2.5D platform

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Fri Dec 18, 2009 5:36 am

[url:3u41tnz2]http://octavoarte.cl/25d_concept.exe[/url:3u41tnz2]

Just a concept. No slopes. Seems to work allright, you may even stretch objects and they still work :)
There's a marker for the player's ground level (w = 0)
Platforms can be moved vertically (not done in demo)

Edit: here it's sorting by basal y (ry) only. Final sorting must involve height somehow, haven't figured it out yet. In this demo, if you go towards the back of a platform, you'll be drawn behind it. A temporary workaround was to set the hotspot to the top of the base collision mask.

TODO/bugs:
-falling faster than maxclimb on a platform lets you through it
-platforms below others don't let you step on the top one
-there's no hitting walls yet
-integrator is very naive. Go Verlet.
-consider having the mask at the top instead of the bottom--> easier to draw
-move platforms on rx or ry, with other objects resting on them?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Dec 18, 2009 4:00 pm

sweet!
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Dec 18, 2009 6:01 pm

Well looks like you got 45 degree moves covered.
For the platforms are you going to have a depth setting as well as height?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Dec 18, 2009 8:32 pm

So far, you have to place the object in the layout as it would look resting on the zero plane, then it will get moved to its proper height on startup.

if by depth you mean the depth of the surface, that's done drawing a collision mask so yeah, it can be whatever you want.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Dec 19, 2009 4:08 am

[url:v1zzcaz8]http://octavoarte.cl/25d_concept.exe[/url:v1zzcaz8]

I updated the demo. Raised platforms work now, woohoo! In this demo there's a spiral staircase.... with platforms one above the other! And one big flat platform below the others!
There's a flag marking what you're standing on now, this should allow me to implement moving platforms later.

Still no blocking from walls (any help on the push-off code? please? should be pushout in 2D)
Also, I could do with some pretty platforms for testing... any takers? my drawings are terrible.

Edit: added crappy shadow, disappears when not touching any platforms. Any thoughts on how to have a shadow that stays on the nearest platform directly below?

Also, space key resets height, to avoid restarting endlessly.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Dec 19, 2009 4:36 pm

Madster:

This is really an impressive development for Construct. Even your quickly sketched prototype is really inspiring. I wish you all speed in completing this endeavor.

Now, to make things even more complicated: Could "depth" be simulated by a combination of drawing smaller platforms, (in the distance), complete with a kind of haze or fog to simulate depth of field and by assigning 3 of the move directions, (the ones that move the player "into" the scene), to player animations that scale down in size, (the player gets smaller as he moves "into" the scene)?

Just thinking too much.

Psmith
B
2
G
3
Posts: 25
Reputation: 900

Post » Sat Dec 19, 2009 8:22 pm

hey thanks! I like encouragement :3

I'll break it down:
[list:3r9tyyog]
[*:3r9tyyog]drawing smaller platforms (in the distance) / player gets smaller as he moves "into" the scene: There's an issue with this. If platforms get smaller as they move away, they'll grow further apart. So I'd have to take perspective into account, adjusting their position. But if I'm doing perspective, I'd also need to be aware of camera position so everything gets adjusted correctly.... so while it could be done, I'm not looking into it right now. Resizing stuff works perfectly though, so no problem there. I even considered allowing rotation of the scene, but the platforms themselves cannot rotate as they are flat sprites, so you would probably fall off them while standing still, which would be awkward.[/*:m:3r9tyyog]
[*:3r9tyyog]haze or fog to simulate depth of field: Using an effect, this would be done with a single action. You could even go all the way and use my Blur Motion effect and do actual field of view, though it would still be flat so wide platforms would have to be avoided.[/*:m:3r9tyyog]
[*:3r9tyyog]assigning keys: You'll have the 3 coordinates used to get and set as you please :)[/*:m:3r9tyyog][/list:u:3r9tyyog]

Edit: updated the demo with DoF... was easy :D (for some reason though I couldn't set the effect via family, had to do it object by object... the effect tab and actions did show up but then I couldn't set the values.. bug?)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sun Dec 20, 2009 4:16 pm

Plan for wall pushout (already detecting collision)
-----------------
grab the position from the previous frame oldp, the new position p
loop checking if oldp+((p-oldp)*x) is colliding, where x is a factor
the factor would start at 0.5, if not colliding it adds half the current factor, if its colliding, it would substract half the current factor
and then I'd repeat until I hit a fixed threshold for (p-oldp)*x (one unit, probably)
and if at the end of the loop it's still colliding, I'd just set the position to oldp.

If it works, I'll post another update :D

Edit: it worked! Wall collision working
[url:2zi87njo]http://octavoarte.cl/25d_concept.exe[/url:2zi87njo]

TODO:
Collision from below (right now it just goes through and lands on top of platforms)
Slopes

Edit2: crashes reported with framerates below 20, loop goes infinite even though it's capped with a counter.... which is strange, will do isolated tests. If "while" is bugged doesn't matter, as behavior won't use events :D
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Jan 06, 2010 5:54 am

Updated the demo with art from Kaos.

Collision works properly from all sides now.
Still can't get sorting right, might have to set standard tile sizes.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Jan 06, 2010 11:42 am

Looking really good :D
Looking forward to the final version ;)
B
14
S
4
G
7
Posts: 83
Reputation: 3,895

PreviousNext

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests