the best ways to prevent lagging?

Non-platform specific questions.

the best ways to prevent lagging?

Postby poopbrigade » Wed Feb 02, 2011 12:07 am

hello every one,umm
I would like to know what are the best ways to prevent lagging
when making a game....


thanx in advance :D XD.
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: the best ways to prevent lagging?

Postby AliceXIII » Wed Feb 02, 2011 12:18 am

always use fps that are divisible by 2, makes the game more stable..
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: the best ways to prevent lagging?

Postby poopbrigade » Wed Feb 02, 2011 12:35 am

XD thanx..is that for the animation? fps
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: the best ways to prevent lagging?

Postby AliceXIII » Wed Feb 02, 2011 2:44 am

for the overall game properties. animation frames just pretain to how many frames of the animation there are :D
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: the best ways to prevent lagging?

Postby poopbrigade » Wed Feb 02, 2011 3:49 am

XD ahh the one in properties, I don't usually touch that....
I've just understand its purpose today.. I always wonder why my animation speed never goes beyond 30 when I set it..
XD LOL... and are there other advice/s you can give me anyway..thanx by the way +1
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: the best ways to prevent lagging?

Postby AliceXIII » Wed Feb 02, 2011 4:29 am

most of it's going to be how well your code is done :P
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: the best ways to prevent lagging?

Postby skydereign » Wed Feb 02, 2011 7:28 am

One way is to use activation regions. To sum them up, they cut up your game into sections, so when you are in an activation region, only those actors "exist". So if you had a separate levels, the enemies in only the current region will act. If you need more explanation, you can search the forums, or ask here.

A similar effect is to disable events for actors not in the screen. This setting can be set for actors in the actor control panel.

Some tips, if you can avoid draw actor events without changing what you want to do, you should. Also, avoid redundant events, of course, but definitely when dealing with clones and collisions. An example, if you are making a shmup, you can give the bullets or the enemies the collision event. There will be lots of clones of both, but, usually there will be more bullets then enemies. In that case, give the event to the enemies.

There are some other general tricks when making your game, but those were the big ones. If you search around, you can find more tips, the link below is full of good tips.
http://game-editor.com/forum/viewtopic.php?f=5&t=6854
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: the best ways to prevent lagging?

Postby poopbrigade » Wed Feb 02, 2011 8:37 am

@skydereign thanx +1
the tutorial is very helpful... I did notice that post but never read it..
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: the best ways to prevent lagging?

Postby BloodRedDragon » Sun Feb 13, 2011 8:25 pm

Skydereign basically explained all of what I was going to say..
BUT!
Also change the resolution to no more than 800x600, maybe even less. You're stuff will appear more pixellated in fulscreen but it means you have space for less actors and images on screen, therefore less lag.
Oh yeah don't have millions of actors on screen at the same time :)

The sad thing is that ive found out that even with just one moving actor, GE has a tiny bit of lag anyway. It's definately not my PC, as it has a dual graphics slot, but having said that, lag can be down to your PC :)
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: the best ways to prevent lagging?

Postby Game A Gogo » Sun Feb 13, 2011 10:53 pm

AliceXIII wrote:always use fps that are divisible by 2, makes the game more stable..

Correction, it's 8,16,32,64,128,256,512
48 seems stable as well
Setting FPS higher will make things faster somehow. but too fast at time as well
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: the best ways to prevent lagging?

Postby poopbrigade » Sun Feb 13, 2011 11:37 pm

XD thanx +points...
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: the best ways to prevent lagging?

Postby candy123 » Wed Feb 16, 2011 9:39 am

Beneficial info you got here!
Bring me to the sea of cosplay, reminiscing through some chocolate ice.
User avatar
candy123
 
Posts: 3
Joined: Wed Feb 16, 2011 9:36 am
Location: http://www.mycosplayclub.com
Score: 0 Give a positive score

Re: the best ways to prevent lagging?

Postby AnarchCassius » Sun Feb 20, 2011 8:56 pm

Do not use an infinite tiling actor if your gamespace is finite. Which unless you're doing Escape Velocity type game it probably is, even then you may want a system cut-off. This may not be true for very large stages but replacing my tiling background with a function to draw tiles behind the gamespace saved me a lot of FPS.

Likewise always disable collision state when you don't need it. You might think not having any collide events is good, but the game is apparently still "considering" these pixels, if not as intensively, unless you actually disable collision itself in the Create event. Although I haven't tried to confirm this I also imagine that your background will cause interference with the CollisionFree test otherwise.

With these two fixes my slow machine no longer drops FPS by 10-50% when the player or camera is in motion. It's actually pretty hard to get lag on modern machines for me, so a slow one hopefully gives a closer approximation of a mobile device's capacities.
AnarchCassius
 
Posts: 55
Joined: Sat Jan 29, 2011 1:33 am
Score: 6 Give a positive score

Re: the best ways to prevent lagging?

Postby Hblade » Thu Feb 24, 2011 1:04 am

Convert your graphcs to 16 bit. Or 24bit.
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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest