another wonderful one. highly highly enjoying this arc of games you're on. I often find myself struggling to fill up 3d spaces but you not only do that but fill them up nested such that poking your head into any given space has surprises waiting for you. love love
are you using windows? i looked into it a bit, it seems like it's a problem with unity in general- it's not a perfect workaround but you could use Alt + Enter to make it windowed, ESC to break mouse lock, move the game window to the other monitor, then use Alt + Enter again to make it fullscreen there. let me know if that works
my favorite one so far... how did you do the size distortion? I love these little worlds within worlds you carve out of viddygames... inside the mind of the player.
thank you! the effect is achieved by altering the initial values of the height of the camera, the movement speed, and FoV based on distance from the starting point to the center of the world. i could clean it up a bit but here is a download for the script - zoe helped a lot with the math!
(hi zoe here ;P) just to give a little extra technical detail or whatnot, the essential idea is that you slow the player as they approach some sort of central point, so that they approach it kind of asymptotically. it's convenient to place this point at the origin (0,0,0) so we did that in this case.
also, we measured the player's distance from the origin "floorwise" (ignoring height) because we put them on a fixed track on the height axis: at the start of the game we imagine a straight line between the player's starting position and the origin, spin that around into a cone with its tip at the origin, and set the player's height along that cone based on their distance from the origin. this trick allowed Lily to arrange the geometry in a more "choreographed" fashion since it allows you to predict how high up the player will be at any point.
also, as a little final touch, it felt right to me to narrow the player's field of view somewhat as they approach the origin (specifically we had it approach half of its starting value, which we figured out by feel). i reasoned that if you were actually shrinking to a smaller size but otherwise staying the same shape, your eyes would move closer together which i think would slightly narrow your field of view. (of course if you turned into a mouse or something your field of view would actually increase…but that's another topic…)
anyway, here's a step-by-step description of how the whole technique works in this game:
Arrange the 3D space so that the origin (0,0,0) is wherever you want to zoom in furthest. The basic idea is that we'll slow player's movement speed more and more as they approach this point. You can cluster geometry very tightly in that area when you're placing your models because they'll glide through it at a quite leisurely pace.
Pick somewhere you want the player to start. When they start out, we'll have them move at the normal speed, and move faster as they move away from the origin from the start, and slower as they move towards the origin from the start. We'll also set their height based on their starting point and their radial distance from the origin.
We can calculate a few values at scene load time to save work in the main loop. These are:
H₀, the player's starting height, which in Unity is their Y-axis position,
D₀, the player's "floorwise" distance from the origin, which in Unity is the magnitude of the player's XZ position vector,
r = -H₀/D₀,
M₀, the player's starting movement speed, and
F₀, the player's starting field of view.
Each frame, we:
calculate Dᵢ, the player's current "floorwise" distance from the origin, i.e. the current magnitude of the player's XZ position vector,
calculate d = Dᵢ / D₀, the ratio of the player's current distance to their starting distance,
set the player's movement speed to M₀d,
set the player's height to (Dᵢ - 2D₀)r + H₀, and
set the player's field of view to F₀(d + 1)/2.
as she alluded to the code Lily posted is messier than this description since it's basically in the state we left it in after playing around it with it for a while and deciding we were happy with it. if you'd like a tighter code sample following this description i don't think it would be much trouble for me to write.
anyway, for other ideas branching off of this, in theory you could have mutiple focal points and set the player's speed based on their distance to all of them; the math would be a little thornier but the basic idea could stay the same. also, regarding range of motion, you could measure the player's distance from the origin on all three axes and let them move noclip style for a more "open world" approach, or you could have them move only on one axis which would make the game into a sort of endless tunnel. i think you could also have an interesting "4D" approach where you transform all the geometry based on the player's rotation around the origin.
← Return to game
Comments
Log in with itch.io to leave a comment.
i truly love this. i want to get the guy with himself in his own head tattooed on me
how do i get out of my room
Beautiful. Love the motifs of remediation and universes inside universes inside spectral people, eerie soundtrack on top, thanks for this.
another wonderful one. highly highly enjoying this arc of games you're on. I often find myself struggling to fill up 3d spaces but you not only do that but fill them up nested such that poking your head into any given space has surprises waiting for you. love love
I wish more video games were experimental and evocative like this.
It opens on my second monitor, any way to remedy?
are you using windows? i looked into it a bit, it seems like it's a problem with unity in general- it's not a perfect workaround but you could use Alt + Enter to make it windowed, ESC to break mouse lock, move the game window to the other monitor, then use Alt + Enter again to make it fullscreen there. let me know if that works
had the same problem and this worked!
my favorite one so far... how did you do the size distortion? I love these little worlds within worlds you carve out of viddygames... inside the mind of the player.
thank you! the effect is achieved by altering the initial values of the height of the camera, the movement speed, and FoV based on distance from the starting point to the center of the world. i could clean it up a bit but here is a download for the script - zoe helped a lot with the math!
(hi zoe here ;P) just to give a little extra technical detail or whatnot, the essential idea is that you slow the player as they approach some sort of central point, so that they approach it kind of asymptotically. it's convenient to place this point at the origin (0,0,0) so we did that in this case.
also, we measured the player's distance from the origin "floorwise" (ignoring height) because we put them on a fixed track on the height axis: at the start of the game we imagine a straight line between the player's starting position and the origin, spin that around into a cone with its tip at the origin, and set the player's height along that cone based on their distance from the origin. this trick allowed Lily to arrange the geometry in a more "choreographed" fashion since it allows you to predict how high up the player will be at any point.
also, as a little final touch, it felt right to me to narrow the player's field of view somewhat as they approach the origin (specifically we had it approach half of its starting value, which we figured out by feel). i reasoned that if you were actually shrinking to a smaller size but otherwise staying the same shape, your eyes would move closer together which i think would slightly narrow your field of view. (of course if you turned into a mouse or something your field of view would actually increase…but that's another topic…)
anyway, here's a step-by-step description of how the whole technique works in this game:
as she alluded to the code Lily posted is messier than this description since it's basically in the state we left it in after playing around it with it for a while and deciding we were happy with it. if you'd like a tighter code sample following this description i don't think it would be much trouble for me to write.
anyway, for other ideas branching off of this, in theory you could have mutiple focal points and set the player's speed based on their distance to all of them; the math would be a little thornier but the basic idea could stay the same. also, regarding range of motion, you could measure the player's distance from the origin on all three axes and let them move noclip style for a more "open world" approach, or you could have them move only on one axis which would make the game into a sort of endless tunnel. i think you could also have an interesting "4D" approach where you transform all the geometry based on the player's rotation around the origin.