Jump to content

multiplayer online card game


game_prince
 Share

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' });
Link to comment
Share on other sites

  • 1 year later...

 

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.

Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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