NePo Posted September 1, 2016 Share Posted September 1, 2016 I started learning Phaser and would like to present my first game. It is interpretation of well know cards game TriPeaks. You can find the game here: http://gopgames.eu/nepo-tripeaks/ In the classic solitaire games score depends on the time you play, faster you play - better the score. I hate that, I want to play as slowly as I can, so I invented my own scoring system. I also wrote about my experience with Phaser (as I am newbie, it is a bit frustrating) and shared some code which could help others like me: http://neposas.postach.io/post/game-solitaire-tripeaks All feedback, suggestions and ideas are very welcome, because I want to make a better game next time. Quote Link to comment Share on other sites More sharing options...
lumoludo Posted September 1, 2016 Share Posted September 1, 2016 The game works well. I might suggest changing the option from "NePo" to "closed" when you start the game, because I didn't know what NePo meant. A restart button would also be nice, in case I want to give up half way through. I read through your blog post and I might have a couple solutions to the problems you faced. If you want to be able to drag and click/tap the same sprite, you can still set it up. There are probably a few ways to do it, but here is one example that I created that you can look at:http://phaser.io/sandbox/XMvyNUwy As for Z-Ordering, it can also be done pretty easily. Since objects in Javascript are dynamic, you can still set a 'z' property on any sprites you create. From there, you can use the group.sort() function to sort them based on the 'z' property. (Just make sure that you set the 'z' property for all objects in the group.) myGroup.sort('z', Phaser.Group.SORT_ASCENDING); You can see an example of depth sorting in the example I'm linking below. It sorts on the 'y' property, but it would work exactly the same.http://examples.phaser.io/_site/view_full.html?d=groups&f=depth+sort.js&t=depth sort It's true that the objects you want to sort will all still have to be in the same group, and that you can't have objects in two groups with mixed z-depths, but you probably don't want to mix groups like that anyway. Logically, all objects in a group should be all in the same z-depth. Quote Link to comment Share on other sites More sharing options...
NePo Posted September 1, 2016 Author Share Posted September 1, 2016 lumoludo, Thank you for you response, I will investigate the code you provided. As for the name maybe I should call it "classic" as normal tripeaks rules say, that cards should be closed. 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.