jump to navigation

Hoth Strike completed June 12, 2009

Posted by markw1970 in Game code and theory, JavaScript Game Library, JavaScript Game Template, game design, shoot em up.
Tags: ,
10 comments

hothstrike-beta1

Well I’m happy enough for this game to be called finished. I may tweak it a little in the future but for now it’s a pretty intense and (I think) rewarding game.
I’ve deliberately left the code un-obfuscated so that people can see how I constructed the game. Warning! It’s not pretty since despite my best intentions to write perfect JavaScript I wound up just cobbling the code together to get a game out.

Future games will make better use of global namespaces and JSON, for example.

CLICK TO PLAY THE GAME

I hope you enjoy playing the game as much as I did crafting it :-)

MAY THE FORCE BE WITH YOU

ps. my top score just now is 58,850.

Hoth Strike – bug fixes June 11, 2009

Posted by markw1970 in Beta release, Game code and theory, bug fix, game design.
1 comment so far

#1 Fixed a glaring error in the way that the count for rescued rebels and alien kills are handled. The way it was written you’d never end a wave unless you achieved it without losing a life !

#2 There was a problem with Probes colliding with the speeder during the wind up of the wave. I set a gl.fightingchance ticker to give the player a chance to move the speeder out of the way.

New code is now online.

Hoth Strike – Beta June 10, 2009

Posted by markw1970 in Beta release, JavaScript Game Template, shoot em up.
Tags: , , , , ,
2 comments

hothstrike-beta1I’m finally happy that Hoth Strike is a playable and enjoyable experience. There are still a few issues that I want to resolve  but hopefully nothing that will stop the show. So I’m offering the game as a Beta release to anyone that stumbles upon this page.

Play the game at this link: www.rebelideas.co.uk/proto/empire

hothstrike-beta2As with any Beta release I welcome all comments regarding bugs and general “playability”.
I will generally now focus on tidying up the code for the game including implementing a ton of stuff I’ve learned from books by Douglas Crockford et al. It’s come as quite a surprise just how inefficient my coding can be. More on that in due course. For now please play and (hopefully) enjoy the game :)

Playing my games with a joystick June 10, 2009

Posted by markw1970 in shoot em up.
Tags:
2 comments

comp-pro-joystick
OK, so I bought a Competition Pro joystick off Amazon and plugged it in. Couldn’t find anything in the OS to map the joystick direction and buttons to a keyboard event so went Googling.

I found JoyToKey. You can visit the relevant page here.

A quick download and config later and I’m playing my JavaScript games with a joystick.

The world is a beautiful place. :)

New game thoughts and a JavaScript adventure game creator June 9, 2009

Posted by markw1970 in Game code and theory, game design.
Tags: , ,
3 comments

Hoth Strike is nearing completion and I’ve been thinking about a new game idea just lately. As much of an arcade gamer as I am I have to say I have a soft spot for good adventure games. For the most part adventure gaming is a miss but occasionally you find a real hit and it’s the hits in gaming that inspire me to create my own. Zelda, Chronotrigger, Zork, Final Fantasy, Dungeon Siege amongst others have all played their part in fuelling my imagination. I’ve just never been bothered to sit down and figure out my own angle for an adventure game. Until now.

mapeditor

It’s important for me to quite literally start from the start and consider the building blocks of a game. As with Invaders and Hoth Strike I knew precisely what the building blocks of the game were going to be (sprites) and knew then that the game would just be a layering of those blocks. Everything in the arcade experience is simply a hurling around of sprites with some input and collision detection thrown in. Adventure gaming is quite different. In an adventure game things happen at a much more pedestrian pace but a whole lot more happens behind the scenes. For my game I want to create a rich world in which to exist.

