Coin-coin le Canapin's Recent Forum Activity

  • Hi,

    I'm working on an online minigolf game.

    I'm not sure about how to "store" the different levels inside Construct 2. Different layouts ? How I could select a random level at the end of each game ?

    How could I use filters before starting a new game (like : no levels with water areas) ?

    What if I want to create a side application in order to create our own map and include them later on another server ?

    I previously worked on a shoot/platformer where I created the maps as small images (about 100 * 50). The image was included as a sprite into the map family and the game converted each pixel into the corresponding tile or sprite (purple pixel : wall, blue pixel : health bonus, red pixel : spawn point…) but that doesn't seem the best way to do so for my minigolf game.

  • It doesn't update the instance list each time you remove one during the same event, so it sometimes targets instances that were already deleted.

  • I guess #MYCSS is the ID of your button ?

    Try to put display: inline-block or display: block in your css.

    Also no need to write twice your padding values as they are identical.

    padding: 10px 10px is the same as padding: 10px.

  • I guess you should first make sure that there can't be multiple peers with the same alias.

    Then you can juste create an array or a dictionnary to create associations between peers ID and alias.

    So you can know the ID from alias.

  • first check the button-collision polygon..

    What an instinct…! I guess you got through this kind of issues before

  • That's what I finally did.

    Thank you

  • Hi.

    I'm working on a minigolf game.

    When a ball enters a sand area (trigger once), its linear dampling decreases. When it leaves the sand area (also trigger once), it comes back to the normal value.

    (I replaced here the linear dampling events by writing "a" or "b" on a text element so I can precisely see if the events are run once or continuously)

    The sand area is made from a dozen of sand squares instances.

    If only one ball is in the sand area, "a" is written once. If two balls are inside the sand area, the code is run continuously despite the trigger once condition : it writes "a" continuously instead or once (total of twice, one of each ball and that's a turn based game).

    Same for the leaving event: it writes "b" once if only one ball is outside the sand area, and it keeps writing "b" if both balls are outside the sand area.

    What I want is for each ball, the code is run only once when it enters or leaves the sand area, regardless the number of balls present in the same area.

    I guess this is pretty simple but I'm stuck on this and it puzzles me. Any idea ?

  • Hard to tel without looking at your events…

  • I'm not sure to understand ; it your events are called server side, the server side ball count will always be updated before the client's one and the issue will remain the same, right ?

  • Hi,

    I'm working on a two player online minigolf.

    I read the chat and pong tutorial.

    In my game, I want to call a function only when the client(s) has finished spawning all the elements from the server (both players balls).

    Actually, the function (which targets one of the two balls) is called before the client has spawned the balls so the client can't find the targetted ball when it receives the server message sent from the function.

    I don't know if I explain well.

    The purpose is having, on the first turn of the game, each player seeing only the first player (chosen randomly) ball, whether the first player is host or client.

    The 2nd player ball will be visible only then the first player has ended his turn.

    In my events, the server immediately starts determining which ball to display in order to send this information to the client, but the client hasn't spawn both balls yet so it can't find it.

    So I'd like to wait until the client has no more balls to spawn before doing stuff.

    Any idea ?

    http://canapin.com/construct/canagolf/0 ... lf-06.capx (open two windows)

    Event 41 : this is where the server will broadcast the right ball (to set visible) to the peers

    Event 33 : this is where the client creates all the players balls : because it takes some times, the event 41 is called way before.

    If I broadcast the ball peer Id during the event 41and I create an "on peer message" event for the client, the ball having this peer id doesn't exist yet client side and that's the problem.

    Sorry, english isn't my native english and it's quite difficult to explain with so little vocabilary.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much !

    I chose the physics behavior, easier to use.

  • Looks like an old Windows screensaver…

Coin-coin le Canapin's avatar

Coin-coin le Canapin

Member since 22 Dec, 2010

Twitter
Coin-coin le Canapin has 1 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies