Skip to content
forked from andreasdr/tdme2

TDME2 - ThreeDeeMiniEngine2 is a lightweight, multi-platform 3D engine including tools suited for 3D game/application development using C++11

License

Notifications You must be signed in to change notification settings

fre3Darchi/tdme2

This branch is 2396 commits behind andreasdr/tdme2:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cda1258 · Jan 21, 2022
Jan 11, 2022
Sep 17, 2021
Jan 21, 2022
Jan 10, 2022
Jan 15, 2022
Jan 10, 2022
Dec 21, 2021
Jan 21, 2022
Jan 15, 2019
Jan 12, 2022
Jan 15, 2022
Jan 14, 2022
Jan 10, 2022
Jan 15, 2022
Sep 14, 2021
Sep 2, 2021
Jan 20, 2022
Jan 14, 2022

Repository files navigation

License: MIT NIX Build Status MacOSX Build Status Windows/MINGW Build Status Windows/MSC Build Status Coverity Scan Build Status

LOGO

1. What is TDME2?

2. Features

  • Application
    • creates main window and initializes OpenGL/Vulkan context and does HID via GLFW3
    • supports
      • setting window position and dimension
      • setting full screen or windowed, borderless windowed mode
      • setting application icon
      • setting mouse position and mouse cursor
      • executing other applications or background applications
      • swapping double buffered buffers (to screen) manually if required
      • checking if application is active (port-mingw, port-msc only for now)
      • setting and getting data from clipboard
    • provides
      • a crash handler for port-msc and port-mingw which also saves backtrace to crash.log
      • application life cycle
  • Math
    • Math class with common math functions
    • Vector2, Vector3, Vector4, Matrix3x3, Matrix4x4 and Quaternion class
      • those have a ordinary API + operators, the latter is still a bit WIP
  • 3D engine
    • model reader
      • DAE
        • node names/ids must not have whitespace characters
        • requires baked matrices
        • requires triangulated meshes for now
      • FBX via FBX SDK
      • GLTF via tinygltf
      • TDME Model file format
        • this is a much more efficient model file format for TDME
        • can also be written
    • objects/entity types
      • 3d model based objects with
        • animations
          • supports model object base animation and animation overlays
          • supports animation blending
        • skinning via
          • CPU on GL2, GL3+/CORE, GLES2
          • GPU via compute shaders with GL4.3+/CORE, Vulkan, GL3+/CORE via OpenCL for MacOSX
          • which also supports several instances of the same object to reduce compute and render calls
        • both animations and skinning have some sort of configurable LOD functionality
        • texture transformations/animations
          • via texture matrices
      • objects with support for LOD
      • imposter objects with support for LOD
      • render group objects for foliage and such including LOD support
      • particle systems which
        • are object based
        • or point based, including sprite sheet animation support
        • or for fog purposes
        • and support
          • basic/point emitter
          • sphere emitter
          • bounding box emitter
          • circle on plane emitter
          • ...
        • there is also support for particle system groups
      • lines based objects
      • entity hierarchy objects
      • environment mapping objects
        • which can be used as reflection sources of other objects
    • object/entity transformations
      • scaling
      • rotations
      • translation
    • color effects on objects/entities
      • color addition
      • color multiplication
    • lighting
      • supports specular lighting
        • supports phong lighting
        • supports phong shading on GL2, GL3+/CORE, Vulkan
        • supports gouraud shading on GLES2
        • supports diffuse mapping on GLES2, GL2, GL3+/CORE, Vulkan
        • supports specular shininess mapping on GL3+/CORE, Vulkan
        • supports normal mapping on GL3+/CORE, Vulkan
        • supports reflection mapping from cube maps on GLES2, GL2, GL3+/CORE, Vulkan
      • supports PBR lighting with IBL
      • supports deferred shading and forward shading on GL3+/CORE, Vulkan
    • custum shaders that currently include
      • specular lighting
      • specular lighting + foliage
      • specular lighting + tree
      • specular lighting + terrain
      • specular lighting + water
      • sky(no lighting + fragment depth at maximum)
      • PBR lighting
      • PBR lighting + foliage
      • PBR lighting + tree
    • shadow mapping
    • early z rejection
    • post processing
      • depth blur
      • desaturation
      • light scattering
      • SSAO
      • vignette
    • object picking
    • camera control
      • set up look from, look at, up vector can be computed
      • frustum culling via oct tree
    • supports offscreen instances
      • rendering can be captured as screenshot
      • rendering can be used (in other engine instances) as diffuse texture
    • supports down/up scaled rendering of main engine
    • screenshot ability
    • multiple renderer backends, which are loaded at runtime
      • GLES2, GL2, GL3+/CORE and Vulkan
  • Physics via ReactPhysics3D 0.7.0
    • have sphere, capsule, obb, convex mesh, concave terrain mesh, height map bounding volumes
    • have multiple bounding volumes per body
    • have static, dynamic rigid bodies and collision bodies
    • uses discrete collision detection
    • rigid body simulator
    • ray tracing
    • for RP3D internals and additional features see ReactPhysics3D website
  • Path finding/flow maps
    • uses A*
    • is paired with physics world to determine if a "cell" is walkable
    • optional custom walkable test
    • path finding utility supports generating flow maps
  • 3D audio
    • decoder
      • ogg vorbis decoder
    • audio entities
      • streams
      • sounds
  • GUI system
    • borrows some ideas from Nifty-GUI regarding XML and layouting
    • borrows some ideas from AngularJS like
      • all nodes are in the GUI node tree and can be made visible or unvisible depending on conditions
    • adds some improvements like
      • support auto keyword with nodes width and height attributes
      • layouting on demand in combination with conditions
    • supported primitive nodes from which compounds are built of
      • element
      • gradient
      • image(plus framebuffer and texture image nodes)
      • input
      • layer
      • layout
      • panel
      • scrollbars
      • space
      • table
      • text + multiline text
    • supports custom templates and compound elements defined by templates and its controllers
      • compound elements
        • button
        • checkbox
        • dropdown
        • image button
        • input
        • knob
        • menu
        • progress bar
        • radio button
        • scrollarea
        • selectbox including tree view
        • selector horizontal
        • slider horizontal
        • slider vertical
        • tabs
      • supports custom templates in general
      • supports overriding used template of a compound element while using its controller
      • so TDME2 GUI is fully customizable in terms of appearance by modifying or adding XML template definitions
    • includes a simple script language
      • to react on events with like on-mouse-click, ... and on-change for elements
      • to manipulate conditions of elements, values of element controller and node properties
    • supports position and color based effects in combination with conditions that can also be defined via XML
  • MiniScript
    • very small implementation of a scripting language without byte code, VM or what ever
    • runs on every CPU, OS, ... due to its simplicity, so its highly portable just like TDME2 is
    • can be easily extended by writing state machine machine states and script methods in C++
    • only works with the following data type primitives: boolean, integer, float, string, vector3 and transformations
    • when calling script methods/returning from methods it does not use references or pointers but only value by copy
    • supports operators by operator to method mapping by a preprocessor run
    • supports loops and conditions
    • sort of event based
    • how to use:
      • each script is attached to a game entity so it for now does not need something like OOP
      • communication between script instances is possible via setting/getting variables
        • if required we will add methods support in the scripts itself
      • complex logic should still be implemented by a game developer in C++ by extending MiniScript
      • game designers can use MiniScript + those methods to implement high level game logic
    • can be "easily" transpiled to C++ later
    • MiniScript methods/states know about them self, so a whole documentation for MiniScript usage can be generated later
  • Networking module, which consists of
    • UDP server
      • n:m threading model with non blocked IO via kernel event mechanismns(epoll, kqueue or select)
      • supports safe messages with acknowledgment and automatic resending
      • supports fast messages
      • can be used in a heavy multithreaded environment (the networking module is thread safe)
      • IPV6 ready
    • UDP client
      • has single thread with a simple threadsafe API
      • supports all features required by UDP server
      • IPV6 ready
    • Simple HTTP client
      • uses a blocking TCP socket, thus it has a simple blocking API
      • Ready for REST providing all methods, setting content type and body
      • be able to set GET and POST parameters via unordered map
      • supports basic authentification
      • IPV6 ready
    • HTTP download client
      • supports basic authentification
      • uses a separate thread to download to file
      • IPV6 ready
  • Operating system abstraction layer
    • file system
      • standard file system
      • zlib based compressed archive file system and a tool to generate it from ./resources and ./shader folder
    • multi threading
      • atomic operations
      • barrier
      • condition
      • consumer/producer queue
      • mutex
      • read write lock
      • spin lock
      • thread

3. Tools

  • Editor
  • Installer
    • TDME2 itself and TDME2 applications can be installed with TDME2 installer, which supports
      • offline installations
      • installation using HTTP download from a repository which is easy to set up
      • updating/repairing/uninstalling
    • TDME2 tools contains the installer creation application, whereas
      • installer definitions are set up using property files
      • create-installer is able to group files into components
  • Other tools
    • archive tool to generate a single compressed file file system from ./resources and ./shader folders
    • converttotm tool to generate TDME2 model files
    • createinstaller tool to generate installer application and archives
    • generatelicenses tool to generate complete engine or project licenses from ./ext folders
    • importtmodel tool to generate TDME2 tmodel prototype files using model and bounding volumes models
    • makefilegenerator tool to generate Makefiles for TDME2 based projects
    • optimizemodel tool to generate texture atlases and bake down model mesh nodes into a few one to reduce GL/VK (render/compute) calls
    • sortincludes tool to sort "include" and "using" source code statements
    • others ...

4. What does it (maybe still) lack

  • physics
    • some more RP3D integration
  • example games
  • documentation

5. What is WIP or planned

  • PBR: generate IBL cube maps from scene
  • Shader parameters, the system is implemented and working, now lets connect tools and shaders
  • Reflections via environment mapping(reflection intensity maps feature is missing for specular materials)
  • Optimizing models with specular lighting regarding render calls by reducing nodes and materials to a minumum
  • GUI effects via XML definitions
  • Port WarStorys "Game Foundation" to TDME2, which organizes game logics, enables communcation between them and enables to do network IO and such
  • MiniScript: more engine bindings
  • MiniScript: MiniScript -> C++ transpiler
  • Add nmake support to makefile generator for TDME2 based projects
  • Editor: complete Undo/Redo and Copy/Cut/Paste/Delete
  • Editor: Code editing with code completion, also visual code and shader editing is planned!
  • Vulkan: Performance improvements
  • Some UI elements need some focus/disabled fixes
  • A release plan
  • A demonstration video

