Games

The bastard in motion

I knocked up a quick gameplay video of Gun Bastard - it's not looking too shabby.

Back to the bastard

With Sheep Snaggers finally out the door, and after recovering from a nasty toothache that turned into a whacking great abscess - leaving me spending the week on the couch cold a feverish with foul tasting poison dripping into my mouth - I finally got back to work on GUN BASTARD today.
After a bit of a slow start where I fumbled around with a couple of things that weren't working right* I've managed to get a bit more done.

Sheep Snaggers released!

Following a successful weekend's testing at Retrovision, Sheep Snaggers v1.0 for windows is now available from the downloads page

Oh behave!

I spent the last couple of days reading over the Owyl docs, and I've managed to implement some basic AI in Gun Bastard.
I've got two different follow behaviours for the bad guys, a "shoot object x if you can see it", and I've farmed the player controls out to joystick move and fire behaviours rather than them being in the game loop.

New game - GUN BASTARD

With Sheep Snaggers pretty much finished, I've been thinking about how I could have improved the structure of the code. As it stands, it's a pretty horrendous spaghetti mess - I hacked features on pretty much at random, and it shows.
I've come up with a much better design, where the main game loop nice and simple

while running:
  think() #handles control input and AI
  update() # move things around
  render() # draws the end result

and the different game modules each have their own versions of the 3 functions. When I switch game modes, I swap out the function pointers for the relevant module and everything stays inside the one loop, which makes handling game events much cleaner.
In Sheep Snaggers, the attract mode and high score entry each have their own seperate copy of the game loop, which then has to throw events back to the main loop - hideous I know, but that's what happens when you don't plan ahead...
Anyway, to test the new structure out, I needed a nice simple game concept.

Enter GUN BASTARD.

Sticks of joy

We now have rudimentary joystick support!
Don't know if I'll get a chance to add an option to configure the button layout, so for now it's button 1 to thrust, button 2 to fire and button 3 to bomb, which works pretty well with my USB dualshock adapter. I can probably add some kind of config file to set up the buttons, doubt I've got the time to write any UI though.
Steering with the stick feels way more like classic Sinistar, rather than the Asteroids style rotation with the keys.

Gah! part 2

OK, that seems to have fixed it.

Turns out Rabbyt caches textures internally, so just reloading the images for my sprites didn't make any difference.

A little bit of digging around in the source and I managed to work out how to empty the texture cache. Once that was done I just had to refresh the textures for anything already existing and everything was happy again.

Of course, now I've found a new problem. All my sound effects seem to be playing about 0.5 seconds out of sync with the game. Grr...

Gah!

Been adding a few more things in, of which more details later.

Right now, I'm working on being able to switch the game to fullscreen mode.
Switching modes is simple enough, but suddenly all my sprites are rendering as solid white blocks. The only things displaying properly are a couple of things that are dynamically loaded.

Looks like I need to reinitialise all my textures when I switch video mode, which is gonna mean a wee bit of rearchitecture...

Damn!

Sheep Snaggers : Latest update

Ladies and Gentlebeasts. We are now 100% feature complete!

Sheep Snaggers : Status update

Updated the alien generation code. Enemies are no longer spawned en-mass across the map at the start of the game. Instead, they warp in to the base star location every few seconds. Calms things down considerably from before where the deathstar was being completed in seconds.

Need to fine tune the ship handling and fire rate a little, maybe the bullet speed too - right now it's way too easy to hit an alien that's anywhere nearby.

Tweaked the attract screen for added psychedelia - starting to look pretty damn good :D

Next job is either enemy fighters or a deathstar that's actually dangerous. Reckon I need to equip it with some suitably scary weaponry.