liciouspasob.blogg.se

Gamemaker 7 set sprite
Gamemaker 7 set sprite













Make sure you're not doing the same collision check more than once in a single step. make sure that event goes in the player object instead of the bullet.Ĭollision functions (and trig calculations) in general are pretty heavy, so it's a good idea to have as few of them as possible. You obviously have to do a collision check between the two objects.

gamemaker 7 set sprite

A good example is the player versus the 100 bullets. So place those events in the objects which will have the fewest instances. Objects that have collision events are much slower than objects that don't. They're not completely static.īackground 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. 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. Make sure you don't deactivate important objects (like the object calling the code!). Instance_activate_region(view_xview, view_yview, view_wview, view_hview, true) Instance_deactivate_region(view_xview, view_wview, view_hview, false, true) Try deactivating anything that's outside of the player's view, and destroy anything that's outside of the room.įor example, put this in the Step Event of an invisible object that sits in each level: 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. Object instances slow down Game Maker a LOT. Here are some tips, from what I think is the most important, to leaster. And now I pass that knowledge down to you!

gamemaker 7 set sprite

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. Intro: Since I'm a pretty mediocre programmer, I often go for an easy solution to my coding problems rather than an efficient one.















Gamemaker 7 set sprite