Giter VIP home page Giter VIP logo

wasabi's People

Contributors

hasan-jawaheri 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

Watchers

 avatar  avatar  avatar

wasabi's Issues

Multi-threaded workers

Need a multi-threaded worker-based system to support CPU-based computations/operations such as particle system simulation and physics simulation.

Functional requirements:

  • Submission of work as just a function.
  • Submission of work as a higher-level worker agent with more finely-controlled execution.
  • Worker agents should be able to launch work, suspend themselves and continue when their submitted work is complete.
  • Worker agents should be able to run in a thread indefinitely should they choose to do so (as if they were a submission of a function that infinitely loops).
  • Worker agents should be able to "yield" in a way and continue later.
  • Ability to make task callbacks (on completion) get called in the game loop (main thread), up to a maximum threshold per frame/iteration.
  • (Optional) Threads manager should be able to spawn more threads should there be more demand.
  • (Optional) Submitted works can have a priority.

Use cases to optimize for:

  • Worker that does a time-based simulation as fixed time-steps. e.g. Every ~25ms it needs to run to update/create new state. State should be part of the worker agent class (user defined, inherited from some interface for the agent).
  • Simple task with a callback. Callbacks execute in worker threads or in main loop.
  • Long running tasks. Should be able to (optionally) be chunked into multiple execution slots in the worker manager to not hog the thread.

Separate GLFW window creation and loop in a GUI-only thread

GLFW won't allow creation of windows in any threads other than the main thread. Further, it only wants on glfwPoll to happen. So Wasabi should have the main (first) thread run only window-related tasks, and run the rest of the rendering (and whatever else) starting in a new separate thread.
Functional requirements:

  • Make wasabi start (main thread) by forking a new thread and running WInitialize over there.
  • Make the main thread allow GUI plugins to operate.
  • GLFW GUI plugin should have a queue of window creation requests, where GLFW window creation actually happens. GLFW window creation functions will simply submit to the thread and wait for completion.
  • GLFW GUI plugin should poll events in the GUI thread, between window creations.

Render to texture sample broken

Render to texture has the following problems:

  • Resizing the window causes weirdness (application hangs?)
  • In debug mode, Vulkan throws lots and lots of errors during render

FXAA Implementation

An FXAA implementation is desperately needed since no default AA is available.

Lighting doesn't have proper spec

Lighting needs to be reworked to have proper specular terms.

Functional requirements:

  • Proper specular lighting
  • Deferred and forward rendering should yield similar outputs
  • SSAO needs a good diffuser texture
  • GBuffer can be more neatly packed
  • Need ability to set specular power, intensity and ambient light (in forward renderer)

Particle enhancements

Lighting:
Particles (internal) lighting could be done by supplying lights to the particle render (up to a maximum number) and performing the lighting in the pixel shader of the particle (similar to forward rendering lighting). Lights can be supplied to the particles per-frame depending on their distance and visibility to the particles.
Particles should also be able to compute normals to be able to be properly lit.

Soft particles:
Use depth-check to allow for soft particles.

Finalize Linux support

Need to test compilation and running of the engine on Linux.

Requirements:

  • Patch the CMake file for any linux-specific things
  • Confirm that GCC is able to compile and run the code
  • Confirm that all the tests run properly and all features are supported

Better error reporting

