sebbernery / haxe-phaser3

Phaser3 bindings for Haxe.
MIT License
20 stars 4 forks source link

Need help! Game refuses to run, compiles just fine. "Phaser" is not defined #8

Open zacksgamerz opened 2 months ago

zacksgamerz commented 2 months ago

Hey! I need some help, Ive been trying to use haxe-phaser3 for a game jam (only for some features, the main framework im using is haxeflixel), when i try to initate it, i get an error. Any idea on how i could fix it? Code: var game = new phaser.Game({ width: 900, height: 600, type: untyped Phaser.CANVAS });

Lime compiles it just fine. So i have no idea why it isnt working image

sebbernery commented 2 months ago

Hello ! You need to include phaser.js in your html. Example : in your header or at the bottom of your body. As your html is generated with lime, you have to manually edit it after compilation, I think there is a way to use custom html page at lime compilation but I don't remember how. I hope this will fix your issue and I'm not too late for the gamejam, feel free to share your compo when it's over :)