Refresh Comments
Anonymous comments allowed.
20 comments displayed.
How... would you even begin coding this? This must've been a nightmare...
I would hihgly recommend another game with similar "what-the-heck-physics"
Look up "Monument Valley"
Look up "Monument Valley"
now im wondering how an anon found this comment.
Everything is based off of the initial distance/scale the object was picked up at versus the area behind it. Pseudo-code could look something like this-
>Pickup Object
>Check Initial Scale(size)
>Move Object to furthest point in visible space
>Scale Object Based on distance moved so that size appears same
(Would be based on a formula using original scale, roughly like
newScale = newDistance * startScale)
>Tada
Usually the most out of the box concepts like this are pretty easy to tackle
>Pickup Object
>Check Initial Scale(size)
>Move Object to furthest point in visible space
>Scale Object Based on distance moved so that size appears same
(Would be based on a formula using original scale, roughly like
newScale = newDistance * startScale)
>Tada
Usually the most out of the box concepts like this are pretty easy to tackle
#18 to #16
-
bminous (10/30/2015) [-]
It actually isn't that crazily complicated (I am most likely making a similar project for my graphics class).
The way your GPU renders the game is by converting objects in your game's 3D world space into 2D screen space using a bunch of matrices. One of these matrices is dependent upon how far away the object is from the camera (called the perspective matrix), which makes sense since objects that are farther away appear smaller.
If you take an object's coordinates in screen space and use the inverse of all of the matrices you just used to convert it there, it changes them back into world space. However, if you change the z-value of this perspective matrix, it'll change the object into 3D world space at the given z-distance and with a size that makes it look the same from the camera's perspective.
The way your GPU renders the game is by converting objects in your game's 3D world space into 2D screen space using a bunch of matrices. One of these matrices is dependent upon how far away the object is from the camera (called the perspective matrix), which makes sense since objects that are farther away appear smaller.
If you take an object's coordinates in screen space and use the inverse of all of the matrices you just used to convert it there, it changes them back into world space. However, if you change the z-value of this perspective matrix, it'll change the object into 3D world space at the given z-distance and with a size that makes it look the same from the camera's perspective.
I'm also in a computer graphics class (University of Wisconsin) and this is ******* cool, and it's amazing how easy the math is. We have to do a final projects before the end of the semester, I'm thinking of selecting one that does something similar to this.
Parkside Campus - much smaller but definitely has some solid professors. I'm considering getting my masters in madison
UW-Platteville here, can attest for quality professors. Many of my Engineering professors graduated from Madison, but came here due to the quality of the undergrad program. Ive been told time and time again, that if you want to get a bachelor's degree go to the other UW's, but for graduates go to UW-Madison.
Due to the way perspective works, a small object that's close and a large object that's far away both look the same size on your screen.
Take 3D object in world
Change it into 2D object on-your-screen-size
Change that back into a 3D object in world at a different distance, but with a size that is still the same when it is changed into 2D object-on-your-screen size
Take 3D object in world
Change it into 2D object on-your-screen-size
Change that back into a 3D object in world at a different distance, but with a size that is still the same when it is changed into 2D object-on-your-screen size