redfoc's Recent Forum Activity

  • I don't know it's my mistake or a bug.

    If player/peer get killed by another player, then Host will kick this peer.

    Player/peer can reconnect to this room and restart it's layout to retry the game again.

    But if player are connected again, all synced object are destroyed every tick/time, but object that are destroyed is not the main objects, i really confused to explain this, it's take a while to find what causing my game bugs.

    So, the game it's self are look like no problem are appears, but the CPU usage are keep increasing since there are a hidden (maybe) synced object that are keep destroying, and this issues are not affected with another peer or an host.

    Before get killed/kicked. There are 457 objects here

    After reconnect again

    There are more than 10k objects and keep increasing since if players are destroyed, player will spawn 'Blood' sprite.

    Synced objects

    Experiment 2, spawn blood are disabled, so there will no function are called if synced objects are destroyed. But it's not solving this problem, CPU usage are keep increasing even there is no objects are created.

    Experiment 3

    Add another synced object on 'Real-time multiplayer' template.

    It's a sprite with sine behavior

    Disconnect a peer

    The result after 6 times of reconnecting/restart, CPU usage are increasing

    Is there any solution for this problem?

  • Ah, you right, i don't realize i missed this.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My multiplayer game are show connection or multiplayer log on.

    If peer/player are kicked/disconnected and restarting layout.

    Log from previous session are shown here, it should't be.

    How to completely clear multiplayer log?

    Fengist

    You're right, i just test to run my game on a dedicated server with relatively same specs just more ram, and CPU usage for handle same peers count are lower than VPS with relatively same specs, but the price plan is also quite higher. Thanks for your link reference i got a new things here.

    Nepeo Thanks for your explanation

    I just realize why i got lagging (player movement) if there are a dozens of peers because my PC CPU are going to 100%, i test it by opening an url on new window as peer. Since i can operate my PC smoothly to browsing and open an app while my CPU are going to 100%, so i did't realize it's my CPU problem.

    When i open my game on Smartphone while my game that running on my PC are got lagging, game are just run smoothly (and another peers movement) on my Smartphone like there is no problem.

    So, with 2cpu and 2gb of ram (VPS) and 35 peers connected, server cpu are going to 75%, i think this server specs can handle upto 50 peers at same time until got 100& of CPU usage.

    I test it with my actual game (described above), there are many collision checks and bot movement that need to by handled by server.

    oosyrag I just test it using a simple game mechanism, only sync x,y position, and with these servers specs it's can only handle 10-15 peers smoothly, so, how big server specs i need for a complete game.

    Kyatric i already read it several times and get a bit confused about it's number

    Ashley So, there is no chance to make dozens of peers on same room using default Multiplayer plugin or p2p ? I hear about websocket, but on plugin manual they say "WebSockets are not currently a suitable choice for this.". How most io games handle dozens of peers at same time? what technology they used?

    WackyToaster I just played knuckol.club and it's so smooth and fast on kill another player, it's look like a local game with bots, but nope.

    Hi there

    I make online multiplayer game using Multiplayer plugin, and use VPS server as a host.

    My game type is a fast-paced top down shooter game, a room will have at least dozens of players, including 10 bots. Bots are controlled by host (using Panthfinding, line of sight and turret behavior), peer only receive a movement.

    I test it using Firefox and Lubuntu (light version of ubuntu) as OS with 1 CPU and 2gb of ram. and i get 100% of cpu (server), with 1 peer connected.

    I just realize there are so many collision (bullets) that my server can't handle.

    So, i decide to upgrade my server plan to 4gb ram and 2cpu with Opera as browser.

    Then i make a simple version of "Real-time game" example template, to just sync player movement only and remove unused functions. Just to find out how far it will go.

    With this server specs, Host only can handle 25 connected peers with lag, and only 10 connected peers are playable.

    Average ping speed is 40-60ms

    Is multiplayer plugin (p2p) can only handle small number of players ? Or i need more bigger server specs?

    Any chance to make IO games similar to surviv.io or agar.io using Construct ?

    Thanks

  • It's my first time built an online multiplayer game, I'm on trial and error phase. Thanks for your suggestion anyways.

  • oosyrag

    No, i have one action of this and i already disable it since peer movement are weird.

    If "local input prediction" are activated, this angle problem are never happen, but player movement are like "Ease in out smoothstep"

  • Hi everyone

    I have a little problem with my game character movement.

    Peer angle and movement are controlled by the host, not directly by Peer/player input itself.

    Player input -> Host -> Player move/input received (Sync obj with position and angle).

    Look at this short video.

    Subscribe to Construct videos now

    How to fix this?

    Thanks

  • oosyrag

    Yeah, i better to forget this things until i find a solution in the future, just separate bot object and set target to real player, so, player will know if an object is a bot.

  • AllanR

    Thanks for your reply

    But, i don't think it's working with real Turret behavior (exclude specific uid), i already tries this and not working.

    If i use pick nearest every tick, it's may slow down the game performance especially on mobile device and there are many object that are checking every tick (for each).

  • Is there any method or alternative to prevent Turret to targeting itself ?

    I want to make online multiplayer top down shooter similar to io games, so, there will be a dozens player on a room. And if there is not enough player, system will create bot player.

    Bot player and real player is a same object / sprite, and there is a separate sprite with pathfinding and turret behavior, Bot player will be pinned with this sprite and a variable for bot identification.

    Bot movement > use pathfinding to patrol/moving, and if turret are detecting target, bot will star shooting.

    Target for turret are grouped using families (pick nearest target)

    Is there any solution for this?

    Thanks

redfoc's avatar

redfoc

Member since 7 May, 2016

Twitter
redfoc has 4 followers

Connect with redfoc

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x3
    Popular Game One of your games has over 1,000 players
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies