This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Can PixiJS be used solely as a rendering engine for use in an Entity Component System architecture? #7202
Labels
🤔 Question
User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim
Hello, thank you for developing such an amazing library.
I was wondering if Pixi could be used as a more low-level rendering engine. For my game I have developed an ECS. That is, each of my entities is nothing more than a bag of components, and each component is simply a plain old data object of fields. For example, my components look like this:
and my entities look like this:
I then have systems like
RenderSystem
,CollisionSystem
,MovementSystem
which just contain functions that iterate over the relevant entities and draw them, update them, etc.My issue is that PIXI seems perhaps a bit too high level for this, and I'm not sure if there exists anything in the PIXI library to accommodate this need. That is, it seems that PIXI asks you to create
Sprites
, insert them intoContainers
, update the sprite object's x and y properties each game update, etc., but even that is too high level for my purposes.Ideally PIXI could just be used as a rendering engine, and I could avoid the whole high-level process of adding sprites to stages. That is, I could do something like this every frame (pseudocode):
Initially I thought that was what https://pixijs.download/v4.6.1/docs/PIXI.WebGLRenderer.html#render did, but I've tried calling it with several different parameters, and each time the resulting canvas is just blank.
Sorry, this is getting a bit long-winded. Let me be more precise. I have the following questions:
renderer.render
it was blank every time.The text was updated successfully, but these errors were encountered: