lennaert's Recent Forum Activity

  • http://www.gatheringro.ch/construct2/bandicam%202015-01-25%2011-09-36-919.avi

    I've recorded a video with another issue of yours

    Haha, yeah, I ran into several of those by now

    there are quite a few chicken and the egg scenarios

    I've done some reworks on my families, and trying a slightly different approach when it concerns the tanks.

    Will let you know if I get it to work till satisfaction

  • Everade

    I think I got it it solved another issue I was having with players colliding with eachother.

    I removed the for each loop with the walls, and placed the following in the for each tanks loop in the comom mechanics.

    I updated the dropbox

    EDIT:

    There is an issue when the wall would not be solid if another player was on another activelevel, directly above or below the active playing player.

  • lennaert

    I've implemented your idea and tested it under most conditions.

    But it's interfering within a very specific scenario, which actually could happen quite a lot.

    Well, it really depends on the situation and how you do the collision check.

    For my test i've created a rather big sprite on the Players position.

    It's my OverlapMask which should check if i'm currently colliding with any object on a specific floor.

    During my tests, i wasn't able to get it to work without using any Overlap Masking, since it seemed that the player was never really able to overlap anything as it was colliding already... i don't know what's the exact issue on that.

    Whatever...

    Let's say Player#1 is walking into an object or a wall... Now the OverlapMask is always in touch with this specific solid which has the same .activelevel instance as the player.

    Which means, it would trigger "Solid Enabled".

    Now if Player#2 on a different .activelevel comes by, he will collide with this solid because it will stay enabled as the Player#1 is still overlaping this object.

    Player#2 will be able to walk through as soon as Player#1 stops walking into the object, other than that it will stay solid forever.

    Do you have any idea how this could be worked out?

    I really wasn't able to get it to work without this overlapmask (which isn't solid by the way)

    In your Tank Game it seems like you weren't using anything to overlap, but for some reason it triggers properly for you while for me it doesn't.

    Or are you having the same issue?

    [attachment=0:1frp9yx7][/attachment:1frp9yx7]

    I see, I think its a matter of reversing the check, instead of checking for walls, overlapping tanks, checking the tank overlapping the wall, and setting the tanks solid.

    I'll will try in a bit, and will let you know.

  • > Everade, lennaert, newt

    Just for fun, I enhanced the layer solution. Now the "engine" has all features you need.

    - You can easily register any new elevation type (e. g. ladder, as I already added, or elevator)

    - Different types of walls or furniture (with any size)

    Of course the same can be done with overlapping, but I restricted collision-checks for the 8-dir-behavior and collision checks in the code as much, as I could.

    What do you guys think about it? If there is any part, that can be solved better, still working correctly, I would be keen to know!

    That looks pretty good, hard to actually read them formula haha.

    You should try it in a multiplayer scenario, and test the peers extensively.

    EDIT:

    for those wondering, the pushout plugin can be found under custom movement or from rex's plugin manager, the pushout solid behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my example I used 2 sprites, but I used an approach that required there being a moment of both overlapses and some booleans set ... got ugly after several attempts, gonna think about it, there's likely a better way to achieve that. will let ya know if I find something better.

    Gonna use this same approach in some of my games too ^_^

    I see we have a same interest in game type

    Got a couple of these games in the pipeline.

  • MultipleChoice

    lennaert

    Thanks a lot for your constructive feedback and ideas.

    I will try your ideas and will let you know if it actually worked.

    I still don't think that your idea will work thought lennaert. From what i've tested so far the collisions were always global, no matter what i've tried.

    On my previous tests, ones a Peer walked to the 1st floor, all deactivated collisions of objects on the ground were set.

    So there's no way that any other peer could colide with anything placed on the ground anymore, unless with the activated objects on the 1st floor which shouldn't happen.

    Also not by filtering using "pick Peer where Peer.UID = Peer.UID"

    But i will give my best and just test myself through your specific example.

    This may take some days weeks, but i will reply within this topic and let you guys know what i've achieved

    I made a working example, its easier then expected, I even got the host/multiplayer movement restrictions/limitations worked out

    But I am not fond of the way my stairs/elevation object works :

    As the solution which I used, the key lays in the overlaps check.

    Both player and wall have solid, and only the player has pushout solid too.

    events:

    for each wall

    wall overlapping with player

    sub

    wall.activelevel = player.activelevel

    action: wall set solid enabled

    else - action wall set solid disabled

    global mylevel (prevents having to pick)

    event:

    for each allobjects

    sub:

    allobjects.activelevel = mylevel

    action: set opacity 100

    else

    action: set opacity 50%

    event:

    player.peerid = multiplayer.myid

    action

    mylevel = peer.activelevel

    The only thing more needed is the stair (going up or down) action, to set the players activelevel.

    Running these on both peer and host, will determine how each player responds to colliding with a wall.

    I have 2 small platforms somewhere in the top middle of the map of my tankwars game see it working here

  • imothep85

    Sounds more like some background process interfering.

    ie windows updates, antivirus updates, virus scans etc

  • lennaert

    Thanks for your "thoughts", that was actually quite interesting!

    I've mainly done what you've listed down already.

    Peer, Objects and Enemies do have a .floor variable to determine on which floor they're currently at.

    But i've not determined the allobjects family.

    I may give it a try.

    And about your:

    allobjects opactiy 100%
    allobjects collisions enabled
    else
    allobjects opacity 50%
    allobjects collisions disabled[/code:1k5sla8t]
    
    If i'm not mistaken then "collisions enabled/disabled" is still GLOBAL, so according to your code that would mean that all objects would activate and deactivate collision each time something walks into an object.
    [b]But you forgot one thing.[/b]
    Your idea says "allobjects on collision with player"
    well... collision does not happen anymore if it has been deactivated. Which means it would never trigger.
    The only way i could actually do this is to check sprite overlap. [b]But activating collision on overlap does NOT work. You will be able to walk through the first object you're overlapping.[/b]
    
    I'm also still not using any Z as offset at all.
    I've simply set a variable "peer.floor" to 1,2,3,4 etc... so that's already the minimum of data to be synced.
    (I still don't understand why everyone gets this offset stuff started. Is there anything special about it? I just don't get it)
    

    The collisions would be activated per activelevel. IE it would activate all collisions on where the player would reside.

    Looping the objects while filtering player.activelevel = allobjects.activelevel, sets each collision individually continuously.

    Ofc the above code is just some basics, more would be required to keep things in check en pretty.

    The not triggering collision would assist in players wanting to walk underneath something above them, for the view of the other party (other peer or host)

    I never use the offset too really

  • Same setup, win 8.1 64b, latest chrome and FF, R195.

    No issues with contruct 2 after closing preview, it runs as it should.

  • some "thoughts"

    player variable:

    z

    iex player.y - 100 offset indicating first level

    either use the 100, or a dedicated variable to determine level

    z=0 set active level 0

    z =100, set activelevel 1

    z=200, set activelevel 2

    etc

    cupboards, doors, walls, spiders enemies, players etc etc, all belong the family allobjects, and have instance var, activelevel, and set them during development.

    events:

    allobjects on collision with player

    player.activelevel = allobjects.activelevel

    action:

    do some bumpage

    Level appearance and interaction mechanic, perform on peer and host

    event

    player.peerid = multiplayermyid

    for each allobjects

    sub

    player.activelevel = allobjects.activelevel

    action

    allobjects opactiy 100%

    allobjects collisions enabled

    else

    allobjects opacity 50%

    allobjects collisions disabled

    just sync peer's activelevel instance variable determined by the peer going up/down stairs

    The peer will appear on other peers and host set by activelevel.

    It can deduce the Z from the given active level, requiring less synching overhead

  • That was fun.

    Suggestion: Would be nice if the tank turned on key pressed and hold, but still turning in increments.

    Noted ^_^

    Was good play indeed, it seemed very smooth

    Thanks

  • As for the mentioned security:

    Why not make 2 separate apps ? A host and a client.

    The host can be stuffed anywhere the public perhaps can not reach, hell even straight from its desktop

    As for a database, I would simply have the host totally abuse the webstorage.

    As for automatically opening dedicated tabs, thats easy, the browser plugin lets you open pages/tabs

    Either have multiple exports of the game in dedicated directories, ie ../gameRoom1/ etc

    Or catch something from the URL to open a room on the newly opened tab: index.html?room=1

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies