Space Inc. - a HTML5 top down multiplayer space game

Space Inc. - a HTML5 top down multiplayer space game

Bonsaiheldin's picture

Please read this first: The movement is very clunky at the moment. That is on purpose, so don't get confused, i'm working on it. I recently implemented time based animation on the server and am brainstorming how to get rid of these resets you see when you start moving or rotating. This is when the server corrects your coordinates and ship angle before it actually moves or rotates you. For now this makes the game pretty hard to play, but because of that it's more or less synchronous and that is a huge step forward as time based animation will soon enable many things which don't work yet (like dying). The problem is that the server, of course, moves you longer than you do locally because of your latency and this makes the game asynchronous. That's why i let the server always correct everything. I think i somehow have to work with time here to fix this crap and enable local smooth moving... *brain brain brain brain...

This is the HTML5 2D multiplayer space game i'm developing. It is my main project to learn how to program. So i'm a beginner and therefore many things don't work flawless yet (even the mouse controls are flawed). The game is built in Canvas with pure Javascript, no framework used. The websocket connection is powered by the Socket.IO library. Just come in with your browser, try it out, fly around and shoot enemies or players (if you're not the only one online).

The game will be a pulsating, persistent MMO world which continues to run even if no player is online. Also it is completely in german yet, but most things should be self-explaining. If not, just click around - you can't break much. :)


  • Chat: Enter (duh)
  • Movement: WASD or arrow keys
  • Shooting: Left and right mouse buttons
  • Info screens: R, (dot), (comma), SHIFT + P, SHIFT + S
  • Station communication: C
  • Main / configuration menu: ESC
  • Background change: Q (just for testing purposes)
  • Debug mode: P

Planned features

  • Real account system where you login (i consider a guest mode though)
  • Guilds / clans (companies and corporations)
  • Trade & inventory system: Collecting resources and items, buying and selling (you already can collect ores from asteroids)
  • Missions: Predefined and random ones, to get items and other stuff
  • Many upgrades and items for your ship (weapons, shields, stat upgrades, modules)
  • More ships to buy or to get from missions: From small fighters and big trade ships to fregates (companies) up to huge destroyers (corporations)
  • Friend system, private messages and mailbox
  • Multiple sectors to travel to (only one yet)
  • Universe populated and controlled by an AI (factions or something), running even when no player is online
  • and other "i don't know yet if i want to do that"-stuff

Artwork from OGA i'm using: 

Note: The game is best viewed in Chrome/Chromium and Safari (all Systems) and Firefox on Windows. It mostly runs very slow in Firefox on GNU/Linux - you're lucky if not as that means your firefox has direct access to your graphics card. You can make the game run faster if you reduce the size of the window.


I would like your comments, especially about the core game mechanics: Flying around and shooting and later you can collect resources and items. Do you like that? It's a pretty basic concept, similar to Asteroids, but you control your weapons with your mouse to have full 360° control over your turrets independent of your ship. So, yeah... I'm not only developing this game to learn how to program but also because i basically just want to play a game like that myself. I am my own game's biggest fan! Isn't that the best motivation one can have? :D

My main inspiration comes from the X series from Egosoft, one of the most complex and most beautiful 3D space simulations existing. You will immediately recognize X when you check the galaxy or sector map (dot or comma button). If you don't know these games, think of EVE online.

There's alot (i mean, really alot) to do for me. You can't die yet and much other stuff, as i'm still brainstorming about basic problems, especially stuff for the (24/7 running) server to handle. E.g. the collision detection is completely client-based at the moment - hell, the server doesn't even know that there are bullets flying around! *braiiin braiiin... Also the enemy ships exist only locally on your computer yet, so don't be confused if a player shoots to directions where nothing is. But i'm so happy that the basic system works! You can't imagine how happy i was when i finally got the websocket connection working. Woohoo!

In the future i consider switching from 2D to 3D WebGL, at least for the engine itself - the graphics may remain 2D so optically not much would change in the first place. But hen i would have access to awesome shader effects (explosions? ;)) and real hardware acceleration. 2D is very resource hungry at the moment, check your task manager... As a perfectionist i always try to optimize everything, but there's nothing i can do about that. However, the browser engines constantly get better of course...

Bildschirmfoto.jpg Bildschirmfoto.jpg 152.2 Kb [19 download(s)]