Hold on and read the following before jumping into action.

  • Again at first click on “Sector Alpha” which is currently the only mission available.
  • Build your ship and make sure to have enough engines so your ship can be maneuvered easily. Adding some turrets might also be nice …
  • This time shields matter. Click on “Shields” at the bottom and drop shields in appropriate zone.
  • Once your ship is done click on “Assemble”.

  • This step is new. This is where you select which ships you’ll be using for the mission. It’s still very basic but gets the job done for now. First click on the ship in the toolbar at the bottom and then click somewhere in the red circle to add your ship to the mission. Ships can only be added in the red circle.
  • You can add multiple ships but I’d recommend that your first try with only 1 ship to not be overwhelmed.
  • Once you are ready to start the mission press SPACE to unpause the game.

  • You’ll notice that new buttons have appeared under ships in your toolbar. For now only care about the first one which will give you manual control of the ship. Click again to release manual control.
    • MANUAL CONTROL
      • WASD for SPEED +, TURN LEFT, SPEED -, TURN RIGHT
  • You can also just assign a target and let the AI do the job by first selecting the ship on the toolbar (click the icon not the actual ship) and then double-clicking on an enemy.
  • Double-click anywhere in space to just move the ship with AI control.
  • Top blue bar is the front shield and bottom blue bar is the back shield. Hull damage will be represented by a red overlay on this ship slot.
  • Click and drag space to view around
  • Lost your ship? Just click on its icon in the toolbar to focus on it.
  • Click directly on a ship (not the icons in the toolbar) to see a new window appear top-right of the screen. Useful to keep track of shields and hull of enemies.
  • Press SPACE to pause at any time.
  • Turrets will automatically fire at the first target they find.
    • NOTE: They currently won’t switch target until the first one is destroyed.
  • There are 2 NPCs. One far left and another far right. Don’t worry they will find you.
  • Hold Q to zoom out and E to zoom in to have a better view of the battlefield.
  • Defeat both NPCs to complete the mission! If you are destroyed then you’ll have to start over.
  • Remember this is some very early work so don’t be surprised to find numerous bugs.

CLICK HERE TO PLAY SPACEWARS VERSION 0.0.3

Better zoom

Well at least from a coding perspective. I said in my last post that each zoom “layer” had its own set of ships and projectiles. Well that was pretty dumb. I only need 2 layers. The first one which is always invisible and used to calculate velocity, rotation and such with real coordinates (I’m letting Flixel do the job as there’s no way I’m going to code all that when it’s already available) and another layer that will display ships, projectiles and explosions while considering the current scale. Instead of resetting the view each time I change the scale with the zoom I just change the scale of the stuff displayed on the screen. Simple as that. Not sure why I haven’t done it this way to start with but the good news is that it wasn’t much to fix.

Explosions

It’s still early to think about anything visual but the explosions you are currently seeing are just png files. I quickly looked around and it seems that it would be possible to create nice particle effects right from AS3 but I’m concerned it might be a bit too much heavy to run so many dynamic stuff on the screen. Besides I’m not sure how I would be able to scale that when the player zoom out/in. I do not want to take unnecessary risks with this project are there are already some resources around to generate some nice particle effects and save them as PNG.

Here are some examples:

Anyway like I said it’s still early but so far I’ll probably go with TimelineFX. I could probably improve myself the other tools for which the code is available (I found the link of flashgamelicense.com) but I’m not interested at the moment to build my own particle effects generator. I’m not only looking at basic explosions but also things like an effect that looks like a shield blocking a projectiles for example.

Interface

The toolbar you see at the bottom will probably by the only fixed piece of interface while everything else will appear in windows that can be opened and closed on request (just like when you currently click on a ship a new window appear). Since the game can be paused at any time I don’t want to have too many things on the screen. In the end you basically need to monitor the health of your ships and that’s it. Want to see more like the stats of enemy ships? Well it will be available with some clicks but you will probably not keep this info on the screen at all time.

I’m also considering adding some distance markers for ships outside the screen. I’m not sure how relevant this could be but once turrets range will start to matter it might be interesting.

Locked view on ship

I just removed this for now as it was just good to give me headaches. I don’t need this to keep working on the game anyway. When the view is locked on a ship the actual current display of the ship is hidden and another immobile display of the same ship appears. This is to prevent the ship from shaking while the camera tries to follow it. I however had too many problems making it work with the zoom. I’ll come back to it later and see if I can figure it out. I’ll also try again to just set the camera to follow a ship without displaying a fake ship and see if it’s not too shaky. There are maybe some settings I can play with but from what I read so far displaying a fixed ship and hiding the real one seems to be the way to handle this. It works wells when you don’t deal with zoom. Anyway that’s stuff for later now.

Share