What is the easiest way is to create a toroidal universe style map in MMF? For example, if a character were to walk far enough in one direction (say two screen widths) he/she would come back on the other side. The same would happen in all directions. If anyone remembers 'Dungeons & Dragons' for the Mattel Intelivision games console then you'll know exactly what I mean.
Thanks for the info but the main character will always be centered with the world/universe moving around him/her. I can do this part but not sure how to wrap the background (say, four times the screen size) and not the character. I take it that no one remembers 'Dungeons and Dragons' for the Intellivision then?
There was a question like this recently. You might be able to find the thread somewhere.
But a good way to do it is to make half a screen width extra at the edge of the world the same as half of the screen on the other edge. Then make the object move to the position on the other side of the level.
If done right it will be seamless.
i could make a tutorial because it's dead easy to make really. Even for someone useless at programming like me.
Andy... just tried it... looks good, many thanks. Earlier I had recovered something similar which I remember doing many years ago (I knew it was on disc somewhere). Mine works differently by the repositioning of quadrants of the universe rather than the character itself... it wasn't seamless like yours though unless I were to use a thick border... seems so obvious now, cheers.
Andy, something has just occurred to me... what happens if you have monsters roaming the maze/universe? I think they might appear and disappear depending on the location of the character as some screens are duplicated.
Andy, I've also noticed that the faster the character moves through a screen at the edge the more noticeable the change. I couldn't find that earlier post that you mentioned... do you remember any words in that question... then I could do a search, cheers, Dave.
By the way I tried a few enemies but they were all a bit quirky in their movement. I set them to ball movement (using the same four lines of code for wrapping) and followed them with the main character to see what they did. At the wrap point sometimes they would disappear then reappear... couldn't work out what was going on... so I gave up...
I remember doing this by having the enemies not scroll with the background, and move in the direction opposite the player when the player moves.
keyboard: repeat while 'right'
--Player: set X to X(Player)+1
--Enemy: set X to X(Enemy)-1
That was an arcade-style game though (a Fantasy World clone), and would probably foul up if you needed enemy background collisions, unless you had half the playfield replicated in each direction around the playfield rather than half a screedwidth. But the advantage is you're taking advantage of one of MMFs object positioning modes rather than manually repositioning dozens of objects when you wrap.