Skip to content
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

Integration with ecosystem #66

Open
10 tasks
minecrawler opened this issue May 10, 2023 · 4 comments
Open
10 tasks

Integration with ecosystem #66

minecrawler opened this issue May 10, 2023 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@minecrawler
Copy link
Collaborator

minecrawler commented May 10, 2023

Add missing demos for how to integrate sim-ecs into:

  • Babylon
  • MelonJS
  • Phaser
  • Pixi3D
  • PixiJS
  • PlayCanvas
  • THREE.js
  • TWO.js

All demos should be in the /example folder. Each should get its own directory and show off the library/framework's basic usage example, but with sim-ecs.

Also add integration for the following tools:

If sim-ecs cannot be integrated, please open a PR to adapt sim-ecs, or document why it's not possible below.


*¹: The RPGMaker MV game loop is a mess and the recursion is spread across several methods. From my initial analysis, it would be enough to detour SceneManager.run() and call SceneManager.update() and the ticks manually. On top, SceneManager.requestUpdate() must become a noop. Everything can be driven by IRuntimeWorld.start()

@minecrawler minecrawler added help wanted Extra attention is needed good first issue Good for newcomers labels May 10, 2023
@minecrawler minecrawler changed the title Demo integration with ecosystem Integration with ecosystem May 14, 2023
@drewww
Copy link

drewww commented Mar 26, 2024

I'm doing a Pixi integration at the moment and might be able to contribute something back when I'm a little further along. So far straightforward -- I'm letting the sim-ecs event loop "lead" and entities have components with Container objects in them that are attached to the pixi scenegraph. Nothing fancy but no major issues yet.

@minecrawler
Copy link
Collaborator Author

Thank you! Pixi is a very good rendering library many projects use, so having a demo for it will be a huge boon. If you have any questions or need help, just drop a message, I try to read my GitHub notifications daily.

@drewww
Copy link

drewww commented Mar 29, 2024

Thanks! I might do that. But so far so good -- just churning along productively. I'm finding some ways to decouple Pixi from the ECS components that make sense for me, but may not be generalizable. I'm building a roguelike, so I'm finding it is useful to decouple the stuff that runs at display framerate and letting the ECS systems slow way down and just run once per turn cycle. That may not be useful for others. :D But once my architecture has settled a little more I'll write it up.

@dannyfritz
Copy link

dannyfritz commented Mar 29, 2024

Thanks! I might do that. But so far so good -- just churning along productively. I'm finding some ways to decouple Pixi from the ECS components that make sense for me, but may not be generalizable. I'm building a roguelike, so I'm finding it is useful to decouple the stuff that runs at display framerate and letting the ECS systems slow way down and just run once per turn cycle. That may not be useful for others. :D But once my architecture has settled a little more I'll write it up.

FWIW, I have done a tiny bit of work on using Pixi@^8 for rendering from within an ECS. It gets pretty non-trivial when pixi wants a scenegraph for everything or you want to do hierarchies of transformations, but without a tree representation of your data.

And just to be clear, I'm not being modest when I say I've only done a "tiny" amount of work on this. The pixi team on discord has been very responsive to requests for help or even feature requests. But none the less here is some code: https://github.com/dannyfritz/nuthatch/blob/v8-localTransform/lib/src/index.ts

Unfortunately this appears to be the only portion of my local working-tree of sim-ecs experiments that has made its way to GitHub though: https://github.com/dannyfritz/nuthatch/blob/c25e7685f91ac0b39adcf80e725864b722595176/package.json#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants