![]() From my experience even if you just try to move an object in GDevelop, sometime it lags without doing anything else, but move. This is all I can think of right now but I need to admit, even with all these techniques I have never been able to make a smooth experience in GDevelop. Instead of scaling down too big images, always make them to be just the right size to fit the game. In case something can be deleted from the scene or created on the fly, always check if there is any in the scene before doing anything to them, with them.įinally, it always a good practice do not use huge images in your game. It a complete waste of resources to try to check conditions on something that don’t even exist. sub_event: bullet is in collision with enemy Before try to move a bullet and check collision with a bullet, make sure there is any bullet in the scene. In case you are deleting, creating objects on the fly, before trigger any events on those objects, check if there is any objects in the scene at all. In this example, if the mouse is over the button is going to be checked only if the mouse is pressed, this way you don’t waste resources on checking if the mouse is over the button even if it don’t even need to be checked (the mouse is not pressed). sub_event: mouse is over button : do something ![]() For example if you want to create a button that can be clicked and you want to do something when it is clicked: For the most part, collision shapes and simple shapes should work just fine but in case you need a complex shape try to use few polygons only, the less is better.Īvoid using multiple conditions in the same event, try to brake up the conditions in to sub events instead. When you check collision, you may need to consider to use a timer and check collision only every 0.2 seconds, this way the collision check is going to be triggered only 5 times a second instead of 30 or 60.Īlso, try to avoid using pixel perfect collision checking as it is extremely resource hungry. Generally, you need to make sure you trigger events only when needed and only as many times as needed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |