Create TurnBase Room With User Waiting Functionality

0 votes
Hello, I want To Build Game In Which TurnBased Room Needed.In this Iwant to set a timer base user joining fuctionality.Some Thing Like A room having capacity of N MaximumUser.When First User Joins The Room Timer Stated And Allow To join Room For Several Time.In That Time period Suppose M User Joined (M < N) Still I want To Start Game For Rest of Vacant Places I want to Use Dummy User or AI Players For That Round. During That Round If Another User Comes Than They Must have to wait Untill Round is Not Complited.once Round is Complited Than These Waiting User can join Room and Replace Dummy User or Ai players. Is this possible in AppWarpS2? If Yes Than Can you Give Me brief Idea How i can Do this ?
asked Aug 11, 2016 in AppWarpS2 by bicubic.unity02 (22 points)

1 Answer

+1 vote
 
Best answer

Hi BiCubic,

Greetings!!!

Yes, Its possible using AppWarpS2 where you can override default AppWarpS2 functionality by writing own game business logic.

AppWarpS2 also provides the Virtual User concept..Here you can create virtual user in a Room if Room has less players require to play a Game. You also write AI logic for Virtual User Moves in your game.

  • You can mantain Game State of your Game. Override onTimerTic ,and write logic for addition and removal of virtual player. Also write the logic of Game Start.
  • By Overriding handleMoveRequest you can validate moves send by the players and use AI logic for virtual player move.

You can write own game business logic there based on your useCases.

Let me know if more queries are concern.

Thanks

Vishnu Garg

 

answered Aug 11, 2016 by Vishnu Garg (674 points)
selected Aug 11, 2016 by bicubic.unity02
Thanks Vishnu This is really helpful for me.
Let me know if more queries are concern.
Hello vishnu,

i tried to create VirtualUser but when i compiled the code it shows me that VirtualUser Class is not available in   " com.shephertz.app42.server.domain " pacakage.

I used following code to :

IUser fakeUser = (IUser)new VirtualUser("BOT_"+i,(Room)gameRoom,(Zone)izone);
dummyPlayers.add(fakeUser);
gameRoom.addUser(fakeUser, true);

And Out Put Is


 [mkdir] Created dir: /Users/bicubicdev/Documents/workspace/CasinoEvilGames/build/classes
    [javac] Compiling 11 source files to /Users/bicubicdev/Documents/workspace/CasinoEvilGames/build/classes
    [javac] /Users/bicubicdev/Documents/workspace/CasinoEvilGames/src/Casino/PokerTurnBasedRoom.java:11: error: cannot find symbol
    [javac] import com.shephertz.app42.server.domain.VirtualUser;
    [javac]                                         ^
    [javac]   symbol:   class VirtualUser
    [javac]   location: package com.shephertz.app42.server.domain
    [javac] /Users/bicubicdev/Documents/workspace/CasinoEvilGames/src/Casino/PokerTurnBasedRoom.java:207: error: cannot find symbol
    [javac]                             IUser fakeUser = (IUser)new VirtualUser("BOT_"+i,(Room)gameRoom,(Zone)izone);
    [javac]                                                         ^
    [javac]   symbol: class VirtualUser
    [javac] 2 errors
I think your are using old server side SDK, Please download the latest from http://www.shephertz.com/downloads/download-onpremwarp.php
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...