The time between updates is huge but this is still being worked on.
A big thank you must be given to Steven Wittens (Here) for showing how this can be done.
The bad news is that for some reason Opera doesnt want to play ball. So for sounds I am now reduced to a list of Firefox, Safari and Chrome as browser platforms. I’m hoping that eventually Opera will fall in line.
Of course next I needed some way of generating sounds. I wanted to work it out for myself and I have something that allows me to make something approaching usable sounds. There is also the issue of having several sounds playing. The control of the audio tag is still currently very limited so I need to try out a few different ways to come up with what I think works best.
The code I have is still very much rough and ready and until I clean it up a little bit I dont want to release it.
So… to sum up… I have something… but Im not sharing… yet.
–> Here <-- is the latest version of my version of the arcade classic asteroids game written using the Canvas tag introduced in Html5.
New features added this time are :
1. Big UFO makes an appearance. Note : It doesn't actually shot yet.
2. Hyperspace works. You should not appear inside any object.
3. You now start the game with 3 lives. You will only re-appear after losing a life when it is safe to do so ( as with hyperspace you will not appear inside an object ).
4. When objects are destroyed debris is produced.
Comments / emails are always welcome.
Let me know what you think.
Well since my last update things have been very busy and I just havent had the time to work on the Asteroids game.
I have made some progress which I hope to upload very soon.
The latest source code now has a hyperspace ( that will not drop you in the middle of a rock… or anything else ). I have UFO’s making an appearance ( but not shooting ). The game now actually has more lives.. you start the game with three.
Small improvements I admit but things which bring me ever closer to a completed game. Watch this space.. but dont hold your breath unless you can safely do so for days.
With the limited time available I have managed to make more progress with the game. This is now a playable game ( I did say playable and not fun ). This means you start a game, you play it, if your score is good enough you can enter your initials for the high score table. The rocks now break into meduim and small sizes.
Whats left to do ? Plenty. You only get 1 life currently. There are no UFO’s. The collision detection is not good. You’ll notice that for the ship. There may also be a bug in around the high score table logic. All the new code is still quite sloppy so it will need a refactor ( once Im happy with how it is working ). Only tested properly in Google Chrome. Time is too short to test everywhere all the time.
Anyway.. click –> here <-- to try it out and do let me know what you think.
I was thinking about the game and trying to find what the best size I should make it when it dawned on me that this is a vector game it can be any size I want.
A bit of digging around and a bit of tweaking the game now fills the window whatever size it is. Well.. it fills it as best it can without distorting.
I still had a bit of time left over so I had a first stab at firing shots and even collision detection between the rocks and shots. This gave me a bit of a headache because FireFox has decided to implement the isPointInPath command differently to the other browsers. Once again after some surfing I found out that a very simple tweak to the code gets it working in all the browsers again. Phew !. You basically have to reset the transformation matrix before making the check. So head on over to check it out.. or just click -> Here <-
What with this being a bank holiday weekend I finally found some time to re-visit the Asteroids prototype code I wrote a while back.
It still doesn’t actually constitute a game yet but it has been written from the outset to be a fully fledged game. It has various stages from the intro page to the main page, high scores, play game, and enter initials. On screens where the ship is visible you can fly around but thats about it. Pressing the Fire Key will cycle through the game stages.
It can and does now write text and numbers onto the screen. All of which are made up of lines just like the game.
I’m quite pleased with it. I hope you like the progress I have made. I hit a few issues which I had to workaround but the result is that it works in all the big browsers ( FireFox, Chrome, Opera, Safari ) except IE.