paxset.blogg.se

Animated sprite game maker studio 2
Animated sprite game maker studio 2





animated sprite game maker studio 2 animated sprite game maker studio 2

Optimize Your Use of Step Events Step Events are, of course, called every step. Whenever possible, turn off "Precise collision checking," which is a per-pixel collision detection method.

animated sprite game maker studio 2

If you need to look up the return value of any slow function more than once, consider putting the value of the collision in a variable and check the variable instead. Make sure you're not doing the same collision check more than once in a single step. Collision functions (and trig calculations) in general are pretty heavy, so it's a good idea to have as few of them as possible. make sure that event goes in the player object instead of the bullet. You obviously have to do a collision check between the two objects. A good example is the player versus the 100 bullets. So place those events in the objects which will have the fewest instances. Do Fewer Collision Checks Objects that have collision events are much slower than objects that don't. Background details that you don't actually interact with are perfect tile material. You can actually do a lot of things with tiles, like create and destroy them, set their depth, get their position, etc. Use Tiles Instead of Objects Tiles are much, MUCH faster than objects, so you should use them in place of objects whenever you can. If you set the argument "notme" to true, the object will ignore itself in the deactivation. Instance_deactivate_region(view_xview, view_wview, view_hview, false, true) instance_activate_region(view_xview, view_yview, view_wview, view_hview, true) Make sure you don't deactivate important objects (like the object calling the code!). For example, put this in the Step Event of an invisible object that sits in each level: Try deactivating anything that's outside of the player's view, and destroy anything that's outside of the room. To that effect, instance_destroy() and instance_deactivate() are your friends. And the more work an object is doing each step, the slower it will be, so take care to make sure nothing is awake if it's not needed. I've heard that ~50 instances is the most that you should have awake at once. Deactivate/Destroy Unused Instances Object instances slow down Game Maker a LOT. And now I pass that knowledge down to you! Here are some tips, from what I think is the most important, to leaster. But with a little research, and some good advice from experienced GM users, I started to make some optimizations to my game that significantly increased its speed. Game Maker is kind of notorious for being slow anyway, so it didn't take long for me to hit its limits. Optimizing Your Game Maker Game Intro: Since I'm a pretty mediocre programmer, I often go for an easy solution to my coding problems rather than an efficient one.







Animated sprite game maker studio 2