Skip to content

Chukobyte/learn-engine-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn Engine Dev

Animation Screenshot

A work in progress tutorial series for developing a cross platform game engine from scratch. The source code for all tutorials will be maintained in this repo and can be accessed here.

Chapters

Note: Chapters are a work in progress and subject to change

Features

  • Sprite Rendering
  • Font Rendering
  • Keyboard, mouse, and gamepad input
  • Entity Component System
  • Scene Management
  • Json Serialization of project properties and scene data
  • Python Scripting
  • Camera System
  • Animation
  • Collisions
  • Python Engine API
  • Example Games

Building

Make is used to build the source code examples. To build the code for a section, change directory to that folder's section (which contains a Makefile) and run the build target with make build. Below is more information about targets defined in the Makefiles.

Name Description
build Compile and link the application.
run Will run the application.
clean Deletes the executable and .o files.
format Will format the source code via astyle.
debug-build Same as build but adds debug symbols.

There is also a top level Makefile that can be used to run make targets for each section's source. To run, define a SECTION parameter when executing make with the following syntax: SECTION=[PART].[CHAPTER].[SECTION].

Example

# Build Chapter 1 Section 0 (Hello Python)
make build SECTION=1.1.0
# Run Chapter 1 Section 1 (Hello Python)
make run SECTION=1.1.0
# Format Chapter 5 Section 1 (Input Management)
make format SECTION=1.5.0

Environment Variables

The makefiles for each section uses the following environment variables for building:

Name Description
PYTHON_INCLUDE Include folder of the python installation.
PYTHON_LIBS Python lib folder containing .a files.
SDL2_INCLUDE Include folder for SDL2.
SDL2_LIBS SDL2 lib folder containing .a files.
FREETYPE_INCLUDE Freetype include folder.
FREETYPE_LIBS Freetype lib folder containing .a files.