No VirtualUser class in iOS SDK

0 votes

Hi,
I am trying to integrate VirtualUser in my iOS app.
But the AppWarpS2 SDK does not contain the class "VirtualUser"

As per the documentation mentioned here: http://blogs.shephertz.com/2014/12/11/add-virtual-users-to-you-multiplayer-game-using-appwarps2/

IUser user = (IUser) new VirtualUser("FakeUser", myRoom, myZone);
myRoom.addUser(user, true);

The VirtualUser class is present in Android platform but not in iOS.

Could someone please guide me regarding the same.
Its a very urgent issue.

Thank you
Aditya

asked Dec 29, 2016 in AppWarpS2 by contact (16 points)

1 Answer

0 votes

Hi Aditya,

Greetings!!!!

VirtualUser is a concept where you can create a bot user on AppwarpS2 so than if there is a single player you can play a game or do communication.

As Its the concept of AppWarpS2 Server where you can create the same using the code snippet you have shared with us. AppWarpS2 server is written in Java language and you can override the same.


It supports will process all the request coming across multiple client SDK platform like Android, iOS, windows,Unity etc.

For iOS App you need only client iOS SDK and do write your game business logic on server in java language.So you can create VirtualUser irrespective of client platform.

Let me know if it helps.

Thanks

Vishnu Garg

 

answered Dec 29, 2016 by Vishnu Garg (674 points)
edited Dec 29, 2016 by Vishnu Garg
Hi Vishnu,
Thank you for your reply.
This is my first time with Appwarp and real-time gaming so it'd be really helpful if you can assist me with the same.

Do i need to use this code: https://github.com/shephertz/App42_CustomCode_Sample/
to create custom jar files and deploy those jar files in the AppHQ Dashboard?

Regards,
Aditya
It will depend on your game business logic if want to write own code and want to deploy it on AppHQ using custom code.
You can also write the logic on AppWarpS2 server as well.
It depends on you how you want to layered your business logic.
Hi Vishnu,
The game I'm making is a quiz based one that contains a turn based room with 6 players in it.
The entire logic so far for custom turn based mechanism has been done in iOS itself, and I haven't uploaded any custom code so far.
That's why I'm a bit confused here on the next step to implement.

Regards,
Aditya
This is what I've used so far:
Shephertz_App42_iOS_API.framework for registering,autheniticate user
AppWarp_iOS_SDK for room create,join etc..

Regards,
Aditya
If you don't want to use CustomCode then Its fine
Hi Vishnu,
But still I'd need to implement the virtual user to fill the room.
Any link or detailed documentation regarding this would be really helpful.
You can create VirtualUser using the code snippet you have shared with.It behave likes a user as its gets the turn as well. You can write your logic for that on AppWarpS2 server in real time for turn or can we for chat or may be anything.
Hi Vishnu,

I have created custom code and deployed jar file in custom_code console and run successfully.  Now I am adding below code in eclipse but which value i have to pass in myRoom and myZone params? I have room id and zone id.

IUser user = (IUser) new VirtualUser("FakeUser", myRoom, myZone);
myRoom.addUser(user, true);
As I have already explained CustomCode and AppWarpS2 both are separate product. You can use Custom Code in AppWarpS2 but vice versa is not true.
You need to write the Virual User Code on On AppWarp S2 server.
You can go through with http://appwarps2.shephertz.com/dev-center/samples/ here you can find existing samples.
Hi Vishnu,
I'm aware of all the links and information you've provided so far, but the documentation is very vague and not at all sufficient.

Here's the scenario:
My turn based quiz game has a room of 6 players. Game only proceeds when all 6 players join the room.
So I need virtual users to fill that space.

All this while I've used the iOS client SDK to create rooms, players etc in Appwarp.
But now it seems I have to use Appwarp S2 to write custom code for virtual players.

Please help me with the following:
1. Is AppWarp S2 compulsory for creating virtual users?
2. I created the rooms using the client SDK in iOS. So how do I pass the "myRoom" and "myZone" parameters to the server?

Info on these two points will help in completing the gameplay
Yes You need to write your own logic. But its different from App42Custom Code?
Yes you can create virtual User in AppWarpS2.  Please first go through with AppWarpS2 samples that I have provided with the documentation link that will clear all the doubts of you.
You can go through with one sample than i would like to explain how AppWarpS2 extend AppWarp functionality.
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
...