I’m not one for game design documents. Not least since I’m the only person working on the games, I have no need to communicate my ideas to a team, but also because I’d rather just get on with the task of writing the game ! But this time I’ve actually made a few notes before writing any code or opening up Photoshop. The notes are simple but probably rather dull to share here. However I did decide on one thing – my design goal. For the other games my design goal was simple – shoot everything and aim for the top score. Those games were played in a web browser at the PC. For my next game I’m considering playing the game on my mobile phone (Blackberry Storm) since it seems to handle web presentation very nicely.

I often find myself in a situation where I’m idly browsing around the phone and looking for something on the web. I’d like to fill that time by dipping in to my adventure game world and exploring a little. My design goal fell out of the bottom of this line of thinking:

Continue my quest on the go with short and simple puzzles.

Being a tools coder I jumped at the chance to knock up a simple level editor. I should add that this is all done without actually considering the execution of the final game but it was fun to knock up. You can take a look at it here: www.rebelideas.co.uk/proto/adventure/grid.html

As you can see in the screen grab it’s a very basic affair just now. You click on a grid sector and provide a title and description. You can also select a floor type from the drop down (or press a corresponding number key i.e. 0 = indoors, 1 = path, 2 = grass etc) and click to block available exits – North, East, South and West.
As the editor develops I will want to zoom in to each area and populate with inventory items and monsters but for now I wanted to get a feel for what my game world might be like.

Please excuse the code it was literally a couple of hours work. If you dig around it you should see that I have a basic config for such things as grid-size, canvas width and height and border width. You can dump your own image files in as well for each terrain. In fact, just expand the gridtypes array with your own and the code will handle your new additions.

I will post some more theory as I think of it.

Hoth Strike – AI modifications June 8, 2009

Posted by markw1970 in Artificial Intelligence, Game code and theory, animation, game design.
add a comment

The latest upload of Hoth Strike contains some AI changes. I had wanted to present a game where the player deals with varying alien behaviour. Up until last night much of the behaviour was predictable and samey so I decided to revisit it.

probe_0_1The probe is essentially the probe from the movie. I loved the dangly leg thing that was going on in that so it made sense to base it closer to the ground. I set the threshold to be about 3 probe heights from the base of the canvas. Better still I wanted it whizzing around like a probe on a mission. i.e. sniffing out rebel pilots. So I set a couple of new properties .floatdir, .upthresh, .downthresh.

Each of these new properties controls which way the probe is floating by way of a modification to the alienmove() function. The code sniffs for the sprite class and if it’s “probe” performs the modification. A floatdir of 0 sends the probe floating up and a floatdir of 4 sends the probe downwards. Better still I modified the speed of the probe and set it off at pace as it changed direction finally slowing down to almost a stand still before it flicks back the other way. The result is satisfying and from a player’s perspective a wee bit trickier to hit with the lasers. I’m happy with it since it ought to be close to the ground and now it is.

pod_0_1 I also modified the pods (the pink energy balls) and had them track the player a bit more by way of a simple modification based on tileDirection. They appear to linger a bit more now rather than just zip off as they did before.

mutant_0_1Finally I addressed the mutant. Defender’s mutants were horrible wobbly things that were a complete swine to hit. I wanted something similar so I modified the alienmove() function once again for spriteclass “mutant” and simply wobbled the sprite in a random direction by a random small amount.

I also added a special effect in the form of spawnSnow() which as you might gather spawns a snow flake. I perform this every time the probe or the player is in close proximity to the ground. The effect being that such close proximity would probably throw some snow up in the air. It’s particularly satisfying as you swing the speeder around !

Just now I have an issue with waves not ending properly. You could wipe out the bad guys and have rescued all the rebels but the wave would not terminate. It’s a checksum issue and something I’m looking at.

You can play the latest game here: www.rebelideas.co.uk/proto/empire/

Hoth Strike – Game Instruction Booklet June 1, 2009

Posted by markw1970 in Game code and theory, JavaScript Game Library, game design, shoot em up.
Tags: , ,
3 comments

