Vehicle simulation game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Macoy Madson 2fbe478384 Removed some whitespace 3 years ago
Content Add materials 3 years ago
Dependencies Added track, fixed terrain 3 years ago
Profiling Added profiling results for later comparison 4 years ago
assets Played with terrain and add ref 3 years ago
audio Procedural audio, shifting now working 4 years ago
audioAssets Added (bad) audio, debug display, window resize support 4 years ago
data/fonts Added (bad) audio, debug display, window resize support 4 years ago
docs Hacked in basic tire model 3 years ago
references Played with terrain and add ref 3 years ago
src Played with terrain and add ref 3 years ago
.clang-format Added skeleton build 4 years ago
.dir-locals.el Fixed segfault, added debug build 4 years ago
.gitignore Removed some whitespace 3 years ago
.gitmodules Forked bullet3 to make vehicle changes 3 years ago
BuildAssets.sh Updated readme, disabled BuildAssets.sh 4 years ago
BuildBullet.sh Fix release build requiring pybullet too 4 years ago
BuildBullet_Debug.sh Forked bullet3 to make vehicle changes 3 years ago
BuildDependencies_Debug.sh Forked bullet3 to make vehicle changes 3 years ago
BuildDependencies_Release.sh Cleaned up Debug and Release build scripts 4 years ago
BuildTools.sh Integrated tracy to many systems 4 years ago
Build_Debug.sh Added true debug build, got rendering working 4 years ago
Build_Release.sh Cleaned up Debug and Release build scripts 4 years ago
CleanAll.sh Moved dependencies into their own folder 4 years ago
ExportBlenderAssets.py Added loop-de-loop, vehicle auto reset 4 years ago
Jamfile Played with ImGui 4 years ago
Jamrules Removed some whitespace 3 years ago
LICENSE Initial commit 4 years ago
ReadMe.org Updated readme 4 years ago
RunProfiler.sh Integrated tracy to many systems 4 years ago

ReadMe.org

Spargus Vehicle Prototype

This is a 3D vehicle game prototype inspired by the gameplay and feel of the dune buggies in Jak 3.

Videos

Progress videos, newest to oldest:

I created a reference video so I could emulate the Jak 3 behavior. It gives you an idea what the inspiration and goal behavior is

Setup

Clone repository

Clone and init submodules for dependencies:

git clone --recurse-submodules https://github.com/makuto/spargus-vehicle-prototype

Set up build system

Jam is used to build the project. Install Jam:

sudo apt install jam

You will also need Blender 2.8 to build the 3D assets. For Ubuntu, 2.8 is not yet in the repository, so you should download it directly.

If you have a system install of Blender which is <2.8, you need to add sBLENDER=/path/to/blender2.8 to Build.sh and Build_Debug.sh jam invocations.

Build dependencies

Spargus uses several libraries:

  • Bullet 3: Physics, raycast vehicle

  • SFML: 2D graphics, debug 3D graphics, audio, input, window

  • Horde3D: 3D graphics

  • dear ImGui: Debug GUI/editors

  • glm: Math

  • tinyobjloader: .obj loading, for collision meshes

  • tracy: Profiling

Currently, SFML relies on system installs for its dependencies:

sudo apt install libopenal-dev libvorbis-dev libflac-dev libglew

Build the rest of the dependencies from source:

cd spargus-vehicle-prototype
./BuildDependencies.sh
Building with Debug symbols
./BuildDependencies_Debug.sh

Build Spargus

Finally, build Spargus. This builds both code and data assets.

./Build.sh
Building with Debug symbols
./Build_Debug.sh

Run Spargus

spargus_vehicle_prototype should be run in the root directory of the repository.

Dependency notes

SFML Setup

SFML is used for graphics, window, and input. I used my old base2.0 library to wrap SFML if I ever want to switch to SDL.

Running BuildDependencies.sh will build base2.0, which builds SFML from source. Currently, SFML relies on system installs for its dependencies:

sudo apt install libopenal-dev libvorbis-dev libflac-dev libglew

Bullet3 Setup

Spargus Vehicle Prototype uses Bullet3 for physics.

Build bullet3:

cd spargus-vehicle-prototype
./BuildDependencies.sh

Optional: Test the examples:

./Dependencies/bullet3/build_cmake/examples/ExampleBrowser/App_ExampleBrowser

Asset pipeline

Create the asset in your desired modeling program

Add the asset to the Jamfile

Add textures to Jamfile

Run jam

This will build the assets only if necessary.

By hand: Export Collada and Wavefront Obj

Collada is used by Horde3D to display the mesh, while the Obj is used to create the collision mesh. The meshes can differ if desired (e.g. for a low-poly collision mesh). On export, ensure Triangulate Mesh and Apply Modifiers are checked.

Supporting programs

It takes many programs to make a game. This list serves as a working set of everything needed to create Spargus (with the exception of low-level operating system etc.).

Versions are in Italics. They indicate the last working version I used. It is not necessarily required to have the exact same version.

Asset creation

In order to create models, textures, and audio effectively, you need the following programs:

  • GIMP (2.8.22): Textures are created in GIMP and stored in GIMP's .xcf format

  • Blender 2.82: Models and animations are created and stored in .blend. Make sure Collada .dae and Wavefront .obj exporting are enabled

  • Audacity: Audio creation/editing

Toolchain

Source to executable toolchain (Linux x86_64):

  • ClangFormat 6.0.0-1: Code format

  • Jam 2.6: Build system. Builds both code and assets

  • clang++ 6.0.0-1: C++ compiler/linker

  • GNU ar 2.30: Library archive creation (e.g. .a)

  • CMake 3.10.2: Dependency project generation (Spargus itself does not use CMake)

Runtime tools

These tools aren't necessary for creating assets, building or running the game, but they are useful for inspecting the game as it is running.

  • tracy Feb 2020: Used for profiling runtime performance

  • Renderdoc 1.5: GPU debugging

Some of these are included in the Dependencies directory.