+ Reply to Thread
Results 1 to 10 of 10

Thread: RejoinGame example (AS3, Unity clients, Java extension)

  1. #1
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts

    RejoinGame example (AS3, Unity clients, Java extension)

    This code example should work on any version of ES5 that is 5.2.3 or later, but it was tested using our current development build. Features include:
    • User chooses an avatar to use
    • User chooses a chat topic (gameType)
    • Server remembers the choices for a reasonable amount of time after the user logs off
    • Room plugin remembers game specific information (position) for a reasonable amount of time after the user leaves the room


    download the zip

    live example

    Please do let me know of any bugs.

    I plan to write a tutorial on this later. In the meantime:
    • Compile and deploy the extension.
    • There is one server level component: RejoinGameServerLevel. Don't make AvatarChatWithRejoin server level; that's room level.
    • You can customize the chat room topics in Extension.xml. There's no limit to the number of topics other than how many you can display to the user at once.
    • You can specify the capacity of the chat rooms in Extension.xml. I have it set at 10.
    • minutesToKeepDataAfterUserLeft and minutesToCheckForCulling specify how long a given plugin waits before removing stale data.

    edit on July 2nd:
    A Unity client has been added to the zip. This client does not give a choice of avatar, but does have the functionality for the various chat room topics. While in a chat room, to switch to a different one, press Enter (same as you do to public chat) and the buttons will appear.
    Last edited by tcarr; 07-02-2012 at 02:44 PM.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  2. #2
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    Tutorial for this example is now available.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  3. The Following User Says Thank You to tcarr For This Useful Post:

    _joseph (06-26-2012)

  4. #3
    Member
    Join Date
    Mar 2012
    Location
    CA
    Posts
    52
    Thanks
    51
    Thanked 0 Times in 0 Posts
    May I put in a request for a Unity Client Example?

  5. #4
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    You can request one, but odds are very low that I'll have time to make one. I'm happy to answer questions if you are having trouble understanding the AS3 code. The tricky part is the server side, which would be the same.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  6. #5
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    Ah, I remembered why I didn't make a Unity example when I did the AS3 one. It's because I don't have a second avatar for Unity Avatar Chat, so the example wouldn't be an exact parallel with the AS3 one. I suggest that you read the Rejoin Game tutorial and then ask questions.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  7. The Following User Says Thank You to tcarr For This Useful Post:

    _joseph (06-26-2012)

  8. #6
    Member
    Join Date
    Mar 2012
    Location
    CA
    Posts
    52
    Thanks
    51
    Thanked 0 Times in 0 Posts
    Would you reconsider if I made a donation?

  9. #7
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    If your donation is another avatar that will work with Avatar Chat, I'll do it. Or if you think that an example that doesn't give the users a choice of avatar (but does give choice of chat topic) will be useful. The problem is that I do not have the skills to create an avatar, and if I get one from the Unity asset store we wouldn't have permission to distribute it with the example.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  10. The Following User Says Thank You to tcarr For This Useful Post:

    _joseph (06-26-2012)

  11. #8
    Member
    Join Date
    Mar 2012
    Location
    CA
    Posts
    52
    Thanks
    51
    Thanked 0 Times in 0 Posts
    Thanks tcarr!

    Choosing between a variety of avatars would depend on the Database Extension, wouldn't it? And I can do with or without choosing between Avatars.

    Also, could you also include that the Lobby and the QuickJoinGameRequest rooms use seperate plugin extensions?

    Joseph
    www.spellstorm-realms.co.cc

  12. #9
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    The way that the RejoinGame example is implemented, it only works for GameManager games (QuickJoinGameRequest), and only in the same extension as the server level plugin in that example. You can make normal room type games into game manager games, and you can merge extensions into a single extension, or you can implement an interop on the plugins so that they can talk to each other. You will have to edit the game plugins to have them work with RejoinGame.

    You don't need database access unless you want to persist the information.

    I'll see what I can do to get you a Unity example that remembers which gameType the user was playing when they disconnected.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  13. The Following User Says Thank You to tcarr For This Useful Post:

    _joseph (06-26-2012)

  14. #10
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    I have implemented a Unity client for RejoinGame and I'm uploading the new zip now (same link as above). It reuses the same scene for the three different chat rooms, and the same NetworkController. If you need an example that uses multiple scenes and separate controller scripts, see the new Reversi game example.
    Last edited by tcarr; 07-02-2012 at 02:42 PM.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts