Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
moondroidcoder opened this issue Apr 25, 2024 · 1 comment

Comments

@moondroidcoder
Copy link

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
Copy link
Owner

Hello ! You need to include phaser.js in your html.
Example : <script src="//cdn.jsdelivr.net/npm/phaser@3.54/dist/phaser.js"></script> 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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants