Jump to content

How to access "bare" render method for game objects in order to separate game data from Phaser


Recommended Posts

I would like to store properties for my game objects outside Phaser,  instead passing these properties (x, y, rotation, texture, etc...) for Phaser to render. Is it possible to expose a render function like this, or is rendering too tightly coupled to game objects?

The alternative is to manually sync Phaser's game objects with my (Mori or Immutable.js) game state.

My reason for doing this is so I can store my game state in an immutable object. Separating game state from Phaser allows seamless hot code reload. By keeping a historical list of these immutable game states time travel with trails is possible. (See the video below)





Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...