game_prince

multiplayer online card game

Recommended Posts

hello how can we add a array of sprites please suggest i used below code but it show [object object,object]. i want to make a shuffling of sprites

var nineheart = this.game.add.sprite( 100,200 , 'third' );
  var spade = this.game.add.sprite(120,200,'fouth');
  var kingspade = this.game.add.sprite(140,200,'fifth');
   var fiveclub = this.game.add.sprite(160,200,'six');
 
testArray = [nineheart,spade,kingspade,fiveclub];
Phaser.ArrayUtils.shuffle(testArray);
game.add.text(80, 50, testArray, { fill:'#ffffff' });

Share this post


Link to post
Share on other sites

 

On 2/24/2018 at 8:49 AM, Odk said:

Looks like you need to work more on dev basics. Lesson one: Use google and try to find examples of what you are trying to do :) There is big chance that someone already did and shared most of it. For example this: http://www.emanueleferonato.com/tag/card-game/ 

I don't think condescension helps. OP posted a question for Phaser3, you gave a link to convoluted, though decent answer in Phaser2.

Share this post


Link to post
Share on other sites

Game Dev NOOB here,

I was planning to make a multiplayer card game SPADES as well.
Have achieved a bit of progress already.
I have shifted to private repo at the moment. Will update my git repo once ready.
For the time being you can check out the repo and hope it helps. Socket io code is in a mess right now. Will refactor it when i complete the client side.

Tech Stacks
-- IONIC 5/ Angular 8
- Phaser 3
- Socket.io

What already works.
- MUltiple ROOM (CRUD DONE)
- 4 players each
- Default 3 players on default room for dev purpose.
- Refresh and rejoin
- SHuffle on server side, (button doesnot work ;) )
- Basic app architecture ready
- Dynamic deck rendering. Circular and Linear ready,  Easy to add other strategies.

IMPORTANT:
ADDED last minute changes before posting here so that  your pc wont get fried. I was putting my adding card sprite logic on update method which was apparently making my gpu very very hot.


https://github.com/themightysapien/kearlbreak

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.