The RPG Maker Resource Kit

Other Game Creation => Game Creation General Chat => Topic started by: :) on January 21, 2007, 10:53:04 PM

Title: Large map, lag [RESOLVED]
Post by: :) on January 21, 2007, 10:53:04 PM
so I was wondering what makes the games lag? Since I am apart of the team making a pokemon group, whats a pokemon game without one LARGE ass map, right? so wouldn't this LAG alot? so I had an idea:

I think that the lag is coming from simultaneously running events. not sure if I'm right.
 I don't think a huge map with no events would lag, right? so my idea is by using switches, STOP every event in each town(part of the large map), but they are activated once you enter the town by placing an event on the ground that would turn the switch on for all the events in the town/ turn the events off from the place you have left.

would that work?
and if not what are some ways of making a pokemon game with a HUGE map/no lag.
Title: Re: Large map, lag
Post by: Lominisio on January 21, 2007, 10:55:28 PM
2 alternatives.

Of course the anti-lag script. That's one way.
Also, what I said about over lapping maps.
Title: Re: Large map, lag
Post by: pliio8 on January 21, 2007, 10:57:34 PM
Most lag, I beleive comes from Paralell(SP?) Processes. You could try an anti-lag script, but that disables all events outside of the veiwing area (Including auto-starts and paralell processes) And i've had no luck with them. But you have a great idea! I'll probably have to try that sometime...

(I feel like a noob talking like this to someone with many more posts than me...hehheh... :=:)
Title: Re: Large map, lag
Post by: :) on January 21, 2007, 10:59:25 PM
lol, don't mind my post count, Im still fairly new. And thanks, I thought the idea was good also.

and so an anti-lag script disables events? cool, and does anyone else think my idea will work?

(p.s lominsio, if this cant be done, I added an anti lag script to the game)
Title: Re: Large map, lag
Post by: pliio8 on January 21, 2007, 11:06:11 PM
Well my problem is that the Anti-lag scripts disable Auto-starts and such.

As in my game I have an evented DDNS,weather,and map change system. Which of course, means they are disabled...

But in a game with no auto-process this could work. (Though they would never work for me)
Title: Re: Large map, lag
Post by: :) on January 21, 2007, 11:07:54 PM
so, it would work in a pokemon..since its not really stopping anything that is in view.

anyways still want to know if anyone think/knows that my idea is better then an ani-lag script?

hmm...but I to have a Day/night, but mine is a script sO i dont think the anti-lag will effect it.
Title: Re: Large map, lag
Post by: pliio8 on January 21, 2007, 11:10:53 PM
It depends.....if the towns are on separate maps, then no...but if they are on the same map. Then this would work IMPOSSIBLY well for it.
Title: Re: Large map, lag
Post by: Yami on January 22, 2007, 03:48:15 AM
The way you could make the maps look like they are the same but they are really changing, is at the end of each map, draw the first bit of the next map that it is going into.  Then make the teleports before you get to the edge.  And they teleport to a little past the beginning of the next map and there is no screen transition.  That would make it look like you are not switching maps at all.
Title: Re: Large map, lag
Post by: :) on January 22, 2007, 03:49:30 AM
wow. thats really smart thinking. and I will try it and get back to you.

Edit: Maybe I'm not doing it right, but even when I do that, there is a short pause and screen shake. maybe I'm not doing it right. does anyone have a demo of this working? or did yami just now think this amazing idea up.  ;8
Title: Re: Large map, lag
Post by: Yami on January 22, 2007, 03:59:27 AM
I just thought it up, but I'll try it too.
Title: Re: Large map, lag
Post by: Fortis on January 22, 2007, 04:03:31 AM
If your doing that why not just make a big map?

*Realizes this is what is causing the lag and shuts up*
Title: Re: Large map, lag
Post by: Yami on January 22, 2007, 04:09:35 AM
I got it to work without being noticed except when you switch maps, it lags for about a half-second.  I'll keep working on it a little more
Title: Re: Large map, lag
Post by: Lominisio on January 22, 2007, 04:10:47 AM
The way you could make the maps look like they are the same but they are really changing, is at the end of each map, draw the first bit of the next map that it is going into.  Then make the teleports before you get to the edge.  And they teleport to a little past the beginning of the next map and there is no screen transition.  That would make it look like you are not switching maps at all.

