shapez.io icon indicating copy to clipboard operation
shapez.io copied to clipboard

improve performance . (game freez in case of big base)

Open mhd-fettah opened this issue 2 years ago • 4 comments

I have been playing the game for 35 hours in that time I created a blueprints have have all the tasks from stage 17-26 all on the same basd all of them optimized from 100% so the final save file size is 5mb (attached) starting at level 21 I started to see lagging and freezing . now at level 26 . if I try to delete or cut some chunk bigger than 100 block the game freeze for like 30 sec the bigger the chunck the longer the freeze . this issue only happen when deleting or cutting adding somthing new cause no issue .

the CPU , GPU , RAM , SSD . all of them are much less than 100% much less like nothing more than 30% even ,

that's why I thing the problem could be fixed by optimizing the code .

save file attached try to load it and then go delete or cut big chunk . Fettah26.zip

ps : am useing to mods here they are in case the mods may cause the issue . mods.zip

mhd-fettah avatar Jun 10 '23 13:06 mhd-fettah

ps : if you can point to me where in the code base the functionality for deleting or cutting a chunk is I can , double check a code and may came up with a solution for that .

mhd-fettah avatar Jun 10 '23 13:06 mhd-fettah

possible duplicate of #1021, please simulate without mods though

EmeraldBlock avatar Jun 10 '23 14:06 EmeraldBlock

you are right it close to the issue #1021 but different at same time . in #1021 the talk about FPS and the game being single core . but over here I am talking about the problem in delete / cut .

the delete cut take so much more time than any other task like x20 more time .

so I thing the delete function have problem and need optimizing and I think the cause is when deleting somthing there is a function that rearranging all the save file to make up for the missing parts . on the other hand when adding new one it just being added to the end of the file and done,

optimizing or refactoring that part of the code could fix the problem .

mhd-fettah avatar Jun 10 '23 15:06 mhd-fettah

yeah that's why I said possible, since even though yours is about an action instead of rendering, both are probably related to the game's utilization of resources (and that issue goes in depth about it).

also please don't speculate about how the game works, it's all empty words unless you actually look at the code (which I think is in mass_selector.js)

EmeraldBlock avatar Jun 10 '23 16:06 EmeraldBlock