ID:164065
 
well even tho , i made a game :P i can't really pin point a big issue how and why games lag.

From my experence i believe most lag come from faults in coding... so I NEED YOUR HELP

If you are good coder (i don't think i am :(

-=HOW TO HELP=-

Provide ideas and suggestion on how to eleminate lag

Like this :


Common mistake: Loops
How to fix this problem: provide time between each loop.
Common Mistake: Running lots of loops
Solution: Don't run loops unless they're actually effecting something that someone will actually notice.

For example, a beginner might make the mistake of having all the monsters in their RPG running on continual "Any Players? Yes? Attack them!" loops. In reality, the only time a monster needs to run this loop is when a player is nearby. So it would be better to have all monsters doing nothing unless a player enters the same /area as the monster (if you have your world divided up into /areas) or have players check to see whether there's any monsters within view (or view * 2) and activate them if they're in view. It takes a lot less effort for the computer to scan a player whenever they move than to repeatedly scan around each monster in the game.

Stuff like that. It really doesn't matter how fast a loop runs, as long as it only runs when it needs to run. Better to have 10 loops that run every tick, but only 1% of the time, than to have 10 loops that run every 10 ticks, 100% of the time.