Git Product home page Git Product logo

delphi3d-engine's Introduction

Delphi3D-Engine

A 3D-graphic and game engine for Delphi, DirectX 11 and Windows. It was used to develop the free-to-play multiplayer game Rise of Legions.

Usage

Engine

Either copy all files in your project or the way we usually link to it: Add the Engine directory and all subdirectory to your search path in Delphi (must be configured for each target 32-bit and 64-bit). The engine is tested (in Rise of Legions) to work with 32-bit using the graphic components (client) and 64-bit working without any graphic (server).

  • With Delphi 10.1 Berlin (version it was developed in): The built-in DirectX-Headers contains some bugs, which has been fixed by us. Ensure to include the directory FixedDX11Header in your project, so the fixed WinapiD3D11.pas is used. Additionally you need to copy the FMX-Source-Files (from Embarcadero\Studio\18.0\source\fmx) into that folder as well to compile them with the patched api headers. Apply the diff FMX.Canvas.D2D.diff to the respective file.
  • With Delphi 10.4+ (feedback from community): Delete the WinapiD3D11.pas from the FixedDX11Header directory, remove the line FMX.Canvas.D3D.TCustomCanvasD2D.LoadFontFromFile(Path); from Engine.GfxApi. There won't be custom fonts, but it should compile and work then.

Editors

The editors in this repository should be working and give you hints about the engine usage and can be used to create and configure effects. (tested in Delphi 10.1 Berlin)

Warning

To be honest this engine has lots of neat functionality, but is not easy to use. This project was developed by my friend an me since our studies over many years. There are a lot of features, but no real documentation (except sometimes more sometimes less code comments) and surely a lot of bugs, if anyone new to the engine will use it. I would advice to use this engine with care and have a look at the source code of Rise of Legions or the editors for some hints about the usage of the modules.

Features

  • Graphics
    • DirectX 11 graphic adapter
    • Camera
    • Forward and Deferred Lighting
    • Mesh + Skinned Mesh Animation + Morph Animation + FBX support
    • dXML - Dynamic UI system based on HTML+CSS+Vuejs style
    • Particle Effects
    • Post Effects
    • Dynamic shader creation with django like block system
    • Terrain Rendering
    • Vegetation Rendering
    • Water Rendering
    • Dynamic custom vertex rendering
  • Component-driven Eventsystem
  • Input handling for mouse and keyboard (also multiple mice support with RAW input)
  • Network
  • Scripting adapter for DWScript
  • Automatic serialization with attributes
  • Sound system (adapter for FMOD and OpenAL)
  • DataQuery - LinQ similar query language
  • Math
    • Vector and Matrix arithmetic
    • 3D and 2D Collision arithmetic
    • Pathfinding
  • Tons of helpers
  • Partially translated headers for Steam API and FMOD

Workarounds

The DirectX SDK throws a lot of warnings which are printed by Delphi in the editor output while in debug. This printing consumes a lot of performance, e.g. the editors seems to run slowly when this happens. To work around this you can use the dxcpl.exe for the DirectX SDK to mute the warnings showing up.

License

License: MPL 2.0

The code base is distributed under MPL 2.0

It make use of other Open-Source-Software stated below:

assimp - Modified, 3-clause BSD-License - Used for importing model files like FBX.

DWScript - MPL 1.1 - Used as scripting language.

Imaging - MPL - Used for importing texture of complex formats.

Jedi-WinApi - MPL 1.1 - Used for various windows functions.

LockBox - MPL 1.1 - Used for hashing.

VerySimpleXML - MPL 1.1 - Used for XML parsing.

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.