Posts Tagged ‘seu’

Sod it… reboot!

Thursday, February 4th, 2010

I’ve come to a decision; the previous iteration of the Blast Engine had become an ungainly mess internally and the object oriented approach used was all but crippling the options for expansion; for a month now I’ve been looking at specific elements of other shoot ‘em ups and thinking to myself that it can almost handle them but not quite – and that inadequacy (as well as the need for lots of little blocks of bespoke code to fudge around the engine’s failings) has finally become too irritating to ignore.

As a result, I started a new version of the Blast Engine pretty from scratch yesterday using an “oldschool” array-based object handling system (still with the SuperStrict mode enabled in BlitzMax to keep my variable declarations on the straight and narrow) and already have a movement pattern system that is significantly more flexible than the previous one and plans for a scripted firing manager that should give the old version a serious kicking as well. At the moment, the only question being raised is how to handle bosses and a few vague but reasonable ideas have already presented themselves…

Messy code

Tuesday, January 12th, 2010

Or at least it was messy, but along with three hours of re-jigging the bullet handling and adding a “blast radius” value for each object (the size of explosions were previously tied to the collision area, now it’s possible to define small collision zones on large objects for cores and so forth but still have an Earth-shattering kaboom when the thing loses it’s shielding) I’ve just spent another hour and a half going through all the functions and entites to remove unused variables; the code is now leaner and slightly meaner than before. Which is nice.

That bumps the engine up to version 0.7 and the next step is going to be strapping a test front end into place to get the thing working properly as a loop. Fingers crossed that shouldn’t prove hideously difficult, but there’s bound to be some variables that are currently not initialised that’ll run wild or places where the order needs a bit of a juggle to prevent global variables being declared more than once…

A bit more blasting

Thursday, January 7th, 2010

Bloody hell, another update so soon… blame it on the snow.

The new spawning system I mentioned in the previous post has been implemented and the entire engine has just become a truly joyful thing to work with! Previously the system could only deal with one nasty at a time (either a single instance or a repeated stream of one kind of attacker) so having eight nasties appear from the top of the screen and fly down one after the other was easily handled with just one set of commands in the control script (which looks a little like XML but isn’t…). But if I wanted two waves simultaneously appearing from opposite sides of the screen I’d have to position an object at the left and another at the right, wait for twenty frames, add a second object at the left and another at the right and so on… fairly messy.

So one overhaul later and when the script interpreter finds something that needs to be spawned multiple times, the code just makes the first instance before shouting “this object, these X and Y co-ordinates, here’s the movement data, repeat it X times, wait Y frames between repeats and nudge the X, Y and angle values this much between each instance” at a newly-created spawning object and then leaves that to generate the rest of the attack wave automagically. There’s literally nothing to stop eight different waves being generated simultaneously from just eight entries in the script, so despite currently looking identical on screen to how it did before again what can actually be done with the thing has been vastly improved and it’s just not showing that because the script doesn’t use those newly crafted features yet!

The next thing I’m going to do (and hopefully that’ll be tomorrow… or more accurately later today) is construct some actual attack waves to properly test the system and then slap a test titles page in so that the game can be “persuaded” to actually run more than once – right now it just drops back to the BlitzMax IDE when it runs out of wave data or the player’s lives are all gone so I have no idea what state it’s leaving things in on exit!