Functional requirement:

  • WError should be able to carry a string to explain the cause of the error
  • Error strings are only used in debug mode (for performance)
  • (Optional) WError should carry a vector of strings and errors can accumulate (i.e. in a nested function, the deepest error will keep bubbling up appending error strings to the vector

Run physics in a separate thread at fixed rate

Physics step rate should be decoupled from graphics frame rate and should be run in a separate thread:
1- this will save CPU time doing physics stuff making both physics and graphics threads faster and have more consistent rates
2- physics can run at a much lower rate (30 steps per seconds) saving CPU time
3- physics can be a lot more stable at fixed (and lower) rate

Need to check but some locking will likely be required as some operations (e.g. ray casting, or applying forces) cannot be done WHILE physics is stepping.

How will threads interact?

  • Physics component should provide utilities to launch/stop the physics thread
  • Main thread (graphics + logic) will read physics state (positions/orientations) every frame in the main loop
  • Physics thread will write positions/orientations every frame (probably at lower FPS)
  • Main thread will need to change interaction with physics such that:
    • Reading remains same from rigid body
    • Writing needs to be queued (this can be handled in rigid body implementation) and done in between the steps
    • Utilities (ray casting?) needs research/verification

The purpose of this split was mainly motivated by improving experience while implementing a game with physics. To get reliable motion via applyForce, a stable physics frame rate is important. It may be better to have the physics thread perform those motions (e.g. to guarantee 1 applyForce per step). This can be done by allowing the users to peek into the queue (it may be enough to implement a getQueueSize so users know not to insert more if already queued. Or be able to directly manipulate queue if its 1 queue for all actions)

Objects wobble when camera moves

There is a weird wobbling that happens when the camera moves. I suspect it has something to do with the buffering and camera matrices (perhaps push constants are ahead of their time?)

There is also a flickering issue when objects are spawned mid-loop, they seem to always render in center for one frame.

Finalize Mac support

Need to test compilation and running of the engine on MacOS.

Requirements:

  • Patch the CMake file for any mac-specific things
  • Confirm that XCode is able to compile and run the code
  • Confirm that all the tests run properly and all features are supported

Clean up repo

Clean up repo to reduce its size.

Clean ups required:

  • Useless files (ahem latex?)
  • git history with binary files

Create samples for newcomers

Wasabi should ship with a sample application

Functional requirements:

  • A simple ping-pong 2D game
  • A more complex ping-pong with cool features

Reimplement particles geometry shaders to be CPU-based instead

Geometry shaders are not supported on Mac, and generally not used frequently. Currently the only geometry shader in Wasabi is for converting particles vertices into billboards. This can be done on the CPU to eliminate the need for the geometry shader feature.

Assimp integration

FBX SDK manual fiddling should be removed and replaced with the much larger library Assimp.

Minimal requirements:

  • Remove FBX importer
  • Implement loading of geometry
  • Implement loading of skeletal animation

Nice-to-haves:

  • Import and export Wasabi files
  • Import and export material data

Basic Editor using IMGUI

Create a basic map editor application to be shipped with Wasabi.

Functional Requirements:

  • Integrate a new project into the build system
  • New project creates an executable that is an IMGUI window, with a Wasabi engine running in a child window view
  • Simple toolbar with any dummy functionality

Rework the way rendering is structured

Rendering is somewhat a mess right now: the stages are completely decoupled from objects and effects. This causes a lot of "guess work" for the render fragments and a confusing user experience.

Functional requirements:

  • Make rendering indexed by effects, not objects/terrains/sprites/etc...
  • Make effects bind to a render stage (which makes sense) instead of a render target
  • Add the ability to override default rendering order
  • This may eliminate the need for effect flags (for now?)

This opens up the door for massive optimizations (such as batching static objects together in one geometry or one (set of) materials/UBOs) and will clean up the code quite a lot.

Complete terrain implementation

Functional requirements:

  • Add basic rendering of the terrain mesh
  • Add ability to supply a set of textures to be tiled over the terrain
  • Terrain should use a clip map for height and for texture/surface properties
  • Height can be from a height map or a class can be overridden to supply X and Y coordinates at every point (or something similar to that) to allow creation of custom synthesizers
  • (Optional) Brush-like editing features: edit height and texturing

Add DPI support

Add ability to render text and sprites using a unit other than pixels such that they are more consistent across devices. The unit will rely on the DPI of the screen.

Multi-threaded resource loading

Need support for loading assets from worker thread(s).

Functional requirements:

  • Data should be loadable separately from Vulkan-specific resources.
  • An estimate on the loading time should be made based on the size/complexity of the data.
  • Loaded data should be made available in Vulkan resources during the game loop slowly and per frame. The number of resources that can be processed by Vulkan per loop iteration should depend on the estimated loading times.
  • There should be a user-specified priority to loading such that high-priority resources are loaded ASAP.
  • Dependencies should be properly handled.
  • Rules for custom (user-defined) dependencies may be required, in the form of callbacks on-load.
  • All loading must be done this way. Application should be able to wait on loading to happen while running a splash screen or playing a mini-game.

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.