NePo

Solitaire TriPeaks

Recommended Posts

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/

tripeaks.png

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.

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.