New to Phaser - questions about its capabilities, features and possibilities of extension

Hello friends,

I’m rather new to Phaser. My only experience is few years old… and with just the most simple arcade mini game. Since then I’ve became rather experienced front-end as well back-end developer, so my general programming skills are quite fine:-)

Obviously, game development is another beast but I love to learn new things. I got an idea for rather unusual small educational game and because Phaser is only game framework I know and because its basic functionalities would be more than enough for the game, I’m considering to use it.

But before I myself dig deeper into the docs I’d like to hear opinion from seasoned Phaser developers. If I may kindly ask:-)

There’re few imho quite unusual demands which I’d need for my game. Basically, main sub-questions for those below are following: would it be possible to do it with Phaser? How hard/demanding would it be? Any tips how to approach it? Etc.

  1. question: Is it possible to integrate and utilize in a game third party JS libraries? If so, is Phaser ready for it? Or there’d be need for additional developer work? Specifically, I am thinking of D3.js, a library for graphs, data visualization.
  2. question: Is it possible to fetch data for the game from API in standard REST way? I catch sight of tutorial about architecture “Phaser JS + Redux”, so I assume - when Redux integration is not a problem - simple API calls wouldn’t be for Phaser problem at all. Am I right?
  3. question as an extension of the 2st one: I’ll be more specific. The game would rely on data generated/computed by RStudio Server (R is language/platform intended for statistics, data science and the likes calculations.). I was thinking about solution like this: I’d develop in-between API on top of this RStudio Server, and from the API I’d fetch data for the Phaser game. Thus, the scheme would look like as follows: game (Phaser JS) <–> API <–> RServer.
  4. The solution above was the first which came into my mind. Probably there might be a lot better ones. For example, the in-between API isn’t necessary, maybe it’d be sufficient to just run Phaser game inside Shiny (which is platform on top of RServer intended for publishing its web apps). Or maybe there’s some excellent plug-in, perfectly suitable for my use-case. So I gladly welcome any suggestions, tips and trick, ideas, possible solutions, just anything what may be relevant for my use-case.

Thank you very much! :pray: :pray: :pray:

Kind regard,

The data API part should be fine, Phaser doesn’t really get involved in any of that.

With D3 if you want to draw to the Phaser canvas, it could get a little complicated, but it’s probably doable.

How about using a DOM game object (div) to run D3? It can prevent rendering integration.