How to detect what causes bugs in my game

Hello,

I am currently working on the map of my railway simulation game but I realize that the game is starting to lag when it’s not even finished, my map has unions, meshparts and the vegetation is made of transparent parts with decals.

How to detect the source of these bugs ?

I really need your help otherwise I would have worked on my game for nothing since an important map is necessary for railway simulation games

Hope you can help me !

3 Likes

`

Script issue
First you have to go to view (top, center-left) → Output
(some where in the left side), then you lauch the game to test what you are doing, then you have to see the things written in Output. The orange text is usually something that may cause lags eg: infinite loop, usually caused by a while true do script.

Game issue
Performance issue may also be caused,not bye script, but the game itself. What i want to say is if there is to many things (eg. 100 000 part) the game could lag. Make sure to clear the debris while

Graphism problems
if no matter what you try you can’t play the game, you should remove the shadoes or just lower the grapphic settings

2 Likes

Try removing the potential sources of lag one by one. For example the Unions. Using the replace all button, I think you should be able to replace all the unions in your game with something else. Test the game, if it doesn’t lag it was the unions, if it does, it wasn’t. Undo to get your unions back and move on to the next. (you should probably make a backup before doing this as I am not 100% sure that you can still undo action after testing your game.)

2 Likes

Unlike what was mentioned in the first post as much as it sounds as common sense, it may not be just caused by mere parts.

On my first time as a Developer I’ve encountered the issue with sudden spike of lag which was caused by a huge number of created Welds in the entire project. Try removing all Welds that exist using either a command in the Command bar or either manually.
I am not talking about the regular welds that you create in order to make animations and such, I’m talking about the Join Surfaces option in the Studio that when objects are connected, they will create welds inside of them automatically causing major lag in huge projects.

The project may also be affected by how optimized the meshes are. Usually models have up to 3,000 triangles if done correctly.
By checking in Studio the option Wireframe Rendering you can see how optimized the object is. You can check other people’s blender creations on how optimized they are on average. New Modelers tend to go overboard with the lack of optimization.

1 Like

Thanks you all for your reply, i will try your solutions and I’ll let you know what works !

1 Like