I don’t have something as fancy as the new Aves Engine demo to show but it’s still a nice proof of concept I’m happy to have been able to come up with. Before coming up with the idea of Blimp Wars I played with some concepts and one of them was an MMORTS that I’d still like to work on some day. I built a quick demo but when I decided to go with Blimp Wars I left it incomplete. Well I now finally added the missing touch and here it is!

Click here for the RTS style spaceship

You might want to to know some stuff to enjoy that though:

  • Right-click to set a destination for the ship
  • Use the mouse wheel to zoom and unzoom (zoom is centered on the mouse position)
  • When zoomed left-click, hold and drag to move the map (clicking on the ship will just pop an alert box so click around it)

The ship is taken from the Tyrian Graphics pack on Lost Garden and has been resized for a bigger view. The demo should work just fine in Firefox, Chrome, Safari and yes … IE (tested with IE 7 but you’ll notice that rotation is slower in IE).

The first thing to know is that there’s no physics involved in this demo. It would have been nice to have something more realistic but it looks just fine the way it is and honestly while I’m sure I’d be able to come up with something that wasn’t my intention to spend too many hours on that.

The first version of this demo had the ship to rotate on itself before moving in a direction. That was easy to come up with but it didn’t really felt good. I did struggle a bit though to build the code that allow the ship to turn in a circle motion as the last time I had to use this kind of basic math was probably 10 years ago. I know there’s nothing complicated in that but what can I say … I’m rusty.

The zoom could really be improved but works nice for the demo. I simply used a jQuery plugin called Mapbox so that means that in fact there are 10 ships on the screen and zooming just show you the right ship based on the zooming value. That means that all movement and rotations are done 10 times so like I said it could be improved as I’m not sure it would play nice if there were many ships on the screen. Reducing the number of layers to 4 would help and would probably be enough (as you really don’t need all those zooming layers) but the best way to do this would be to really have just 1 ship.

When the ship is created a speed and turning radius is assigned to it. If you want to play smart you can go ahead and set a destination inside the radius needed for the ship to turn. I’ve thrown in some code to handle that but it doesn’t seem to always work. I didn’t bother much with this issue so if the ship goes into an infinite loop don’t bother telling me.

You can check the code used for rotating the ship here. This code is not from me though and I don’t remember where I took it. I think it’s from some jQuery plugin that was doing more than needed and I just removed what wasn’t required. IE as always do things his own way and the result isn’t as good as in Firefox or Chrome. As for using canvas well I just didn’t feel comfortable to use that. I’ll need to do some reading before considering using canvas.

What could be done to make this demo cooler? Well I keep thinking of rotating turrets … It sure can be done but on the other hand if such game was to be done having fixed turrets with limited firing angles would add to the strategy used and would give a nice advantage for smaller and faster ships.

So what would I do if I had a bit more time and energy? The answer is this demo. I have learned quite a bit in the last years and I have a good feeling of what my MMO framework is good at. A good example is how I would handle the shoot and hit mechanic. It felt a bit laggy in Blimp Wars but by giving a bit more power to the client I’m pretty sure the result would be much smoother. That surely doesn’t mean to let the client make all the decisions as that would be asking for hacks but the client shouldn’t be waiting all the time for the server to tell it what to do.

The design of this idea was started several months ago is at the moment I’d say all the main systems are clear in my head and in my notebook. If you go read this post you might find some stuff I have in mind. Golemizer thought me what can be done for a 1-man team and what is too much so I’d make sure to not repeat twice the same mistakes.

However like I said time is lacking and I’m not sure I’d do this project part-time as that part-time is getting smaller and smaller. One day I guess I’ll have to figure a way to fund my full-time development for 2-3 months or at least a way to minimize the risk such decision may imply. Any investors reading? ;) I’m still waiting to see how Indie Fund will work so maybe part of the answer is there. Anyway the bottom line is that it’s still an issue I’m working on.

Share