brianautumn Posted January 14, 2016 Share Posted January 14, 2016 Okay so I have a game I would like to integrate with drupal. What is the best way to go about doing this? For example, some levels are free, and some are paid, should php generate the script before the load, or should there be an ajax call? Anyone have an example to a safe way of doing this? WombatTurkey 1 Link to comment Share on other sites More sharing options...
WombatTurkey Posted January 14, 2016 Share Posted January 14, 2016 Not sure the relevancy how drupal interacts with Phaser. but, yes, use ajax w/ gzip compression to load in the new level data. If level's are paid, simply make an ajax request to a .php script to check their credentials before spewing out the level data. Link to comment Share on other sites More sharing options...
brianautumn Posted January 14, 2016 Author Share Posted January 14, 2016 So I would like the game to be able to be embedded as an iframe on a drupal page/node/whatever so I'm not sure if I should host it in the modules folder, because if you link directly to it, it skips the drupal engine. So Im not sure if its safe to send ajax requests to drupal that way, or if there is a more clever way to integrate it. Essentially I would like to be able to control levels and save scores eventually to drupal. Link to comment Share on other sites More sharing options...
Recommended Posts