Faux 3d

Discussion and feedback on Construct 2

Post » Wed Oct 19, 2016 7:16 pm

Saw this post on Reddit for a voxelish method to simulate 3d:
https://www.reddit.com/r/gamedev/commen ... e_creator/

Its fairly easy to do, however there's a lot of overdraw, and I remembered Ashley had a go at an optimization to help with that:
request-for-feedback-front-to-back-renderer-performance_t148692?&hilit
But it was a no go.


So I was wondering if it's time to have another go at it, or perhaps we should look for a shader method to help?
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Wed Oct 19, 2016 7:49 pm

That is really cool. Would be interesting to see this done in c2.
B
45
S
20
G
65
Posts: 1,115
Reputation: 38,121

Post » Wed Oct 19, 2016 9:21 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Oct 19, 2016 9:45 pm

It really needs its own object type to pull it off.
In theory, you could just draw it in Paster, but object management would be a nightmare, not that a bunch of sprites pinned together is terribly manageable to begin with.

Of course Canvas can't do webgl so it's pretty much off the table.
On the other hand, Paster can only do rectangles.
No collision detection in Paster, or Canvas either.
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Wed Oct 19, 2016 10:23 pm

might be doable in a shader if you can access some data that represents the voxels/etc, then interpret that to draw the pixels, but you would need to also draw them at the correct angle, so you'd have to rotate the data around, etc(because you can't rotate it after it gets drawn since it has illusion of another perspective).. seems kind of tricky, and I'm not sure how complex a shader can be.

edit: also another issue is how to keep the illusion that objects can intersect each other (layers sliding between layers of other objects)

at some point you essentially are trying to build a 3d simulation, so you might want to just work with 3d methods.
B
45
S
20
G
65
Posts: 1,115
Reputation: 38,121

Post » Sat Oct 22, 2016 2:04 pm

Someone's made a slicer for MagicVoxel:
https://www.reddit.com/r/gamedev/commen ... s_for_the/
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Sat Oct 22, 2016 2:13 pm

pretty neat!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sat Oct 22, 2016 7:39 pm

newt wrote:Someone's made a slicer for MagicVoxel:
https://www.reddit.com/r/gamedev/commen ... s_for_the/


nice.
Too bad that this is pure hell to import/manage in c2. Imagine importing an animated model. c2's sprite/animation system isn't cut out for this sort of thing.
B
45
S
20
G
65
Posts: 1,115
Reputation: 38,121

Post » Sat Oct 22, 2016 8:37 pm

Add frame> Import frames > From sprite stip

I haven't checked, but C2 should automatically replace duplicate frames in its spritesheet export, per object.
So animating it that way should be doable.
Then you should be able to animate via events, but yeah it would take some extra effort.
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Sat Oct 22, 2016 9:34 pm

I think the matrix transforms will be a bigger issue if anyone plans on doing some type of game using objects like this for scenery.
Here we go with the trig again......
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests