Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I've been noticing the game always starts running smooth but I think as I build more belts it begins to chug and slow down a lot. My PC is a pretty decent VR-ready one so I don't think specs are a problem. I find I can't really get into any late game stuff before everything starts grinding to a snail's pace. It's been an issue since before this patch too. 

(1 edit) (+1)

Yeah, the problem is that the game has too much to calculate every frame if you have a large factory, and good gpu doesn't help with that. The solution is for me to have programmed it better, but apart from that, a solution that you can try is to minimize items on belts in the world. You can use long funnels, hovering hands, and rockets for long distance item transport instead of belts.

If it still lags, then you can reduce the number of crafters with items in their inventories. Different crafters also take different lengths of time to process if they have items in their inventory. The time depends on the number of recipes they can perform, with the assembler having the most recipes and the barrel having the fewest.

Usually minimizing items on belts does the trick tho. I hope this helps.

I'll give that a shot!

i am not an expert here, but as i know, video card can be used for many not complex calculations like this

(2 edits)

It is probably possible to make item movement on belts parallel, but other components aren't so simple to parallelize so issues could arise from the interactions between the objects in the world. This can be fixed by computing all items at the same time before anything else each frame. It is also possible to make parts of the code run in parallel, like the collision detection function for the items, and the code inside crafters that checks their inventory against the recipe array. The problem is that the functions in gms2 aren't programmed to run on the gpu, and I don't think gms2 has an option to make my own code that runs on the gpu (apart from the shaders), so I would have to make my own engine for that. 

If I was to write my own engine, I would probably try to have all the objects in the world compute in parallel in relation to the same world state (and not in order, updating the world one object at a time like how gms2 computes it), which would open up the possibility of running a lot of it on the gpu, but I think I would have to program everything in the game in a very different way, and I don't have much experience actually writing gpu programs anyway (my experience is limited to the colour replacing frag shaders that the cowgirls use to render). I also don't know how well object oriented stuff works with the gpu.

You are right that parallelization would be good for running a game like this, but I am not experienced enough to make it happen sadly.