-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add a loop or feedback SN constructor #181
Conversation
@SheetKey can you have a look at the |
|
@turion its exactly what I was looking for! I'm using an ECS and using only ClSFs with feedback for my main game loop forced everything to happen on the same clock where I would rather have the ability to have different processes happen at different rates. |
That sounds great :) what's an ECS? In case your code is open, feel free to share. |
Entity component system. You essentially treat every game object as a collection of components (mostly wrapped in Maybe), then define functions, in my case signal functions, that do things with the components. For example I have position and velocity components with corresponding signal functions that update the velocity (from user input in the players case) and another that updates position from the velocity. My game state is a list of entities and I compose signal functions that do various things. Right not my ECS is just a big record but there are some libraries that I'm considering using once I have a better grasp of SDL: apecs and ecstasy. |
Ah yes :) that's the kind of thing that we started to develop dunai & rhine for. Have you looked into |
I haven't really looked into gloss. I decided on sdl2 because of the various graphics libraries for haskell it seemed like the most well documented for game programming. Even though its mostly C++ it translates to haskell with very little changes. That being said I haven't done any vector graphics, just loading pngs. If I run into issues I might switch but I haven't had any problems using sdl so far. |
Loop
toFeedback
Thanks @SheetKey for inspiration