Giter Club home page Giter Club logo

moltenengine's Introduction

Hi there ๐Ÿ‘‹

I am a full-time software engineer with significant experience in developing in-house/internal university systems and integrations. I have 15+ years of experience with .NET, C# and ASP.NET, but also a lot of experience with PowerShell, Batch, Python, PHP, MS-SQL, JS/Typescript and many of the common JS frameworks/libraries.

On the game development side of the things, I have previously released two mobile games. These are Physworks on Windows Phone 7 (now defunct) and Fizz Filler on Android. I'm also developing my own game engine in my spare time, named Molten, which uses the DirectX 11/12 and Vulkan graphics APIs.

If you have any questions, feel free to contact me via GitHub or any of my linked social media profiles.

๐Ÿ”Ž Github Profile Details

Syncaidius

โšก Github Stats

Syncaidius Syncaidius

๐Ÿ”ฅ Github Streaks

Syncaidius

๐Ÿ† Github Achievements

Syncaidius

moltenengine's People

Contributors

azure-pipelines[bot] avatar dependabot[bot] avatar github-actions[bot] avatar syncaidius avatar zeracronius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moltenengine's Issues

Main renderer thread locks OutputSurfaces collection.

The Renderer_main thread locks the OutputSurfaces collection preventing adding additional output windows while presenting.

Main thread is trying to add additional output surfaces here:

engine.Renderer.OutputSurfaces.Add(window);

Renderer is locking the collection here:

