AppWarpS2 WP8 Quiz Tutorial demo connection fail

0 votes
Hi I have several WP8 apps that I want to add turn based functionality as a quiz like app similar to QuizUp.

As a first step I sucessfully installed and setup the chat server app from the tutorial here:

http://appwarps2.shephertz.com/dev-center/

All worked O.K.

I then downloaded the QuizUp like trivia game from the samples page and have been having trouble getting it started.

http://appwarps2.shephertz.com/downloads/download-onpremwarp.php

1) I ran the server as in the previous chat server sample using the server files provided with the quiz game sample using windows_start.bat. (just like the previous sample)
 
2) Created a java project and imported the file system for the java server folder provided with the trivia game sample and added the .jar file to the build path and ran the program.

3) Logged in to the AppWarp Dashboard and created a zone and room (just like the previous sample) also added room properties IsPrivateRoom = false.
(server command window & Eclipse console now displays the zone and room just created)

4) I ran the trivia game sample in VS2013 having changed the global context variables API_KEY = "app key given when created zone in step 3 above", HOST_NAME = "127.0.0.1"  and GameRoomId = "id given when I created room in step 3 above"

I am always getting connection failed while trying to connect in the game! I'm running the app on the emulator!

In onConnectionDone eventObj result type returns 6 (connection error)?

I'm obviously new here and the sample details stop at anything to do with windows phone so I've pieced together bits & pieces I could find!

I not sure what I'm doing wrong or not at all here? Am I on the right track? How do I get a connection?

Many thanks

P.S. I'm also getting the following error in the debugger:

System.Windows.Data Error: BindingExpression path error: 'm_FbFriendList' property not found on 'QuizMania.MainPage' 'QuizMania.MainPage' (HashCode=1166200). BindingExpression: Path='m_FbFriendList' DataItem='QuizMania.MainPage' (HashCode=1166200); target element is 'System.Windows.Controls.ListBox' (Name='FbFriendList'); target property is 'ItemsSource' (type 'System.Collections.IEnumerable')..
System.Windows.Data Error: BindingExpression path error: 'ListBoxStyle1' property not found on 'QuizMania.MainPage' 'QuizMania.MainPage' (HashCode=1166200). BindingExpression: Path='ListBoxStyle1' DataItem='QuizMania.MainPage' (HashCode=1166200); target element is 'System.Windows.Controls.ListBox' (Name='FbFriendList'); target property is 'Style' (type 'System.Windows.Style')..

P.P.S. OK scrap the connection problem, I'm in...! (was using wrong IP addy :)

Still not sure why I'm getting the binding issues though?

Another question:

I notice that if I connect game with Facebook fiiends and there is no one playing the game , thats it.

1) Is there a way to send invitation(s) to my Facebook friend(s) to play a game? (who have and dont have the app installed)

2) If they accept the invite then toast notify the inviter that they accepted? (EG get playing I'm waiting else may your happieness turn to ashes in your mouth!)

3) Do I have complete control over the server side game logic?

4) As these are quiz apps, I already have tousands of questions prepared in text files. Can I specify the layout for the questions and answers or do they have to be in a specific format like in the demo? Don't want to reformat the whole lot!

Finally

5) I'm assuming I can bind the whole thing together with leaderboards and achievements etc?
Could you point me in the right direction for further information regarding the above...

...Many thanks

Response:

Many thanks for your reply, I'm getting a null pointer at the server end when both users logout on the quiz demo and not sure why?

Please see console print below...
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre8\li
b\tools.jar
Buildfile: C:\Users\Trip Admin\Desktop\Submissions\Verses Mode\Quiz_WindowsPhone
\Quiz_WindowsPhone\QuizServer\warp.xml
     [echo] Using Java version 1.8.

clean:
   [delete] Deleting directory C:\Users\Trip Admin\Desktop\Submissions\Verses Mo
de\Quiz_WindowsPhone\Quiz_WindowsPhone\QuizServer\build

compile:
    [mkdir] Created dir: C:\Users\Trip Admin\Desktop\Submissions\Verses Mode\Qui
z_WindowsPhone\Quiz_WindowsPhone\QuizServer\build\classes
    [javac] Compiling 21 source files to C:\Users\Trip Admin\Desktop\Submissions
\Verses Mode\Quiz_WindowsPhone\Quiz_WindowsPhone\QuizServer\build\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with
-source 1.7
    [javac] 1 warning

