Will my game eventually lag?

Non-platform specific questions.

Will my game eventually lag?

Postby Hblade » Wed Jul 04, 2012 3:54 am

As you guys already know Im making an "I wanna be the Archer" game, and everything is in 1 giant ged file with no filled regions. I managed to avoid the Collision lag, by not having it repeat and using some old fassion tricks, but will the game eventually lag due to the insane level size? It'll have who knows how many worlds, and I can't be bothered to use different ged files now.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Will my game eventually lag?

Postby skydereign » Wed Jul 04, 2012 6:46 am

If you don't control when actors are created, when they receive events, and the like, it is only natural that the game will lag. This is why you use activation regions. Only actors within the current region exist, and therefore you won't run into this lag problem.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Will my game eventually lag?

Postby Hblade » Wed Jul 04, 2012 3:57 pm

Alright thanks. Activation regions should work amazingly.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Will my game eventually lag?

Postby happyjustbecause » Sun Aug 12, 2012 6:21 pm

I've been testing out Night Knight on another computer, and it seems to be going through some decent lag at certain times. Could you tell me how to use the activation regions like you implemented? Is it also good to have actors not receive events when out of vision when possible? I've been doing that. How much does file size affect a game being laggy? Is it all about the code and how many actors are on screen and such?

And how can I improve the collision system? Is that a big component of the lagginess?
Last edited by happyjustbecause on Sun Aug 12, 2012 6:43 pm, edited 1 time in total.
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Will my game eventually lag?

Postby happyjustbecause » Sun Aug 12, 2012 6:31 pm

Oh and I think there's this one thing I've been doing that may be a good idea, but it may not. I've been putting certain animations/images into a single file and making events switch/change the animpos instead of the animindex.

I've even done this with large images such as different types of backgrounds. Is this a bad idea? The background has the create actor include the ChangeAnimationDirection to be STOPPED, but does the fact that there is a large image slow down the game at all?

It does reduce the file size of the game for sure, but it may not be good to prevent lag. I had two types of clouds be 1.7 megabytes and when they were separate files they were 1.2 megabytes each. So that saved .7 megabytes, but do you think it will cause lag?
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Will my game eventually lag?

Postby skydereign » Mon Aug 13, 2012 1:59 am

Large images will cause lag when the screen moves around. If you take one massive background, and compare it with a similar version broken into smaller pieces, the large one will be slower. But, having a lot of clones with pieces of the animation can also be bad, due to large number of clones. While I haven't done too much actual comparisons with it, when working on apalia, we found a good balance.

I'd imagine having a smaller image would be easier for gE, as even if the animation is broken into several small frames, it still needs to remember the next frames. Large images do cause lag, so if you can break things into different pieces (that make sense) you should do so.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Will my game eventually lag?

Postby happyjustbecause » Mon Aug 13, 2012 4:04 am

Yeah, it does seem like it could be good (reduced file size, only 1 file rather than several), but also it seems like it could be bad (large image, having to have ChangeAnimationDirection as Stopped). Do you think I should make things like the image I attached into two separate files? I've been doing this method a lot for my pause menu, because for each thing the mouse hovers over, it lightens up the image.

Actually maybe I could make the image brighter, and just set the rgb values to be lower :), that seems it would be a grand idea actually =D.

Could you possibly go into the activation region? And possibly the collision system being less lag causing?
Attachments
Reset.png
Reset.png (23.83 KiB) Viewed 2008 times
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Will my game eventually lag?

Postby Fojam » Mon Aug 13, 2012 12:38 pm

My game has a lot of code, and the only lag i get is on older generation ipods. it runs fine on all the newer gen ipods and pretty much every computer i run it on.
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron