Skip to content

EmanueleGames/Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

137 Commits
 
 
 
 
 
 

Repository files navigation

Jumps & Coins



Development

IDE:              Microsoft Visual Studio
Language:    C++
Libraries:      SDL2 (Simple DirectMedia Layer)

Multiple scenes implemented with Object-Oriented State Machine
Inheritance, polymorphism, operator overloading
Time based movement (framerate indipendence), multiple collision detection
File writing and file reading to implement saves
Stages designed with customizable tiling
Sound effects and music. VSync active. Average FPS counter
Multiple stages with parallax scrolling

Features

  • Five scene game: Title, Game (Stage 1-2-3), Game Over
  • Single player mode, three stages with increasing difficulty
  • Left and Right Arrows for movement
  • Up Arrow for jumping

Save File

  • Make sure to extract the game in a folder where you can create files
  • The game autosaves in a binary file at the start of each stage (not checkpoints!)
  • The info stored in the file are: starting stage, lives, coins and score
  • If you want to delete the savefile, you can find it in the data folder

Customizable Stages

  • The stages are realized with a tiling system
  • In the data folder you can find 3 files: stage1.map stage2.map stage3.map
  • Inside these file there are the maps for the entire stages
  • You can freely customize these files as you like, just follow the format and use valid tile codes

My advice, however, is to edit your levels using the spreadsheet map_editor.xlsx included in the project.
It's much easier to work this way and the effect of your changes is much more direct and understandable.
Open the spreadsheet and you will find one sheet for each stage, each cell represents a tile:

image

The color is not relevant, it is just used to give a better prospective of the layout.
The only data that matters is the code inside every cell:

00 01 02 03 04
05 06 12 13 14

You can now edit the file as you like, just make sure the dimensions stay 18 x 400 cells.
Once you're done just export the sheet as a new .csv file.
Open it with any text editor and replace every ";" with a blank space " "
Finally replace the rows in the file stageX.map relative to the desired stage and you're good to go!



Code is a little over-commented just to help anyone interested to navigate it better

About

Platform 2D Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors