j0schi's Forum Posts

  • well so if it is only for testing purpose you can have an account on my turn server

    so who will actually play this game?

  • might be related to my problem, take a look here and feel free to ask away: https://www.scirra.com/forum/viewtopic.php?f=147&t=178631

  • I noticed that also, it is different from browser to browser.

    you could try to detect the user agent (but there will be many cases where this is not correct) and then set the position if the game runns in this browser:

    UserAgent

    Return the full user agent string for the browser, e.g. Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63.

    regards

  • So this rly bothers me, as i cant get it wo work.

    Basically i have a bunch of instances of the same object floating arround. The object has the instance variable "points" which also determine the size of the object. When one instance overlaps another the instance with more points should gain points from the instance with less points. This work as long as only 2 intances are overlapping, if another 2 overlapping it does not work (only for the first instances overlapping while i picked instances by nth).

    I tryed to let each instance spawn another object, pinned it to the first object and set a variable UID but that also does not work:

    is there any working solution for this problem? Any help would be greatly appreciated.

    Kind regards

    Patrick

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So i should write a guide (and maybe i will in the future) but i am just needed elsewhere. regardless of this i want to post my solution for a common problem with C2MP:

    How to set up multiplayer server for up to 100 Players

    • write a Server in C2 which handles the game logig as you would normally do but without the player part
    • get a server for example from linode.com with at least 2 (better 3) cores
    • install ubuntu 14.04
    • Login as root
    • sudo apt-get update
    • sudo apt-get install xfce4
    • sudo apt-get install xrdp
    • sudo service xrdp restart
    • apt-get install firefox
    • echo xfce4-session >~/.xsession
    • connect via windows RDP to your server by entering the IP and your user credentials (after connection)
    • start firefox
    • type in about:config
    • enable webgl for WAY BETTER performance
    • navigate to your serversoftware written in c2
    • fire it up!
    • profit!

    so with this setup i successfully run a game with 50 simultaniously connections and the server was not nearly full, running the serversoftware at 60FPS at 0.6 CPU utilisation. The server synced 50 playerobjects with high precision double 8 bytes, 4 Instance variables, as well as 500 pickups with normal precision low bandwidth (mostly static)

    Maybe this will help someone in the future! Good luck with your mutiplayer project.

  • So to answer my own question:

    I installed a turn Server and now everything works fine.

    Here is a quickl guide what i did to install the reTURN server on ubuntu 14.04:

    1) apt-get install resiprocate-turn-server

    2) nano /etc/reTurn/reTurnServer.config

    3) Set up IP and Port for TURN Server in config

    4) Disabled md5 PW hash

    5) Added User in nano /etc/reTurn/users.txt like username:SHA1HASHOFPW:reTurn:authorized

    6) Configured IP-Tables to open up the Port

    7) Restart server so the new configuration becomes active: service resiprocate-turn-server restart

    8) In Construct 2 before opening the connection: Multiplayer: Add ICE server "TURN:domain.my(username "username", "credential SHA1HASHOFPW"

    9) Works like a charm on all devices now.

    If anyone needs an account for testing purpose i can grant you a timly limited access to my TURN-Server, so you can test your stuff out!

    Kind regards

    Patrick

  • its like impossible to say without more informations...

    Layerscale? Imagepoint on the wrong place?

    Regards

    Patrick

  • So i started a new multiplayer project. Everything seems to work as intended first. I could connect locally over LAN booth as a peer and a host. Then i tested it over the Internet and it did not work.

    Here is what i tested both with the original Construct 2 Example and my own game in a combination of Windows, Linux, Android, latest chrome and firefox:

    My PC - Friends PC: Peers can not connect

    My PC - Other PC in other network: Peers can not connect

    Other PC in other network - Friends PC: Peers can not connect

    My PC - Mobile Phone (carrier connection): Did not work

    Other PC in other network - Mobile Phone (carrier connection): Did not work

    Error:

    So only thing i could get a connection is within my own lan network. I did not change anything on the example construct 2 provides. I am not behind a nat/special firewall. Originally i intended to write a html5 server done in construct 2 for my game and let it run in a browser (Chrome in a VM 24/7) but it currently doesnt seem to make any sense as IOS does not support the construct 2 WebRTC and even with Linux / Win it seems not to work properly...

    Does anyone else experience those issues? DOes anyone have any tips what i could try to get it work? Or is the multiplayer feature of construct currently broken?

    I am thankfull for any suggestions how to fix this problem.

  • Update: only happens in chrome and chrome canary, Internetexplorer and firefox works fine...

    Its really annoying as it destrois the immersion in games. are there any workarrounds for this?

    Kind regards

    Patrick

  • So it might be obvious, but i still cant get it working.

    Basically the sound plays at the LAST object where it should have been played before, but not on the current one.

    Can anyone explain whats going on here?

    capx attached as demo.

    http://bytecrunch.org/soudbugdemo.capx

  • Prominent normally it should just check for the collision poligon. but currently i cant reproduce this behavior anymore everthing works as intended now.

  • There where no behaviors set, just plain. i rly dont get what happened there, started a new project, did exactly the same and it worked perfectly...

    Stupid as i am i overwrote the original file...

    Working with construct for like 4 years now, never seen anything like this. Might be a strange, and very rare bug. he just used a wrong collision polygon, the drawing was just to make it clear...

    Kind regards

  • For your first Problem a possible solution:

    • Give the stg1lv1 object a variable called timer
    • Set the timer to a random value at creation
    • Each Second Subtract 1 from this timer
    • Make a condition if instance variable timer is <= 0 -> Change direction, speed -> set timer to random (value1,value2)

    For the second question

    i am not sure if you have disabled the collision detection or the physical bullet collision.

    if collision detection is on you could make an on collision with another object event, then calculate the angle based on your objects position relative to the barriers position and then reverse it and set it as the new angle of movement.

    Hope that helps

  • Hey all,

    i am feeling pretty stupid right now as i work with construct 2 for a while now.

    Today i encountered something strange which never happened to me before. the engine is using the sprite shape instead of the colission polygon to determine object overlapping.

    This is the code:

    here you can see the collision polygons on the left and the final detection on the right:

    https://gyazo.com/0a44607ec4096437332cbf0c4598b3b8

    Is there any option that provokes this behavior? I might have changed it by accident, but cant find it.

    Any suggestions?

    kind regards

    Patrick

  • Thanks R0J0hound , the example is amazing! I will play arround with it a little!

    Dind`t know about quix though or i would have searched for that directly haha