User Tag List

Results 1 to 4 of 4

Thread: Lobby system help

  1. #1
    Clicker Multimedia Fusion 2iOS Export ModuleXNA Export Module
    Asholay's Avatar
    Join Date
    Nov 2008
    Location
    England
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lobby system help

    Ok, so I've hit a block... (note, that 'host' refers to someone creating a channel on the server as their game)


    I'm creating a lobby system which upon connecting to the server, joins you to a lobby channel (hidden), and gets a channel list of all 'hosted' games on the server.

    Currently, when you 'host' a game it joins (thus creates) a channel with your username, which can be seen from the game-list which all connected players see.

    I've managed to allow people to join any game by selecting it from the list box (of channels), and then joining it - you can then also chat between yourselves.

    This all works fine, however I want to make it so that when a host changes a detail such as game difficulty, or maximum number of players, it sends that data real-time through to every connected player so that when they select a game from the channel list, it also provides the details the 'host' has selected - i.e. difficulty level, etc on their screen (thus enabling them to select a game which suits them most).

    Now, because lots of hosts will make lots of changes to game settings, how can I temporarily save the received game details, and then reload it if the potential joining player selects the game from the list? This is why I make every player join the lobby channel - otherwise you'll have to join a game to get the details of it.


    A more logical method would be vice-versa - i.e. for the player selecting a game from the channel list to request and receive the current data for that game - but I can't think of a method.



    Any help appreciated - sorry for the length of the post, but a more concise question yields a more concise answer (hopefully!)

    Cheers, Ash

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module
    Fusion 2.5 (Steam)
    Mathias's Avatar
    Join Date
    Jun 2006
    Location
    Copenhagen, Denmark
    Posts
    1,083
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Lobby system help

    If you just receive changes from the Lobby channel, I would use something like the Named variable object, and then store all the data there.

    Pretty much anything will work, it's just up to you which method to use

  3. #3
    Clicker Multimedia Fusion 2iOS Export ModuleXNA Export Module
    Asholay's Avatar
    Join Date
    Nov 2008
    Location
    England
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Lobby system help

    Hmm - not come across the named variable object... we didn't have that in TGF back in the day lol...

    That reminds me, I must get round to playing with the new object extensions!!


    Will give that object a try this evening and see what I can come up with, cheers.

  4. #4
    Clicker Multimedia Fusion 2iOS Export ModuleXNA Export Module
    Asholay's Avatar
    Join Date
    Nov 2008
    Location
    England
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Lobby system help

    Ok, I managed to get around the problem by using an object... so for the purpose of providing info for anyone else who checks this thread for lobby help, here's how:

    I used the Ini++ object...

    When a host makes any change to the game settings, it sends a full string of data down a subchannel which covers all settings (10 string parts in total - game type, difficulty, etc)

    When text is received on that subchannel, it sets the source of the string parser to the received text as usual, and then in one event creates a group for the host's name, and saves each bit of game data sent in the string as an item in that group.

    So the ini looks like this for each hosted game:

    [Ash] (the group)
    Difficulty=hard (the items)
    Gametype=co-op
    Slotsused=2
    Slotsmax=4
    etc


    Then, when a player in the lobby clicks on a selection in the 'available games' list box (which is just a channel lits), it sets all the strings in the game information panel to the Ini++ Group of the selected host, drawing in each 'item' of data from the Ini for each string in the info panel.



    The next stage is to delete every Group at the end of the frame which has item 'hostname' or whatever - so it basically purges the Ini++ file of all it's temporary game data.

    So far, it seems to work a treat!

Similar Threads

  1. Online-Lobby all don´t work
    By Johnny in forum Lacewing
    Replies: 23
    Last Post: 29th March 2010, 11:25 PM
  2. OINC Lobby Example Tutorial
    By Sumo in forum Lacewing
    Replies: 9
    Last Post: 29th November 2009, 11:45 PM
  3. Question RE: Online Lobby System
    By GnadeGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th September 2007, 06:29 PM
  4. Video Tutorial for Lobby-System
    By Johnny in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st July 2007, 01:17 AM

Posting Permissions

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