Skip to main content

Posts

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. U...

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 outro Intro state needs to show a countdown Game state will run the game as normal, but with a visible "timer bar" to show how long is left Outro 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.

World In Motion

In the last post I touched on how easy it is to score in this game - you can just camp out on the score bullet spawner and watch the points rack up. I'm going to add a little delay to the score bullets so that they start out in a deactivated and uncollectable state, and then change to active and collectable after a short time - say, half a second. To make it clear what state they are in I'm going to add code to let me change the look of Objects and allow them to be animated.

Born Slippy

Up until now, the player control has felt very "digital" and harsh. Whilst there's an argument to be made that that is how it should be in a shoot-em-up, I didn't like it that much. I'm going to add a little bit of momentum to the player sprite to give the ship a feeling of weight.

Loaded

The images in the game are being loaded by creating an Image element and using a .png file, stored as a Base 64 encoded string, to load the data: Every time I need to change a sprite in the game the process is: Edit the source .png image file in a paint program and save it Convert the file to a Base 64 encoded string (I use https://www.base64-image.de/ for this) Copy the encoded string Paste it into the source code Refresh the game in the browser This works ok when there are only a few graphics, but it doesn't scale very well. The workflow that I really want is: Edit the source .png image file in a paint program and save it Refresh the game in the browser Much better! So how do I do that? I'm going to add a resource manager that loads the .png files directly from the server.

Phony Game

Up until now I've been mostly focusing on the game technology and neglecting the game play . I'm going to address that a little bit by adding scoring to the game. I want to add some risk/reward to the gamplay - score higher by taking more risks. From now on I'm going to try to make sure that I remember to add gameplay features as well as tech features. So how do you score in a shoot-em-up where you can't actually shoot? There are a few possible ways that come to mind: Score bullets: Fired from spawners like normal bullets, but instead of hurting you when you collide with them they give you score Bullet grazing: Score points by flying very close to bullets  but not close enough to be killed Score zones: Marked areas of the screen that award you points when you fly over them I like all three of these scoring methods and I'll probably implement them all over time. If you have any more good scoring ideas that you'd like to see in the game, please let me know...