bengine is a C++ framework for creating 2D, 2.5D, and simple 3D games. Anyone
who finds it useful is welcome to use all or part of it for their own purposes,
however currently it is primarily a sandbox in which I can experiment with
various game-related systems and a platform on which I can build my own games.
So keep in mind that all code is subject to change or removal at any time.
Any branches other than master
may be subject to destructive rebasing and
force-pushes.
- Modular
- Systems should rely on as few other systems as possible. Systems are packaged as static libraries in most cases, and individual applications link against whichever modules they need to use.
- Cross-Platform
- Platform-specific code should be abstracted or wrapped and separated from the rest of the codebase in order to make supporting new platforms easier. Currently only Windows x64 is supported, but it should be possible to support any x64 platform in the future.
- Flexible
- It should be easy to use and extend systems for new purposes. Generic programming is embraced. When considering a tradeoff between simplicity of usage and simplicity of implementation, prefer the former. When considering a tradeoff between flexibility or performance, lean towards the former unless it is a known bottleneck.
- Portable
- The end-user runtime requirements should be minimal. Ideally any system with the compiler runtime and an OpenGL 3+ video card/driver should be able to run programs without needing to run an installer first. Configuration and other persistent data are stored in files, not the Windows registry. Assets are packaged together for faster and easier file transfers.
- Boost (External; 1.63 or newer recommended)
- Lua 5.3 (Fork; 5.3.3+)
- GLFW (Fork; 3.1.2+)
- GLM (Fork; 0.9.8.3+)
- GSL
- STB
- Catch 1.8.2
- pugixml 1.9
- zlib 1.2.11
- SQLite 3.16.2 (Internal)
Boost must be downloaded and extracted separately. Set the BOOST_HOME
environment variable to point to the path where the archive was extracted.
The SQLite source amalgamation is distributed within this repository. All
all other libraries are referenced as git submodules.
bengine uses the Ninja build system. The Ninja build script is generated by a
custom Lua frontend. Most development is done in Visual Studio, so .vcxproj
files are also provided, however they may use slightly different settings
compared to Ninja builds.
Some files are partially or fully generated. This includes Ragel lexers and
Lua scripts embedded in source files as comments, which are subsequently
executed by the limp
tool (included as part of bengine).
- Ninja
- Visual Studio 2015 or Visual C++ Build Tools (Windows)
- Visual Leak Detector (Windows; optional)
- Ragel (optional; code generation)
- Limp (included; code generation)
:: Ensure BOOST_HOME environment variable is set:
> SET BOOST_HOME=C:\path\to\boost
:: Clone submodule repositories and build external libraries:
> setup
:: Open a VS command prompt for development and testing:
> workspace
:: Regenerate build.ninja:
> ninja configure!
:: Or alternatively:
> limp -f build.ninja
:: Build all modules, tools, and demos:
> ninja
:: List all top-level targets:
> ninja -t targets
:: Run all limp rules: (changes are not always detected normally by Ninja)
> ninja limp!
:: Clean up intermediate ninja build files and libraries:
> ninja clean!
:: Clean up all build files (Ninja and VS; useful before copying/moving repo to another location)
> ninja deinit!
bengine is a portmanteau of Ben and engine. Thus it is pronounced been-gin, not bee-engine. When written, bengine should never be capitalized, even when it starts a sentence.
Excepting the libraries listed above, bengine is provided under the MIT License.
Copyright © 2011-2017 Benjamin M. Crist