Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Wrap around map in GM?  (Read 3176 times)

0 Members and 1 Guest are viewing this topic.
Wrap around map in GM?
« on: April 07, 2009, 01:21:31 am »
  • Modrill made the avatar. I command you to like it.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1159
Just out of curiosity, I'd like to know if it is possible to make a wrap-around map (like the Final Fantasy's overworld maps) in GM?
Logged




My Brawl FC is 1289-8196-4511. Don't expect me to be on all the time though.
  • Super Smash Karts
Re: Wrap around map in GM?
« Reply #1 on: April 07, 2009, 01:40:46 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 102
I know that it is possible as I've seen it done before in Game Maker, I'm just not sure how to make one since I don't use it. One potential method for accomplishing this would be by loading the map and objects on it as they come near view, rather than loading the entire map at once, and when the script comes to the "edge" of your defined area, it loops around.

I'm sorry that I can't be of more help than this. I hope that someone with more Game Maker experience can better answer this question or that my suggestion helps you. If you need any help or want me to further explain my suggestion, just let me know. I'd be more than happy to try and help, I just can't promise anything.
Logged

gm112

Re: Wrap around map in GM?
« Reply #2 on: April 07, 2009, 02:01:09 am »
I don't have any experience with GM, but you could possibly check the Y values of the player on the map and have it teleport the character from the top to the bottom. You'd have to do some tricks with tiling to make it work efficiently. Vice versa for the X value.
Logged
Re: Wrap around map in GM?
« Reply #3 on: April 07, 2009, 02:19:20 am »
  • Modrill made the avatar. I command you to like it.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1159
Well, I've thought of making exact replicas of the edges of the map... Like say, half of the total screen from one edge, paste onto the opposite side. Then, move the objects to the middle of said edges once they get to the opposite end.

That still seems like far more work than I should be doing. I'll do it if that's the only way, but I just wanted to know if there was any other way to do such a feat.

I don't have any experience with GM, but you could possibly check the Y values of the player on the map and have it teleport the character from the top to the bottom. You'd have to do some tricks with tiling to make it work efficiently. Vice versa for the X value.

Heh heh, RPG Maker terminology. (Not that I'm saying you're a RM user)
Logged




My Brawl FC is 1289-8196-4511. Don't expect me to be on all the time though.
  • Super Smash Karts
Re: Wrap around map in GM?
« Reply #4 on: April 07, 2009, 09:42:40 pm »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
Well there is just the default action of "Wrap Screen" (the one with the two red bent arrows overlapping) and in the help file it's said to be used in the Outside event. And here's the code from the help file:

Quote
move_wrap(hor,vert,margin) Wraps the instance when it has left the room to the other side. hor indicates whether to wrap horizontaly and vert indicates whether to wrap vertically. margin indicates how far the origin of the instance must be outside the room before the wrap happens. So it is a margin around the room. You typically use this function in the Outside event.
Logged
  • https://colbydude.com

Antidote

>.>
Re: Wrap around map in GM?
« Reply #5 on: May 16, 2009, 03:58:46 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
I know this is kinda old but:
Code: [Select]
if (x > map_w)
   x = 0;
if (x < 0)
   x = map_w-sprite_width;

then repeat changing the appropriate variables for the y coord. GM7 actually has a built in function for this. (map_w is pseudo code btw)
Logged
  • Axiomatic Data Laboratories

DJvenom

super-sage
Re: Wrap around map in GM?
« Reply #6 on: May 19, 2009, 03:30:33 am »
  • Colbydude was here.
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2898
It's plenty doable, but as stated before, you're gonna need to do a few tricks with the tiling in your map (to make it appear as though you're about to walk into the same area) before resetting your X or Y to the correct location...


In frame 1, he's walking...
Frame 2, he's coming upon a tree (loop landmark)
Frame 3, he's passed the loop landmark and unknowingly stepped on a trigger!
Frame 4, he's in a location identical to frame 3, but its actually where he started, thanks to the seamless tiling!!!
Logged
I do art
I ermmm... DID do art
I do art
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.335 seconds with 49 queries.