This repository contains source code of following two libraries:
libforthgame2d - a simple 2D game engine,libleveleditor - an level editor engine for simple 2D game.This code is an example use of the Forthlang compiler. Not perfect,
bit messy and full of experimental features exposing various sometimes
unexpected ways of using Forthlang.
First, you need to build Forthlang compiler and make it visible
(as forthlang command) to your command line. The compiler also
needs to be able to find header files for the libforthlang library
and the linker needs to be able to easily find it.
Simple Makefile is provided and should be sufficient in most cases.
No install target is provided.
The Makefile includes the make.def file where you can tweak your build
time configuration.
Provided make.def file makes use of GNU-compatible readlink command.
This can be problematic on systems where readlink command is not
GNU-compatible (e.g. MacOSX). In such circumstances, GNU equivalent
(greadlink) needs to be installed (e.g. from MacPorts). A building
process started with gmake command (instead of make) results in
greadlink being used instead of readlink.
Along with the two libraries, forthgame2d executable binary is also
built. When started with no command line parametes, it just starts
a simple game. Available command line parameters are:
forthgame2d [width] [height] - start a game with given SDL window size,forthgame2d [level] - start level editor and open a level specified asforthgame2d [level] [width] [height] - same as above, with given SDL