Python Networking, TimeDelta & GGPO (Good Netcode)

This forum is currently in read-only mode.
From the Asset Store
[C3] Banner ads, Interstitial ads, Rewared video ads, Rewarded Interstitial Ads
  • Are there any examples of some MMORPGs using it (not that I'm making a mmorpg btw). And can you say for certain that using a python library for networking will work well with a fast paced online action game with construct, and there isn't any reason why it shouldn't be fine. MMORPG in a 2D sense would probably mean 6-18 characters in a room cooperating. I should point out I'm talking about the quality of the network and not that it just works. Will it just depend on the programmer and there isn't any reason Construct and Python would conflict.

    For those that don't know what GGPO is, you can read this (first and"What's this rewind thing?" paragraphs. And the first few paragraphs here) for a quick understanding of what it is. This is what newer fighting game like "BlazBlue, Street Fighter 2 HD Remix, and the recent Marvel vs Capcom 2 release use". It basically keeps the clients in sync behind the scenes by rolling back frames in the game play. The is done while you can't see, so it feels more close to the real arcade experience. Here is a random online match of a game using GGPO

    Subscribe to Construct videos now

    .

    Now how would trying to use timedelta instead of fixed frames affect this style of netcode? I don't want to waste any time when it's time to convert to netplay. And if it doesn't work, I'd rather remake this specific game last in something else and finish offline only games. Thanks.

    Jonathan5 I'm aware of Scidave's work and he's done enough for community already. Thanks for posting those links, so more people get a chance to see them. Hopefully, he or a dev could shed some light on this issue.

  • Scidave said he is working on a tutorial, so you should probably wait for that.

    Dungeon Escape Online:

    http://www.scirra.com/forum/viewtopic.php?f=4&t=6239

    Pong Demo:

    http://www.scirra.com/forum/viewtopic.php?f=4&t=6102

  • Still, even if Scidave can do it, I'd like to know if this isn't more suited to a C++ plugin or something else. I wouldn't want to use Python for something it isn't suited for.

  • Also:

    For those that don't know what GGPO is, you can read this (first and"What's this rewind thing?" paragraphs. And the first few paragraphs here) for a quick understanding of what it is. This is what newer fighting game like "BlazBlue, Street Fighter 2 HD Remix, and the recent Marvel vs Capcom 2 release use". It basically keeps the clients in sync behind the scenes by rolling back frames in the game play. The is done while you can't see, so it feels more close to the real arcade experience. Here is a random online match of a game using GGPO

    Subscribe to Construct videos now

    .

    Now how would trying to use timedelta instead of fixed frames affect this style of netcode? I don't want to waste any time when it's time to convert to netplay. And if it doesn't work, I'd rather remake this specific game last in something else and finish offline only games. Thanks.

    Jonathan5 I'm aware of Scidave's work and he's done enough for community already. Thanks for posting those links, so more people get a chance to see them. Hopefully, he or a dev could shed some light on this issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll take a crack at answering your questions, although I'm not a big network programmer myself.

    Are there any examples of some MMORPGs using it

    • Eve uses Stackless Python.
    • The creator of PodSixnet is making an MMO that should support hundreds of players at one time.
    • OpenRTS is written in Python/Pygame

    And can you say for certain that using a python library for networking will work well with a fast paced online action game with construct, and there isn't any reason why it shouldn't be fine.

    It hasn't been done yet so nobody can say for certain, although I don't see any roadblocks assuming the following issues are addressed:

    • Access to Object private variables in Python
    • Access to behaviors from Python code

    While there are workarounds to the two above cases it will make for messy and inefficient code. You need to have access to behaviors in order to interpolate and predict properly. Until that is done, Construct/Python code will be limited to turn-based and slow action games over internet.

    MMORPG in a 2D sense would probably mean 6-18 characters in a room cooperating.

    This is already a given in Python. I'd venture to say even in PodSixNet you could do this for faster pace assuming that you also interpolated the players positions and perhaps added predictive code. I don't know how fast your characters will be moving so if things are happening insanely fast you might have issues w/ TCP. You wouldn't even need to do the GGPO type things you are talking about.

    There are different levels of netcode which handles various levels of lag. From simple to more complex:

    1. Basic TCP/UDP library. PodSixNet is an example of a basic TCP library. It performs what it needs to do quite well and integrates perfectly with Construct. However, by itself it is only practical with slower online or fast LAN games. You will start to notice the effects of lag over a 150ms latency (300ms round-trip).

    2. Interpolation: Even with a UDP library you can't escape lag. Interpolation is used to smooth the movement of the player from the prior position to the new position. This is usually done with tiny movements each frame until the player reaches the new position.

    3. ClientSide Prediction (Dead Reckoning): If there are large amounts of lag even interpolation will not be sufficient. In that case, the clients can predict where other objects will be by keeping a rolling average of the latency and using speed,direction characteristics to predict the actual position.

    4.Lock-Step: This is usually used in a peer to peer networking scheme where each client will take a fixed amount of latency in exchange for seemless play with other peers (of similar latency). Usually, everybody will have a latency of say 100ms and that allows for deterministic play between all of the peers.

    5. Roll-back: This is used in GGPO and in a bunch of FPS games as well. Sometimes a player will die on the server, but then an update comes from the client saying that he would have moved in time. The game is then rolled back on the server and all clients get updated information.

    I think roll-back will be a real pain to implement and I have no idea how it would fit in with Construct. I'll have to leave the timedelta issues and implementing it to the developers.

    I'd like to know if this isn't more suited to a C++ plugin or something else.

    I think we can all agree that a plugin is going to be more suited to networking than Python. If a plugin was written it could handle a lot of the synchronization for fast-paced games behind the scenes you might have to do with Python. That being said, PodSixNet integrates well with Construct so for its use case I would say it is well suited.

    So to summarize all of this:

    If you want to make turn-based, RTS, or slow action online games use PodSixNet. It integrates easily with Construct and is easy to understand and use.

    If you want to make fast-paced games then as of right now it is not practical (because of Python access to behaviors). Once the Python support is improved then it is probably up to the skill of the programmer, but you are in uncharted territory.

    Edit: Based on frpnit's work with UDP, the Mastermind library might be a good alternative as well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)