Codenburger Posted October 29, 2014 Report Share Posted October 29, 2014 Hi, I am new to Phaser and I am going to be using JavaScript, coming from a Python background, using Oop ! May I ask, is Oop generally using with Phaser and JavaScript. Would Oop be a good way to create games with Phaser and JavaScript. This looks like a great Game engine. I can't wait to get stuck in. Codenburger Quote Link to comment Share on other sites More sharing options...
UgnisKarolis Posted October 29, 2014 Report Share Posted October 29, 2014 OOP is probably the only way to create something bigger than a simple demo scene. Example of a Sprite object in Javascript https://github.com/UgnisSoftware/Phaser-Starter-Kit/blob/master/public/javascripts/states/example/views/SpriteAnimated.js and example controller https://github.com/UgnisSoftware/Phaser-Starter-Kit/blob/master/public/javascripts/states/example/exampleController.js.In reallity, code usually doesn't look that clean, this is how controller usually looks in reallity: https://github.com/UgnisSoftware/The-Lone-Wolf-Corp./blob/master/public/javascripts/states/space/SpaceController.js but the same OOP principles apply.Also, you should probably give TypeScript a try, it makes OOP much cleaner and Phaser fully supports it. Quote Link to comment Share on other sites More sharing options...
Mathieu Anthoine Posted October 29, 2014 Report Share Posted October 29, 2014 You should try haxe-phaser Quote Link to comment Share on other sites More sharing options...
Codenburger Posted February 18, 2015 Author Report Share Posted February 18, 2015 Thank you guys. Some things to think about there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.