Space Shooter (jthaboss) Mac OS

broken image


So this post might be the first of several canvas examples, this one will be on a basic space shooter game for starters. So this example is just a simple little game that involves a player ship that moves around and shoots at other player ships and that is it. Nothing to interesting maybe, but hey you have to start somewhere when it comes to these.
So then this is a project that I threw together in just a few hours, so it is not really a complete game at the time of this writing at least. I did not get around to polishing every little thing about it, but if this post gets enough traction maybe aI will get around to working on this one a little more. There is much more work to do when it comes to getting this to even start to look like some kind of finished product when it comes to things like at least having a basic menu system, and displaying all player stats of interest. However the initial goal was not to really make a finished product, I just want to get to a very simple starting point.

  • If you are a big fan of arcade shooting games with the new modern combat, and want to bring the freedom for the galaxy, Galaxy Attack - Space Shooter is perfect game for you. With classic arcade games genre, old game with a new context, this game puts you at the galaxy on fire with infinity shooting war.
  • Space ship kids game Play Space Gunner Online Space Game. Use your lasers to Venus 3D Space Survey Screensaver for Mac OS Transfer yourself to the orbit of the Venus planet. Observe Star Defender 4 for Mac OS X Who can give a dare to numerous hordes of Inserctus and to; Venus 3D Space Survey Screensaver for Mac OS Transfer yourself to the orbit of Venus planet.
  • Jun 02, 2020 How to play Space shooter: Slide your finger across the screen to dodge enemy bullets You have to collect coins and use those coins to buy upgrades. Select appropriate spaceships for each level.

Space Shooter (jthaboss) Mac Os 10

Description With the technology given by the good aliens to defend the earth, travel through space defending the earth against the waves of bad aliens that want to invade our world. Power-ups - You can play with Classical or Endless mode - In Endless mode if you hit the enemy ship, you lose powers.

Still I had some fun with this one, and I might get around to putting more time into the project at some point in the future if this new collection of posts gets some traction.

Space Shooter (jthaboss) Mac Os 11

1 - The Space Shooter Canvas Example

This canvas example consists of several javaScript files and a single html file. The project seems to work just fine via the file protocol if you do want to get it up and running that way. I also made it so the canvas example does not depend on any external assets in terms of images, or scene data which seems to be the way that I make most of my canvas projects anyway.

This project is an example of the canvas element in action as well as many other subjects that come up when developing a canvas game with client side javaScript. Many such projects involve the use of a framework such as phaser ce to help save time, but in this post I ma doing everything with native javaScript by itself.

1.1 - The source code for this space shooter as well as all my other canvas examples is up on my github

There goes the neighbourhood mac os. the source code for this can be found on my canvas examples repository on my github account. I will not be getting into details as to how to go about cloning down the repo and running the server that will host this example and all the others locally, the main README file there outlines that.

2 - The Display Object Classes

The first javaScript file disp.js is a file that I worked out for display objects that will be used in this canvas example. A display object is often a sprite or graphic in the canvas that represents some kind of object that is used in the game such as a ship, enemy, power up, or anything to that effect.

Sense the time that I first started this example and wrote this post, I have made a number of other canvas examples that also include some kind of system like this. I found myself making this kind of system over and over again, and got sick of doing so. So now I have a canvas example where the focus is just on this very part of the development of a canvas game which is a canvas example on the subject of an object pool. I now think that the best root to take is to just use some kind of framework, or at least start to create ones own framework where things like this are worked out to a science to which it can then be set and done so that one can move on to things that truly matter in a project.

However for this example I made my own independent system for display objects, and collections of such objects. So then in this canvas example display objects are things like this player ship, enemy ships, and shots that are being fired from the player or enemy ships. So these objects have values like x and y that represent the current location of the object in the canvas matrix, but also values like the current heading.

This file is also an example of prototype based inheritance in javaScript, as there is a base class and then additional class that inherit from that base class but have additional properties and methods. So then there is a Base Display object class that creates objects that contains properties and methods that are common for all display objects for starters. Then in addition there are other classes that extend that base class for Ships and Shots to be used in this canvas game example.

2.1 - The Base Disp Class

So the file starts off with the Base Display Object class. Here I define a constructor function that will be used for all Display Objects in the canvas example.

The base display object class of course has properties like x and y but also a heading in radians, and a value that reflects the current pixels per second rate of movement. This kind of game is a real time rather than turn base system game so it is best to move the display objects by way of the system clock rather than just stepping by a delta each frame tick.

