The Daily Click ::. Forums ::. Klik Coding Help ::. Toroidal universe in MMF 1.5
 

Post Reply  Post Oekaki 
 

Posted By Message

Dave S.



Registered
  26/09/2003
Points
  924
11th November, 2007 at 13:24:35 -

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.

 
n/a

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
11th November, 2007 at 13:55:02 -

There's an option that you can set a condition for when the character leaves the play area, that the movement will loop, i.e he will appear at the otherside and start again.

 
My signature is never too big!!!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
11th November, 2007 at 14:08:26 -

Only works for the built in movements I think.

 
Craps, I'm an old man!

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
11th November, 2007 at 17:50:23 -

Well, its not that hard to do anyways even if its not possible with custom movement (i think it is tho. not sure). compare x and y pos of the character.

e.g

Hero X Pos >400 - Set Hero Pos X = 0
Hero X Pos <1 - Set Hero Pox X = 399

Something of that sort. it should work for both x and y.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

Attan



Registered
  13/03/2007
Points
  136
11th November, 2007 at 17:55:48 -

Make it bouncing ball movement, and set the speed to "0". Then create whatever custom movement you want and write:

*(object) leaves the play area
-(object) wrap around play area

Think that is the easiest way. Then you have to make the camera move smoothly and not make an ugly jump when you wrap around (if you have scrolling of course).

 
n/a

Dave S.



Registered
  26/09/2003
Points
  924
12th November, 2007 at 04:19:16 -

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?

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
12th November, 2007 at 11:13:23 -

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.

ok done

http://www.ectoprods.com/uploads/wrap.zip

made with The games factory.

Image Edited by the Author.

 
.

Dave S.



Registered
  26/09/2003
Points
  924
12th November, 2007 at 16:17:51 -

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.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
12th November, 2007 at 20:19:37 -

no problem mate.

 
.

Dave S.



Registered
  26/09/2003
Points
  924
13th November, 2007 at 03:15:10 -

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.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
13th November, 2007 at 10:53:54 -

i never thought of that.

maybe you could make enemies move along with the player?

as in keeping track of how far away the enemy is from the player and whenever the player hits one of the edges the enemies position is changed to make it appear the same distance away.

If i'm right it would appear to never have moved.

 
.

Dave S.



Registered
  26/09/2003
Points
  924
14th November, 2007 at 16:51:41 -

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.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
15th November, 2007 at 11:20:40 -

You might be better off just looking through the links manually since there aren't all that many topic in code it.

um... this might be it, but i'm sure pixelthief made a diagram showing how to make it yourself...
that code by davince might be usefull.
http://www.create-games.com/forum_post.asp?id=200967



 
.

Dave S.



Registered
  26/09/2003
Points
  924
15th November, 2007 at 15:40:58 -

Tried the link... but who is pixelthief? It's basically what you said all along. I'm trying to work out what DaVince has written... cheers mate.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
15th November, 2007 at 17:21:22 -

Pixelthief is the bloke with the cookie monster avatar.

 
.
   

Post Reply



 



Advertisement

Worth A Click