A small bit of code demonstrating how to make a reflective floor in MMF 1.5 / 2.0. No extensions required. Please let me know what you think, as this is my first example file. Thank you! ^_^
Printable View
A small bit of code demonstrating how to make a reflective floor in MMF 1.5 / 2.0. No extensions required. Please let me know what you think, as this is my first example file. Thank you! ^_^
Very cool example! - Thanks for sharing it.
Very awesome! It's nice!
There's a few bugs in it thought simply because the reflection is a copy of the actual active, and not a 'real' reflection, so I get stuck on that rock, and the actual character quits showing the running animation, yet the reflection still is.
Good idea for this too if someone uses it: Show invisible wall cutouts and enemies in the reflection, but not in the actual world for a challenging game <img src="/center/images/graemlins/laugh.gif" alt="" />.
Walk through walls, but walk in air in the reflection... etc.
That'd be cool.
Ive played at least two games that did this at some point, I think 2 of them were mario games (64DS and Paper Mario),
Would something like this be easyer to do with ViewPort?
but it would be slower
I don't think using ViewPort would make it slower. Actually I think it would speed it up a bit if you use many objects. That way you don't need to make flipped objects for every object and control them with events.
I'm not familiar with the viewport object, it would be interesting to see someone do this with it and post it here so we can test and see which would be faster indeed.
Great example! thanks very much for sharing!
Thank you all! I made it before the Viewport object was around I think... but I may remake it using the Viewport object. This way it can be used in games a bit more effectively! ^_^
I changed a few things in the example to use ViewPort object and it is attached to this post.
It now only uses two simple events: Collision with the obstacle, and an 'always' event.
You can add as many objects as you want to this example and without coding anything, you will have them reflected in the floor <img src="/center/images/graemlins/laugh.gif" alt="" />
The floor in this example stretches the entire visible area down to fit the watery floor but you can easily change that by setting the 'height of rectangle' parameter to 70 instead of 128.
I like this version alot better than mine... not to mention it's alot easier to understand. ^_^; Very nice!
A little update,
Nice improvements, so I added some little refinements.
- Stop moving off screen
- Layer of collision the same as wall.
Very nice, but I don't like that you can't move offscreen at the top of the frame. It makes the platform movement bug (makes the character stick to the top if you hold the jump key) and it doesn't make sense that the sky has a "loft" <img src="/center/images/graemlins/wink.gif" alt="" />
I'm using the exact same technique in the game i'm making, AGAIN! It's weird seeing these ideas i put into my game popping up independantly on the click forums <img src="/center/images/graemlins/smile.gif" alt="" />