Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

877574 Posts in 32868 Topics- by 24310 Members - Latest Member: Muzuh

May 19, 2013, 09:47:24 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Cloning Fez's perspective-shifting scheme?
Pages: [1]
Print
Author Topic: Cloning Fez's perspective-shifting scheme?  (Read 689 times)
Vince_Lawrence
Guest
« on: July 03, 2012, 04:15:16 AM »

Having a game with tons of obstacles with the perspective-shifting feature will truly give our players more options to get out of that level.

I know that Fez was done as a 3D platformer in 2D environment that can change its perspectives which is kinda unique,  how or what do you think about making the same perspective-shifting scheme in blender game engine or unity?

This might also makes my Journey Demake have a 90 degrees of view and gameplay instead of just a dynamic platform view which is kinda wierd for Journey.

Can you make it? If so,  how will you? I will try to mimic that feature in Game Maker for a while.

Coffee
Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #1 on: July 03, 2012, 06:07:56 AM »

I don't understand the question. They just did 3D rendering and used orthogonal rendering when having the screen fixed on one side. Animated objects are all billboards/sprites, the reste is full 3D, built through "voxels" or whatever you call that.

There is a GDC 2012 conference where the programmer (I forgot his name) explained most of how it works, it's nothing special but it's very specific to this kind of game features - unfortunately the conference video isn't accessible publicly. One interesting thing was that the hero is moved to the front cube when the  screen is locked on a side, but you don't see it, it's just a natural way to make sure you can know where, in 3D the character is, intuitively, when you see it in 2D.

If you want to do something similar without to start from nothing, it might be a good idea to start looking at voxel rendering engines. I guess.
Logged

http://www.klaimsden.net | Game : NetRush | Digital Story-Telling Technologies : Art Of Sequence
Sam
Level 3
***



View Profile WWW
« Reply #2 on: July 03, 2012, 06:39:23 AM »

Are you trying to work out how to do the rendering efficiently, or how to do the game logic?

For Fez's rendering, the lovely Renaud Bédard has made available slides from his presentation explaining how he did it:
http://theinstructionlimit.com/cubes-all-the-way-down-igs-gdc

(Edit Page 30 to 37 in those slides talks about collision detection and management, so definitely worth reading)

But I suspect you're more interested in the mechanic. It's fairly simple to get the basics working, although plenty of opportunity for fiddling with edge cases to get it working how you like.

When making a normal 2d platformer, you probably have something like a series of points that you check for collision against the level tiles. For instance when attempting to walk right you check a point to the right of the character; if it's within a solid tile you know the player can't walk that way (probably you want to allow the player to walk right up to the wall rather than stopping short, but you get the idea). Similarly to see if the character has walked off a ledge you check a point just below her feet, and if that's not within a solid tile then you make the player start to fall.

For Fez-style stuff you do just the same, but rather than checking a point on a 2d map you're checking along a ray cast through a 3d map. The good news is that the ray is always aligned to an axis, and is cast through a voxel grid so it's very simple to do.

For example:
We have a 3d scene where x and y are horizontal, z is vertical.
The camera is currently looking down the y axis.
The player is at (1,1,1) and is trying to walk one unit to the right.
We want to know if that position is an open space or if there's a wall there.
As the camera is looking down the y axis, the following locations will appear to be positioned where the player is trying to walk:
(2,0,1)
(2,1,1)
(2,2,1)
(2,3,1)
..etc..

For Fez's mechanics if either (2,0,1) or (2,1,1) is a solid block then the player should be stopped. If any of the further back locations are solid blocks that's fine, as they're treated as background stuff.

You'll have an entertaining time working out how best to invisibly shift the player back and forth as they move about the world (especially when jumping) so that the resulting behaviour is what you want from the game, and what will make sense to the player.


Almost three years ago I made a prototype mimicking Fez's perspective shift. I can't seem to find the source code, although from that time it would doubtless be a mess anyway.
http://www.saltgames.com/2009/fez-rip-off/
« Last Edit: July 03, 2012, 06:52:33 AM by Sam » Logged
Paul Eres
Level 10
*****


Also known as RinkuHero.

RinkuHero
View Profile WWW Email
« Reply #3 on: July 03, 2012, 07:57:30 AM »

I know that Fez was done as a 3D platformer in 2D environment that can change its perspectives which is kinda unique

http://www.youtube.com/watch?v=hFPmCcEVozQ
Logged

xgalaxy
Level 0
***



View Profile
« Reply #4 on: July 03, 2012, 09:56:56 AM »

Also Super Paper Mario did it years before Fez too.
But who cares. All games are clones of clones of clones of clones anyway.
Logged
Crimsontide
Level 3
***


View Profile
« Reply #5 on: July 03, 2012, 01:42:24 PM »

I did this: http://www.youtube.com/watch?v=4ZRYqqyvFY8&feature=plcp for the TIG assembly competition a while back.  It wouldn't have been hard to use orthongal projection.
Logged
Vince_Lawrence
Guest
« Reply #6 on: July 03, 2012, 02:47:57 PM »

Woah! That's a lot! Any source code i can borrow?  Wink
Logged
Crimsontide
Level 3
***


View Profile
« Reply #7 on: July 03, 2012, 03:50:25 PM »

The source code was hacked together over a month (all the time we had for the competition) so its a mess and not something I'd want roaming around the internetz with my name on it.  I can help with the math/theory if u need.  What you saw was all done primarily in a pixel shader.  Each frame I drew a single quad that covered the entire screen, and all tracing code was done in the shader.  It worked fine for the competition performance wise, but in retrospect if I were to do a full game engine I'd use a hybrid polygon/voxel approach.

The only real innovation I think I may have done in the shader was I was able to fold the 2 stages of ray tracing (map stage, and tile stage) into a single loop with minimal branching.  Which yielded a significant increase in performance (probably 2x-3x the frame rate).
« Last Edit: July 03, 2012, 04:27:48 PM by Crimsontide » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic