Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] MultiOnline : multiplayer online kit - V3 now available

Discussion in 'Assets and Asset Store' started by VirtuElle, Aug 16, 2013.

  1. RealSoftGames

    RealSoftGames

    Joined:
    Jun 8, 2014
    Posts:
    220
    yes i have done that, and still gives error.
     
  2. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Could you give me the URL where you have put MO's php files ?
     
  3. kinghack

    kinghack

    Joined:
    Nov 30, 2013
    Posts:
    54
    I fixed it the issue was the ip was different when I created the server login. I assumed that it updated but I was wrong.

    I decided that it would be better if the time was constantly sync'd.


    I made a timer in the MNetwork.cs script and then in my DayNight.cs script I got the MNetwork object with

    networkSrc = GameObject.Find("MNetwork").GetComponent<MNetwork>();

    and then set the time.

    time = networkSrc.TimeValue;

    It didn't change the time to the hosts time when the player joined but I think I need an RPC function?

    I'm basically just trying to get it so that the host stores the day-night variable on their client and constantly updates all the other clients day night variables.




    Also iv set up a url to guitexture system as a background is there a way I can have a server option that's entered when creating a dedicated server so I can load the texture in the wait room like networkSrc.gameInfo.backgroundtexture
     
    Last edited: Jan 14, 2015
  4. colorcraft

    colorcraft

    Joined:
    Jun 16, 2013
    Posts:
    41
    Is there a way that I can remove the login system and have the user enter their name in a textfield?
     
  5. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Yes, you need to do a RPC function. If you want to constantly update your timer, you can call your RPC function from the Uptade() function in MNetwork, with something like that:
    Code (CSharp):
    1.  
    2. if(isGameHost){
    3.   // Your RPC function, with the mode RPCMode.Others
    4. }
    5.  
    I'm not sure to understand You want that the game host would able the chose the background texture ?
     
  6. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    By default no, the system is made to work with an account system, but if you have a little knowledges in programing, you must be able to adapt the current system
    The system requires that users have accounts, registered in the database. So, you could delete the fields password and e-mail to ask only a username, and when a user enter his player name, you registed him on the database, and put him as "logged" (-> in MPlayerData, you put the variable isLogin as true)
    And when the player exits, you delete him from database.
    In this way, you could remove the login system without have to modify a lot of code.
     
  7. Kobaltic1

    Kobaltic1

    Joined:
    Jan 22, 2015
    Posts:
    183
    I did not read all 15 pages so I apologize if this has been asked. I notice there is no Android or IOS support. Are there any plans on adding this in?
     
  8. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Do you still work on porting your assits to unitys new ui system?
    Hope for some news about that soon.
     
  9. Mr-Fox080

    Mr-Fox080

    Joined:
    Jan 22, 2015
    Posts:
    2
    Hello friend, first of all congratulations on your system. We use Photon in some games, but we want to try your system. I already bought it, just need to know why people using internet in gold place can not appear in the created room. I read here that have to open the door, only it comes to open the door, but do not see anyone teach open the door. My router is LINk1One ... I wanted to know how to open the door does not work ... more
     
  10. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Hi, currently not, I had tested in with Android and it wasn't supported, and since the current system was not very adapted for mobiles devices (because of port forwarding), I didn't worked more about it.
     
  11. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    That's one of my ideas for MO, but I don't garantee that I will make it.
     
  12. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Hi, yes, MO work with port forwarding. You must go on the admin of your router to open the port you want to use for host the game. The system is different depending of the router, of you don't know how it work, you can ask to your provider.
     
  13. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    Hi ;) The last time i used it, it works fine ;)

    Now... it doesn't work correct..

    Installed all and create a User, then it comes an error BUT, User is created.

    If i would login with this user then it says

    Login failed :

    No message

    if i go in my sql database then there is the 1 in the login table of the user i would login .. whats going wrong? something in a php file?
     
  14. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Which is the error when you created the user ?
    You don't have any other message in the console (when you create an user and wheb you log) ?
     
  15. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    Here this is what happen...

    Register in Unity
    Anmeldung Unity.png
    Error but ...
    it works...
    Mysql anmeldung.png
    Login after register...
    login Unity.png
    Error but...
    it works...
    mysql login.png
    Login after failed Login
    it says, User is already login...
    login failed after login.png

    Is it maybe the Server and php5? I Have no idea... i use my own server ... with the game "F.r.a.g. me" we used your Site from your documentation and it works... maybe i will test this..
     
  16. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    I've a question.
    Can I ask my question in an spare time ?
     
  17. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Ok, I think that your php pages don't give the success message. So the C# script "thinks" that there was an error, but "he" doesn't have any error code so, the message is just "Register / Login failed".
    When everything is OK (the account well created / the user logged...) the php pages must write the word "Success", else, there are one or many other words, which work as error code, so that the C# script can catch the error it and display the good message.

    So, you can try to create a new user directly from the URL of your php pages, and tell me what it write on the page, just enter this URL on your web browser:
    Your website and folder when you put MO/saveUser.php?userName=test2&mail=test2@test.ch&pass=1234&privateIP=1.1.1.1

    You told me that you have already use MO in the past and everything worked fine, did you re-install everything or do you use some old php srcipts ? Maybe there a a problem in this side.
     
  18. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Sure, just ask your question ! Here or by private message, as you want.
     
  19. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    I used the New Version.
    ...
    New database and Server, my own from netclusive.de
    ..

    Only change is from the alwaysdata host (your doc) to my own Server

    Message from php is

    Success
     
    Last edited: Jan 27, 2015
  20. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    Forum delete some chars...

    Screenshot_2015-01-27-23-07-19.png
     
  21. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    I played my games in 2 PC on house.but I want play with friends but not work.Why?(sorry for my english)
     
  22. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    Amrix, has you some errors in the unity debug console?

    To test your game, build one game and Run it. Then you Start the other instance of your game inside of the unity Editor.
    Create a Server in unity and Then join from the build game, see what Happens in the console.

    If is nothing to see, Then Start Server in the build game and join from unity Editor.

    Is you See some errors, Post it here.

    Maybe it is only a Firewall ;)
     
  23. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    i haven't got any error.My error is I create a room but my friends not connecting.They press join button but not connect.Only it work in my 2 pc.
     
  24. trhero

    trhero

    Joined:
    Mar 6, 2014
    Posts:
    7
    Asset have any max player limit?
     
  25. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Ok, so this is your problem, because of these characters, you the message "Success" is not Intercept by C#.
    You have probably an "echo" somewhere on your php files, or some html tag which cause these characters, do you have an idea about from where it can come from ?
     
  26. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Did you open the game port on your router ? I guess it may be the source of your problem.
    People which are external of your network cannot join your game if you didn't open the game port.
     
  27. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    In theory, there is no players limit . The players limit depends only of the host capacity (so, it depends of the host's computer performance).
     
  28. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    <?php
    .....
    if($user->playerCall(urldecode($_REQUEST['id']), urldecode($_REQUEST['loginKey']))){
    echo 'Success';
    } else {
    echo $user->errorMessage;
    }
    .....
    ?>

    I have no idea where there came from...
     
  29. Sergasteam

    Sergasteam

    Joined:
    Mar 1, 2013
    Posts:
    113
    Dear VirtuElle please make a quick search function of the game, your system is very similar to the system in the multiplayer game Warcraft 3. I try to alter your system for quick search of players, but I do not know where to start. The idea is that when looking for 2 players at the same time the game should send their requests in your system for a scene of dedicated server and when the server saw 2 players, it has created the lobby for the players and launched a scene automatically. I'm willing to pay you a little more for the overall Asset or this feature. I like your asset.
     
  30. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    It's not from here, the echo / html tage is probably somewhere else, but I don't know where.
    So, you can try to re-install all the php pages, it may solve your problem (maybe you had put some output in the code and you don't remember).
    Or, the other solution, I think the more easier, it's to replace the instructions
    Code (CSharp):
    1. if(trimText == "Success")
    by
    Code (CSharp):
    1.  if(trimText.Contains("Success"))
    everywhere on MOServer, it will resovle this problem.
     
  31. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Hi, that's interesting, I will think about it.
     
  32. Sergasteam

    Sergasteam

    Joined:
    Mar 1, 2013
    Posts:
    113
    Thank you its will be very good!!!
     
  33. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    145
    Only installed it on server nothing more but your idea with the trimtext.contains is great :)

    Thank you :D

    Edit:
    With this, it works :)

    I hope i can convert this to bolt or the forge networking :) Unity network isn't sooooooo great ;(
     
    Last edited: Jan 31, 2015
  34. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    No.How can i solve this problem?
     
  35. Sergasteam

    Sergasteam

    Joined:
    Mar 1, 2013
    Posts:
    113
    you need to do port forwarding, see the instructions in the router. If you have a dynamic ip then you will not succeed.
     
  36. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    My IP is dynmamic.Is there a solution to this?
     
  37. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    Please Help Me!
     
  38. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    But which one of your IP is dynamic ? Your private IP or your public IP ?
    My public IP is dynamic, that's not a problem, the port forwarding still works.
     
  39. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16
    My public IP is dynamic.will be finished when I open port?
     
  40. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Yes it will, you didn't tried ?
     
  41. fearlessneon

    fearlessneon

    Joined:
    Nov 8, 2013
    Posts:
    12
    Im about to start beta testing and i was wondering is there any way that i can make it were they can have a special prefix before there name like "[Beta]fearlessneon".
     
  42. AmrixGames

    AmrixGames

    Joined:
    Jan 27, 2015
    Posts:
    16


    I opened port.This photo from 192.168.2.1







    Port Forwarding Tester




    My Unity Project
     
  43. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Sure you can.
    If you want that the name are saved with the prefix, you can add it on the php page MOUser.class.php: on the function saveUser(), line 70 youu can add your prefix in this way: ':userName' => '[Beta]'.secure_prepare_db($userName).
    But in this way, when a user want to log, he will have to put the prefix with his username.

    Else, you can just add it on the display, in this case, just add in on MOMenu, on the function LogUserDone, line 826: m.playerDataSrc.userName = "[Beta]" + server.userName;
     
  44. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    And it still don't work ?
    Maybe the problem is your firewall or your antivirus.
    When you have your port open, your firewall may display a message when create a new game, to confirm that you authorise other people to connect to your computer. Did you have this message ?
    You should tried to deactivate your firewall and antivirus.
     
  45. smokegun

    smokegun

    Joined:
    Dec 13, 2012
    Posts:
    170
    I also have a problem Sync animations.... because i am making a multiplayer out of UFPS but they don't use animation files every animation is putted in ragdolls so how can you Sync ragdolls?
     
  46. bekiryanik

    bekiryanik

    Joined:
    Jul 6, 2014
    Posts:
    191
    I get this error;

    Code (csharp):
    1.  
    2. Register Failed;
    3.  
    4. You are trying to load data from a www stream which had the following error when downloading.
    5. 404 Not Found
    6.  
    Why could it be? The files are in the right directory which i write in MOServer.cs. But i still get this error.
     
  47. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    You have to sync your animation using RPC functions.
    It's explain on the documentation part 7.4 (page 66), and you can also watch this tutorial which will help you:
     
  48. VirtuElle

    VirtuElle

    Joined:
    Jan 27, 2013
    Posts:
    458
    Did you tried to access on the web page from your web browser to be sure that the page is well upload ?
    Are you sure that you have put the good folder, and that you didn't forget the "/" after the url (on MOServer line 13) ?
    (you must write "www.yourwebsite.com/", or "www.yourwebsite.com/folder/", with a slash in the end).
     
  49. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Are you still working on a new unity ui version?
    Do you also make this more easy to use only parts of your asset i think it is calling modular?
    For example with a simple editor switch if i want to use a password or not or if i want to have the chat system or not?
     
  50. spaceapevisuals

    spaceapevisuals

    Joined:
    Feb 16, 2015
    Posts:
    2
    Hi. When you click on install PHP, all i get is a page full of code, unlike the log in boxed you have to fill in in your videos.

    <?php
    $successData = false;
    $successCreate = false;
    if(isset($_POST['submitData'])){
    if(!empty($_POST['mysqlHost']) && !empty($_POST['dataBase']) && !empty($_POST['name']) && !empty($_POST['pass'])) {

    $fp = fopen ('functions/logData.php', 'w');
    $content = '<?php ';
    $content.= '$logUser = \''.$_POST['name'].'\';';
    $content.= '$logPass = \''.$_POST['pass'].'\';';
    $content.= '$logHost = \''.$_POST['mysqlHost'].'\';';
    $content.= '$logDbName = \''.$_POST['dataBase'].'\';';
    $content.= '?>';
    fwrite($fp, $content);
    fclose($fp);
    $message = 'Your database login data are well saved.';
    $successData = true;
    } else {
    $message = 'Please, fill all the fields';
    }
    } elseif (isset($_POST['submitCreate'])){
    include 'functions/functions.php';
    $db = new MODb($logUser, $logPass, $logHost, $logDbName);
    $file = 'dataBase.sql';
    $content = fread(fopen($file, 'r'), filesize($file));
    //echo($content);
    $db->exec($content);
    //echo $db->getError;
    $message = 'Your database have been created, the installation is complete.';
    $message2= '<br/>Now, delete this page of your web server (you can keep a copy locally to be able to change the data later).';
    $successCreate = true;
    }
    ?>
    <!DOCTYPE html>
    <html>
    <header>
    <title>MultiOnline installation</title>
    <style>
    body {
    font-family:"arial";
    margin: 50px;
    }
    h1 {
    color: #0080FF;
    } div {
    border-width: 3px;
    border-style: solid ;
    border-color: #D8D8D8;
    padding: 30px;
    }
    </style>
    </header>
    <body>
    <h1>MultiOnline installation</h1>
    <br>
    <?php echo $message; ?>
    <br>
    <div>
    <?php
    if($successCreate){ echo $message2;}
    elseif ($successData) { ?>
    <form method="POST" action="">
    <table>
    <tr>
    <td></td>
    <td><input type="submit" name="submitCreate" value="Create database" style="width:100%"/></td>
    </tr>
    </table>
    </form>

    <?php } else { ?>

    <form method="POST" action="">
    <table>
    <tr>
    <td>MYSQL host:</td>
    <td><input type="text" name="mysqlHost" value="<?php echo $_POST['mysqlHost']?>"/></td>
    </tr>
    <tr>
    <td>Database name:</td>
    <td><input type="text" name="dataBase" value="<?php echo $_POST['dataBase']?>"/></td>
    </tr>
    <tr>
    <td>User name:</td>
    <td><input type="text" name="name" value="<?php echo $_POST['name']?>"/></td>
    </tr>
    <tr>
    <td>Password:</td>
    <td><input type="password" name="pass" /></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" name="submitData" value="Continue" style="width:100%"/></td>
    </tr>
    </table>
    </form>
    <?php } ?>
    </div>
    </body>
    </html>