cld

GGJ 2020 - Part 2

Saturday, February 1, 2020

Grabbing, throwing, trials, and poor Git usage

It's about 8:30pm as I write this, and I think I'm already gonna call it a day on day 2. I got a bunch of stuff working, then tried to make it into a game, then broke a bunch of stuff, and finally reverted back to the testbed I had functional around 2pm today.

Interaction

The big thing I was able to tackle today was grabbing and throwing stuff. Grabbing was pretty straightforward; I subscribed signals to the button_pressed and button_release signals that ARVRController comes with, which in turn have child Area nodes subscribed and can attach grabbable objects as children to themselves if one happens to be in the, er, Area.

Following that I started working on throwing. The short version of my tinkering is I aggregate a small pool of changes in the global position of ARVRController, applying a weighted multiplier to each value, and provide that aggregate to the grabbed object as an impulse after I throw it. There's a couple other bits to it to account for the rotation of the playspace (left-stick rotates the play area), but that's pretty much it.

Making (and breaking) a game

By this point I thought I had a pretty good set of systems in place to start making a game. I wanted to do something Myst-like, so I build out a little island terrain to start walking around it. The terrain had slopes to it, so I thought it'd be cool to move the play area up and down so it snapped to the surface where the user is "standing".

And this is where things fell apart. I started messing with some raycast stuff to position the play area, and to make a long story short I broke the player system somehow without having any commits to revert to in the repo other than the last one I made after getting throwing working. This made me grumpy, and now here we are.

What next?

I still think I might take a stab at making a little environment to walk around in, just keeping it all on a flat surface. I think it'd be fun to do a bit of lo-fi 3D modeling/texturing and walk around in it. The only thing I might try to add is some method of preventing the user from walking through walls, but we'll see where it gets.