Destructible Terrain [ENIGMA PROPAGANDA]

Posted by ludamad on June 8, 2008, 1:10 p.m.

I'M A DONG

Hello, time for some ENIGMA propaganda to make you all drool. It's just too easy to talk about how much ENIGMA has over GM.

Today's topic, and an area where Colligma totally rocks GM's collision system: Destructible Terrain.

I was looking at the Game Maker wiki's article about the issue. Here are the proposed solutions (for 2D collisions) in Game Maker:

-Many Objects (the worst probably)

-Sprite Modification (not much better)

-Surface manipulation, creating sprites out of surfaces (the function lags significantly, very memory hogging compared to colligma)

Many objects fails for obvious reasons. In order to get pixel perfect manipulation, you need 1 object for every pixel. This is horrible. Each object has its own code that needs to be run (tons of time right there), its own default variables (tons of memory right there). Even bigger objects are slower, and they sacrifice accuracy even.

Sprite modification and surface usage:

The functions are really slow, and a sprite is a bad way to store collision information. Not taking graphical considerations into account, all you really need is an array of bits.

And that is exactly what colligma has.

Say you create a room with 32x32 blocks. You can give them all their own collision mask, or make them share one. Anything that will be changed, however, needs its own. I would reccomend only created a collision mask once you need to modify the object. Once you have a collision mask created, it is just a matter of using colligma's mask manipulation functions to remove, or add, parts to the mask. How you want to show it graphically is up to you, however. Very easily with colligma you can make a player sized hole in the ground, it takes elementary functions, unlike GM's unwieldy solutions.

Comments

PY 16 years, 5 months ago

<_<

Yeah, we're 64D, you're preaching to the converted :P

Grand-High Gamer 16 years, 5 months ago

all I hear is bitch bitch whine whine

ludamad 16 years, 5 months ago

PY: Maybe the more active members are. Just want to make sure.

PY 16 years, 5 months ago

Yah, I know what you mean :P

It's a good show of 'nig's capabilities, anyway.

s 16 years, 5 months ago

You've failed to mention using an array to carry the masks and custom coding the collisions in GM. I can see issues of arrays being 64bit and stuff and the fact that the collisions would have to be interpreted, but it is an option people should remember

noshenim 16 years, 5 months ago

sweet…

how does enigma work, run a gm .exe through it and it's converted? I've never heard much about what it acually is.

PY 16 years, 5 months ago

Not quite, though josh should let you do that.

Have it decompile on open :D

It takes .gm6/k, not suer about d

noshenim 16 years, 5 months ago

ok

firestormx 16 years, 5 months ago

I don't know if you've thought of this, but maybe you could make a simple way to have multiple collisions for one instance. For example, if I have a giant battleship, and rather than make every turret its own object, I just have masks over those turrets, and when it hits those different masks, I can change the sprite to whichever sprite has that turret gone.

Obviously that's a bad example, but do you kinda get what I mean? Where each mask has its own option for collision. You know how GM has the "on collision" thing? Could you make a thing where it's "on collision with mask 1, destroy instance", or "on collision with mask 2, destroy other instance", etc.

PY 16 years, 5 months ago

I agree with fsx