Flexible game engine written in C++, Scripting in Lua
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
doc
include
lib
scripts
src
.gitignore
LICENSE
README.org

README.org

What is Kampf

A game engine developed for 2d Games employing the entity component game design pattern. Game scripting is done through the lua programming language.

Currently, the kampf engine is in alpha and has been discontinued

You can see an example of a game written in Kampf here

Compatible Operating Systems

  • Windows (mingw gcc 4.7+)
  • Linux (gcc 4.7+)

Compiling

Prerequisites

Make sure to include all of the dependencies provided by each prerequisite

All prerequisites must be on your environment path / Library path in order to compile correctly

For Windows, Mingw should be on your path as well, along with with Msys. ex. C:\MinGW\bin;C:\MinGW\msys\1.0\bin within PATH

The easiest way to include the prerequisites, is to copy the resulting ./include, ./lib, and ./bin folders over C:/MinGW for the Windows binary folders for each. (Lua being an exception)

For Windows, the prerequisites must be i686-w64 versions

Lua

NOTE: you can also use LuaJit

Website
here

SDL2 (Version 2+)

Website
here

SDL_Image (Version 2+)

Website
here

SDL_TTF (Version 2+)

Website
here

Win32

cd src
make
  • Make sure that SDL2.0 and Lua5.1 are on your path. The makefile might need to be edited to accomodate luajit instead of just plain lua. Typically I place all of my libs and includes within the mingw include/ and lib/ directory. In the future i’ll probably be providing snapshots of the latest compiled libraries and includes.
  • cd to src/
  • make
  • that’s it!

    If you want to look at the current test cases, run ‘make tests’ and then run ‘make runtests’ to start running tests

    NOTE: the kampf_interpreter runs at one point, which requires you to type ‘quit()’ or ‘exit()’ in order to continue running the other tests

Linux

  • Install the dependencies, you know what to do

Dependencies

  • Msys
  • SDL2.0
  • SDL_Image (2.0+)
  • SDL_ttf (2.0+)
  • Lua5.1 or Luajit2.0