Git Product home page Git Product logo

flappyengine's People

Contributors

mrtrizer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flappyengine's Issues

Optimization of rendering

Now z-sort is call every render. To avoid this, I can keep Views in order until they are changed.

Overwrite configuration with extentions

For example:
config.json

"name":"Flappy",
"defines":["RELEASE"]

config_debug.json

"defines":["DEBUG"]

Than command flappy prebuild cmake debug will give you next result:

"name":"Flappy",
"defines":["DEBUG"]

Rework flat entity model to entity hierarchy

This should solve problems with object transport. Entities become untied of EntityManager.
When entity is added to EntityManager hierarchy and get access to ManagerList, we should send a Connected event to connected subtree. Optionally we can also pass managerList in this event. When subtree is disconnected, all children get Disconnected event. Presenter components use this events to create/remove renders.

SomeComponent::SomeComponent() {
   on([this](Connected e) {
       ...
   });
   on([this](Disconnected e) {
   });
   on([this](Update e) {
   });
}

(I realised that such code can't work, because all components of entity will get this events at same time. Thus I can't call Connected event on component creation.)

Also this code can be placed in Component base class and usual virtual connected()/disconnected()/init() methods could be called.
Finally, this approach can help us to simplify entity-component tree.

To provide necessary methods for entity manipulation, we can create common parent class for EntityManager and Entity.

About memory safety. We can create temporary entity for component in Component constructor. So we can use entity() method in component constructor without crashes. This temporary entity will be removed when component is added to another entity. If programmer added some components to temprorary entity they also will be removed.

Rename modules

Idea for names:

  1. Utils
  2. UnitTests
  3. EventBus
  4. Core
  5. GraphicsRes
  6. OggRes
  7. JsonRes
  8. BasicComponents
  9. PosixCore
  10. GUI
  11. OpenGL
  12. OpenAL
  13. Sdl2
  14. Box2D
  15. RenderManagment
  16. ResManagment
  17. Text

How to compile GLSL to HLSL and MSL

After little exploration I found a solution. For compilation to HLSL and MSL I could use glslang + SPIRV-Cross. So, seems, I need not worry about this currently and just continue work with GLSL.

  1. Install glslang https://github.com/KhronosGroup/glslang
  2. Build https://github.com/KhronosGroup/SPIRV-Cross
  3. Compile GLSL to SPIR-V binary representation with glslang.
  4. Map SPIR-V to HLSL or MSL

Fragment shader compilation from GLSL to GLSL ES and HLSL:

glslangValidator -H -V -o test.spv shaders-hlsl/frag/basic.frag
./spirv-cross --hlsl-enable-compat --hlsl --shader-model 51 --entry main test.spv
./spirv-cross --version 310 --es test.spv

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.