1
0
Fork 0
mirror of https://github.com/jonof/jfbuild.git synced 2025-12-04 16:25:08 -05:00
No description
Find a file
Jonathon Fowler 7b928e1b4b be multi-monitor aware
Since I'm here, avoid scope-hiding globals 'fullscreen' and 'bpp'.
2025-10-07 19:16:48 +10:00
.github/workflows ci: update windows sdk for windows-2025 runner 2025-09-22 17:57:01 +10:00
doc render rooms using fragment and vertex shaders 2018-11-15 23:46:26 +10:00
include be multi-monitor aware 2025-10-07 19:16:48 +10:00
kenbuild be multi-monitor aware 2025-10-07 19:16:48 +10:00
libsquish quiet clang warnings in rg_etc1 and squish 2022-12-21 22:30:57 +10:00
src be multi-monitor aware 2025-10-07 19:16:48 +10:00
tools rebuild old palette shade and translucence on demand 2025-09-14 17:48:50 +10:00
xcode be multi-monitor aware 2025-10-07 19:16:48 +10:00
.gitignore kenbuild: macos packaging 2024-03-03 15:35:40 +10:00
AUTHORS work-in-progress 2009-05-10 01:09:30 +00:00
buildlic.txt Initial import 2004-09-15 04:49:35 +00:00
ChangeLog overhaul startup windows 2018-03-31 15:17:07 +10:00
COPYING work-in-progress 2009-05-10 01:09:30 +00:00
LICENSE update readme 2020-09-09 17:06:27 +10:00
Makefile separate kenbuild make from the engine's 2023-01-01 16:29:20 +10:00
Makefile.deps separate kenbuild make from the engine's 2023-01-01 16:29:20 +10:00
Makefile.msvc arttool: several improvements 2024-02-24 19:48:46 +10:00
Makefile.msvcshared separate kenbuild make from the engine's 2023-01-01 16:29:20 +10:00
Makefile.shared recognise Haiku, because it's trivial to do 2023-01-15 19:56:50 +10:00
makemsc.bat Initial import 2004-09-15 04:49:35 +00:00
README.md allow kenbuild to compile with Xaudio2 using MinGW-W64 2025-09-17 18:54:17 +10:00

Build Engine Port

by Jonathon Fowler, Ken Silverman, and others

This is the source code for my port of Ken Silverman's Build game engine to make the engine functional on modern hardware and operating systems.

Minimum system requirements

  • 32 or 64-bit CPU. These have been tried first-hand:
    • Intel x86, x86_64
    • PowerPC 32-bit (big-endian)
    • ARM 32-bit hard-float, 64-bit
  • A modern operating system:
    • Linux, BSD, possibly other systems supported by SDL 2.0.
    • macOS 10.15+
    • Windows Vista, 7, 8/10+
  • Optional: 3D acceleration with OpenGL 2.0 or OpenGL ES 2.0 capable hardware.

Compilation of the KenBuild test game

Before you begin, clone this repository or unpack the source archive.

Now, based on your chosen OS and compiler:

Linux and BSD

  1. Install the compiler toolchain and SDL2 development packages, e.g.
    • Debian 9: sudo apt-get install build-essential libsdl2-dev
    • FreeBSD 11: sudo pkg install gmake sdl2 pkgconf
  2. Install GTK+ 3 development packages if you want launch windows and editor file choosers, e.g.
    • Debian 9: sudo apt-get install libgtk-3-dev
    • FreeBSD 11: sudo pkg install gtk3
  3. Open a terminal, change into the kenbuild subdirectory of this cloned repository, and compile the test game with: make or gmake (BSD)
  4. Assuming that was successful, run the test game with: ./data/game

macOS

  1. Install Xcode from the Mac App Store.
  2. Open game.xcodeproj from within the JFBuild source code's xcode folder.
  3. Select the 'game' target and then from the Product menu choose Run.

The project will automatically download the SDL2 framework to xcode/frameworks upon first build. If there are problems with this process, you can manually fetch SDL2-2.x.y.dmg from http://libsdl.org/download-2.0.php and copy SDL2.framework found in the .dmg file to xcode/frameworks.

Windows using Microsoft Visual C++ 2015 (or newer) and NMAKE

  1. If needed, install Visual Studio Community 2017 for free from Microsoft. Terms and conditions apply. Install at minimum these components:
    • VC++ 2015.3 v140 toolset for desktop (x86,x64)
    • Windows Universal CRT SDK
    • Windows 8.1 SDK
  2. Open the command-line build prompt. e.g. VS2015 x64 Native Tools Command Prompt or VS2015 x86 Native Tools Command Prompt.
  3. Change into the kenbuild subfolder of this cloned repository and compile the test game with: nmake /f Makefile.msvc
  4. Assuming that was successful, run the test game with: data\game

With MinGW-W64 cross-compiling for Windows

  1. (For example, on macOS with Homebrew) Install mingw-w64 with: brew install mingw-w64
  2. Change into the kenbuild subdirectory of this cloned repository, then compile the test game with: make HOST{CC=cc,CXX=c++} $(set CC=gcc CXX=g++ RC=windres RANLIB=ranlib AR=ar; echo ${@/=/=x86_64-w64-mingw32-})

Compilation options

Some engine features may be enabled or disabled at compile time. These can be passed to the MAKE tool, or written to a Makefile.user (Makefile.msvcuser for MSVC) file in the source directory.

These options are available:

  • RELEASE=1 build with optimisations for release.
  • RELEASE=0 build for debugging.
  • USE_POLYMOST=1 enable the true 3D renderer.
  • USE_POLYMOST=0 disable the true 3D renderer.
  • USE_OPENGL=1 enable use of OpenGL 2.x acceleration.
  • USE_OPENGL=3 enable use of OpenGL 3.x acceleration.
  • USE_OPENGL=USE_GL2 enable use of OpenGL 2.x acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=USE_GL3 enable use of OpenGL 3.x acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=USE_GLES2 enable use of OpenGL ES 2.0 acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=0 disable use of OpenGL acceleration.
  • WITHOUT_GTK=1 disable use of GTK+ to provide launch windows and load/save file choosers.

Test game configuration

Settings for the KenBuild test game and its editor can be found in these locations depending on your operating system:

  • Windows 7, 8/10: C:\Users\xxx\AppData\Local\KenBuild
  • macOS: /Users/xxx/Library/Application Support/KenBuild
  • Linux: ~/.kenbuild

Credits and Thanks

  • Ken Silverman for his patience, help, and guidance.
  • Ryan Gordon for inspiring me to try and match his port.
  • Pär Karlsson for his contributions.

Enjoy!

Jonathon Fowler