Skip to content

edunad/rawrbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo
RawrBox - PSX..ish game engine

template

Why PSXish?

This engine started as a C++ training project, with hopes of being applied in my own games. Don't expect it to rival Unity, Unreal or Godot; it's not geared towards advanced rendering techniques such as anti-aliasing or ray-tracing. Rather, it's tailored for creating PlayStation 1-style games with modding in mind :).

Important

World Coordinates: left handed.
Matrix: column-major.

FEATURES

Module Features
Engine - C++23
- Tick based system
- Limit FPS and TPS
Animation - Skeleton data support
- Blendshapes support
- Multiple armature animation support
- Vertex animation
Data - File formats:
    - Meshes:
        - GLTF 2.0 (using fastgltf)
        - OBJ (using ???)
- Images:
        - PNG, JPEG, BMP, TGA, GIF (using stb)
        - SVG (using lunasvg)
        - WEBP (using libwebp)
        - WEBM (video only) (using libwebm)
- Fonts:
        - TTF (using stb)
- Audio (using BASS):
        - OGG
        - MP4
        - MP3
        - WAV
        - Supports url audio
- JSON (using glaze)
Math - Vectors, colors, matrices & quaternions support
- Bezier curve & easing
- Packing support (float16, etc)
Physics - 3D multi-threaded physics (using JoltPhysics)
- 2D physics support (using Muli)
Rendering - Vulkan & DirectX 12 support using (Diligent)
- Material system similar to unity
- Window & Input callbacks (using GLFW)
- Clustered rendering :
        - Decals (WIP)
        - Lights (point / spot/ directional)
- Linux (steamdeck) support
- Bindless rendering
- Post-processing support
- 2D rendering
- Custom rendering plugins
- Multiple camera support
- GPU Picking
- IMGUI support
- GPU Particle system
Network - HTTP / HTTPS requests (using libcpr)
- Packet network implementation
- NetVar & NetArray support for snapshot implementation
- Simple socket implementation
Scripting - Scripting / modding support with LUAU (using luabridge3 + luau)
Other - I18N (internationalization) support
- Settings support
- Steamworks support
- Custom UI
- DEV Console with support for custom commands & scripts
- Timer utils (based on GMOD's timers)
- File watcher implementation
- Threading utilities

SAMPLES

001-stencil
002-generated-models
003-light
004-instancing
005-post-process
006-decals
007-particle-system
008-ui
009-gltf
010-bass-audio
011-physics-3D
012-physics-2D
013-webm
014-scripting
015-gpu-picking
016-steamworks
017-imgui
018-camera

BUILDING

WINDOWS

REQUIRED SOFTWARE

  • Microsoft Visual C++ Redistributable 2015 - 2022 version
  • Vulkan SDK (ensure the enviroment paths are correct)
  • GIT or something similar to GIT
  • CMAKE at least > 3.16.3
  • Download and install C++ Build Tools (2022 is recommended)
  • Download and install a IDE, Visual Code is recommended.
  • Download and setup ninja (make sure it's in the enviroment path)
    • pip install ninja if you have python3 installed
  • C++23 is required to build.

IDE SETUP (Visual Code)

  1. Open the workspace file (.code-workspace) and install the recommended extensions (at least C++ & CMAKE)
  2. Run cmake configure
  3. Select [Visual Studio Build Tools <version> Release - amd64] on the kit popup (for all of the projects)
  4. Run the compiler by hitting F5

LINUX

REQUIRED SOFTWARE

SETUP

  1. Build the container : podman build -t rawrbox .
  2. Run the container : podman run -ti rawrbox /bin/bash
  3. Run cmake_rawrbox (ALIAS) to prepare the cmake rawrbox
  4. Run build_rawrbox (ALIAS) to build rawrbox

LIBS

LIB DESCRIPTION USAGE DEPENDENCIES
RAWRBOX.RENDER Rendering lib (aka, contains window, stencil, etc) Contains window, stencil, model / texture loading. Basically anything related to rendering ENGINE & MATH
RAWRBOX.MATH Math lib Contains vector, color and other math related classes
RAWRBOX.BASS Bass lib (aka sound loading) Loads sounds using the BASS lib, supports 3D & http sound streaming ENGINE & MATH
RAWRBOX.UTILS Utils lib Utils for game development
RAWRBOX.ENGINE Engine lib (aka game loop) The engine it self, contains the game loop mechanism UTILS
RAWRBOX.UI UI lib UI components lib RENDER & RESOURCES
RAWRBOX.RESOURCES Resources manager lib Resource manager. Handles loading and stores the pointers for easy access UTILS
RAWRBOX.PHYSICS.3D 3D Physics lib Handles 3D physics ENGINE & MATH
RAWRBOX.PHYSICS.2D 2D Physics lib Handles 2D physics ENGINE & MATH
RAWRBOX.GLTF GLTF lib Handles gltf2.0 model loading RENDER & RESOURCES
RAWRBOX.WEBM WEBM lib Handles webm loading RENDER & RESOURCES
RAWRBOX.SCRIPTING Scripting lib Handles lua & mod loading ENGINE & MATH
RAWRBOX.NETWORK Networking lib Handles networking
RAWRBOX.STEAMWORKS Steamworks lib Handles steamworks UTILS
RAWRBOX.IMGUI IMGUI lib Handles imgui RENDER



CMAKE OPTIONS

OPTION NAME NOTE DEFAULT
RAWRBOX_BUILD_TESTING Builds & enables project tests OFF
RAWRBOX_BUILD_SAMPLES Builds the project sample OFF
-- -- --
RAWRBOX_CONTENT_FOLDER The content folder to output assets Assets
-- -- --
RAWRBOX_USE_WAYLAND Enables WAYLAND compiling on LINUX OFF
-- -- --
RAWRBOX_BUILD_RAWRBOX_RENDER Builds and the renderer, disable for renderless programs ON
RAWRBOX_BUILD_RAWRBOX_UI Builds rawrbox ui (alternative to imgui) OFF
RAWRBOX_BUILD_RAWRBOX_RESOURCES Builds the resouces manager (aka handling and storing loaded resources) OFF
RAWRBOX_BUILD_RAWRBOX_3D_PHYSICS Builds the 3D physics engine OFF
RAWRBOX_BUILD_RAWRBOX_2D_PHYSICS Builds the 2D physics engine OFF
RAWRBOX_BUILD_RAWRBOX_BASS Enables BASS support. ⚠️ BASS IS ONLY FREE FOR OPEN SOURCE PROJECTS ⚠️ OFF
RAWRBOX_BUILD_RAWRBOX_GLTF Enables gltf2.0 model loading support OFF
RAWRBOX_BUILD_RAWRBOX_WEBM Enables WEBM loading OFF
RAWRBOX_BUILD_RAWRBOX_NETWORK Builds network support OFF
RAWRBOX_BUILD_RAWRBOX_IMGUI Builds imgui support OFF
-- -- --
RAWRBOX_BUILD_RAWRBOX_SCRIPTING Enables lua & modding support OFF
RAWRBOX_SCRIPTING_UNSAFE Enables io support on lua (loading and saving files on the data folder) OFF
RAWRBOX_SCRIPTING_EXCEPTION Enables scripting throwing exceptions instead of catching them OFF
RAWRBOX_SCRIPTING_WORKSHOP_MODDING Enables workshop utilities (useful for steam workshop / mod.io) OFF
-- -- --
RAWRBOX_BUILD_RAWRBOX_STEAMWORKS Enables steamworks support OFF
STEAMWORKS_APPID Sets the steamworks appid OFF
-- -- --
RAWRBOX_BUILD_QHULL Builds QHull util OFF
-- -- --
RAWRBOX_BUILD_MSVC_MULTITHREADED_RUNTIME Builds libraries with MSVC Multithreaded runtime (Auto-enabled if jolt is used) OFF
-- -- --
RAWRBOX_DISABLE_SUPPORT_DX12 Disable dx12 support OFF
RAWRBOX_DISABLE_SUPPORT_VULKAN Disable vulkan support OFF
-- -- --
RAWRBOX_DEV_MODE Enables all the modules, used for rawrbox development OFF
-- -- --
RAWRBOX_INTERPROCEDURAL_OPTIMIZATION Enables IPO compilation on release ON



INTERNAL DEPENDENCIES



dependencies




EXTERNAL DEPENDENCIES

LIB NOTE LICENSE
DiligentCore Used for vulkan / directx rendering Apache License 2.0
glfw Used for window management ZLIB
glaze Used for JSON loading MIT
fmt Used for text formatting CUSTOM
utfcpp Used for utf support Boost Software License 1.0
imgui Used for ui rendering MIT
stb_image.h Used for loading images (png,gif,jpeg) MIT / Public Domain
stb_image_write.h Used for writting images MIT / Public Domain
stb_freetype.h Used for loading fonts MIT / Public Domain
stb_easy_font.h Used for drawing debug text MIT / Public Domain
thread-pool Used for managing async threading MIT
qhull Used for calculating convex hulls from given points CUSTOM
fastgltf Used for loading gltf2.0 models MIT
catch2 Used for testing Boost Software License 1.0
bass Used for loading sounds FREE / PAID
JoltPhysics Used for managing 3D physics MIT
muli Used for managing 2D physics MIT
webmlib & vpx Used for loading webm BSD 3-Clause
libwebp Used for WEBP loading BSD 3-Clause
luabridge3 Used for loading & managing lua scripting MIT
luau Used for lua scripting MIT
lua Used for lua scripting CUSTOM
curl Used for HTTP / HTTPS requests MIT
libcpr Used for HTTP / HTTPS requests MIT
lunasvg Used for SVG loading MIT
meshoptimizer Used to optimize meshes MIT
ozz-animation Used to animate skinned meshes MIT
spdlog Used for logging MIT