Skip to content

(WIP) Simple videogame using SDL. Navigate a rolling coin, rotating a labyrinth using the mouse.

License

Notifications You must be signed in to change notification settings

AlCastilloBa/roadcoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roadcoin

Description

Videogame inspired on old mechanical-based coin operated machines. A coin was guided though a small maze. The player rotates the maze with a handwheel.

The objective of this project is not only recreate these machines, but also make it extensible with several maps stored on files. Additionally, other forces appart from gravity will be recreated, such as springs, black holes, magnets,...

Screenshot001 Screenshot007
Screenshot008 Screenshot009

Technical details

The mazes are composed of a set of line segments. Normally these segments will be walls, but other segment types will be available, such as "goal" and "death" line segments. Additional elements have been included, such as bumpers and flippers so far. The maze can be rotated using the keyboard, a mouse or a joystick. This program uses the SDL2 library, and no additional libraries or engines. Everything is implemented using simple vector operations and simple mechanics equations.

The following libraries are needed:

  • SDL2
  • SDL2 image
  • SDL2 ttf
  • SDL2 mixer

Currently compiles for GNU/Linux (using gcc), and for Windows (using MinGW).

  • To compile for GNU/Linux with gcc, use make.
  • To compile for Windows with MinGW, use mingw32-make.exe -f ./Makefile_windows_minGW, but check "include" and "lib" paths first. Additionally, an "exe" is included (remember SDL2, SDL2image, SDL2ttf, SDL2mixer dll libraries are needed).

Current state

Work in progress. The basic game physics have been implemented. It has a functional menu, and all levels can be played directly through this menu. Currently the game consist on five levels, and all levels are playable. A lot of features are still to be programmed...

Controls

Game can be controlled with a mouse. Moving mouse left and right rotates the map. Pinball flippers (when available), can be controlled using left and right mouse buttons.

Additionaly, some keyboard keys can be used:

Key Action
ESC Go back to menu, or exit game.
Rotate map left
Rotate map right
P Pause game
F Toggle fullscreen (menu only)
C Change camera mode
KP8 Move camera up
KP2 Move camera down
KP4 Move camera left
KP6 Move camera right

Additional information

The music used in this project is temporary and only used for testing purposes. In order to avoid copyright issues, it is not uploaded. Feel free to use your own music.

About

(WIP) Simple videogame using SDL. Navigate a rolling coin, rotating a labyrinth using the mouse.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published