rexrainbow's Recent Forum Activity

  • jayderyu

    Ha, it's because I don't want to repeat the official multi-player in my plugin, and reuse the MPwrap for all my MPxxx plugin. I had made MPchat plugin for chat-room already.

  • xoros

    Or I could made a sync-function first. The sync-function is just a funcition-like interface, which could trigger "condition:on function" for each player , include sender itself.

  • The question 2 is similar with that peer could not receive the message which sent by itself.

  • xoros

    Actually the host/peer structure is the basic of all, but the problem is - it's too detail to build game by host/peer. Thinking about most of C2 users are not programming background, there is a mess in their event sheets, "evey tick" everywhere.

    That's why I try to make a "framework" for turned base game.

    The request-validate-execute sequence had be done in my plugin (WIP). I am think about how to get random number(shuffle cards or something else). The easier way is to sync the random seed to each player initially. They are all based on official multi-player plugin. (Ohya, I do not need node.js server at all ! )

    BTW, "action: close room" might be necessary. For example, if the max peers is 4. The game start at 2 players, and it might want to close the room to reject others players.

  • imothep85

    You need to get the path of each image.

    You might need to have a text file which list all of image paths.

  • helena

    About prevent diagonal moving, using if... else if ... else ...

    + is up key down
    [ul]
    	[li]do something[/li]
    [/ul]
    + else
    + is left key down
    [ul]
    	[li]do something[/li]
    [/ul]
    + else
    + is right key down
    [ul]
    	[li]do something[/li]
    [/ul]
    + else
    [ul]
    	[li]do something[/code:3amd340v][/li]
    [/ul]
    About get neighbor tiles, using Expression:DIR2UID(uid, dir)
    [ul]
    	[li]UID ( number ) : The UID of chess.[/li]
    	[li]Direction ( any ) : The direction.[/li]
    [/ul]
    Then use condition: pick by UID.
    
    It might be better to have a condition to pick neighbor chess I guess, when I have time.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • xoros

    The reason of no delay in ghost-shooter example is "predicting" -- character of peer will be moved immediately when key pressed. It predicted the position at local, and corrected at next sync from host.

  • imothep85

    I though the thumbnails were created by server when image imported, it could reduce the traffic of network by sending small images.

    If you try to create thumbnail in C2 (client side), all you need is downloading origin image, then resizing. "action:get image from uri" at sprite is enough to do that.

  • xoros

    Indeed, I had noticed that the peer could not received the message by itself.

    The problem comes from the execution flow. In my concept, I split command execution into 2 stages,

    Each of player (host/peer) will request a command, then go through validating, and executing stage,

    1. validate stage: player check if this command could be run by call it's validating function. If not, do nothing, else (validating pass)

    • host: broadcast this command to all peers, then go to stage2 immediately
    • peer: send request to host, then go to stage2 immediately , so that there is no delay

    ------> when host receive request from peer, host will run the same validating function, it should be pass like sender-peer, otherwise the validating had mismatched, something wrong at this sender-peer. If the validating pass (match with sender-peer), broadcast this command to all peers. ( then go to stage2 immediately )

    2. execute stage: execute command

    • player(host/peer) who request the command and validating pass will go to this stage
    • peers receive the command which validating by host will go to this stage

    ---

    On the other word -

    1. [peer] request a command

    2. [peer] validate this command (could I run this command?)

    3. [peer] if validated pass, execute this command and send this request to host

    4. [host] receive command , then validate it

    5. [host] if validated pass, execute this command and send this request to other peers

    • if validated failed , something with that peer

    6. [other peer] get validated command, execute it.

  • xoros

    Agree. I had made a plugin for chat by wrap some multi-player event into my plugin, which hidden the host/peer into plugin, so that user could ignore the concept of host/peer.

    I am thinking about a turned based plugin recently, it also sent command through message channel.

rexrainbow's avatar

rexrainbow

Early Adopter

Member since 4 Apr, 2011

Twitter
rexrainbow has 87 followers

Connect with rexrainbow

Trophy Case

  • 15-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies