Jump to content

Solitaire TriPeaks


NePo
 Share

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.

 

 

Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...