lennaert's Forum Posts

  • this is 1 awesome game, dident laughed so much for long time,really enjoyd it:D need more optimization for sure:D

    hehe, yes, same here !!!!

    was awesome

    I'll look into performance for the next updates too

  • lennaert how do you create such smooth movement between all peers? D:

    Also, would you mind sharing how floors work? I'm trying to get the hang of 2.5D in multiplayer and while I think I've got the theory down, I've yet to try implementing it.

    Hey DatapawWolf

    The floors just required a smart approach to them, lots of knowing when 'not' to invoke something combined with a couple else's in the right order. (image below of floor leveling collisions core)

    As to the multiplayer, I spent weeks on end working out the mechanics and best approaches ... and in the end I managed quite well.

    -Knowing what to execute by who (host/peer/both) really makes a difference.

    -As few datasynchs as possible with a smart approach to movement.

    My host and peer event sheets are tiny compared to my common events sheet.

    (host 100 events, peer 50 events, common 500 events)

    Wall is also member of level objects

    I named my layers to: level0, level1, level2

    Referencing them like move to layer: "level"&playertanks.activelevel

  • good game

    Hey man, thanks for testing.

    I have been busy the last month working on lots of updates for TankWars 2.

    Here is an updated version

    *top post updated

    I have been making lots of progress.

    Still working on various updates, better speed manipulation, new touch screen controls, joystick, social logins, and stats keeping offline.

    If you run into bugs, try a reconnect or exit and try again.

    Web RTC can be iffy

  • Progress.

    *top post updated

  • >

    > Your multiplayer isnt really mutliplayer ... well, it is .. but its multiplayer in 1 screen ... not Everade's intention I believe.

    >

    > Here is a tip: Preview your multiplayer game in chrome, and press CTRL + Shift + N

    > A new Incognito chrome pops up, enter the same adres ie localhost:50000 and voila, 2 screens showing your game as a multiplayer game.

    > When you navigate the host or peer in one screen, it should also do that in the other screen.

    >

    > lennaert: You are right, it is not a true multiplayer, but it shows you the solution for walking through objects being one floor above, while the upper player is colliding. I am quite sure, that easily can be implemented in a split-screen or online or whatever multiplayer-kind.

    Thank you for the indeed very useful tip! Never did any real multiplayer before, I'm going to check it out.

    MultipleChoice

    Your welcome

    In a split screen scenario, you can easily manipulate and rely on everything, as you have control over everything, but as soon as it involves another instance of a game, in need of relaying information back and forth, and namely, such as we encountered here, the restrictions, its quite the challenge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It took me a bit of headache hahah, but I think Ive nailed it now ... again, the power came from simplicity ...

    Weird really, every time I run into something that takes way too long to develop, I find myself adding tons of booleans, vars, objects and what not .... just to get 1 thing working lol

    Generally taking a step back and looking at it a day later helps enormously.

    dropbox updated

    90% of the solution was in the approach, where I tried manipulating the objects, all I had to do was manipulate the player.

    MultipleChoice

    Your multiplayer isnt really mutliplayer ... well, it is .. but its multiplayer in 1 screen ... not Everade's intention I believe.

    Here is a tip: Preview your multiplayer game in chrome, and press CTRL + Shift + N

    A new Incognito chrome pops up, enter the same adres ie localhost:50000 and voila, 2 screens showing your game as a multiplayer game.

    When you navigate the host or peer in one screen, it should also do that in the other screen.

  • 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.

  • 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.