Isometric multiple floors

Get help using Construct 2

Post » Sun Jan 25, 2015 6:35 am

Everade wrote: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?

Unbenannt-1.png


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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sun Jan 25, 2015 7:18 am

@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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sun Jan 25, 2015 10:15 am

B
40
S
8
G
3
Posts: 159
Reputation: 3,024

Post » Sun Jan 25, 2015 11:18 am

Everade wrote: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 :D
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sun Jan 25, 2015 11:34 am

Yea please let me know if you've got it to work.
I'm on it the whole day already and all i've achieved is a big ass chaos.

I even broke some of my stuff which was perfectly fine before ^^
B
40
S
8
G
3
Posts: 159
Reputation: 3,024

Post » Sun Jan 25, 2015 3:26 pm

> @lennaert : Nice solution. I would love to see, how you did the z-index part. On the other hand I am not sure you can handle walls/furniture on different levels colliding/overlapping with both players at the same time, when the lower one has to pass through, but not the upper one. Maybe yes, then it would be even more exciting to see your solution. I added the multilayer-feature aswell, as you noted. Feel free to optimize or comment on anything you notice.

> @Everade: Did you take a look at my stuff at all? I really hope it helps you man ;) (Wenn ihr hilfe gebrauchen könnt, meldet euch einfach mal gerne bei mir...)

Passing beneath/above object (being on different floors)
Finally all the basic features are included. Not using solid-behavior or pushout absicly at all, since you have to be able to pass under walls, which must be colliding with the player on the same floor. (There still can be some reduced even now, eg "guides"). Players can just swap places, like with the wall being put in the foreground or background according to any layers, which is not implemented yet, but easy from here.

No Solids
Obviously, you can work more with collisions, also adding solid behavior -- which is more stable and might be necessary especially on slow devices to prevent passing through walls when slowing down to few ticks per sec. --, and just use this method when both players are on different floors, to disable solid temporarily, but enable the collision-control-lock. But I don't know, how many objects you are going to end up with.. it's always good not to have too many collisions, especially, if you plan to play it on phones/tablets. So its a balancing...

Formula, Family and Harmony ;)
Also, it is just a sketch, I'm sure it can be optimized a bit. Sorry for any longer Formula, but I try to work with families and relative values, to build up a proper engine with all object types are being easily replaced or added easily, without further coding basically, so anyone can use it to start with. Of course, most of them will be registered, to provide some more transparency, (as I did already in this file). I am also thinking of putting them as a collection online somewhere in this forum, since I really enjoy developing different ones and got a bunch of them by now.

CONTROL KEYS:
Player A = AWSD
player B = L/R/UP-ARROWS
You do not have the required permissions to view the files attached to this post.
B
8
S
3
Posts: 197
Reputation: 1,207

Post » Sun Jan 25, 2015 8:16 pm

@MultipleChoice

Yes i've examined yours as well.
But i haven't tried to implement your solution into my engine as of yet.

Because @lennaert s solution was pretty specific based on my current engine i've built.
So it was way easier to get it implemented.

I'm not planning to release my game on any smaller device, it's currently being developed for PC only.
Also it is planned to support at least 4 player online co-op.

So implementing your idea into my engine would basically require it to be completly rewritten.


For sure i'm going to take a closer look at yours as well. In the end i'm simply searching for a solution that simply works and is stable without any further sneaky bugs like the current ones i have.

If construct 2 would simply offer a more advanced solid system....
So we could ignore specific objects to be ignored on specific solids. That would be the best solution i can think of.
I've suggested it already and there were even some other developers who would be interested into it. But since the Construct 2 team is that small, i don't think that it's ever going to make into Construct. At least not Construct 2.


No matter what, it seems like building a proper online multiplayer iso engine will take months if i'm heading forward with the same development speed. It's really a freaking pain.

But i'm happy that i've recieved some great support from all of you guys. ;)
Thank you
B
40
S
8
G
3
Posts: 159
Reputation: 3,024

Post » Mon Jan 26, 2015 11:44 am

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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Mon Jan 26, 2015 2:25 pm

lennaert wrote: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.
B
8
S
3
Posts: 197
Reputation: 1,207

Post » Mon Jan 26, 2015 4:25 pm

MultipleChoice wrote:
lennaert wrote: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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: draiza and 9 guests