Skip to content

A pair of super-simple game engines written with SDL to demonstrate that engines for different genres might not be that different after all.

Notifications You must be signed in to change notification settings

Archenoth/SDL-game-genre-engine-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Engine similarity

The purpose of this repo is to serve as an example to emphasize how engines between different genres of games don’t really need to be different architecturally.

This repo contains two ridiculously simplistic, but heavily commented engines in SDL; One for a simple side-scroller engine, and the other for a simple top-view engine.

The two files are practically the same, with the only differences being the way that the state is changed based on player input (Inside the handleInput() functions.) and the lack of some unneeded state for the top view engine because of a lack of physics.

DISCLAIMER: These two engines were made for the sake of demonstration only, and are not intended to be examples of particularly good engine code or stellar gameplay.

Building

Building this on a *nix platform should be as simple as ensuring you have the SDL 2 development libraries and then running:

make

…inside of the folder.

This will create sidescroller and topview binaries that you may run.

There is also a help make rule that describes the things you can get make to do.

Controls for the Sidescroller engine

The player in the sidescroller can be moved left or right with the [Left] and [Right] arrow keys, can jump with the [Spacebar], and can quit the engine with [Q].

Controls for the Top-view engine

The player in the top-view can move in the four cardinal directions with the arrow keys, or exit the engine with [Q].

About

A pair of super-simple game engines written with SDL to demonstrate that engines for different genres might not be that different after all.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published