So in this canvas example all display objects have these properties they have a 2d position in the canvas as well as a heading and speed in pixels per second. This class also has many methods that are common for all display objects such as the move object method that accepts a time arguments and then moves the object by its current heading and pixels per second value.

The methods here have to do with just moving a display object in a uniform way, and there is also a common method for applying boundaries, and the distance formula. So any property or method that should apply to all display object class should be placed in this class, as it would have the same effect as monkey patching something into the main javaScript Object prototype object only not to that extreme.

2.2 - The Shot Class

The Shot class is one of two classes that I have that extend the functionality of the Disp Class. A Shot Class is used with A Ship Class an as the name implies represents a shot from a ship that can hurt another ship.

For now there is not much to this class I am just adding a damage property that is the amount of damage that the shot will cause to a ship, and a lifespan property that will serve as away to flag the shot for removal if it has just been around for to long.

2.3 - The Ship Class

Here I have the Ship Class that is used for both the Player Ship as well as enemy ships. Here I add a lot of properties that have to do with shooting shot and getting hit by a shot, as well as a custom draw method that overrides the main generic draw method used for other display objects that just displays a white square.

For now I am using this class as a way to also deal with a collection of shots. I am doing this as a way to help keep things simpler, but if I where to continue working on this example I might want to have a shot collection class, as well as a similar class for collections of ships. However for this example at least I decided to have an updateShots method in the Ship class, and for the Ship class to also work as a shot collection class by storing an array of Shot Class instances.

The update method of the ship class supersedes the Disp class update method so it is called first, but within the body of that update method I am still calling the main Disp class update method. The reason why is I still want the same rules to apply for all display objects when it comes to movement. Alter that I call the update shots method.

At the time of this writing I did not go beyond adding anything more than just a base display class, and then classes for ships and shots. I am still not to interesting in putting to much more time into this one for now as i have many other examples now some of which I thing are better candidates for improvement.

3 - The State Machine

A state machine is a way to break an application such as this space shooter game into separate states, where each state is a method or collection of methods that define a set of logic that is to run for different states of the application or game play. For example A game might have a loading state, title screen state, menu state, game state, pause state, and game over state and it might not end there.

(jthaboss)

In this canvas example there is a main game state, as well as an initialization state, and a game over state. I did not put an awful lot of time into this canvas example, but if I where to continue working on this there would be a title state, as well as several other states that have to do with various menus to say the least.

In here I also parked some logic that has to do with what might eventually be a Ship Collection class. I needed at least some logic for that, and it had to be parked somewhere.

4 - Events

In the events.js file I worked out a few event handlers for moving the player ship and continuing when the game is over. Nothing major for this canvas example just a crude yet functional solution for accepting user input and using it to move the player ship.

5 - Renderer

So then there is also the renderer.js file. Here I have the code that will draw to the canvas. This returns a main draw method that will render one of many other draw methods depending on the current state of the game.

It also have one helper draw method of sorts that is called just once in the main draw method, but methods like that could be used in many such draw method. So for now it is just an example of keeping this a little more fine grain by pulling it into a stand alone method.

There is more that comes to mind, such as pulling the draw methods that I have in the classes out of the classes and place it here. Making the method at least a little more functional by making it so that the state object is passed as an argument to the factory function and make it so the factory function needs to be called in the state machine. However when it comes to making a first alpha state of a project those kinds of things take a back seat. The real concern here is if i am starting to make something that people will actually want to play or not.

6 - Main app loop

Then there is the main app of the canvas game example. Here I am using requestAnimatuonFrame to create the loop, and call the States tick method and the draw method for each frame over and over again.

It goes without saying that I made this very basic, and it seems to work okay this way. The reason why is that I am figuring how much time has went by in the state machine, and then passing that value to the update methods that I am using for the display objects.

I would design this kind of loop all kinds of different ways. Ways where I would move display objects by just steeping by deltas each frame. Ways where I would use some other means to go about limiting the frame rate, but testing if a certain amount of time has elapses here in the main app loop, and then call my update and draw methods. However I have come to find that this kind of approach seems to work good when it comes to a real time space shooter type game.

Other games could be event driven and when it comes to that kind of game I might not need a main app loop at all, however that f course is not the case here, so no matter what i am always going to need something like this, at least for the game state anyway.

7 - The utils module

Like all my other canvas examples I have got into the habit of having a general utility library for all of theme. I am not using a framework of any kind, and I am treating each example as its own stand alone project. However there is some code that I find myself using across most of not all canvas examples, and as such I have started packing code like that here. This utils module will change a little from one example to another, but there are some methods such as my create canvas method that I am using in just about all of them. In future collections of canvas examples, I might stick to using some kind of common library though.

8 - The html file

Now for the html file that I have for the canvas example where I am linking everything together. For this one I am using a hard coded canvas element rather than creating and injecting a canvas element with javaScript. I am also linking to all the extremal javaScript files that I have worked out when it comes to handling display objects, a state machine, events, rendering and a main app loop.

If I start to put together a project that is even just a little involved I often like to break things down a lot to keep everything better organized. So now that just the plain old boring HTML is out of the way lets get to the actual fun and interesting javaScript stuff.

9 - Conclusion

This canvas example is still pretty basic, If I get around to it I might put a little more time and effort into it. I often create projects like this where I get to the point where it is just starting to feel like a finished product, but stop and move on to the next thing. I would like to break that cycle some time, but only with something that is worth the investment.

A better user interface would be nice, and some animations, transitions and sound would be a nice touch. Still this was a good exercise for me, when it comes to working out how to structure a canvas example that is something not so basic. I think I will like to make a few more posts like this one, and put a great deal more effort into canvas examples that are worth more time and energy.

This canvas example is not really my best example of this kind of game thus far, another space shooter type game that I put a little more time and effort into would be my hyper casual space shooter game that just involves flying around and blowing up blocks. That example has things like upgrades, better controls, and menus, but is also in a state where I cant help but think that there is something more missing.


Stop looking for the best app, we have found it for you. With a pretty good average note of 4.6, Space Shooter: Galaxy Attack is THE application you need to have. And the 10,000,000 persons who have already install it will tell you the same.

Shooter

In this canvas example there is a main game state, as well as an initialization state, and a game over state. I did not put an awful lot of time into this canvas example, but if I where to continue working on this there would be a title state, as well as several other states that have to do with various menus to say the least.

In here I also parked some logic that has to do with what might eventually be a Ship Collection class. I needed at least some logic for that, and it had to be parked somewhere.

4 - Events

In the events.js file I worked out a few event handlers for moving the player ship and continuing when the game is over. Nothing major for this canvas example just a crude yet functional solution for accepting user input and using it to move the player ship.

5 - Renderer

So then there is also the renderer.js file. Here I have the code that will draw to the canvas. This returns a main draw method that will render one of many other draw methods depending on the current state of the game.

It also have one helper draw method of sorts that is called just once in the main draw method, but methods like that could be used in many such draw method. So for now it is just an example of keeping this a little more fine grain by pulling it into a stand alone method.

There is more that comes to mind, such as pulling the draw methods that I have in the classes out of the classes and place it here. Making the method at least a little more functional by making it so that the state object is passed as an argument to the factory function and make it so the factory function needs to be called in the state machine. However when it comes to making a first alpha state of a project those kinds of things take a back seat. The real concern here is if i am starting to make something that people will actually want to play or not.

6 - Main app loop

Then there is the main app of the canvas game example. Here I am using requestAnimatuonFrame to create the loop, and call the States tick method and the draw method for each frame over and over again.

It goes without saying that I made this very basic, and it seems to work okay this way. The reason why is that I am figuring how much time has went by in the state machine, and then passing that value to the update methods that I am using for the display objects.

I would design this kind of loop all kinds of different ways. Ways where I would move display objects by just steeping by deltas each frame. Ways where I would use some other means to go about limiting the frame rate, but testing if a certain amount of time has elapses here in the main app loop, and then call my update and draw methods. However I have come to find that this kind of approach seems to work good when it comes to a real time space shooter type game.

Other games could be event driven and when it comes to that kind of game I might not need a main app loop at all, however that f course is not the case here, so no matter what i am always going to need something like this, at least for the game state anyway.

7 - The utils module

Like all my other canvas examples I have got into the habit of having a general utility library for all of theme. I am not using a framework of any kind, and I am treating each example as its own stand alone project. However there is some code that I find myself using across most of not all canvas examples, and as such I have started packing code like that here. This utils module will change a little from one example to another, but there are some methods such as my create canvas method that I am using in just about all of them. In future collections of canvas examples, I might stick to using some kind of common library though.

8 - The html file

Now for the html file that I have for the canvas example where I am linking everything together. For this one I am using a hard coded canvas element rather than creating and injecting a canvas element with javaScript. I am also linking to all the extremal javaScript files that I have worked out when it comes to handling display objects, a state machine, events, rendering and a main app loop.

If I start to put together a project that is even just a little involved I often like to break things down a lot to keep everything better organized. So now that just the plain old boring HTML is out of the way lets get to the actual fun and interesting javaScript stuff.

9 - Conclusion

This canvas example is still pretty basic, If I get around to it I might put a little more time and effort into it. I often create projects like this where I get to the point where it is just starting to feel like a finished product, but stop and move on to the next thing. I would like to break that cycle some time, but only with something that is worth the investment.

A better user interface would be nice, and some animations, transitions and sound would be a nice touch. Still this was a good exercise for me, when it comes to working out how to structure a canvas example that is something not so basic. I think I will like to make a few more posts like this one, and put a great deal more effort into canvas examples that are worth more time and energy.

This canvas example is not really my best example of this kind of game thus far, another space shooter type game that I put a little more time and effort into would be my hyper casual space shooter game that just involves flying around and blowing up blocks. That example has things like upgrades, better controls, and menus, but is also in a state where I cant help but think that there is something more missing.


Stop looking for the best app, we have found it for you. With a pretty good average note of 4.6, Space Shooter: Galaxy Attack is THE application you need to have. And the 10,000,000 persons who have already install it will tell you the same.

Contents

  • 2 Space Shooter: Galaxy Attack in details
  • 5 Download Space Shooter: Galaxy Attack on your smartphone

Images of Space Shooter: Galaxy Attack


Space Shooter: Galaxy Attack in details

If you are interested, some numbers may please you :

  • The latest version of this application is 1.308
  • Last update was on February 27, 2019.
  • The category of the app is: ONESOFT
  • The total number of downloads is: 10,000,000
  • And the OS you need to use or play on PC/Mac : Windows (XP, Windows 8, Windows 10, Windows Vista, Windows 7) and Mac OS (macOS Sierra, macOS High Sierra, OS X 10.11, OS X 10.10

Last update details

- New weekly quest.
- Increase game performance

Description of Space Shooter: Galaxy Attack

Here is a short description of the app to let you know more about it :

If you are a fan of space shooting games and like to simulate sky fire shooting, so Space shooter: Galaxy attack game is game for you. This is a game developed from classic arcade games genre, old game but with a new context, more vivid graphics, more modern combat scene, fiercer, more glamorous.
One day, our beautiful galaxy is under attack of the space terminator and the alien attack. The alien invaders beat our squad, they destroyed all of galactica. And you are the chosen hero. Your mission is to be the guardians of the galaxy. Now, find the companion, build space team, command the spaceship to protect the origin galaxians and the surrounding asteroids.
Space Shooter : Galaxy Attack game puts you at the galaxy on fire with infinity shooting war. You will be faced an increasingly large number of enemies and deal with many striker bosses in space war. Are you sure you will survival the bullet hell ?
As the game progresses, you will earn the right to upgrade your spaceship to bring it to full lethal capacity.
FEATURE
- Amazing lighting and special effects
- Includes Power-ups and Bosses!
- Leader board global.
- Lucky circle.
- PVP - online shooting games
HOW TO PLAY
- Move spaceship
- Kill space intruders
- Upgrade space ship
- Change your weapons.
The Galaxy's future is now in your hands. Get your weapons ready for infinity battle in this shooter games

Space Shooter: Galaxy Attack on PC and Mac


To have it yourself on your computer Mac or PC, you just have to follow the steps below :

  • Click here => Download Bluestacks <= to install Bluestack, or here => Download Nox for PCDownload Nox <= to install Nox App Player
  • Once the emulator loaded on your computer, you can launch it and search for 'Space Shooter: Galaxy Attack' from the store
  • Then, install Space Shooter: Galaxy Attack and enjoy it from your own computer

Download Space Shooter: Galaxy Attack on your smartphone

If you prefer to have it on your smartphone, it is also easy to download it :

Space Shooter: Galaxy Attack on Android phone

  • Open your Play Store
  • On the research bar, write Space Shooter: Galaxy Attack and 'OK'
  • Once you have found the app you are looking for, click to install it
  • Wait and then enjoy using the application

Space Shooter: Galaxy Attack on iPhone or iPad

  • Launch the App Store
  • Type to found Space Shooter: Galaxy Attack and then install it
  • The dowload may take a few seconds or minute, and be set on your smartphone or tablet
  • You just have to click on the app to use it




broken image