Archive for April, 2009

Moving along

Thursday, April 23rd, 2009

Well, a few days have passed and here’s another update; the scripting now has the option to repeat an entry (meaning that entire waves can be defined from a single item), there are now three object types with their own firing pattern and sprite design (well okay, two and a half since the third is an amalgum of the other two!) and nasties can be set to speed up or slow down over time. That last one has presented all manner of possibilities because i deliberately left off any bounds checking; nasties can zoom on, decellerate to a stop and then start moving in the opposite direction to whizz off again… but if they’re turning as well it makes some very interesting patterns.

Here’s a screenshot of a couple of waves, lots of bullets and a particle-based explosion which also uses a linked list:

A running test of the OOP engine

A running test of the OOP engine

Essentially it’s completed to the level i intended things to go to… but i’m seriously considering the building of a more substantial project around this control engine now so who knows…! i’ll write up a “post mortem” in the next couple of days.

Being belligerent

Saturday, April 18th, 2009

Looking at the title, i’m not sure if the belligerence was on my part or the code… i raised the bar somewhat on the “learning OOP in BlitzMax” challenge; today saw the player’s data such as ship co-ordinates, score and lives converted into a single object and the addition of a primitive but workable attack wave manager that not only uses a linked list to store data, it reads in and parses it from what is pretty much an XML file. Then because i was feeling particularly masochistic, i decided to clean everything up internally so that the BlitzMax “SuperStrict” mode could be enabled.

Somehow that all works and i’m still getting over the shock, but the fight that was put up will probably rate as a bigger challenge than the final game’l be! Due to “other commitments” i’ve got to step away from the thing for a few days (or possibly longer) but i’ve made a start on some in-game sprites so the next milestone will be getting those at least to a state they’re workable, scripting up some attack waves and then slapping together the presentation code so that the game becomes a properly stand-alone unit rather than something that needs to be run each play.

Getting shot at

Friday, April 17th, 2009

My nasties have become noticeably trigger happy today, in fact it’s safe to say they’re trigger bloody ecstatic since each is firing nearly two bullets a second! The only issue is that, despite their attempts at peppering the player with lethal projectiles, for some bizarre reason the collision checks that should print a line to the console appear to be utterly ignoring what’s going on. i wouldn’t mind if this bug were being consistent, but the check code with the problem is based on one driving nasty to player bullet collisions and a third routine that checks the player to nasty collisions is in turn an almost direct cut-and-paste from that broken bullet check! “Bizarre” really doesn’t cover it…

Update: the problem turned out to be the lists being used; due to a typo on my part, the bullets for player and nasties both ended up sharing a list, so when the code went to check the nasty bullet list it was always empty. i’m not even vaguely sure how the damned thing worked with the two independent sets of bullets writing to the one list but somehow it did…!

So now that’s sorted out i have a testbed with a player spacecraft that can fire bullets which blow up nasties, which can in turn return fire or ram the player – at the moment, the nasties all drift around fairly aimlessly since they’re spawned randomly if a button is down, but that’s the next job…