carystanley Posted June 9, 2016 Share Posted June 9, 2016 This is my first post to this forum. First I wanted to say that Phaser.js is really awesome. To see all the different things people have build with it, and to see Rich and others so active on the forum helping each other. I think it really is the best opensource HTML5 game framework out there! I'd like to share my experience, and hurdles learning Phaser, and hopes for Lazer. So I'm a Software Engineer by employment, but game development is this hobby I am just starting to cultivate. I did a lot of research looking at the different game frameworks our there. Unfortunately, many allow you to write a platformer game with just a few lines of code, but can't do much more. After looking at what was out there, Melon.js and Phaser.js seemed the most promising. But when I found our Melon.js had deprecated tilemap collision, I sadly gave up on it. Phaser, on the other hand had a large feature set and allowed you to choose the way you wanted to render, or the physics/collision detection you wanted to use. It had tons of examples, and I was building little demos in no time. So I thought, its time for me to build a full fledged game, so I started trying to build a Earthbound clone. One of my first hurdles came as a surprise. I was originally drawn to Phaser for its sloped tile-based collisions in Ninja Physics. But soon I learned Ninja Physics was sort of a 2nd-class citizen. It was missing a lot of functionality, and it actually had no spacial optimization (you are literally checking every tile, good luck with a large map). Also, you have to compile a custom package to use it (took me a while to figure this out). Tried the old slope for arcade physics plugin, didn't work, but I'm hopeful for the new one (http://phaser.io/news/2016/05/phaser-arcade-slopes-plugin). Next, I wanted to make a text dialogue pop up with letter-by-letter display while the game is "paused" in the background. I have not found a clean way to achieve this. There is a "pause" feature, but that pauses everything, so I can't have the animation of characters appearing. Ideally I would be able to "pause" a sprite group, or be able to have a State stack, but State really is just a loose binding of the main game object, and the game physics, stage, etc.. are all sort of global singletons. This gave me a similar issue when I want to create a "Battle" scene, I would rather not move to a new state, because I don't want to loose the old state info, what I wanted was sub-States, but since everything is sorta part of the global update, I have no control. The letter-by-letter animation also has challenges because the BitmapFont, just takes text and lays it out in glyphs, I have no feedback when the text runs over, so I don't know when to "scroll" the panel. Its line layout function is considered "private". Ideally, the font would be separate from the rendering, So the font would have utilities to know layout and then I could control the glyphs I wanted to make, when I want to make them. Lots of demos for this basically keep rendering the string over and over with a char added, this means all the glyphs for the text are layed out over and over again. Sorry, for that long winded rant. Lazer has given me hope as I believe it has realized this issue. That Phaser is great it that an inexperienced developer could put together a basic demo easily, and Phaser would do all the heavy lifting. But when you want more control, you find yourself working against the framework. The vision for Lazer seems to see how "less is more". Give people smaller building blocks to allow them to compose whatever they want (like little lego pieces), versus making assumptions and trying to do it all for the user. I am looking forward to Lazer, and continuing to try my hand at game development (when I have a free moment with the busyness of our new daughter). I would love to try to get more involved with what is happening here (if I get time). I thought about opening PRs for Phaser, but wonder if I should try to help with Lazer. Here is a link to the demo I've been working on: http://carystanley.github.io/earthbound-js/ (not much yet, just two rooms) Link to comment Share on other sites More sharing options...
Recommended Posts