[Effect] 2.5D Platformer

Share your Construct 2 effect files

Post » Fri Nov 04, 2016 8:30 pm

@matriax
here is for you .. with rooftop ...
http://gigatron3k.free.fr/html5/C2/FX/2dcity.rar

Look carefully params and events and invisible block for collision ..etc
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
20
G
29
Posts: 815
Reputation: 22,093

Post » Fri Nov 04, 2016 9:59 pm

Gigatron wrote:@matriax
here is for you .. with rooftop ...
http://gigatron3k.free.fr/html5/C2/FX/2dcity.rar

Look carefully params and events and invisible block for collision ..etc


Thanks! Now i understand how the shader works much better after some tests :D .

I can create a sprite called Building, this sprite is a collision & Z-Face(Rooftop). Using the cointainer option creates 2 sprites = One with X-Face and other with Y-Faces. And in theory with only one sprite(The collision-rooftop) i can set in every position and on start layout all will be set, in theory! No? :P .

This will be using 3 different sprites, but wonder if with only one sprite i can do something in events to get differrent frames of the sprite and for each one set the X/Y face automatically, mmm...

One suggestion, Now we have Z,X,Y faces. Z for Top, X for Left-Right and Y for Up-Down. Will be possible setup all the faces? I mean, Now you can set X-Faces, that shows the left and right face the same sprite. Is possible add the variables for all the faces? = Up/Left/Right/Up/Down ? .

---

Other thing, after play with the Cubeface demo, i realized that the cube of bricks and how looks is perfect for a Wolfeinstein/Doom game. I played with all the variables and the Angle is like a zoom.

So, maybe i'm missing something, but with this, is not possible do a Wolf/Doom game? Or for that we will need any other variable? :O
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Fri Nov 04, 2016 10:54 pm

If you set X,Y,Z face to 0 and All face parameter to 1 you can see all face of cube...
A little knowledge about 3d perspective projection X,Y,Z ... you can build 3d like world ..( wolfenstein)..
You can use 2.5d platformer or 3d Cube fx, this last can just use 1 same picture for all faces..
So ... X Y and (Z is the deep of the 3d world ) ... however collision must be adapted...
Finally with some test and a bit work you can make nice pseudo 3d like game...
Good luck ....
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
20
G
29
Posts: 815
Reputation: 22,093

Post » Sat Nov 05, 2016 8:24 am

Ok, so A Doom game can be done, interesting!, i will work with that this weekend :D .

About faces i guess i'm not explained well.

With 3D cube FX i can set 1 image to all the cube faces. With 25dplatformer, i can set 3 different images. 1 for Z faces, 1 for X-Faces and one for Y faces. Like shows in the CubeFace demo: http://gigatron3k.free.fr/html5/C2/3d8/ the 3 different faces are the Question mark, the yellow face and the brick.

To be more clear, if i want to do a 3D dice, i can't because only can set the numbers 1,2 & 3, and i will need to map all the faces for the six numbers/faces.

What i'm saying is get the variables to map the six faces of the cube with different images. Can you add it?
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Sat Nov 05, 2016 5:26 pm

I'm blocked now because i can't figure how do the near/far effect.

I put various sprites together for a long wall, and i tried the near/far effect with the zoom factor, width/height, sprite scale, etc... and always they overlaps when are near and separated when they are far. I don't know what variable i'm missing or events to get all the tiles near/far at the same distance between them.

Any tip?
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Sat Nov 05, 2016 7:18 pm

@matriax

you must use scale funtion of C2 with Z.... mean distance and perspective..
look this example with starfield.... put cube in place of stars...

Image

plugin-pixijs-on-c2_t161606?&hilit=pixijs
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
20
G
29
Posts: 815
Reputation: 22,093

Post » Sat Nov 05, 2016 8:52 pm

Thanks, I see, when are near/far not only the scale changes, also the imagepoint/positiont(X,Y) changes to avoid that problem. All the thing is more complicated than i thought in a first moment.

Also I discovered that in Construct Classic had some real 3D cube plugin that manage all this thing more easily, wonder if there is anyway to port to C2.

I will give a try to the cube-stars and if again get blocket will test the Q3D plugin to see how hard is.
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Previous

Return to Effects

Who is online

Users browsing this forum: Lof and 1 guest