6. Technology

  • designed for simple multi threading, but
    • 3D rendering engine uses multiple threads if using Vulkan renderer, or one thread only if using a GL renderer
    • UDP client has its own thread
    • UDP server can have multiple IO threads, multiple worker threads and always has its own server thread
    • HTTP download client has its own thread
    • physics or game mechanics can also run in a separate thread(s)
  • uses 3rd party libraries
    • needs to be installed
      • OpenGL
      • OpenAL
      • glew
      • pthreads
      • GLFW3
      • Vulkan(optional)
    • included in TDME2 repository
      • FBXSDK
      • libpng
      • ReactPhysics3D
      • RapidJSON
      • sha256
      • tinygltf
      • tinyxml
      • V-HACD
      • Vorbis/OGG
      • Vulkan
        • glslang
        • OGLCompilersDLL
        • simple_vulkan_synchronization
        • spirv
        • VulkanMemoryAllocator
      • zlib
  • targeted platforms and its current state
    • Windows/MINGW(port completed)
    • Windows/MSC(port completed)
    • Linux(port completed)
    • MacOSX(port completed)
    • FreeBSD(port completed)
    • NetBSD(port completed)
    • OpenBSD(port completed)
    • Haiku(port completed)
    • Android(port pending)
    • iOS(port pending)

7. Other information

7.1. Links

7.2. External references

7.3. Other credits

  • Dominik Hepp
  • Mathias Lenz
  • Kolja Gumpert
  • Mathias Wenzel
  • Sergiu Crăiţoiu
  • Chantal Zabel
  • others

7.4. Special thanks go to

  • Kristin Meissner
  • Dominik Hepp

8. Collaboration

  • Interested in collaboration? Then drop me a line via mail or use the issues section on tdme2@github or on tdme2@codecks
    • You can help with testing and reporting bugs
    • I have easy to hard task regarding engine/tools development
    • I have tasks regarding documentation
    • I even might have system administrator tasks

9. Donation

About

TDME2 - ThreeDeeMiniEngine2 is a lightweight, multi-platform 3D engine including tools suited for 3D game/application development using C++11

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.8%
  • C 21.2%
  • GLSL 0.4%
  • Yacc 0.4%
  • Makefile 0.1%
  • Objective-C 0.1%