Let’s Get Physical

Physics is something we witness the effects of every day so it should be really straightforward to program, right? No. It turns out that even with Game Maker Studio’s in-built physics engine, computers still don’t really know what physics is. On top of that, adding physics components to a game is so far outside my comfort zone I would probably find it easier to hit myself by firing a cannonball round the planet from the top of a very tall building. Physics programming appears to require a combination of maths, general knowledge and luck.

Well anyway, I appear to have rockets working now. For now. They arc gracefully/correctly, hit the thing they’re supposed to 75 per cent of the time, and actually destroy the thing they hit (if they’re supposed to) most of the time.

The little yellow dots in the image below are place-holder images for the thruster trail which slowly drop and fade as they emit from the rocket, hence the reason why none of the rockets in this picture look like they emanate from the turret (you’ll just have to take my word for it.) Also, this image shows three different rockets in sequence just in case you were feeling discombobulated.

There was supposed to be an earth-shattering kaboom.

There was supposed to be an earth-shattering kaboom.

In order to fire rockets at your enemy, the minimum you’ll need to have is a power unit (left of image) to keep the other structures on line; a weapons command room (underground at bottom); a rocket store (above weapons command) stocked with at least one rocket; and a turret. It may sound like a lot of hoops to jump through simply to obliterate your foe with projectiles, but this is just the first few items in a tree of options which should make game play more interesting.

For example, you only need one weapons command room in your base but because it controls all weapons, if it goes down for any reason it will temporarily knock out your ability to retaliate and force you to alter your priorities to react to the situation and find a way of regaining the upper hand. I really like the idea of a branching dependency structure. It’s been done really well before in games like Command and Conquer; I’m wanting to bring that mechanic to a more personal, micro-managed level. Because micro-management can be fun!

The next thing I want to work on is assigning and keeping track of every placed unit’s properties so they can have hit points and give other bonuses depending on if they have power or are manned. Although I haven’t yet started this it seems, on paper at least, to be less difficult than programming physics.

In my next post I’m going to talk more about some of the features I’d like to implement (this is more a note to myself but thought you’d like to know that too.)

Fin

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s