1 # GE211 — a game engine for EECS 211
3 GE211 is a relatively simple game engine for beginning C++ programmers.
7 To use the framework, you need to derive your game class from
8 ge211::Abstract_game; so to get started you may want to go straight
9 there. Otherwise, all useful definitions are in the ge211 namespace.
13 GE211 depends on the SDL library version 2, along with SDL2 plugin
14 libraries SDL2_image, SDL2_mixer, and SDL2_ttf. You need to install the
15 development versions of these packages, as appropriate for your
16 operating system. They are easy to find on Google, but if you are in a
17 class, your instructor might have an easier way for you to install them.
21 If you are using GE211 in a course (such as EECS 211 at Northwestern),
22 your instructor will give you a CMake project that includes files and
23 configuration for GE211. You shouldn't have to do anything to set it
24 up. Otherwise, read on.
26 GE211 is configured and built using CMake. The easiest way to add the
27 library to your project is to add the whole repository as a subdirectory,
28 and then include it in your `CMakeLists.txt` via the `add_subdirectory`
32 add_subdirectory(3rdparty/ge211 EXCLUDE_FROM_ALL)
35 The `EXCLUDE_FROM_ALL` flag prevents extra CMake targets from GE211
36 from appearing in your IDE.
38 Adding the subdirectory creates a CMake library target that your program
39 target can be linked against using the `target_link_libraries` command:
42 target_link_libraries(my_game ge211)
45 A minimal, complete `CMakeLists.txt` for using GE211 might look
49 cmake_minimum_required(VERSION 3.3)
52 add_subdirectory(3rdparty/ge211 EXCLUDE_FROM_ALL)
54 add_executable(my_game my_game.cpp)
55 target_link_libraries(my_game ge211)
56 set_property(TARGET my_game PROPERTY CXX_STANDARD 14)
57 set_property(TARGET my_game PROPERTY CXX_STANDARD_REQUIRED On)