I thought I’d have a bit of fun making a simple manual for my game in the same vein as the old Atari VCS games. I used to love the mini-stories that each game carried. Their ability to suspend your disbelief was awesome. For a kid with a fertile imagination these games and their colourful instruction books were hugely inspirational :)

Hoth Strike

hothstrike4

Introduction

Scattered throughout the icy wilds of Hoth are remote rebel outposts that double as safe havens for stranded pilots.
Sadly since the initial AT-AT strike on the rebel base all communication has been lost to the outlying sectors.
Dozens of rebel pilots are lying stranded with no hope of survival !
Worse still the Empire has launched a calculated attack on Hoth to eliminate any surviving rebels and time is running out to rescue your comrades.
You must fly with caution between the numerous outposts rescuing pilots and destroying every trace of imperial aggression.

Objective

1) Rescue the stranded rebel pilots
2) Destroy all alien probes

To pick up a rebel pilot simply fly your speeder directly over them. They will hold on to the speeder until you fly them over the rebel outpost.
If you fail to rescue a single rebel pilot you will lose and the game will end.

Rebel intelligence has gained valuable information on the enemy.

Probe
Floating spy probes with semi-intelligent targetted laser bombs.

Raider
Pest probe that hones in on stranded humans and carries them away producing..

Mutant
..an awful hybrid of twisted metal and human flesh. Mutants turn innocent humans in to rabid killers and will pursue the player across the landscape !

Pod Launcher
Dumb “mother” probe with no weapons just a belly full of radioactive baby pods.

Pod
High energy balls of alien waste that bounce around the level until they collide with the player.

Good luck and may the force be with you …

hothstrike3

Fine tuning the action in Hoth Strike – a question of balance May 27, 2009

Posted by markw1970 in Artificial Intelligence, Game code and theory, shoot em up.
Tags: , , ,
7 comments

There’s not much left to do on Hoth Strike before I draw a line under it and move on to my next game. But something that has been playing on my mind just lately is the question of balancing the action. I’m not a fan of implementing skill levels in games since they bring with them their own problems with level playing fields. I want everyone to experience the same game and to work it out such that they become competent and confident at it. That said I can’t just hurl stuff around the screen and expect players to accept it. I desperately need to consider balance.

A decision that I took early on was that I wanted to emulate Defender as much as possible. I prefer to set a stage and repeat it ever so slightly bumping the player’s requirements with each “wave” as opposed to say designing muliple levels. I’m very much an arcade gamer and not somebody who wants to sit down and devise a multitude of tricks and traps. At least not at the moment. Just now I’d much rather have the player see the limits of the game and work out how to “survive” within a static arena.

So I set out to design a few aliens and have them behave differently to one another. Some drift like jellyfish, others hunt for the good guys whilst some hunt the player or bounce annoyingly around the screen. Most spit laser bombs at the player (I even went to the trouble of plotting the player’s position relative to the alien and have them fire their laser bombs in a relevant direction!) and all will kill on impact. I wanted to have the player spend most of their time zapping the bad guys and probably spending most of their time in flight. But then I realised the player cared for nothing. They didn’t much care that the aliens were just drifting around since he had no goals. Hence the design goal of rescuing the rebel pilots. Instantly this new dynamic prompted the “mutant” alien idea. Lifted straight from Defender and DropZone the player had to stop the landers from capturing the good guys before they mutated in to the awful “chasers” that made those games so difficult. The player was now potentially all over the screen to complete the wave.

It still pains me that my original intention of having AT-ATs in motion had to be scrapped through my own failings at animation. The dynamic of speeding across the landscape taking pot shots at the walkers would have been stunning. But just now it’s not to be.

