Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 8th 2016 edited
     
    I wanted to make a role-play game on the CI Editor... but I can't figure out one thing: I want to assign the roles based on seat number. So if it was Werewolf, then player 0 would be the wolf, 1 the spy, 2 and 3 the villagers.
    However, how random are the seats? Is it based on when you joined, or is it randomly assigned?
    (The actual game will have similarities to werewolf, but it will be more interesting as it takes more actions to eliminate a player.)


    Another concern is how well do multiplayer games work if you need to change scenes? I was planning to have a scene for the star map (it's a space theme), a scene for the "interstellar meeting", etc and scenes will change during the course of the game. I don't want to have players disconnecting just because they have to travel to the space station for a meeting, and I refuse to do the old-fashioned method of having the scenes tile a massive area.


    So to summarize:
    (1) How random are the seat indices? (I can't test this in the editor.)
    (2) How well do multiplayer games work if you need to change scenes?-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeApr 8th 2016
     
    I would assume seat number be be designated by role.
    Maybe join order.

    Maybe you could implement some kind of starvation system. This means that players can go out of order, but they have points taken away when they use a turn, and they only get points back when other players take a turn. If a player starts getting too many points, they are forced to spend them before other players can continue. (I.e. They're "starving")-----------------
    Orange is my favorite number.
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 8th 2016
     
    But the API is "Join Randomly", although that could imply it picks 3 random others in the queue and puts you in by join order.... I would like a definitive answer.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeApr 8th 2016
     
    Oh, you mean in game?

    I don't know then.-----------------
    Orange is my favorite number.
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 9th 2016 edited
     
    I don't know about this. I tested Tree Cutters three times in a row. Every single time, the first joiner got to go first, and going first is determined by seat index....

    So here's my odds.
    For me, I don't know if it's join-order or random seats, so I assume each has 50% probability.

    Here's a tree showing the possibilities after each trial. P1 is the player that joined the game first.

                                        |
               Join Order--------+-------Random
             /              \                  /            x
           P1             P1               P1            P2
          /   \          /   \             /   x         
         /     \       /      \           /     x       
       P1    P1     P1     P1       P1    P2         
      / \    / \     / \    / \       / x                
     1  1   1  1   1  1   1  1     1  2          


    The x's indicate paths that did not happen. There would be 16 equally likely possibilities, except that 7 didn't happen (because they involved P2 going first), so the probability seats are determined by join order is exactly 8/9 (there's only one leaf left in the Random side).


    As it happened, the probability is 16/17, since I tested it a fourth time.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTapir
    • CommentTimeApr 10th 2016
     
    Players enter game instances by their joining order.
    However, you should view player seat indexes as random in actual games,
    for players can't control their index in the game pending queue.
    (player_seat_index = player_queue_index % num_seats_per_game_instance)

    Multiplayer state is global, it is independent of scenes (just view it as world variables).
    So switching scenes will not affect multiplayer state.

    (btw, looks the game server has bug, sometimes it will not create new game instances even if there are enough players in the pending queue)

    (btw2, glad to see you all still here.)-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 10th 2016
     
    I see. However, the problem is if four of us are on the chat and they know I clicked join first, they would know I have whatever role corresponds to joining first.

    Why have you been away so long?-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeApr 11th 2016 edited
     
    @Mathdude
    Use a seed based random number generator, supplied by whoever is the first "index." All you have to do is make it so that whenever all players have joined a game, run a script to internally check if their seat indent == 1. (Or 0, whichever index is first.) Then, if it is, generate a random seed, and pass it to all clients, including itself. Next, use that seed to generate roles and everything else. Thus, it doesn't matter who joins first, as the actual roles are completely different, even under the same join conditions.

    @Tapir
    It's good to see you, too! :) :D-----------------
    Orange is my favorite number.
    •  
      CommentAuthorTapir
    • CommentTimeApr 11th 2016
     
    @Mathdude,
    just like thedude said, you can make some prelude logic before the formal game logic.

    ===

    After several more failed tries to get some revenue at last year, I got a job, a some busy job. That is it.
    It is really not very bad, the job is some helpful for me to get experience to improve the multiplayer function in CIE later.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeApr 11th 2016
     
    @Tapir
    I'm glad to hear it. At least you're getting lots of coding experience from it.
    It's nice to know that after all this time, CIE is still in development. It warms my heart to know that CIF is still pushing through these slow times. ^^-----------------
    Orange is my favorite number.
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 11th 2016
     
    DARN, I spent 8 minutes replying, and my computer closed the tab without permission.....

    Basically, I want server side coding. I decided to delay the development of this game and do a simpler one. You have secret dice rolls, but at the end of each round everyone must show their dice. I use a WeGo channel for this, but I'd rather have the dice generated at server...

    Is there an easy way to tell when someone disconnects? It's either Player Status Changed, Instance Phase Changed, or Instance Seat Info Changed.

    ===

    I thought maybe publishing CIE-made games to Kongregate, NotDoppler, etc would attract viewers. But you have to make it really good. The Ludum Dare entries weren't winners, and that didn't attract many people at all.

    ===

    Thanks for stopping by. It's been 6 years, and we're still making progress.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorBioManiac R2 (Moderator)
    • CommentTimeApr 12th 2016
     
    TAPIR YOU LIVE!!! It's good to see you! How is your job going? Are we going to see you post here more again now?

    I have a friend that wants to contact you and discuss some things for improving the CIF forum,
    I'm not sure how much time you have or if you'd be interested in talking about it?
    •  
      CommentAuthorTapir
    • CommentTimeApr 12th 2016
     
    @MathDude
    > Is there an easy way to tell when someone disconnects?
    yes, Instance Seat Info will change when someone disconnects.
    You need to loop all seat infos to find which seats are changed.

    @Bio
    I will try to post here often.

    Hi, you can welcome your friend join and post her/his opinions here.
    Aha, our forum needs to be improved? I feel it is almost perfect. :)
    It is like a quiet small unique island hidden in the huge world.

    It doesn't mean I don't like improvements for CIF.
    I just have no intentions to improve it for promoting it.
    I want to keep it quiet and act as our base.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 12th 2016
     
    Oh, so the Seat Infos thing is an array. Interesting.

    A very quick request (hopefully): the option to allow a range of players. The game I'm making technically works with 2 people, but it's better with 3 or 4. I wish I could have it so any number from 2 to 4 (potentially even 5-6!) could play. (I haven't even tried making 3 different instances, but something tells me it would flop.)

    Problem: if 3 people try to join at the same time, two of them would inevitably join first and start without P3. For this reason I propose a parameter for a timeout that after say 10 seconds with nobody joining (or when there gets to be the most number of players) it starts the game.

    Like this:
    Alice joins the game
    Bob joins the game. There is now enough players, so the 10 (or whatever) second timer begins.
    5 seconds later: Carlos joins the game. The timer restarts.
    5 seconds after that: Dave joins the game. There are now 4 people. Game starts.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorBioManiac R2 (Moderator)
    • CommentTimeApr 13th 2016
     
    ^ Can't we just code that ourselves? (i don't remember since I haven't tried to make a multiplayer level in so long)
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeApr 13th 2016
     
    I agree with Bio.-----------------
    Orange is my favorite number.
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeApr 14th 2016 edited
     
    Right now your multiplayer game must have a fixed number of players. I don't think you can pend more than one request at once.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTapir
    • CommentTimeApr 17th 2016
     
    HI, mathdude,
    variable number of players will be supported in custom game server feature later.
    This feature will bring many complexities (so bug prone) to the current design.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    • CommentAuthorpuzzle geek (Advanced Member)
    • CommentTimeApr 17th 2016
     
    A wild Tapir appears :o-----------------
    puzzled