• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows GMS2: So Much Lag... Confused on why

A

AngelFireKing

Guest
So im in the middle of create a large world 2d platformer mining/crafting game. The world is quite large. Width: 2048, Height: 4096. And i have a system so that when instances are outside of the view they are deactivated. When i change the width to 4096 and the frames go from 221 to 20... I dont understand this. Can someone explain this to me on why it lags. cause the new instances are deactivated and yet it still drops frames to low to play
 
E

Edmanbosch

Guest
So im in the middle of create a large world 2d platformer mining/crafting game. The world is quite large. Width: 2048, Height: 4096. And i have a system so that when instances are outside of the view they are deactivated. When i change the width to 4096 and the frames go from 221 to 20... I dont understand this. Can someone explain this to me on why it lags. cause the new instances are deactivated and yet it still drops frames to low to play
What are the sizes of your blocks? What's your code for deactivating the blocks?
 
A

anomalous

Guest
Run the built in debugger to check performance related issues first, if you don't already know what the issue is. It's easy to use and essential for serious development. There are tutorials/blogs/manual describing how to use it.
Use average time (underscore t button) when you do it. You can also screenshot that and ask people to help you read it, but it it's usually pretty clear...instance this, function that, takes this much time...etc.

No generic game engine is optimized to handle large, dynamic block game designs, they can be incredibly intensive if done in ways that do not pay attention to optimization. For a first or solo project, they are about an 8/10 on difficulty, FYI.
 

NightFrost

Member
Are you running your de/activation code every step? Because you shouldn't. And if you're familiar with the concept (you didn't mention your skill level) you could divide them into quad trees so you have less overall objects to handle.
 

RangerX

Member
Post your activation/deactivation related post.
Your mistake is probably there since when the screen gets larger you get more lag, just like if more activation/deactivating was going on and slowing down everthing.
 
Top