So to the point of this post.
In my games I try to design on a point – counter point basis. That is, where the point is to collect an item I make it the sole objective of a game object to frustrate the player when he’s trying to collect that item. In Invaders I threw bonus items down the screen and upped the alien bombing rate in an attempt to thwart the player’s attempts at powering up. With Hoth Strike I wanted to be a bit more intelligent with it. Where the player has to collect a rebel pilot I create an alien whose sole purpose is to look for rebels and destroy them ! Where the player has to carry a rebel pilot to safety I make sure that there’s enough on the screen to bring him down.

It’s that last bit I’m bothered about.

Simply littering the screen with obstacles isn’t very good game design in my opinion. I want to inject personality in to the probes such that they hound the player based on the things that the player can achieve.
The player can swing his speeder left and right, for example, so why not have an alien that tracks the player perfectly thus reducing the advantage of being able to swing the speeder around.

Now that the game objects are in place I will be fine tuning the game in terms of it’s execution.
If anyone has any ideas they’d like to share / offer then please do drop me a line.
This is the fun bit ;)

Hoth Strike – development thoughts and notable points May 22, 2009

Posted by markw1970 in Game code and theory, game design, photoshop.
Tags: , ,
3 comments

No updates for a little while so I thought I’d offer some thoughts on the progress of the game (Hoth Strike).

The last stuff to go in was the Pod / Pod Launcher stuff. Anyone familiar with Defender will know all about these little devils. The theory is simple: you shoot the pod launcher (carrier) and destroy it only for the screen to fill with tiny little pods that are to be frank a swine to hit. I was always hugely frustrated by this in Defender (leaving aside the sheer thrill of destroying all pods before they scattered with some amphetamine trigger finger action) so for my game I wanted the pods to be big and destroyable. To counter their size I made them persist within the bounds of the playing area and simply bounce around.

I now have a few aliens in place with differing behaviours:

Probe - Dump probe modelled on the one from the movie that strikes the surface of Hoth and proceeds to inform the Empire of the location of the Rebel base
Lander - Slightly less dump probe that looks for Rebels to hijack
Mutant - Awful hybrid of Lander and Rebel that turns on the player and pursues him across the playfield spunking bombs all over the place
Pod Launcher - Big dump blob (not yet drawn) that drifts around like a jellyfish and is generally a nuisance
Pod - Big bouncing ball that will most likely knock the player for six as it ricochets off the screen edge

I had a number of emails from folk asking why the AT-ATs weren’t animated and why there were no Wampas. The answer is simple, I failed to animate the AT-ATs convincingly and I couldn’t be bothered to draw and code the Wampas :-) That said, I may have some help in the AT-AT department. Look out for a sequel to Hoth Strike in the near future to see the walkers in motion !

So that leaves me with a game that is very close to completion. I have to say for the most part it has been fantastic fun to develop. I spend most of my time just now playing the game and working out where to improve it. But generally I’m very proud of what I’ve achieved.

Some notable points in the development:

Realising that the lasers could be “double timed” by utilising the onkeyup event to spawn a player laser. This was a cracker. I was frustrated at having to rapidly smack the fire button and then realised that every key press had to be met with a key up event. Both events fire a player laser. All I had to do was force a small interval but not so much that you’d experience a gap in the action.

Perfecting the “speeder slide”. This was initially frustrating. I’d wanted to have the speeder slide left and right since it adds a whole new dynamic to the game. But I had the speeder sat static in the centre of the screen and literally swung the landscape around. The effect was poor until I unglued the speeder and had it swing around the screen with only minor adjustments to the landscape below. On playing the game I realised that the speeder slide is an effective technique against the mutant probe !

Scrolling the terrain. This is key to the game working. I knew that I could stitch tiles together since I’d done it with the prototype but actually moving them at pace seemed a bit ambitious. Never the less I worked it out to the pixel so that the scenery tiles moved seemlessly. This is something that I am quite proud of.

The general look and feel of the game. The entire project has been a retro step for me in that I get to play with individual pixels in Photoshop once more. I love pixelling game graphics and this has been hugely entertaining and rewarding. There are a host of sprites that won’t make it in to the game which I may post up some day. The next game will be sprite intensive and will be an vehicle for testing my pixel work ;)

