GithubHelp home page GithubHelp logo

jonof / jfbuild Goto Github PK

View Code? Open in Web Editor NEW
97.0 16.0 28.0 4.16 MB

Port of the Build game engine by Ken Silverman

Home Page: http://www.jonof.id.au/jfbuild

License: Other

C 88.76% C++ 8.60% Objective-C 0.53% Makefile 0.32% Batchfile 0.01% Assembly 1.31% CMake 0.10% QMake 0.03% GLSL 0.11% Perl 0.01% PowerShell 0.04% Shell 0.18%

jfbuild's Introduction

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. 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

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

jfbuild's People

Contributors

bszili avatar danielgibson avatar jonof avatar martymac avatar plagman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jfbuild's Issues

compile on linux

how do you compile a simple game that loads a map in c ? where are the engine libraries located ? any hint is greatly appreciated

Unable to build this on macOS

Getting the following for everything when typing in 'make'.

error: No signing certificate "Mac Development" found: No "Mac Development" signing certificate matching team ID "S7U4E54CHC" with a private key was found.

Gamma applied twice in "sdlayer2.c"

This is first done with curpalettefaded where the gamma is applied by the tables. Also called SDL_SetWindowBrightness with the same gamma.

I would prefer to use the original tables, because in windowed mode SDL changes the brightness for all windows, not just the game window.

Update old documentation

Considering how much has changed from the original build text files, wouldn't it be best to update the documentation?

Unable to build using x64 Native Tools for VS2022

Following the guide, I received the following:

C:\jfbuild-master\kenbuild>nmake /f Makefile.msvc

Microsoft (R) Program Maintenance Utility Version 14.34.31944.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cd ".."
        "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\nmake.exe" /nologo /f Makefile.msvc /                   USE_POLYMOST=1 USE_OPENGL=1 USE_ASM=0 RELEASE=1 engine.lib
        cmd /c tools\generateversion.cmd > src\version-auto.c
fatal: not a git repository (or any of the parent directories): .git
        cl /TC /c  /Iinclude /Isrc /Ilibsquish /DRENDERTYPEWIN=1 /DUSE_POLYMOST=1 /DUSE_OPENGL=1  /nologo /MD /Zl /O2  /Fosrc/version-auto.obj src\version-auto.c
version-auto.c
        lib /out:engine.lib /nologo src\a-c.obj src\asmprot.obj src\baselayer.obj src\cache1d.obj src\compat.obj src\crc32.obj src\defs.obj src\engine.obj src\kplib.obj src\mmulti.obj src\osd.obj src\pragmas.obj src\scriptfile.obj src\textfont.obj src\talltextfont.obj src\smalltextfont.obj src\winlayer.obj src\glbuild.obj src\glbuild_fs.obj src\glbuild_vs.obj src\polymost.obj src\hightile.obj src\mdsprite.obj src\polymost_fs.obj src\polymost_vs.obj src\polymostaux_fs.obj src\polymostaux_vs.obj src\polymosttex.obj src\polymosttexcache.obj src\polymosttexcompress.obj src\rg_etc1.obj libsquish\alpha.obj libsquish\clusterfit.obj libsquish\colourblock.obj libsquish\colourfit.obj libsquish\colourset.obj libsquish\maths.obj libsquish\rangefit.obj libsquish\singlecolourfit.obj libsquish\squish.obj src\version-auto.obj
        cd "C:\jfbuild-master\kenbuild"
        link /OUT:data\game.exe /SUBSYSTEM:WINDOWS  /opt:ref /nologo /RELEASE src\config.obj src\game.obj src\gameres.res src\startwin_game.obj src\kdmsound.obj src\kdmsound_stub.obj ..\engine.lib msvcrt.lib user32.lib gdi32.lib shell32.lib ws2_32.lib comctl32.lib comdlg32.lib uxtheme.lib xinput9_1_0.lib
engine.lib(engine.obj) : error LNK2019: unresolved external symbol build_version referenced in function initengine
data\game.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\link.EXE"' : return code '0x460'
Stop.

I have tried doing the same with the 2015 x64 tools, however, the same issue still came up.

Missing `tables.dat`

Freshly compiled, Debian 8:

  - 320x200 24-bit windowed
There was a problem initialising the Build engine: Failed to load TABLES.DAT!
   (press Return or Enter to continue)

No copy of TABLES.DAT or tables.dat is in the source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.