Optimisation Tips
-
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.