User Tag List

Results 1 to 7 of 7

Thread: Establishing channels in poinc

  1. #1
    No Products Registered

    Join Date
    Jan 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Establishing channels in poinc

    Hey community,

    I'm currently using Poinc to run the server of a game I'm making. Thanks for all the stuff you guys have created, and the examples, as I've been working pretty closely with those. Unfortunately, I'm still new to Python and I'm having some trouble getting it to do what I want. I want to create some channels when the server is started. I found a way to do this, but I'm not sure if it's the way I need to, because...

    What I really need is a way to, in fusion, get all the peers that are currently in a channel. I'm stuck because I don't know how to access channels. The only thing I can find is self : Get Channel Count, but I'm pretty sure that's only getting the channels that the current user is connected to. I need a way to find all the channels that have been created on the server, and then get the peers connected in said channel.

    Any thoughts?

    Thanks in advance.

  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: Establishing channels in poinc

    A channel in Poinc is only created when a client decides to join it. When the client count in a channel drops to zero, it is destroyed. If you really need to keep channels "running" all the time, code your own 'area' class that resides in the factory.

    As for getting the number of peers in the current channel, use Channel_PeerCount("OINC client").
    If you need to loop over all the peers and channels on the server, use channel listing (built into OINC)

  3. #3
    No Products Registered

    Join Date
    Jan 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Establishing channels in poinc

    Thanks, this seems to be the direction I need to head in. But, I have two questions...

    1. Could you point me in the direction of some documentation where I could learn how to set up such an area in Python?

    2. If I use these 'areas', will I still be able to access peer lists from them with Oinc?

    Thanks again.

  4. #4
    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: Establishing channels in poinc

    It would probably be easier for me to get you going if you told me what you're trying actually to achieve

  5. #5
    No Products Registered

    Join Date
    Jan 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Establishing channels in poinc

    Good point. I generally don't like to force too much on the people here, as I understand everyone has lives to deal with. But, if you're willing to provide specific help, I'm more than interested.

    I'm making a chat application. What I'm trying to implement are 'rooms' that people can move between in the application. So, people in Room 1 will only be able to chat with people in Room 1, but not with Room 2, etc. After this is in place, I need to create a sidebar that displays not only all the rooms, but all the users currently in each room. These will be expandable and collapsible, so players can see who is in which room. For example:

    -Room 1
    UserNameX
    UserNameY
    UserNameZ
    -Room 2
    UserNameA
    UserNameB
    +Room3
    -Room4
    UserNameC

    By clicking on the plus or minus sign, the player will display or not display the list of players in that room.

    My plan was to seperate these rooms by channels. I'm going to have specific types of messages sent over subchannels (private messages, variables, etc.), so I figured using channels as rooms was a good idea. What I need is for these rooms to always exist, even if there are no users in them.

    Thinking about it now, I could always have the Room name displayed, and if there is no one in there, then I wouldn't have to get the list...in which case it wouldn't matter if the room actually existed or not...hmm...

    Well I'll probably try to implement that in the meantime. But, if you know a way I could have these persistent rooms, I would probably prefer to do it that way.

    Thanks for helping me find a solution, but I do still look forward to your help.

  6. #6
    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: Establishing channels in poinc

    I would intercept the acceptChannelRequest (or whatever it's called), send all the rooms (and their peercount, or 0 if the channel doesn't exist), and then, when the client sends a direct message on eg. sub 0, send the peers in the channel.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Establishing channels in poinc

    What happened to Request Channel List?

Similar Threads

  1. establishing closest object to player
    By life2searching in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th August 2011, 01:41 PM
  2. How many channels
    By Tuna in forum Lacewing
    Replies: 3
    Last Post: 5th February 2011, 02:54 PM
  3. Poinc tutorial ideas
    By Mathias in forum Lacewing
    Replies: 18
    Last Post: 18th December 2008, 11:36 AM
  4. Poinc Plugin Server
    By Mathias in forum Lacewing
    Replies: 0
    Last Post: 15th October 2008, 07:13 PM

Posting Permissions

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