jar:
    [mkdir] Created dir: C:\Users\Trip Admin\Desktop\Submissions\Verses Mode\Qui
z_WindowsPhone\Quiz_WindowsPhone\QuizServer\build\jar
      [jar] Building jar: C:\Users\Trip Admin\Desktop\Submissions\Verses Mode\Qu
iz_WindowsPhone\Quiz_WindowsPhone\QuizServer\build\jar\quizserver.jar

run:
     [java] Zone Created GOT_Quiz with key 8c2dcf00-0686-43bd-b
     [java] Room Created GOT_Quiz_Room1 with ID 647227785
     [java] Add user request jul
     [java] Room Created QuizRoom jul with ID 383274819
     [java] jul joined room Request
     [java] jul joined room Request Success
     [java] Received Start Quiz Packet1RoomId 383274819
     [java] Add user request emu
     [java] emu joined room Request
     [java] emu joined room Request Success
     [java] Received Start Quiz Packet2RoomId 383274819
     [java] Send Question Packet of 512
     [java] Sending Question to User jul
     [java] Sending Question to User emu
     [java] Answer Received 0
     [java] Send Answer
     [java] Answer Received 0
     [java] Send Answer
     [java] Send Answer
     [java] Send Answer
     [java] Send Question Packet of 512
     [java] Sending Question to User jul
     [java] Sending Question to User emu
     [java] QuizRoomAdaptor onUserLeaveRequest emu left room 383274819
     [java] QuizZoneAdaptor onUserRemoved jul
     [java] QuizRoomAdaptor onUserLeaveRequest jul left room 383274819
     [java] QuizZoneAdaptor onUserRemoved emu
     [java] java.lang.NullPointerException
     [java]     at java.util.Collections$UnmodifiableCollection.<init>(Unknown S
ource)
     [java]     at java.util.Collections$UnmodifiableList.<init>(Unknown Source)

     [java]     at java.util.Collections.unmodifiableList(Unknown Source)
     [java]     at com.shephertz.app42.server.domain.Room.getJoinedUsers(Room.ja
va:941)
     [java]     at quizserver.QuizRoomAdaptor.onTimerTick(Unknown Source)
     [java]     at com.shephertz.app42.server.domain.Room.handleTimerTick(Room.j
ava:857)
     [java]     at com.shephertz.app42.server.domain.Zone.handleTimerTick(Zone.j
ava:802)
     [java]     at com.shephertz.app42.server.handler.WarpProtocolHandler.handle
TimerTick(WarpProtocolHandler.java:539)
     [java]     at com.shephertz.app42.server.handler.LoopTask.run(WarpProtocolH
andler.java:676)
     [java]     at java.util.TimerThread.mainLoop(Unknown Source)
     [java]     at java.util.TimerThread.run(Unknown Source)
     [java] Deleting Room 383274819 true

 

Thanks
asked Sep 20, 2014 in AppWarpS2 by wiredvoltage (84 points)
edited Sep 24, 2014 by wiredvoltage
There is no worry about binding issue it will run smoothly

1 Answer

+2 votes
 
Best answer
 
1) Is there a way to send invitation(s) to my Facebook friend(s) to play a game? (who have and dont have the app installed)
Ans: You can implement this logic using facebook apis,send the message to your fb friend,he will let you know when he will online.once he is online you can continue with the same logic as we implemented in our sample.but dont add any AppWarp logic(like creating room etc.) until your friend is online.becuase it might happen you friend check your message after long time.You can implement Push Notifcation using our APP42(http://api.shephertz.com/) product.
 
3)Do I have complete control over the server side game logic?
Ans. Yes,You can define your own game logic
 
4)As these are quiz apps, I already have tousands of questions prepared in text files. Can I specify the layout for the questions and answers or do they have to be in a specific format like in the demo? Don't want to reformat the whole lot!
Ans.We have put our question Questions_<i>.txt at server side in Json format. You can change the question format but you have to also change the code at server side and client side accordingly 
 
5)  I'm assuming I can bind the whole thing together with leaderboards and achievements etc?
Ans, You can use our APP42(http://api.shephertz.com/) product for leaderboard and achievements features 
answered Sep 22, 2014 by errahulpanchal (169 points)
selected Sep 27, 2014 by wiredvoltage
@errahulpanchal Hi Rahul I'm getting the exception metioned above, not sure why?
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
...