Faux 3d

Discussion and feedback on Construct 2

Post » Sat Oct 22, 2016 9:58 pm

It doesn't look too bad. Generating the graphics would be the hardest to do. Drawing layer by layer or using a voxel editor are a couple options. Personally I think It would be cool to just slice up textured 3D objects, but I haven't seen a workflow to do that yet.

The graphics would probably need to be lower resolution to keep the video ram usage low.
Rendering using multiple instances for every frame isn't so bad. Probably just a matter of zordering everything by frame. The rotation may take a bit of math, but it's not bad either. Animation is just more images and isn't bad, maybe a couple more events.

Now the paster plugin could be used to cut down on the number of instances needed and the amount of things to be drawn. The static scenery could all be drawn to a paster per layer that way you only have draw those and the moving objects per frame.
Another plus of using the paster object is all the rotation math isn't needed.
Besides that the vertical squish can't be done with vanilla C2.

Collisions would be done in the same way as isometric. Everything is done from a top view.

I'm not very proficient with shaders but I don't think they would be helpful here because for one you can't access more than one source image in C2.
A plugin may work, but internally it would be much more complicated to make than with events imo. Not to mention it would be less flexible.
Reenabling the "front to back" may give some rendering improvement but at the same time the paster plugin wouldn't work with it, but that may be a small loss.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sat Oct 22, 2016 11:02 pm

I'm currently using this trick to make a 3D dungeon - it's working very well so far. I can render about 5-600 of these 'slices' before the CPU usage starts climbing, around 1300-1500 before it goes through the roof. Work within the constraints and it's a pretty usable little trick for 3D fun :D Right now I've got a three-storey dungeon averaging ~20 rooms, made out of just 36 slices. Plenty of room left for enemies and particles. I'm even handling some collisions in 3D, to allow the player to clamber around the level - I've been amazed at how little these have added in terms of performance concerns. As Rojo points out, static scenery is comprised of single objects, which makes for a huge optimisation, and no limit on draw distances. I just use canvassnapshot to build my slices (not sure what Paster is!) with little to no problem.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 237
Reputation: 2,296

Post » Sun Oct 23, 2016 4:14 am

I’ve got a tech demo up on the arcade for a 3-D platformer made with vanilla C2 (with license). It uses values for position and size in 3-D space to calculate collisions. Rendering is based on animation frames, Z sorting, and calculations that transform the 3-D coordinates to positions in 2-D space. A .capx is included.

Click to play Blue Sky.
Eh, Steve!
B
113
S
54
G
13
Posts: 112
Reputation: 16,090

Post » Sun Oct 23, 2016 4:36 am

@mrtumbles
I'm curious, how did you make your assets, and did you go for a low resolution look?

Also "paster" is a plugin that allows you to draw to it's texture.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sun Oct 23, 2016 9:39 am

That's a cute trick!

There is a lot to explore here with regards to rotating and displacing tricks to create perspectives.

I have found that adjusting the luminosity of the parts helps distinguish it from other objects and conveying that 3d look.

This is without the luminosity shading
Image

This is with
Image

I simply adjust the parts from bottom to top with gradually increasing luminosity..
B
16
S
6
G
1
Posts: 29
Reputation: 1,656

Post » Sun Oct 23, 2016 9:50 am

Hey Rojo - I'm just making them by hand. With only 12 layers per floor that means any given decoration etc only has 12 slices to worry about. I draw most features first as a standard sprite (how I want it all to look at the end) before drawing the 'slices', which gives me a good guide on dimensions etc. It's some trial and error - and some stuff just looks horrible.

I Googled Paster - it might actually solve some of the issues I've got with using canvassnapshots as I am at present. Great work!
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 237
Reputation: 2,296

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Glyfos, jefftrier and 9 guests