Optimisation Tips
-
I thought it would be a great Idea if we could give our tips on optimisation!
One of my tips is to be careful about graphic format. Having a graphic that is 1000px by 1000px that is shown in very small on screen all the time can affect performance ( this is a very big example but you should be careful with it ).
I'm not sure but I also find out that small graphic ( 240px by 240px for example ) that are shown in very big ( 500% ) can affect performance. Knowing what you'll get on your screen is important! -
@XxWhiteHearrxX i dont know if anyone else does this but i thought i would mention it on optimization tips as well. I created a layer with an empty object to show the boundaries of where each phone screens are. Since my game is vertical i needed to see where the sides are. I found out that simply hiding this layer is not enough. If you turn on your boundaries option you will see a full blue screen. This was the reason why my FPS kept dropping. So for a tip. If you have a layer simply just for referencing purposes. Be sure to delete it within the final build of your game.
-
Instead of using multiple timers, use a single timer that broadcasts a message each interval. This will work, assuming all the timers you intention to have use the same interval duration.
-
One often overlooked thing with images, is keeping the blank space to a minimum. What I mean by this is if you have say a ball that is 128x128 pixels, to crop it as close as possible with minimal transparent space around it.
So don't have a 128x128px ball with a blank 1024x1024px canvas around it.
-
Idk if this tip comes under optimisation, but...
If you're using timers for every frame, as of the current version now I think it stutters a little bit (for example if you use timer 0s move an object a bit, it doesn't move smoothly). If you want it to be more smooth, use 0.0166666666666666 instead of 0. -
@Murtaza is it possible to have the graphics editor find the closet crop possible automatically with a push of a button? Or even have this as an Import feature such as when you import an imager bigger then 2048 hyperpad asks you if you want to resize it. This close crop feature was actually a feature in the kwiksher plugin software i used to make for games.
-
@SplitMindGaming There should be other apps out there for that. HyperPad is for programming, not image editing. Except of course if we can make our own image editors :P
-
@SplitMindGaming said in Optimisation Tips:
@Murtaza is it possible to have the graphics editor find the closet crop possible automatically with a push of a button? Or even have this as an Import feature such as when you import an imager bigger then 2048 hyperpad asks you if you want to resize it. This close crop feature was actually a feature in the kwiksher plugin software i used to make for games.
When importing animation frames hyperpad already does this already. It crops and removes all the white space and rotated and positions everything on the sprite sheet to be fully optimized and reduce space.
-
@Murtaza oh nice.
-
Do you guys know if its better to just have all the coding into one object label? Would this increase performance? Also what are the rules for empty objects. If i use a large 1000 by 1000 empty object would that decrease performance or are empty objects written in code and it doesnt really matter how big they are.
-
@SplitMindGaming I think sometimes it can be better to have all your coding in one object, but it depends on what is happening. If you're spawning in lots of objects, it's more efficient to have as few behaviours inside the spawned objects as possible.
I'm pretty sure big objects are ALWAYS laggier than small objects no matter what type they are.
-
@Aidan-Oxley what about particles. Would you say a full screen particle system such as snow effect will lag the system?
-
@SplitMindGaming In one particle effect, if you set the particles to spawn over a 1000, it can affect performances. Also if you set the size of the particles to the maximum. I rather like making snow effects with not a lot of particles ( like 200 ) and make them small but still visible. I also think that the blend mode of the particles can somewhat affect performances but I'm not sure.
-
@SplitMindGaming Each single particle (as in one of the objects making up the particle animation) causes way less lag than actual objects, otherwise the same rules apply to particles, more particles or bigger particles will cause more lag.