User Tag List

Results 1 to 6 of 6

Thread: Question about how players should correctly connect to server

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Unknowner's Avatar
    Join Date
    Oct 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about how players should correctly connect to server

    I saw a lot of tutorials connection to test host via channel and then sending position to peers, when you have your own server u should do all via server?

    On my server I have all monsters but I don't have players so I can't detected collisions and send it to clients.
    Should I do the collisions on clients and send it to server? sience on client i have both monsters and players.
    Or should I create the players in to server and send collisions to client?

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The server should have the one and only true 'game' and the client should just try to match it as closely as possible. The clients should not be allowed to make any decisions because this opens your game up to cheating with hacked clients. If the server controls everything, it will be impossible to cheat.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Unknowner's Avatar
    Join Date
    Oct 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LB View Post
    The server should have the one and only true 'game' and the client should just try to match it as closely as possible. The clients should not be allowed to make any decisions because this opens your game up to cheating with hacked clients. If the server controls everything, it will be impossible to cheat.
    I'm able to connect players via channel but then I try to create them on server too and only works with 1 not with 2 or more its like they erase their ID and match with the first one, here is my code

    The first 2 parts are on server, the last one are from client


  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What's that list box for? You don't need to keep track of clients or their IDs, the Lacewing server does that for you.

    When a game starts, loop over all the clients in the channel and create an object for them (make sure you set one of the alterable values to the client ID).
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Unknowner's Avatar
    Join Date
    Oct 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LB View Post
    What's that list box for? You don't need to keep track of clients or their IDs, the Lacewing server does that for you.

    When a game starts, loop over all the clients in the channel and create an object for them (make sure you set one of the alterable values to the client ID).
    My method works perfect on client side, but the problem is spawn players on server so i can keep them controled via serverside, when i know a game start? I'm using on join request to create the new player that has joined via client, then i create his object and set his ID but when I create a new one both players have the last ID dunno why

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There is a difference between joining the server and joining a channel on the server. You should do everything inside a channel - each channel represents a game.

    When the game starts depends on what the game is - sometimes it might start as soon as there is at least 1 person, other times it may require 2 or more players before it starts. You have to decide that yourself.
    Working as fast as I can on Fusion 3

Similar Threads

  1. Lacewing server won't connect
    By AwesomeFun1 in forum Lacewing
    Replies: 5
    Last Post: 2nd December 2015, 08:04 PM
  2. How do you connect to players near you?
    By bluetiger in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th December 2012, 01:49 PM
  3. Cannot connect to any server using OINC
    By Xoram in forum Lacewing
    Replies: 7
    Last Post: 15th September 2009, 12:04 PM
  4. MooClick other players not working correctly
    By izac in forum File Archive
    Replies: 2
    Last Post: 22nd June 2008, 09:46 PM
  5. On a hosted server, what do you connect to?
    By Gerblegod7 in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 27th March 2007, 09: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
  •