July 27, 2018 - Cloud Web Designs

Space Shooter slightly updated.

By Karel Jordaan / On

Ok people I have uploaded a sligthly upgraded version of the little Space Shooter game that I was working on the last few weeks.
Again a live and learn experience and alot of fun for sure. Everything probably wont be perfect but there was progress so thats a good thing at least.It might take a few seconds to load once you click the Space Shooter link on the website so please be patient and hopefully it will be ready to start.

So the plot is simple, you are the little space shooter in your spacecraft zipping around in space and have to zap the little space alien buggers flying around you. Be carefull though cause some of those little buggers can get quite arrogant and all puffed up with pride but little do they know it actually just makes it easier for you to zap them! Oh and just a little warning, just as you think you killing it you might just get hit by a little meteor shower starting to rain down on you, so make sure you dodge that aswell before it zaps you whu ha haa! Also just a heads up there is music in the game so be aware of that.

The game was made using HTML5 and a Javascript library called enchant.js, which is specifically used to develop games.All of the images/sprites used for the player and aliens and bullet and meteor are free assets to use and it comes with the enchant.js library when you download it. The background images I downloaded from google images.
Its again specifically made to play on desktop PC or laptop and although it might display in a browser on a smart phone you wont really be able to move around because you will need the arrow keys on a keyboard for that.So mouse left click will shoot and arrow keys will move you around in space. I think my next game will be more targetted towards play on smart phone mobile devices so that excites me although Im not quite sure as yet what its going to be but will let you know ASAP.

Just a bit of boring info for you about the scripting of the game is that everything you see is coded behind the scenes as a Object that you create in a Class and then specify what the object is all about by giving it properties with values for example: the space ship that you see moving around on your screen will look like this behind the scenes –

Player = Class.create(Sprite, {
this.image = game.assets['graphic.png'];
this.x = playerX;
this.y = playerY;
this.frame = 0;
this.scaleX = 1.5;
this.scaleY = 1.5;

So all of that code says that you the Player, are a Sprite, (a Sprite is a term used for an image in game development) and then you specify the height and width of the sprite/image and you specify what Sprite sheet/image should be used from the games assets to get the image that needs to be used for you the Player. this.x and this.y sets the position for the player when the game starts. The this.frame=0; property tells the game what image to use from the sprite sheet that is essentially read as an array which is 0 based so that means the first image on the sprite sheet should be used as the Player image. this.scaleX = 1.5; and this.scaleY = 1.5; enlarges the image a bit and then you add it to the scene with game.rootScene.addChild(this);

Ok so all of that is a bit of technical jargon which most of you probable wont understand but its just a little insite into what things amount to behind the scenes.

All of thats quite alot for now but if you have actually read this far then I want to thank you and ask you to please go try the game and have some fun for a few seconds. You can also comment below the post and go like my facebook page Cloud Web Designs .

Will be letting you know about the next game I’m planning soon, cheers for now people!