Giter Club home page Giter Club logo

ciopillis's Introduction

Hi ๐Ÿ‘‹, I'm firststef

๐ŸŽฎ I love both playing and creating video games.

๐ŸŽฒ Board games too!

๐Ÿ“ I enjoy learning about programming languages compilers & runtimes.

Languages and Tools:

cplusplus csharp python typescript unity

ciopillis's People

Contributors

firststef avatar kavarna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ciopillis's Issues

Multithreading Systems Support

A system should run in parallel with other systems. The tricky part here is that different Systems need the same components so parallelism in those cases is not supported.

The Manager that will handle this should note what component types are being used and with what operation (read/write). A possible implementation for this could be done with the help of the Pool::Get function. This could be split into two - T Get and GetRef. The Get() implementation allows reading, the GetRef() will allow writing. When those functions are called the Manager takes note of that and if the internal state allows for read/write on the particular component, it sets some flags and returns the components. When the System Exits, the flags that were occupied by the system are cleared. But this implementation has a big flaw: what happens if a system uses multiple components at once? If we implement this right, we could: release previously managed components from the Manager flags and only leave the most recent blocking request. Until that request is fulfilled other systems will be allowed to change states of components (or at least only read them - writing components as a system is waiting is pretty dangerous). If the request becomes solvable (the flags are free to be taken) we do not return the components yet, we check if the components that we previously temporarily released can be taken back - we wait until the original state was available. When we regain it, we return with the requested components and we set the flags.

[! READ]
Also, before we do this, events must be changed to be handled by each system in their own execute() phase or in that proximity. Events should be added to a queue that is appended to a listening system when the Subscribe() method is called.

Also running a thread for each system may be the wrong approach - we might want to do coroutines on some threads - we will need to implement the coroutines in an asynchronous fashion.

Better Systems functions handling

The return type of Initialize(), Execute(), and Uninitialize() is void. This should be changed to bool in case something fails.

Also, some systems might need to Execute every time but check for themselves if they are enabled or not so that they will "run in stealth mode". We could introduce a StealthExecute() function in the interface that is executed if the systems are disabled.

Another useful parameter for Execute() would be delta - the time from the last execution.

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.