OutputSurfaces.For(0, 1, (index, surface) =>

Which then locks the collection until it has finished presenting every surface while the main thread is in a spin-lock causing a race condition.

billede

Occlusion Culling

Add support for occlusion culling in the scene graph/system. This will be one of several provided culling methods.

DX11 Renderer - Dynamic buffers and Discard

With the current dynamic buffer implementation, if any of the dynamic buffer segments map using the DISCARD flag, all data for other segments in the same buffer is discarded too.

This is a problem if multiple segments are mapped with DISCARD because each subsequent map call will discard the data of the previous map call within the same frame, on the same buffer.

This can be resolved by using DISCARD only on the first map call, then NO_OVERWRITE for subsequent calls during the current frame.

Implement Console Window

Implement an in-engine/game console window for aiding development:

  • Implement console window UI
  • Implement ConsoleWindowWriter for attaching to a Logger
  • Implement console command system to allow commands to be called via a Console Window

Renderer - Molten.Renderer.MonoGame

Create a MoltenRenderer implementation based on MonoGame, to provide a stepping-stone towards full cross-platform support. MonoGame already provides cross-platform renderer capabilities.

This means the full engine can be used with a good cross-platform foundation, while the fully-featured renderers are developed (OpenGL, DX11/12 and Vulkan).

OpenGL Support

Add support for OpenGL:

  • OpenGL ES:

    • Android
    • iOS
  • OpenGL 4.x:

    • Windows
    • Mac
    • Linux

Implement Missing SpriteBatcher Methods

Implement the following methods:

  • DrawRoundedRect() - Takes a border radius. If radius is zero, silently revert to DrawRect()
  • DrawRoundedRectOutline() - Takes a border radius. If radius is zero, silently revert to DrawRectOutline()
  • DrawCircleOutline()
  • DrawEllipseOutline()
  • DrawShapeOutline() - Draws the outline of a Shape object
  • DrawShape() - Draws a solid, filled Shape object
  • DrawEdge() - Accepts Shape.LinearEdge, Shape.QuadraticEdge and Shape.CubicEdge
  • DrawGrid() - Draws a grid with customizable cell size, line thickness and colours

Mouse cursor jumping on window focus

The mouse cursor jumps if you first click outside of the window, then click inside of it.

The cursor will jump to the last-clicked location outside of the window.

Implement SpriteSheet class

Implement SpriteSheet class for rendering multiple sprites from the same texture with ease.

Also support sprite animations and keyframing.

Visual Studio Templates

Add project templates:

  • Standard Game Template - Provides the foundation needed for creating a game with the editor
  • Barebones Template - Provides only what is needed to update, render and read input. No editor. Similar to Monogame/XNA and XNA templates.
  • Terminal/Headless Template - Provides a foundation with no rendering capability. Perfect for servers

Take into account the following editors:

  • Visual Studio
  • Jetbrains
  • MonoDevelop
  • Visual Studio Code

Frustum Culling

Add support for frustum culling in the scene graph/system. This will be one of several provided culling methods.

Engine not correctly closing log streams on exit

To replicate:

  1. Start a sample
  2. Close sample
  3. Attempt to delete log file - denied
  4. Attempt to start a new sample (without closing the sample list window)
  5. Exception thrown due to write access being held by the previous log stream

Default Content

Content handles should be populated with default assets (if available) upon instantiation. This allows for a usable asset to be provided, while the requested one is loaded/retrieved asynchronously. Allow allow default assets to be retrieved or set directly.

Implement the following on ContentManager:

  • T asset = ContentManager.Default() for retrieving the default asset of a specific type. E.g. Font or texture
  • ContentManager.Default(T value) for setting default asset of a specific type

Implement the following on IContentProccessor:

  • IContentProccessor.LoadDefault() - Virtual which can optionally provide a default asset, which should only be loaded on the first request of default or if a Load() request fails to find the requested file

[Input] Gesture Support

Add support to PointingDevice for gestures.

These could be provided via a path made up of bezier curves or edges, for a pointer to follow within a given acceptance range.

Multi-touch gestures could be built by combining multiple of such paths, to create a composite multi-touch gesture.

Implement headless Foundation class

Implement headless Foundation<I> class. Currently only Foundation<R,I> exists.

A headless implementation would not include a renderer. An optional console window should still be available.

[DX11] Deferred Context Support

Implement support for, and make use of, deferred DirectX 11 contexts. These allow GPU commands to be queued up by multiple threads in advance of them being sent to the GPU.

UI System

This issue is for tracking progress on the UI system. Feel free to post any suggestions here also.

Core:

  • #78
  • Mouse & touch input handling
  • #85
  • Parenting
  • #67
  • #76
  • Compound components - e.g. scroll area made of a panel and 2 scroll bars
  • UIManagerComponent - A scene component for managing the update and render of UI. Scene input should pass through this for UI interaction.
  • #77
  • #84
  • #93

Elements:

  • Button - UIButton
  • Checkbox - UICheckbox
  • Collapsible panel with toggle button and label
  • Container - UIContainer
  • #90
  • #100
  • #88
  • Horizontal scrollbar - UIScrollBar
  • Image - Automatically handles loading of image asset to avoid render issues. Should display colored rectangle if no image
  • Label/Text - UILabel
  • #87
  • #86
  • #101
  • #91
  • GridView - Displays a grid of grid cells. Each cell can have elements parented to it which will render inside it
    • GridViewItem
  • List view - UIListView
  • #128
  • #75
  • Panel - UIPanel
  • #89
  • #102
  • Scroll area - UIContainer
  • Sprite - UISprite - Provides functionality for rendering a static or animated sprite into UI
  • Loading wheel/spinner - configurable speed, segment count, fade, etc
  • Stack panel - UIStackPanel - Renders children horizontally or vertically in order
  • #74
  • #73
  • #72
    • TreeViewItem
  • Vertical scrollbar - UIScrollBar
  • Window - UIWindow

Visual Studio 2019 support

I installed Framework 4.8 and when I try to run the examples project I immediately get System.BadImageFormatException.

The exception is raised when trying to call GetTests method within the MainWindow constructor.

Also the content editor won't even compile.

I have no idea if it's problem on my side.

Crash when disposing a Winforms Render control

As the title says. This happens if you dispose the control before it is done initializing. Stack trace:

[20:20:40]    Type: System.NullReferenceException
[20:20:40]    Message: Object reference not set to an instance of an object.
[20:20:40]    Source: Molten.Input.Windows
[20:20:40]    HResult: -2147467261
[20:20:40]    Target Site: GetHandle
[20:20:40]    at Molten.Input.KeyboardDevice.GetHandle() in C:\Git\MoltenEngine\Molten.Input.Windows\KeyboardDevice.cs:line 103
[20:20:40]    at Molten.Input.KeyboardDevice.Surface_OnPostResize(ITexture texture) in C:\Git\MoltenEngine\Molten.Input.Windows\KeyboardDevice.cs:line 124
[20:20:40]    at Molten.Graphics.TextureAsset2D.AfterResize() in C:\Git\MoltenEngine\Molten.DX11\Textures\TextureAsset2D.cs:line 179
[20:20:40]    at Molten.Graphics.RenderControlSurface.AfterResize() in C:\Git\MoltenEngine\Molten.DX11\Surfaces\RenderControlSurface.cs:line 167
[20:20:40]    at Molten.Graphics.RenderControlSurface.CreateTextureInternal(Boolean resize) in C:\Git\MoltenEngine\Molten.DX11\Surfaces\RenderControlSurface.cs:line 61
[20:20:40]    at Molten.Graphics.TextureBase.CreateTexture(Boolean resize) in C:\Git\MoltenEngine\Molten.DX11\Textures\TextureBase.cs:line 283
[20:20:40]    at Molten.Graphics.TextureBase.ApplyChanges(GraphicsPipe pipe) in C:\Git\MoltenEngine\Molten.DX11\Textures\TextureBase.cs:line 650
[20:20:40]    at Molten.Graphics.SwapChainSurface.Present() in C:\Git\MoltenEngine\Molten.DX11\Surfaces\SwapChainSurface.cs:line 54
[20:20:40]    at Molten.Graphics.RendererDX11.<>c.<Present>b__40_0(Int32 index, ISwapChainSurface surface) in C:\Git\MoltenEngine\Molten.DX11\Renderer\RendererDX11.cs:line 285
[20:20:40]    at Molten.Collections.ThreadedList`1.ForInterlock(Int32 start, Int32 increment, Func`3 callback) in C:\Git\MoltenEngine\Molten.Utility\Collections\ThreadedList.cs:line 694
[20:20:40]    at Molten.Graphics.RendererDX11.Present(Timing time) in C:\Git\MoltenEngine\Molten.DX11\Renderer\RendererDX11.cs:line 283
[20:20:40]    at Molten.Engine.<StartRenderer>b__20_0(Timing time) in C:\Git\MoltenEngine\Molten.Engine\Engine.cs:line 145
[20:20:40]    at Molten.Timing.DoUpdate() in C:\Git\MoltenEngine\Molten.Utility\Timing.cs:line 136
[20:20:40]    at Molten.Timing.Update() in C:\Git\MoltenEngine\Molten.Utility\Timing.cs:line 111
[20:20:40]    at Molten.Threading.EngineThread.<.ctor>b__6_0() in C:\Git\MoltenEngine\Molten.Engine\Threading\EngineThread.cs:line 44
[20:20:40]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[20:20:40]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[20:20:40]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[20:20:40]    at System.Threading.ThreadHelper.ThreadStart()```

InputDevice - Add Support for Battery Information

Add support for retrieving battery information from InputDevice class:

  • Add BatteryStatus class
  • Add .Battery property to InputDevice - BatteryStatus type
  • Include IsConnected, Name, Description and Percent properties

Drag-and-drop support

Implement Drag-n-drop support to the UI system:

  • OnDrag() method - Triggered when dragged. Can return false to reject dragging
  • OnDropped(UIElement target) method - Triggered when the UIElement is dropped on another UIElement
  • OnDragOver(UIElement over) - Triggered when another UIElement object is over the current one. Can return false to disallow

Dropping:

  • OnDropReceived(UIElement dropped) - Triggered when an UIElement receives a drop action from another UIElement. Can return false to reject the dropped object

Replace Example UI with Molten's UI

Replace the current WPF-based example browser with Molten's own UI system.

The (awesome) side effect of this would be that it also acts as a demonstration of the engine's UI system.

Audio System

This is issue is tracking development of Molten's audio system.

Implement audio abstraction layer:

  • AudioSettings - To be added into EngineSettings as a .Audio property
  • ISoundSource - Contains loaded audio data + format info, as well as access to related audio settings.
  • ISoundInstance - Provides support of playing multiple copies of the same sound, as well as access to related audio settings.
  • SoundEmitterComponent - An in-world representation of an attached ISoundInstance. Automatically updates any 3D-positioning audio info.
  • Pitch and Speed control - Sound sources/instances should provide access to pitch and speed/tempo
  • Dynamic sound sources/instances - Allow manipulation of sound effect data to allow real-time audio generation or manipulation. This may open the door to run-time-generated audio effects. e.g. echo, noise, explosions, etc.
  • Audio capture functionality - Record audio directly from an input device. e.g. microphone or line-in

.NET 7 Generic Math Operators

Once .NET 7 release around November, look into the use of generic math operators to clean up math type generation. Currently it uses some overly-complex text-template (.tt) files to output a large amount of codebase for vector and quaternion types.

  • Also consider using generic math types to clean up the numerous rectangle, angle, matrix and viewport types
  • Consider cleaning up multiple color types with generic math

See for details: https://devblogs.microsoft.com/dotnet/dotnet-7-generic-math/

Change Renderer/Input Initialization

Choose and initialize renderer and input library via generics instead. For example:

Foundation<IRenderer, IInputManager> game = Foundation<RendererDX11, WinInputManager>();

This will mean that the renderer library and input library no longer need to be defined in the engine configuration. This simplifies the codebase and setup of the engine.

Currently these are set by changing EngineSettings.Graphics.Library and EngineSettings.Input.Library.

Networking

Networking is considered a key area of a game engine to support features such as multiplayer, chat and rich presence.

The following features will be provided and supported, via Molten-specific networking built on Sockets:

  • Client-server - connectivity and management of players connected to a dedicated/central server
  • Peer-to-Peer - connectivity and management of directly-connected players via peer-to-peer
  • TCP/UDP Support
  • Streaming support - Likely via TCP
  • Packet-based communication - Data will be sent/received via Packet objects
  • Packet ordering - Correctly manage the order of received packets via internal ordering system
  • Vector and custom packing support - Reduce the size of packets where possible
  • Chat system - In-game chat system
  • Multiplayer lobby system - Management of players entering a server
  • Multiplayer authentication, role and permission system
  • Network prediction abstraction layer - Basic prediction algorithms will be provided via helper classes, but abstraction will be provided to allow more advanced, game-specific prediction to be implemented easily
  • SHTTP/HTTP Comms - Support for making HTTP request will be supported. Object serialization/deserialization will also be provided for handling XML/JSON data to and from REST/SOAP web APIs

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.