Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Mirror reflection for 2D character  (Read 8096 times)

0 Members and 1 Guest are viewing this topic.

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Mirror reflection for 2D character
« on: October 28, 2017, 11:30:13 PM »

Dear Muties!

I've got a question that might have been asked several times, yet the replies I managed to find don't seem clear to me. Since the question is pretty common for adventure games, I assume lots of people could be interested in a solution.

I'm planning a 2D game similar to The Cat Lady in the aspect of flatness and only horizontal movement of characters.

My question is: Is there a feature in WME to get a reflection as a 2D character walks past the mirror?

Step-by-step instruction would be great to see.

THANK YOU for your attention. I posted another question on this forum before, so I know you guys are friendly and very smart.

Also I keep saying THANK YOU to Mnemonic. Hello to odnorf, Jerrot and Azrael.  ::wave
Logged
Owls are not what they seem...

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Mirror reflection for 2D character
« Reply #1 on: November 02, 2017, 05:46:05 PM »

Hey WME community!

Seriously? No way to create a mirror effect in WME? Nothing like in the screens? What about The Lost Crown? There WAS a mirror in the bathroom location..Now that was 2.5D game created with WME. Shouldn't there be same feature for 2D game?

Thanks for your attention and help!












Logged
Owls are not what they seem...

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Mirror reflection for 2D character
« Reply #2 on: November 03, 2017, 12:32:03 AM »

Sorry to disappoint, there is no such automatic feature, but if it's important then no doubt you could "fake" the effect by creating a suitable 2D graphic, you could trigger in with an actor entry event to a region.

With sufficient attention to detail, you could creating a pleasing effect

"smoke and mirrors" as they say in the trade.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Mirror reflection for 2D character
« Reply #3 on: November 07, 2017, 11:38:22 AM »

Sorry to disappoint, there is no such automatic feature, but if it's important then no doubt you could "fake" the effect by creating a suitable 2D graphic, you could trigger in with an actor entry event to a region.

Hey eborr! Could you please explain this in more details?

Big Thanks for your reply!
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Mirror reflection for 2D character
« Reply #4 on: November 07, 2017, 04:13:49 PM »

I think eborr means that you "simulate" the mirror with a second actor entity. It will not be very straightforward but I think you can achieve this with some work.

So, you create a second actor entity with the same animations as your main actor. You arrange so that the area below the mirror is a Sprite Entity. In this sprite entity you will set an image. The image must be the area below the mirror. This way, you will place your second actor behind this area, so that his lower body is cut off. Perhaps the image should extend left and right of the mirror, so you can show part of the actor as he enters the area in front of the mirror.

Then, you will set a region entity on the floor around the mirror. You can catch the event ActorEntry inside the region and start your code. The code must copy the main actor's movements, meaning for every move the main actor takes, the second actor must do the same (right-left). For up-down I guess you want the opposite movement.

Then, you can catch ActorLeave event to stop this behaviour and perhaps unload the second actor.

I have described it very roughly and probably missed some important points (maybe eborr meant an animation instead of a second actor entity?). I guess you can start and then seek help here again when you are stuck.
« Last Edit: November 07, 2017, 06:25:58 PM by anarchist »
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Mirror reflection for 2D character
« Reply #5 on: November 07, 2017, 07:12:45 PM »

I have described it very roughly and probably missed some important points (maybe eborr meant an animation instead of a second actor entity?). I guess you can start and then seek help here again when you are stuck.

Hey anarchist, Thank you a lot for your kind explanation. I don't think I've got a clear picture of what exactly should be done step-by-step, yet I'll try to figure out. If I get stuck, I'll post a new message here. Probably the topic is interesting to many game developers (mirrors are frequent in adventure games), so will try to share my experience as a tutorial in the end.
Logged
Owls are not what they seem...
 

Page created in 0.039 seconds with 19 queries.