So there you have it. I hope to finish the game off in the next week or so and add it to my expanding library of 2 games.

Thanks for reading.

Hoth Strike colour, composition and Ralph McQuarrie May 1, 2009

Posted by markw1970 in animation, creative, game design, photoshop.
Tags: , ,
add a comment

 

Ralph McQuarrie's inspirational painting of an AT-AT Walker on the surface of Hoth

Ralph McQuarrie's inspirational painting of an AT-AT Walker on the surface of Hoth

 Like any other game designer I take my inspiration from all manner of sources. Hoth Strike is a fairly easy one to research since the movie The Empire Strikes Back is one of the top grossing movies of all time. There is literally a truck load of material out there. Obviously I also have the movie on DVD so plugging and playing for research purposes is often called for.

But it’s the work of Ralph McQuarrie that provides the greatest inspiration and the painting above inparticular helped to define the palette for the game.

Blue and Orange sit together beautifully. As artists we all know that and in a lot of cases it’s been done to death. But in the image above it just says it all. What I love about it is that it excludes any evidence of snow and ice. It could just as easily have been a concept piece for a battle taking place on Tatooine. There’s nothing in that shot to suggest that the vehicles are engaged in a battle on an ice planet in sub-zero conditions.

Even without the exploding trail from an unfortunate Snow Speeder this image has drama. The walker looks menacing with it’s upward pointing head and gun turrets and clearly stands at a good height from the ground. (Anything with legs is unlikely to be flying, surely !) 
The speeder dashing past appears to be trailing a rope. The mind boggles as to it’s intention. On watching the movie obviously we know the outcome.

What strook me about this image is that there are about 5 or 6 clear colours that dominate.

hothpaintingcolours

At first I translated the colours literally in to the game. The sky was bright blue, the ice below was shades of light blue and white/grey and the probe droids were dark and bleak. I wanted to remain faithful to this painting and fought with it for the best results. Ultimately it didn’t work and I had to reluctantly rethink.

The droids just didn’t sit right against a bright sky. Infact I really didn’t like the sky like this. I had always envisaged a night sky bleeding in to the bright Hoth daylight. (note: I’d opted for a clear setting as opposed to the bleak setting in the movie where horizons were largely undefined) So I applied a stepped gradient to the background layer and placed an obligatory Atari/Activision sunset colour scheme behind the mountains. (I always loved those saturated sunsets in the early VCS titles).

The result was that I could create brighter and more cheery graphics and sprites to fly over the darkening sky. I instantly brightened up the main probe droid and coloured the “raider” tones of yellow and orange. The mutant probe is actually comprised of colours from the McQuarrie painting.

Better still I had the perfect backdrop for bright Star Wars lasers and a beautiful contrast with the snowy terrain below. At Software Creations and subsequently Acclaim I pixeled a hell of a lot so putting these images together was pure retro fun. I even created tiles that wrapped seamlessly as if still designing for the GameBoy :)

The rebel soldiers take their base colour from the same orange that drives the explosions which in turn is taken from the McQuarrie painting. (I should add here that I modified the colour levels on the painting in Photoshop before taking the colours out and plonking them in to my game palette)

at-at-ingame

So there we have a detail from a frame of the final game. 
I think the overall result is extremely satisfying and great fun to play.
The most important part of playing with colour schemes and composition is understanding the game and what you want the player to “experience”.
In Hoth Strike I was always going to move everything at pace. It was therefore vital that colours were clear and anything that moved, such as landscapes and alien missiles, were clearly defined. Otherwise the entire thing would have become a mud of colours and confusing to play.

I will be creating a second Hoth game at some point and when I ultimately put the finishing touches to this one the plot and scenario will become quite apparent.

I hope you enjoy playing the game as much as I do bleating on about it !