Thats what I was talking about with overlapping maps. :P I used to have a perfect working example. I'll see if I can find it.
Title: Re: Large map, lag
Post by: Blizzard on January 22, 2007, 10:39:40 AM
Ok, let's clear this up:

1. Lag



2. Anti-Lag scripts

Title: Re: Large map, lag
Post by: Ravenshade on January 22, 2007, 12:05:50 PM
Pokemon games...i.e crystal, gold...the game boy stuff, don't have large maps if you've noticed, just single blocks of land that have few events and then you go to a new area etc...
Title: Re: Large map, lag
Post by: Lominisio on January 22, 2007, 01:39:34 PM
Pokemon games... i.e. Ruby, Sapphire... are one big map if you've noticed
- Except for the inside of houses and stuff. :P
Title: Re: Large map, lag
Post by: Blizzard on January 22, 2007, 02:03:56 PM
Not really... The transition between maps is only executed very unnoticable. No way these maps could fit into a Game Boy Advance RAM.
Title: Re: Large map, lag
Post by: Lominisio on January 22, 2007, 02:33:29 PM
That's why I was insisting they were overlapping maps because it wouldn't be possible for them to run otherwise.
Title: Re: Large map, lag
Post by: :) on January 23, 2007, 01:04:36 AM
so, anyone have any luck on making a non glitch transition between the different maps?
Title: Re: Large map, lag
Post by: Yami on January 23, 2007, 01:06:05 AM
Mine didn't have a glitch except for it stops your step when you switch maps (so you can tell cause there's like a 1/4 second moment when you aren't moving)
Title: Re: Large map, lag
Post by: Lominisio on January 23, 2007, 01:07:11 AM
I found mine but when I actually tried it, there is a slight lag. Not that noticeable but it is there.
Title: Re: Large map, lag
Post by: :) on January 23, 2007, 01:10:50 AM
Mine didn't have a glitch except for it stops your step when you switch maps (so you can tell cause there's like a 1/4 second moment when you aren't moving)

ya...we need to over come that.
Title: Re: Large map, lag
Post by: Irock on January 23, 2007, 06:11:47 AM
I wonder how Zelda Windwaker did it...it's basicly one map.
lol


But if the game isn't going to use auto starts I would suggest an anti lag script.
Title: Re: Large map, lag
Post by: Blizzard on January 23, 2007, 11:31:35 AM
I wonder how Zelda Windwaker did it...it's basicly one map.
lol

You're not seriously believeing that...?
Title: Re: Large map, lag
Post by: Ravenshade on January 23, 2007, 11:49:59 AM
yay -6 rep!

Okay, so imma little random but still.

Sapphire and Ruby were large maps yes, but they weren't one giant map, they did overlap though, yet somehow the managed to prevent the screen going dark...hmm. I wonder how they did that.
Title: Re: Large map, lag
Post by: Blizzard on January 23, 2007, 12:06:46 PM
Lol! You can program if you want the screen going dark. You don't have to. I added the dark-screen feature in RMXP. I mean you can also put a few maps like this together in RMXP that look like on big map. Just turn off the "Fade effect" when you use it.
Title: Re: Large map, lag
Post by: Ravenshade on January 23, 2007, 12:10:09 PM
lifty...so that's why there is a little lag...in my poke games....hmm...anyone notice it lags in Fable, Halo, and other games like that....
Title: Re: Large map, lag
Post by: Blizzard on January 23, 2007, 12:37:55 PM
Ah, you noticed. ^^ That's the overfade between 2 maps. Music usually also changes.
Title: Re: Large map, lag
Post by: Ravenshade on January 23, 2007, 12:56:22 PM
heh, I only notice because i play for like hours at a time
Title: Re: Large map, lag
Post by: :) on January 23, 2007, 02:23:35 PM
But that still comes to the problem of the short 1 second lag after going to the next map, even with fade off.
Title: Re: Large map, lag
Post by: modern algebra on January 23, 2007, 05:46:24 PM
Your original idea seems like it would work. If whenever you entered a town you turned off all but the events that are in the town, I don't think you would get lag. The script might be more convenient though...
Title: Re: Large map, lag
Post by: Yami on January 23, 2007, 07:47:51 PM
No, you might be onto something.  Each event that is tied to a certain area has a prerequisite to it that a switch is turned on.  The switch gets turned on when you enter the area.  What you do, is at the entrance of each area, there is a line of events that turn the switch for that area on.  When that switch is on, the events appear.  When you leave, the switch turns off, and the switch for the area you are heading into turns on.  That makes it so only the events that are in the area that you are in are turned on, and that gets rid of a bunch of the lag.
Title: Re: Large map, lag
Post by: :) on January 23, 2007, 11:25:27 PM
that was want I meant on the first page  ;D , but wont their still be lag? it would still end up being a HUGE map.
Title: Re: Large map, lag
Post by: landofshadows on January 23, 2007, 11:37:04 PM
You could make each map area as seperate maps, and then make screen dumps of them, when you reach the edge of a map make a picture show of the to tiled maps next to eachother pan what ever way you walking then fade off...

