Problem with collision + zoom?!

For questions about using Classic.

Post » Sat Apr 05, 2008 4:35 am

You don't need timedelta for a push-up loop, and that's not a loop.

Here:
http://www.mediafire.com/?z41xtvizkez

Added some key control too, for feedback.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Apr 05, 2008 5:20 am

deadeye. yours doesnt push it back up. it still overlaps.

edit: also odd. editing your events list wont let me add a system command. O_o

edit: i started a new .cap and when i add a family system seems to dissapear from the options on the add event in the event list. only groupings are "objects" and "familes". system is nowhere to be found.

[url:3qg85xr0]http://i18.photobucket.com/albums/b121/comeon666/system2.png[/url:3qg85xr0]
B
2
S
1
G
4
Posts: 64
Reputation: 1,328

Post » Sat Apr 05, 2008 7:09 am

[quote="cecil":biuz2d44]deadeye. yours doesnt push it back up. it still overlaps.[/quote:biuz2d44]

Well, I don't know what to tell you. All I know is it should work.

In fact, it does work. Look at this example:

http://www.mediafire.com/?hvgox9gyvvz

Walk sideways into the protruding block. You will be pushed to the top because of the loop.

It seems to me it's not so much a matter of whether the object is actually overlapping, but whether the image is rendering properly.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Apr 05, 2008 7:20 am

Thanks for your suggestions guys!

But usually I like to build the engine without the need to constantly push sprites out of backdrops they're not supposed to overlap. And it works, but only without TimeDelta.

Doppel's example works sometimes. But most of the time the detector and the player sit on top of the ground. Which is what the event actually does, since you're pushing the movers family out of solid sprites when the detector overlaps.

And if I go by logic the condition should be with the player that overlaps. Which is what deadeye did, but strangely, like cecil said, although the events seem right it still overlaps.

EDIT: I guess deadeye is right. When I add an event

player overlaps solid -> close application

it doesn't quit the app when I just let it drop on the top, although it visually overlaps. But when I move it in sidewards, it ends the application.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Apr 05, 2008 7:38 am

[quote="PixelRebirth":e6nmpm3k]When I add an event

player overlaps solid -> close application

it doesn't quit the app when I just let it drop on the top, although it visually overlaps. But when I move it in sidewards, it ends the application.[/quote:e6nmpm3k]

Yep, that's pretty solid proof right there.

Edit: By the way, I can see the overlap you're talking about when I change it to point filter instead of linear.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Apr 06, 2008 2:21 pm

And the real question is that really is a problem? If you change this box into some sprite gamers will hardly notice it.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Apr 06, 2008 8:15 pm

Only just got round to looking at this thread - just to set the record straight here...

You really really should use TimeDelta based movements - it's an important aspect of designing a game if you use custom movements! TimeDelta has limited accuracy and in practice will vary by a small, random amount every frame. This means sometimes, by chance, it will work, and other times it won't. You cannot guarantee you will land perfectly on top of the ground so you do need a little while loop to push you up out of the ground. And as for this:

[quote:16vl06ng]usually I like to build the engine without the need to constantly push sprites out of backdrops they're not supposed to overlap.[/quote:16vl06ng]

As you might realise, it's a perfectly necessary part of designing a good custom platform engine - in fact most movement engines (even the built in behavior ones) use some kind of push-out algorithm. So it's a bit like saying you're going to design a custom 360 degree movement engine without sin or cos. In other words, good luck with that :P

In conclusion, I think the while loop solves this issue, no?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Apr 06, 2008 9:10 pm

Even the NES Super Mario Brothers uses push-out code. Look up a website on SMB tricks and you'll realize just how far simple platform movement code has come.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Mon Apr 07, 2008 2:36 am

[quote="Ashley":bl0g1ioq]So it's a bit like saying you're going to design a custom 360 degree movement engine without sin or cos. In other words, good luck with that :P[/quote:bl0g1ioq]

thats actually very simple to do. :twisted: :shock:
B
2
S
1
G
4
Posts: 64
Reputation: 1,328

Post » Mon Apr 07, 2008 2:05 pm

The problem is that the pushout won't work here, since Construct doesn't seem to recognize that the player sprite is overlaping. But it's displayed that way. So pushout has no effect, it's still (visually)overlaping 1px.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests