Giter Site home page Giter Site logo

lxq2537664558 / grit-engine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grit-engine/grit-engine

0.0 2.0 0.0 38.44 MB

Grit Game Engine

Home Page: http://www.gritengine.com

License: MIT License

Makefile 0.29% Batchfile 0.02% Shell 0.23% C++ 94.10% Python 1.87% CSS 0.17% C 0.27% Objective-C 0.03% Lua 0.39% MAXScript 2.63%

grit-engine's Introduction

Grit Engine

This is the central repository for the Grit Game Engine project.

From here can be built the engine executable itself, the launcher, and various tools. These are mostly useless without the accompanying media tree (the Game Directory which is available on Sourceforge via Subversion. Therefore to get everything, execute the following:

git clone --recursive https://github.com/sparkprime/grit-engine.git grit-engine
svn checkout https://svn.code.sf.net/p/gritengine/code/trunk grit-engine/media

The subversion tree also contains prebuilt up-to-date executables (Linux & Windows) so the majority of developers only need that. Grit can be substantially modified through Lua scripting, and this potential should be exhausted before modifying C++ code.

Build files are provided for Linux (Makefile and .../*grit.mk) and Visual Studio 2013 project files. Building C++ takes about an hour on Windows and 10 minutes on Linux. Scripts are available for copying new executables into Subversion, if it is checked out in the media/ directory.

Windows

Only Visual Studio Express 2017 is supported. The "Community" version is free (as in beer). Download it from the Microsoft site.

Requirements

You will need the DirectX9 SDK (Google it), install that on your system (in Program Files). The install adds a system-wide environment variable DXSDK_DIR pointing to the install directory. This is used by the Visual Studio build. If Visual studio is running, you will have to restart it to make it 'see' the new environment variable.

Regular build

Open grit-engine.sln and build the whole solution with the Normal configuration. This will build all the tools and dependencies.

Debug Build

Debugging with Visual Studio requires the engine to be built with the Debug configuration. To run in the debugger, execute the engine project from inside Visual Studio. You may need to set the working directory to the media/ directory (from the engine project properties).

Modifying the Build

The build uses hand-written MSVC build files. Each executable and library has a project file, and properties files are used to layer additional build options without duplicating them between project files. They are structured as follows: * grit-engine.sln: Collects together all the projects. * solution.props: Build options for all libraries and executables. Options that are the same for both Debug and Normal configurations live here. * solution_debug.props: Additional options when compiling in debug mode. Options that are the same for all object files live here. * solution_normal.props: Additional options when compiling in normal mode. Options that are the same for all object files live here. * pch.props: Options for enabling the precompiled header, used for top-level apps. * path/to/my-project/my-project.vcxproj: An executable or library to build. Build options that are specific to the library itself (like warning levels) live here. * path/to/my-project/my-project.props: Build options required by clients of a library and the library itself (typically defines and include paths).

Linux

The following instructions are for Ubuntu. If you're using another distro, you'll have to figure it out for yourself but hopefully the Ubuntu instructions will help. Note that the make files require GNU make, which may be called gmake on your system.

Requirements

sudo apt-get install subversion g++ make pkg-config gdb valgrind \
libfreeimage-dev libzzip-dev libfreetype6-dev libglu1-mesa-dev \
libxt-dev libxaw7-dev libglew1.5-dev libxrandr-dev \
libgoogle-perftools-dev libopenal-dev libreadline-dev freeglut3-dev \
nvidia-cg-toolkit libvorbis-dev xutils-dev libicu-dev

Building

Simply running make -j 8 in the root (adjust for your number of cores) will build everything. Executables for the current platform are left in the root directory. You can add it to your PATH.

Debugging

You can debug Grit with gdb or valgrind. If the assembly is too obscure, disable optimizations by overriding the OPT variable as so:

make -j 8 OPT=

Note that this will not rebuild anything that is already built, so you might want to first delete specific object files -- the ones containing the code you're debugging, and then rebuilding them without optimizations.

Modifying the Build

The makefiles are handwritten. They use a lot of GNU make specific features. Each sub-project and dependency defines a grit.mk file which defines the additional source files and required build options. These are all included by the root Makefile which computes the actual build rules.

grit-engine's People

Contributors

sparkprime avatar augustomoura avatar razzeeyy avatar nta avatar lavrod avatar

Watchers

 avatar  avatar

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.