Z-Layering/Buffering Predicament (Whole Team Read)

General discussion pertaining to Elysian Shadows, ESTk, ESGamma, and the Adventures in Game Development series.

Moderators: News Mods, Elysian Shadows Team

Z-Layering/Buffering Predicament (Whole Team Read)

Postby Falco Girgis on Thu Apr 04, 2013 2:52 pm

Discussion topic for the the following blog post written by Falco Girgis:
http://elysianshadows.com/dev/project/blogs/creative-interests/105-z-layering-buffering-predicament
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby Falco Girgis on Thu Apr 04, 2013 3:20 pm

I have been doing some more thinking on this...
Falco Girgis wrote:2) We don't necessarily render the top layers above everything on the bottom layers... Instead of the top layers starting implicitly at elevation 16, they start implicitly at the same elevation as the layer below them... For example, an object at elevation 2 on the bottom layer, would cause the top layer to begin at elevation 2, rather than 16. This would require quite a bit more work on the renderer, and it would add some complexity to the elevation system and representation within the Toolkit... Not sure if this is worth it.
This sure is the most versatile, flexible solution... It initially scared the shit out of me due to the additional computational complexity (not so much algorithmic) required by my depth buffering algorithm (especially on the DC)... But I've come to realize it may not actually be as bad as I thought...

  • Sparsity - First and foremost, the usage of the top layer is going to be fairly sparse. The majority of the game will exist on the bottom layer... So even with the entire second layer being depth buffered, rather than static, the chances of the renderer iterating over a depth-buffered tile and having to buffer it later is still a (fairly large) statistical unlikelihood in the grand scheme of rendering the map...
  • Map Iterations - The depth buffer currently has to iterate over the visible map region two separate times, one for each layer... If we combined the rendering into a single pass, we are reducing loop overhead AND transform calculation overhead, as we can potentially render both layers using the same vertices here (they occupy the exact same x,y location with a different z coordinates).
  • Texture Changes - The biggest issue in my mind was the fact that this hybrid draw-order of objects/tiles will require MANY more texture state changes of the GPU... We aren't just rendering terrain from one sheet then going on to render objects from another. They can theoretically be intermixed in one render pass... But 1) as I said, this is already sparse and 2) it turns out the overhead of a texture change is not actually that high on the Dreamcast. It's just an additional polygon header submission, without any stalling on the PVR... and I'm not particularly concerned about the other OpenGL builds' performance.

This would definitely resolve the issue of being able to use the top layers however we please... But we still need to define ground rules for how to use the top layer as a separate Z plane, and how to transition entities between two Z planes from both a level design and an engine implementation perspective...

I am still studying Chrono Trigger and Temporal Flux. :)
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby dandymcgee on Fri Apr 05, 2013 9:07 am

Now THIS is cutting edge ES development. Excellent idea to turn this into a post Falco. I agree that the community is probably interested in what we're working TODAY much more so than what we were working on two years ago.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby Imrooniel on Fri Apr 05, 2013 9:24 am

ok, so keep stuff on 1 layer. Got it.
User avatar
Imrooniel
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 783
Joined: Mon May 07, 2012 1:36 pm

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby Falco Girgis on Fri Apr 05, 2013 10:47 am

Imrooniel wrote:ok, so keep stuff on 1 layer. Got it.
Actually, that might not be the case. We're still working on deciding if we can use the top layers for any z-level/elevation or not. There is no denying the fact that you can do some very powerful things with your art if you can do whatever you want with all 4 layers...

I have maybe about 4 scenarios that any approach we take needs to be able to produce. We need to sandbox some shit in the Toolkit this weekend, so I have something to play around with in the engine.
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby Benjamin100 on Sat Apr 06, 2013 2:54 pm

Interesting.
The first game with layers?
I don't understand. I mean, it isn't the first tile engine to have... multiple layers.
I mean, that's just drawing certain tiles first and other tiles second. What do you mean?

Never did finish Chrono Trigger. I got it on Virtual after it was recommended to me.
(I was busy playing Super Mario RPG when I was a kid.)
Benjamin100
ES Beta Backer
ES Beta Backer
 
Posts: 255
Joined: Tue Jul 19, 2011 10:37 pm

Re: Z-Layering/Buffering Predicament (Whole Team Read)

Postby Falco Girgis on Sat Apr 06, 2013 11:45 pm

Benjamin100 wrote:Interesting.
The first game with layers?
I don't understand. I mean, it isn't the first tile engine to have... multiple layers.
I mean, that's just drawing certain tiles first and other tiles second. What do you mean?

Never did finish Chrono Trigger. I got it on Virtual after it was recommended to me.
(I was busy playing Super Mario RPG when I was a kid.)
Right. We have two sublayers per layer. So our bottom layer is basically 2 tile layers like CT.
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL


Return to Elysian Shadows Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron