5 ms·
I Open-Sourced My Phaser-Powered HTML5 Game
- TheSisb2 11y agoThis is a really great write-up! Thank you very much for sharing. I've always wanted to make a game with Phaser, this will definitely come in handy!
- deificx 11y agoThis page is really hard to read on mobile (android chrome). There's basically one word per line.
- zackproser 11y agoThanks for pointing this out. Should be fixed now.
- lewisl9029 11y agoThanks for sharing! I'm curious though: what would a game engine like Phaser offer over general-purpose web app frameworks for building turn-based games (other than maybe performance)? I've been toying with the idea of a turn-based co-op rogue-like using web technologies. I was considering just using some React-based framework and lots of fancy custom CSS to build it, since it leverages my existing knowledge and experience much better.
- zackproser 11y ago@lewis9029 - Phaser is a joy to develop with because of how well put together it is. The main advantage to using it is that you'll reap the benefit of a veteran game developer's many years of experience rather than having to implement tweens, spritemaps, groups, physics, etc, on your own. Though I haven't built a turn-based game with it myself yet, I know others have and it would basically save you time and allow you to focus on the logic that makes your game unique. @deificx - Thanks for letting me know. I'll look into this. @TheSisb2 - Thanks. Glad you'll find it useful.
- INTPenis 11y agoSpace bar should click on Start whenever that's the only option available. It's a small detail but it would be better not to have to reach for the mouse.
- zackproser 11y agoGood idea - Thanks
- deepnet 11y agoHow did you make it into an app on Android ?
- zackproser 11y agoI used Ludei - I was planning on creating a separate tutorial on this a little later. Basically once you get your Phaser game finished, their service will wrap your game into a valid .apk or iOS app for you.
- freehunter 11y agoPhaser really is fantastic. I'm not much of a programmer but I'm able to churn out some pretty decent projects with it. It's really nice.
- zackproser 11y agoIt is. It's apparent how much effort went into it when you build a project with it and realize how much of the nitty gritty has been abstracted away for you.
- phantom_oracle 11y agoApart from the source-code being open-sourced, the game really is fun as well. I haven't gotten far enough, but I hope it becomes more challenging with alien rockets that try to attack you or something. kudos to author for a cool game.
- zackproser 11y agoThanks phantom_oracle! If you stick it through into level 2 you will indeed get alien rockets lobbed at you :)
- phantom_oracle 11y agoI did get to level 2 :) Have you considered making the alien-bot more dynamic or perhaps adding more bots? Also, what about adding the ability to destroy bots too?
- gluelogic 11y agoThanks for doing this. I am planning on getting into Phaser really soon and I will definitely be reading this source code.
- zackproser 11y agoSure thing. Glad it will be of some help. While there are lots of good Phaser code samples available, my goal was to provide a completed project to make it clear how everything fits together.
- hellbanner 11y agoGood post. I've been pondering making posts like this for a book -- HN would you pay for code breakdowns of completed games with source code provided? (Personally I bought the gameprogrammingpatterns.com book but I might be an exception in this crowd)
- zackproser 11y agoThanks - I was thinking of doing something similar. I think there is value in doing the legwork of organizing all this material into a coherent, step by step type of guide / book. The information obviously exists elsewhere in scattered pieces - but I believe devs would pay to have it curated sanely for them.