Spacious – Game

I’m trying to develop my own games (for fun and experience) so I decided to participate on One Game a Month and for the month of January I worked on this little game using Unity 4.3 new 2D tools.

note: The game uses the Unity WebPlayer which is not supported by some browsers anymore.
[unity src=”22″]

The Game

This was my first experience finishing a game all by myself. I did everything but the music and some of the art (some sprites were part of a free pack from Jesse Freeman). I’m making the project files and source code available (check the bottom of the page).

The idea of the game is very simple, it’s a 2D side-scroller/platformer staged in an alien planet where you explore controlling a clone of a space-suited man (The idea of having a clone is because if you die you can then just spawn a new one). The objective is to search a new “reactor” for your spaceship so you can then leave the planet.
The planet has some energy crystals that can be collected for your own good (I had in mind giving these crystals more importance, like using them to restore your energy or make more clones, but I didn’t have time to implement it, so for now it’s only a way to get a higher score at the end).spacious_2spacious_3
The controls are very simple and explained at the beginning of the game. You move, jump, use a jet pack(with limited fuel), use bombs, and can switch on/off the energy (lights and jetpack). A high fall can cause damage so be careful jumping around.
One big danger is the planet’s alien life. For now there is only one kind of alien though, it tries to hide blending with its environment so it can attack by surprise. The alien doesn’t like the light though, it hurts its eyes.

The planet is also filled with hidden places, some will be where you tried to step on, some other places are a bit harder to find.

The game can be played at kongregate as well.

Some of the ideas I had (I may still do them if I find time):

  • Procedural level generator (I started it but still has a long way to go)
  • Mobile version
  • More aliens
  • More character mechanics (hide and shoot)
  • Crystals stuff (restore power, more clones, as ammo)

It was a good learning process! I have some plans to implement a few things, but let’s call it done for now. Next project has to be in 3D.

Project files

I’m making it available as an open source under the WTFPL license. The code isn’t very clean, and a lot of the comments are in portuguese, but feel free to use it however you find it useful for. ( I  would love to know if you do something interesting with it )

Music by Geomagnetics can be found at:

15 Replies to “Spacious – Game”

    1. I’m sorry for taking so long to reply.
      If you still need an answer, on the file ‘GUICtrl.js’ on the Start function, if you change lines 79 and 80 from:

      //temp to delete all saves


      //temp to delete all saves

      and run the game once, then it should reset the game properly.
      Then comment the line 80 back again otherwise it’s never going to save the game.

  1. Hello, I would like to take your “Spacious – Game” as a basis, or continue to do well in this game full source code and vent in the “Steam Greenlight.” Please allow me to do this? πŸ™‚

    1. No problem, go for it!
      I just don’t have the right to approve the use of the music, so if you want to use it then better contact the author.
      And let me know when you have something ready, I would love to see it.

  2. Hey Andre, I like this game build and I was wondering. I tried putting my own background in your level but the light doesn’t affect the background that I created. I added the dark_sprite as material to it with sprites/default as the shader but this does nothing. Would you be so kind as to explain to me how you did the lighting with the background and foreground effect? Or what could be the reason why this doesn’t work with my own imported sprites?

    1. Hi Robin, I’m glad you liked it. Would you mind showing me a print screen of what’s happening or what you want to achieve? It would then be much easier for me to help you…
      If the light isn’t affecting the tiles then you may need to look at their layer, I’m almost sure the light affect only some layers (I can’t open the project right now to confirm). If you mean the actual background (the big sprites behind the character) then the light won’t affect them because the light works by vertex, so you won’t see changes in big sprites.
      Let me know if this doesn’t help so I can take look further to help you out.

      1. The layers are set the same as your sprites in the main level but the background and foreground are 2 big sprites so I’m guessing that is the problem here.

        1. If it’s like the mountains in the background then the light isn’t affecting them, they have only different base colours.

          1. Yeah it covers the entire level so I should try making a level with small tiles, the right layer and material then it should work.

  3. Oke I got the light to work in my own environment, it looks pretty good πŸ™‚ but I have another question to ask if you don’t mind answering. I’m trying to make the level start without the main menu screen and the need to press “space” where to camera goes to the player (which is a cool effect by the way), I just need it to simple start the scene with my player ready to move on command.

    1. Alright! I’m glad to know it’s working.
      About changing the the title screen, it shouldn’t be hard, I can give some directions here without testing, so be aware that it might not work 100%.
      Start by positioning the camera where you want it to start, then modifying the MainCtrl.js script in the _scripts folder.

      function Start()


      function Start()

      Then comment out line 81 (or it should be 82 after the changes on the Start function) it’s the last line on the StartCamera function.
      like this:


      That should be a good start, I would advice cleaning up the code although that should work.

  4. Hello,
    Its a nice game. Congrats. I have a question – how do i add “admob ads” i.e. interstitial & banner ads in the game. please help

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.