Download the GLBasic TiledMapLoader and TileMapRenderer source code

 

GLBasic Mars Explorer

A simple two stage parallax side-scrolling 2D retro game inspired by Moon Patrol and created for educational and benchmarking purposes.

MarsExplorerGLBasicScreenshots

Download the GLBasic Mars Explorer Windows Game Executable

Controls for Mars Explorer:

Decelerate (brake) — Left Arrow or A
Accelerate —————- Right Arrow or D
Jump ———————— Up Arrow, X or Right Shift
Fire ————————— C, Space or Enter (Return)
Pause/Resume ——— P

Press Fire on the Title screen to start the game.

 

Download the GLBasic Mars Explorer Game Full Source Code ready to use in GLBasic (free download available for Windows, MAC and Linux).

A simple two stage parallax side-scrolling 2D retro game inspired by Moon Patrol.

PLEASE NOTE: This is not a complete ready to publish game. It is a complete example of how to program a game in GLBasic. As such it contains only two stages which is all that is needed to show how to handle the player completing one stage and proceeding to the next. You can easily add new stages in the Tiled map editor and update the program accordingly to allow the player to proceed to your new stages.

There are many other enhancements you can make such as adding a framerate-independent update system, a High Score Screen, programming different behavior for the two different aliens, adding new aliens (perhaps even a Boss battle at the end of the stage) and so forth.

Those are all things I would do for a real game project.

Right now what you get is a complete framework for such a game. Think of it as a sort of GLBasic parallax side scrolling arcade game template.

I’ve been programming and making games as a hobby for over 30 years now. This will show you how I program video games. The source code may be helpful to learn how to structure your games to manage game projects much more complex than this one.

I hereby release this source into the public domain for educational purposes. Feel free to use any of the code in your own projects.

I spent 34 hours on this game project in total. That is a lot of time to me and at the same time I think it is very reasonable. I had to learn how to best apply my development style to this new environment and also needed to make a Tiled map loader, get the game design hammered out, create the graphics, design the stages in tile maps and so forth.