A downloadable asset pack

Buy Now$1.99 USD or more

This script demonstrates how you can cut the number of objects in a room dramatically by "merging" them together to form larger ones. This is an ideal script for top down games and platform games, as it will permit more instances to be placed in a room, since it can lower your instance count by over 50% (as high as 80% in some cases).

Note that the scripts work by changing the sprite index, so you are advised to use tiles to draw the walls/platforms, then make the objects for collisions invisible and optimise them with this script.

You can find a companion script to add tiles to a room automatically based on the instances placed (also written by me) here.

Purchase

Buy Now$1.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $1.99 USD. You will get access to the following files:

com.nocturneassets.optimise.yymps 63 kB

Comments

Log in with itch.io to leave a comment.

There seem to be some inefficiencies in its algorithm. I have a screenshot to back this claim up.
It might be possible to have the algorithm run multiple passes, maybe using GPU acceleration via OpenACC (which could be snuck into your GML so that it gets included via YYC).

Additionally,  you could use overlapping instances for some things, to optimize things even further.

Thanks for the comment! Yes, I'm sure that this could be optimised further, but I think that it does the job it was designed to do well enough for most use cases. Your suggestion about multiple passes is interesting, but unfortunately, the way the asset works means that multiple passes isn't possible, although in almost every situation you can use it in at the moment, you'll see an almost 75% reduction in instances (and it could be more depending on the room layout)...  That said, I do re-pass all my assets regularly and when I do my next update pass I'll look into improving how it works, as per your suggestion. Thanks again for the feedback!

(+1)

No problem. Helping people out is its own reward!

(1 edit)

By the way, you should also take a look at these: YellowAfterLife - GameMaker Instance Flags

Destrovel - GameMaker Instance Pooling

Making a version of your Optimize Objects asset which is compatible with these would be pretty boss.

(+1)

hey, really cool to see my asset mentioned. wasn't sure its actually helped anyone given how basic it is. 

(+1)

Sometimes even the most basic stuff can be extremely helpful.

Deleted 5 years ago

Hi there! Could you explain more? This asset is one of my best sellers and I've yet to see anyone create a better one... I'm not saying it can't be done, as it probably can! I'd just like to be the one to do it... so if you think there is something that this asset is missing or does incorrectly I'd love to know so I can improve it. :)