So when you reach the edge of the screen to teleport to the next area, it displays a JPG of the Map you on and scrolls to the next section, you then appear on the next section and start walking... Like the first outings of Pokemon on the Game Boy...The will be a Transition, but a purpose one... keep it uniform and fairly fast I think it would look pretty cool.
Title: Re: Large map, lag
Post by: modern algebra on January 24, 2007, 12:02:46 AM
I wouldn't think that there would still be lag. I am under the impression that lag is caused by too many events running at the same time, and so turning off all extraneous events should get rid of the lag. Unless loading the map itself causes lag, your idea should work.
Title: Re: Large map, lag
Post by: landofshadows on January 24, 2007, 12:06:47 AM
If there are many Events I guess you could try the Anti Lag script, it works very well...

Or try putting all the workings of an event on an off state and when you reach certain places turn them on, like as you enter a town turn a switch on to activate all the events by the doors of the houses for example.

Same with enemies appearing...

To be honest I don't know if an Off Event causes lag as much as an event thats switched on ?
Title: Re: Large map, lag
Post by: :) on January 24, 2007, 12:08:13 AM
if I was right at the start, and My idea would work...then wouldn't an anti lag script work better, and save time?
Title: Re: Large map, lag
Post by: Yami on January 24, 2007, 12:28:27 AM
Anti-lag scripts can cause bugs with parrallel process though, but I guess it wouldn't hurt to try.
Title: Re: Large map, lag
Post by: landofshadows on January 24, 2007, 12:29:48 AM
The one by BLizzard the all in one script could be worth looking at...

His scripts are pretty tight...

Just save your game again but as TEST or some thing, so you have two copies and play around with some scripts... It can't hurt...
Title: Re: Large map, lag
Post by: :) on January 24, 2007, 12:31:12 AM
eh, I guess I will try and get your idea working, but if I can't get it perfect I will just do my idea, it won't be too bad. and maybe even just split the world map in half, and use your idea once, instead of at each new town, so one spot of a 1 second lag won't be too bad.

O, lol idea. At that spot, I will make it in the grass, and have a Battle come up automatically, but when your done, you are in the new map..lol that would work so well.
Title: Re: Large map, lag
Post by: Yami on January 24, 2007, 12:39:50 AM
Yeah, except you could exploit that by going back and forth through it to get fights fast.
Title: Re: Large map, lag
Post by: :) on January 24, 2007, 12:41:39 AM
and that....wait actually no! I will set up a complex system of events in that area, and overlay the map pretty far so its different each time, what you guys think of that?
Title: Re: Large map, lag
Post by: Yami on January 24, 2007, 12:47:43 AM
I guess that would work XD
Title: Re: Large map, lag [RESOLVED]
Post by: :) on January 24, 2007, 12:50:50 AM
yay! solution found.

but if anyone has imput please post.
Title: Re: Large map, lag [RESOLVED]
Post by: landofshadows on January 24, 2007, 12:52:14 AM
I would always make a 2nd copy before trying the untried Matey... Is this another game your making then ?
Title: Re: Large map, lag [RESOLVED]
Post by: :) on January 24, 2007, 12:58:03 AM
yes, its not my main one..I was going to start it after my lod game was done since I had the pokemon idea...but lominsio posted the game before me...if I have to which I hope not, I will have to leave the group ,focus on lod, and make my own pokemon game after words..
Title: Re: Large map, lag [RESOLVED]
Post by: Yami on January 24, 2007, 06:34:24 AM
I was just playing pokemon red and i noticed something....

when you leave town & switch areas, there is the slight lag I was talking about.  It's really subtle, but you can see it.
Title: Re: Large map, lag [RESOLVED]
Post by: :) on January 24, 2007, 11:56:08 PM
hm...your right! I just played pokemon red, and there is one...but most happen with the music change, maybe thats something