How can I optimize my game?

Hello, it’s me again I have taken a break from my game but now I’m back and determined to make some good progress.

But enough of that what I’m really here to do is to ask you how I can optimize my game to reduce lag. I have already compressed almost every texture in my game, and I try to keep my game simple by using low poly models and basic particles, but I still experience lag.

I know it’s not the computer because I switched from a Chromebook laptop to an Asus Tuf Gaming 15

And this laptop is really good at running high end games, (I have downloaded and played such games myself) so I don’t understand how I can have an almost lagless playthrough with a Game like Beamngdrive, Teardown, Minecraft, or even all the other horror games I have downloaded, (For inspiration) yet I’m drowning in lag with my simple game.

So, I decided to ask you guys for help. If there is anything I can do to help ease this lag.

Thank you ahead of time, to be honest I would not have gotten this far without you. (I guess that is your Job here anyway, to help people like me:)) But thank you very much and have a nice day!

Hi @DinoCalebProductions!

The resolution of your textures is also very important. Also the amount of lights and cameras in your scene can make a big different. More information on the page below. (If you share a link of your project someone can take a look if you want).

https://developer.playcanvas.com/en/user-manual/optimization/guidelines/

2 Likes

OK thank you very much for your help. I will read into this and see what else I can do. Thank you!

You may want to check the resolution difference of displays. Usually the first culprit is fillrate and the other is the refresh rate of your display. If you have a link to the project, there could something simple in your game causing the issue.

Here you go, PlayCanvas | HTML5 Game Engine

This should be the editor. Thank you very much for taking a look.

After all the shader compiles, it seems to be running at a smooth 60 on my display. Do you have a video showing the frame drops?

Sorry for the late reply I had to get some school work done.

I tried to post a video once before on the forum, but it didn’t let me.

Also, last night I did batch some of the objects in my ‘Game’ scene, mainly all the characters, But I didn’t have time to test the frame rate.

I will try to record a video but I don’t know if I will be able to show it here.

I tested my game now after batching my characters, and for some reason they are all acting funny.
It’s like batched objects don’t play animations. Is there a way to fix this or I just have to batch static objects only.

also, template objects with bones stay in a T-pose position rather than staying manipulated as I had left them.

The gameplay is smoother now though.

I did an experiment and found out that I shouldn’t batch dynamic objects.

Thanks for the help now.

I guess its solved!

Currently the batching feature does not support skinned meshes, as you have found out. They can be dynamic, e.g. a box can move around by physics, or you can move a model by script, but no animations.

2 Likes