Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT]Rewriting the engine in C++ #7

Draft
wants to merge 225 commits into
base: master
Choose a base branch
from

Conversation

NicusorN5
Copy link
Member

@NicusorN5 NicusorN5 commented Feb 16, 2022

Rewriting the engine in C++ could allow more control and performance compared to the old Monogame releases. Monogame has limited 3D rendering capabilities, namely the assimp implementation allows a maxiumum of 72 bones, BasicEffect (Blinn-Phong with limited control over the variables), broken UVW mapping, and some cross compatibility issues.

I do realise this will take months, but I think it is worth it.

Currently, it is being written using plain Winapi32 and DirectX11 (native windows technologies, duh). Future implementation could use NVRHI and a cross platform GUI library.


Tasks are placed in the order they are finished.

Complete tasks

  • Binaries in the repo. #1
  • Initializing Windows API window.
  • Setup main interface
  • Initializing DirectX11 device
  • Keyboard shortcuts
  • Drag and dropping projects
  • Implementing the Camera object
  • Rendering matrices (MVP + SRT transforms)
  • Drawing the center X-Y-Z axis
  • Depth buffer
  • Implement a basic color shader (Vertex position-color) shader with no transform and transforms
  • Object selection interface
  • Implement runtime created dialog box memory templates
  • Textured shader
  • Model loading using Assimp
  • Skinmesh object
  • Content manager
  • Command line arguments parsing
  • Sprite object
  • Autoupdater
  • Mathematical data structures APIs (Matrix, Vector3, et cetera)
  • Settings
  • G-Force object
  • Skinmesh/Model previewer
  • Implement NVidia PhysX as a physics engine
  • Empty object
  • SkyColor object
  • Project I/O
  • Font loading
  • Font rendering
  • TextPrint object
  • SpriteBatch implementation
  • Macro based reflection (reflective programming, not reflection shaders)
  • Fog object
  • Counter object

Tasks that are currently being worked on

  • ⏳ Skinmesh mouse picking
  • ⏳ C# bindings
  • ⏳ 3D primitives
  • ⏳ Audio device handle creation
  • ⏳ "Legacy" 3D Rad v722 style APIs
  • ⏳ UI Translation/Rotation/Scale buttons similar to 3D Rad v722
  • ⏳ Fog shader
  • ⏳ Writing and generating documentation

TO DO Tasks

  • Collision editor
  • Loading sounds
  • Playing sounds
  • Gizmos
  • Visual Studio support
  • ExitFade object
  • Timer object
  • EOL object
  • EOK object
  • SoundSource object
  • SoundEffect object
  • Skybox object
  • Script object (C#)
  • FPVCamera object
  • Rigidbody object
  • Force object

Tasks list taken from: https://github.com/orgs/3DRadSpace/projects/10

Athanatos added 30 commits August 18, 2021 17:30
Not using Monogame anymore, switching to C++ DX11/DirectXTK
Made Shader,VertexBuffer, ShaderInputLayout and ResourceCreationException classes.

Made Vector4 and Vertex[type]Declaration structs

All that code was written in 1 go and it worked for the first time. lmao I'm still amazed
--> I continued to make the code more modular
--> Implemented IObject and Camera

TODO:
--> Implement shader parameters
It looks so broken GAH
Now to fix the axis model...
NicusorN5 added 3 commits May 26, 2024 18:45
Kinda works, but all asset previews are broken and save a plain coloured image.
@NicusorN5
Copy link
Member Author

CMake building works with VS2022 on Windows 10. Post build processes are broken at the moment.

NicusorN5 added 3 commits May 28, 2024 00:41
Fixed by writing an optimisation in SpriteBatch to not create new VertexBuffers in each Draw() update, but to modify an existing Vertex Buffer with an initial capacity of 1024 and a growth factor of 2.

Fixed VertexBuffer usage variable not being used in the ctor. Thus also fixing
::SetData() throwing exceptions.

Finally, also fixed the post build process.
@NicusorN5
Copy link
Member Author

Currently using a naive font atlas implementation, see results in the picture below:
image

Visual Studio doesn't seem to define NDEBUG when switching to Release-x64, this is so fcking stupid. I'm beginning to hate VS2022. May want to try CLion again.
The LookAt vector doesn't seem to update, either way, I fixed some regressions induced by the last refactor
@NicusorN5
Copy link
Member Author

For the moment, I will consider the reflection component (without reflecting member functions) and the spritebatch (despite text rendering not being optimised with one single draw call) tasklists complete.

I'm switching the goal to a earlier but more unstable release.

@NicusorN5 NicusorN5 added the urgent Should be fixed ASAP. label Dec 28, 2024
@NicusorN5
Copy link
Member Author

Marking #1 as complete, since I won't bother editing the git history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature urgent Should be fixed ASAP.
Projects
Development

Successfully merging this pull request may close these issues.

Binaries in the repo.
1 participant