Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Development Update – Box Acceleration and Split Depth

Box Acceleration

I finally fixed the box acceleration problem. You can now release and re-catch a box during free fall:

Previously, when you let go of a box during free fall, it would just fly up past you.

The reason why this was happening was that in a part of the code, it was setting the velocity and acceleration to 0. So the box wasn’t actually flying past you, it was having its speed drop down to 0, and so it looked like it was flying past you.

I’ve now made it so that when you let go of a box, the player passes on their acceleration and velocity to the box, so the box will continue to fall at the same speed.

Also, the box now has the same acceleration and terminal velocity as the player.

Split Depth Gif

I thought I’d try making one of those split depth gifs with one of the looping gifs:

This took me over an hour to wake – I was painstakingly drawing on each of 140 frames in Photoshop (because I had read online that’s how other ones like this were made).

Of course, as I was about to finish, I realize I could have just easily done this using a shader and a depth texture in Unity.

Basically, the shader would overlay the white bars on the camera, and any geometry whose depth is pass a certain distance, you render it above the white bars.

So yea, this realization made me feel like an idiot.

However, I can now I can create a system that will allow me to produce these gifs easily and with more accuracy.

Mechanics System Overview

I’m at a point now where I have an idea of all the systems in the game and what they are supposed to do, and it’s getting hard to keep track of it in my mind.

I decided to start writing it down, and thought I might as well share it here. That way, I don’t have a bunch of poorly named word documents cluttering my desktop.

Some of these points might seem confusing or unclear. That is because this is really more for me to remember.

Cube (Single Gravity)

–   Is active when player is on its respective gravity
–   Is inactive when player is not on its respective gravity
–   Player can lift it up and place it above things
–   Materials change depending on whether it is active, inactive, or illuminate (when it’s on an appropriate trigger – has active and inactive states)
–   Cube is illuminated when placed on trigger.
–   When cube is removed from trigger, it is no longer illuminated
–   Must fall downwards when player lets go
–   Must fall downwards when player tries to switch onto another wall while carrying object
–   Cube does not rotate
–   Player needs to be able to carry box through portal
o       Utilize phantom box renderer (that moment where the box goes into the portal first before the player
–   Player needs to be able to hold onto box while falling, even when going through the recursive world teleporter
o       Also phantom box renderer (that moment when the box goes through teleporter before player does, it will disappear)
–   When player lets go of box mid-flight, the box should fall at same speed as player
o               When player drops box, just take the velocity and acceleration of the player and apply it to box, so if player is stationary, box starts at 0 velocity. If player is falling, box will then fall alongside player
–   Cube should snap to grid (0.25 units)?
–   Cube should grow from trees
–   Cube + water + soil  = tree
–   When a cube is taken from a tree, the tree grows another cube
–   But when you take that new cube from the tree, the old cube is destroyed
–   Need a way to keep track of which cube is from which tree and if it has been destroyed or not

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.