Posts Tagged ‘BlitzMax’

Knock, knock

Wednesday, July 21st, 2010

To paraphrase Britney, it’s been a while… but the Blast Engine has finally received some attention over the last couple of days!

One of the new functions is the ability to give an enemy object a title – for example “boss core” – and then tell subsequent enemies to “attach themselves to it; they won’t follow it’s movements (because it played merry hell with the aiming system when I had a go at implementing it and would be too restrictive a system anyway) but when “boss core” is destroyed they’ll simultaneously combust with it; the idea is to use these attached objects to build gun mounts or other destructible parts that can be attached to a larger boss object and then given the same movement commands so they tootle around with it.

The object rendering currently offers ten levels of priority, with the background scrolling sitting between levels 5 and 6 and the explosion generator running between the top two; this means that ground-based objects will always be behind airborne ones and enemies without collision information can be employed to generate parallax effects in front of and behind the action. To make synchronising movement easier, objects can specify a speed to be “nudged” down the screen in time with the background scrolling.

A new directive has also been bolted into the timeline processing which halts the scrolling and aforementioned object nudging until a named enemy has been taken out; this means that the scrolling can be paused for mini-boss and boss battles as need be and then restarted without losing sync with the timeline. And objects can now turn to look at the player, which can be surprisingly unnerving…

A little background

Saturday, February 20th, 2010

I burbled a little previously about my aliens working from their scripts and was worryingly proud for some reason; since then the player’s ship has been introduced to the concept of firing bullets, everything has been taught to notice when it’s collided with something that should make it explode and just for good measure the explosions themselves have been bolted in for full-blown kabooms and to fling the odd burst of fire around when bullets make contact with shielded enemies.

So the next step is to slap a simple front end into place and get the game transitioning from titles to game and back cleanly (the number of times I’ve tried this and found that what was assumed to be stable code royally broke when it couldn’t rely on it’s variables being zeroed at declaration is remarkable) before strapping a life counter system into place, a temporary shield so the ship can be thrown back into the fray after death without immediately combusting a second time and the beginnings of the score handling.

I also need to think about scrolling backgrounds – the method of storing the data is already settled on (a large image which gets sliced into screen wide strips that are probably going to be 32 pixels high, essentially a variation on the column compression I used back in the 1980′s) but there will need to be an “editor” cobbled together to make landscape production a little easier.

Fire THAT way you berk!

Monday, February 15th, 2010

Today the little… aliens learnt how to fire properly – as with their movement, every nasty has a script to work from that says which bullet to use, initial speed and angle (the latter of which can send “commands” for rings of bullets, aimed shots and random sprays), change values for speed and angle, the delay between shots and how many to actually fire before moving on to the next set of instructions. Currently there’s a hard-wired maximum of eight states, but if anything needs more it’s just a quick change of a constant.

Of course, the system didn’t work first time and I’d have been quite frankly stunned had that happened, as I “joked” on assorted social networks the nasties appeared to be holding their script upside down (I suspect that one or two had perhaps picked up something from an old episode of Emmerdale) but eventually it flew and they in turn let fly with both barrels. Now I can define some fairly complex patterns on an object-by-object basis, trigger pauses, loop to a command rather than just the start and I’ve got plans for more.

Because things have been rather non-visual lately, here’s a quick screenshot of the new and improved Blast Engine (running with some “borrowed” sprites from Tehkan’s classic Star Force for no other reason than I’ve always liked that game):

Blast Engine V2

The curvy ring-shaped firing is handled from the script, the command for the purple bullets look like this:

<fire>
  <bullet=bullet2>
  <speed=2>
  <speedchange=0.2>
  <angle=ring>
  <turn=2>
  <delay=10>
  <repeat=8>
</fire>

Simples!