Skip to main content

Posts

The Long And Winding Road

I started this blog back in November of last year. My aim was to document the development of a Bullet Hell shoot-em-up, written in JavaScript. Here we are, six months later, and lots has happened. With 20 posts already written, I thought that now would be a good time to take stock of what I've already done, and to look to the future and see what's to come.

Recent posts

Erase And Rewind

As I continue work on the level editor for the game I decided that adding an undo/redo system would be pretty handy. Because such a system will end up being quite tightly integrated into the editor code it makes sense to add it sooner rather than later - so that's what I'll be doing in this post


Implementing an undo systems in an editors is a programming problem that has been solved many times. The solutions usually fall into one of two categories:

The Move

I'm going to get started on the level editor now. I'll start off simple with object selection and re-positioning using the mouse.


Before I get to the editor code itself, there are a couple of things that I need to add first..

Heavy Loaded Head

Most games work best when you have more than one level, but ip until now that's all I've had - one level. Even worse, that level has been created directly from code written into the game itself - to change it I have to rewrite the code. What I need is data driven level loading - the levels should be defined by a data file.


In this post I will be defining a level format and writing code to load it into the game. Let's start by talking about how the data will be laid out..

Going Back To My Roots

One thing that I always try to do when I'm writing a game/app/whatever is to use simple placeholder graphics. There are a couple of good reasons for this. Firstly, it makes you concentrate on the gameplay - if the game doesn't feel fun with simple graphics then it's not going to feel fun however good you make the graphics. When I worked at Denki we had a rule about not making our graphics any more "real" than basic coloured shapes until the core gameplay felt fun. Secondly, it gives a blank canvas to whichever artist comes in to create the proper graphics. At some point in the development of this game I'll get an artist in (applications for the position are open!) and I don't want to prejudice their view of how the game should look - I want the artist to tell me how it should look. Finally.. it stops me from getting distracted and spending too much time tweaking the graphics when (see first point) it doesn't make any difference at this stage.


Up unti…

Give Me Just A Little More Time

In this post I want to make the game time limited. By doing this, I make it more of a challenge to beat the high score. I'm going to set the time limit for a level to 30 seconds - I think that's a good amount. Also, I don't want to just dump the player straight into the action unprepared, so and I'm going to add a couple of bits of  "ceremony" before and after the gameplay to make it a nicer experience.


There are a few main things that need to be added to make this happen:
Add "sub" states to the Game state: intro, game and outroIntro state needs to show a countdownGame state will run the game as normal, but with a visible "timer bar" to show how long is leftOutro state will show a summary of the game - score, high score, etc.
Let's start with defining these states:

Hold The Line

Now that I have an animation system, why don't I use it to try and implement a new enemy type with minimal code? I'm going to implement an XY Zapper enemy. This is an enemy that periodically spams out a horizontal or vertical laser beam that instantly fries everything in it's path. The Zapper tracks the player's position and homes in on it, which makes it hard for the player to sit still in one place on the screen. This is good as it helps to stop the player from being lazy, sitting still and exploiting holes in the bullet patterns.