News for hackers. Stuff that matters.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @06:49AM (#9877309)
@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.

Re:I Open-Sourced My Phaser-Powered HTML5 Game by INTPenis on Monday July 13, 2015 @07:50AM (#9877493)
Space 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @08:03AM (#9877553)
Good idea - Thanks
Re:I Open-Sourced My Phaser-Powered HTML5 Game by deepnet on Monday July 13, 2015 @01:23PM (#9879527)
How did you make it into an app on Android ?
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @02:41PM (#9880076)
I 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by hellbanner on Monday July 13, 2015 @12:23PM (#9879101)
Good 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)
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @01:07PM (#9879399)
Thanks - 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by freehunter on Monday July 13, 2015 @08:36AM (#9877716)
Phaser 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @09:04AM (#9877823)
It 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by lewisl9029 on Monday July 13, 2015 @06:19AM (#9877226)
Thanks 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.

Re:I Open-Sourced My Phaser-Powered HTML5 Game by phantom_oracle on Monday July 13, 2015 @09:33AM (#9877952)
Apart 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.

Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @09:44AM (#9878004)
Thanks phantom_oracle! If you stick it through into level 2 you will indeed get alien rockets lobbed at you :)
Re:I Open-Sourced My Phaser-Powered HTML5 Game by phantom_oracle on Tuesday July 14, 2015 @01:38AM (#9883068)
I 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?

Re:I Open-Sourced My Phaser-Powered HTML5 Game by TheSisb2 on Monday July 13, 2015 @04:01AM (#9876917)
This 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!
Re:I Open-Sourced My Phaser-Powered HTML5 Game by gluelogic on Monday July 13, 2015 @09:57AM (#9878070)
Thanks for doing this. I am planning on getting into Phaser really soon and I will definitely be reading this source code.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @10:26AM (#9878231)
Sure 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.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by deificx on Monday July 13, 2015 @05:50AM (#9877162)
This page is really hard to read on mobile (android chrome). There's basically one word per line.
Re:I Open-Sourced My Phaser-Powered HTML5 Game by zackproser on Monday July 13, 2015 @09:18AM (#9877889)
Thanks for pointing this out. Should be fixed now.