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 big players like 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.

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 (using assimp):
        - glTF/GLB
         - OBJ
         - FBX
         - DAE
         - 3DS
         - MD5mesh
    - Images:
        - PNG, JPEG, BMP, TGA, GIF (using stb)
        - SVG (using lunasvg)
        - WEBP (using libwebp)
        - WEBM (video only) (using libwebp)
    - 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
- 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-assimp
010-bass-audio
011-physics-3D
012-physics-2D
013-webm
014-scripting
015-gpu-picking
016-steamworks
017-imgui

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.ASSIMP Assimp lib Handles assimp 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. Default is assets OFF
-- -- --
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_ASSIMP Enables assimp model loading 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_TRACE_EXCEPTIONS Enables exception tracing ON
RAWRBOX_INTERPROCEDURAL_OPTIMIZATION Enables IPO compilation on release ON



INTERNAL DEPENDENCIES



dependencies




EXTERNAL DEPENDENCIES

LIB NOTE
DiligentCore Used for vulkan / directx rendering
glfw Used for window management
-- --
glaze Used for JSON loading
fmt Used for text formatting
utfcpp Used for utf support
-- --
imgui Used for ui rendering
-- --
stb_image.h Used for loading images (png,gif,jpeg)
stb_image_write.h Used for writting images
stb_freetype.h Used for loading fonts
stb_easy_font.h Used for drawing debug text
-- --
thread-pool Used for managing async threading
qhull Used for calculating convex hulls from given points
assimp Used for loading models
catch2 Used for testing
bass Used for loading sounds
JoltPhysics Used for managing 3D physics
muli Used for managing 2D physics
-- --
webmlib & vpx Used for loading webm
libwebp Used for WEBP loading
-- --
luabridge + luau Used for loading & managing lua scripting
curl + libcpr Used for HTTP / HTTPS requests
lunasvg Used for SVG loading
cpptrace Used for easy error tracing