lennaert's Forum Posts

  • Event 4, instead of gamesPlayed put Ajax.LastData there.

    If you get a NaN error, encapsulate the Ajax.LastData with int() i.e. int(Ajax.LastData)

  • I believe the wait 0.2 makes the nested loop loose the reference to the ab object.

  • NaN stands for Not a Number

    When storing your local storage variable, put int (variablename) around it.

  • Needs to be associated with the correct peers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need Synchronized objects and associate the objects with the peers.

    When the peer disconnects from the host/room, the host automatically destroys the objects, which in turn destroys the objects on the other peers.

    Adding a touch event on the host side, to destroy a player associated object will destroy the given object on the peers as well.

    But the other way around will fail:

    Adding the touch event on a peer (not host) to destroy any of the player objects ... the object in question would simply be recreated.

    You can however, from the peer end, send a message to the host, with a reference to the object you want to destroy, and have the host destroy the object for the peer.

    Got my license just now ....

    But when I log on to the construct 3 , even after updating to latest version, it says I'm on the gamejam license

    I did not try opening c3 since mid jam before purchasing ....

    > Only available by credit card ?

    >

    Right now yes. We'll be adding Paypal when we can - may be a few months away though.

    Too bad

    If it had ideal or PayPal I would have bought one already ....

    It really helps to offer more payments options though ... I can imagine not many indies having a credit card.

    Now I gotta find my card details again lol

    Every year I need it once or so, lol (apple dev)

    Only available by credit card ?

    1# M1 Tank platoon - Amiga

    2# F117 stealth fighter - Amiga

    3# Apache gunship - PC

    4# Constructor - PC

    5# Simcity - PC

  • Looks like your anglelerping towards angle 0 there, try setting that to anglelerp(sprite.angle , sprite.8direction.angleofmovement, 50*dt)

    Also, disable setting the angle in the 8direction behavior for the anglelerp to work

  • hey lennaert can you share with me a quick example of host migration when the host leaves so that the game doesn't quit. would be greatly appreciated

    There never really is a quick example for something like that, generally it needs to get suited to fit a specific mechanic.

    I made an example and commented it.

    capx

    It has 2 things, ID preservation and reconnecting to a new host maintaining locations.

    The host can even reconnect as peer and get his old location back.

    It uses player object sprites on which you can pin an avatar, the idea is that the peers/host preserve the avatar if a player disconnects, or host leaves, and with those details players can reconnect.

    ^_^

    edit: keep in mind when testing on more then 2 chromes, the local storage of the 2nd incognito window might use the cache of the 1st incognito window

  • Sprite set angle

    To Anglelerp(sprite.angle,desired_angle,50*dt)

    This can smoothly rotate towards a desired angle.

  • You can use choose() for that

    choose(2,4,8,32)

    it will only select 1 of those 4 numbers.

  • However if you don't mind some juggling you could take the paster.imageUrl expression and load that into the canvas object.

    Thanks for the tip, I will try that

  • Hi, I slapped together a relative simple multiplayer template.

    This makes use of a ghost object to circumvent the movement lag between peer/host with synced objects.

    Capx