Oh god, it's finally happened. I started to narrate what I thought were the wobbledog's thoughts as I watched the gif...
"What's this? What's this? Is it tasty? Can I eat it? NOM! NOM!"
<it starts raining food>
"Yay!"
Your gifs are reaching critical levels of adorable ActualDog. Are you going to pay for my insulin bills?
Haha, perfect. If people can look at the dogs and put thoughts to their actions, I've done my job!
Wobble Dogs is definitely my favourite place on the internet just now. Having spent a lot of time fighting with physics recently I appreciate how clever the tied down turn implementation is. I love the giant candy food blocks too! I can imagine coming back next week and you'll have implemented an entire flavour system for procedurally generated candies with dog preferences over what they will eat. Looking forward to more, thank you for sharing!
Don't give me any ideas!!
Candy as dog food suits the game perfectly.
Glad it's not just me! Excited to get some more fun foods in.
I saw this thread quite a few months ago and thought it looked neat at the time. Coming back now, I love the progress you've made and the direction you're going with the game. Everything about this is super cool! Your attention to detail really shows.
Makes me wish I had more time for little side projects of my own so I could mess around with stuff like this.
Thanks so much. Attention to detail slows me down a ton but I hope it ends up paying off in the end. With something so focused on one specific entity it seems worth it to me.
haven't checked in here for a long time. i can't believe the progress you are making! the dogs are so charming and full of personality
and yes for candy food, so good!
Thank you! I'm trying really hard to keep momentum on this thing.
---
Nice beefy update today!
So first of all, I finally got around to putting in some visualization for when you grab something and drag it around. It was always super hard to tell where exactly a dragged object was in 3D space and I had this task on my list for a while.
My first pass got the basics in and it was functional enough. A cylinder model with a simple shader to fade alpha from the hit point to the origin that moves with the mouse, some highlighting on the first hit object, and a yellow circle around our collision point.
Polishing it up a bit more got me here.
The circle was impossible to see when put on taller objects, and it looked bad when it hung off the collision point anyways. Now the circle always stays anchored to the stage floor. The circle also changes size to reflect the held object's bounding box, and it eases in and out. And of course, the main beam is thinner. I'm pretty happy with this for now! I might end up thinning the circle a bit but I'm undecided. Gonna let it sit for a while and see how it feels. At the very least, this makes dragging things around way way more readable.
And then for the bigger change, I explored bounce removal. I've been irritated at my physics for a long time because things don't feel super weighty. I built this game at a sort of large scale (standard dogs are around 6 feet tall), which turned out to be a good decision in terms of being able to actually scale things down for puppies and tiny legs (physX doesn't operate well when scales are too low), but it also means that things fall slower than you expect because it's not clear how big the world is.
One thing that I felt I could actually address is bouncing. No matter how much I make my objects weigh, they still really love to bounce around on collision and it makes them look super light and floaty. I looked up this issue a bit to see how other people solved it and as far as I could tell it's just sort of a problem baked into PhysX. I read over some other solutions people had been using and came up with a relatively simple script to limit bouncing.
The basic idea is that it zeros out an object's y velocity if its value is greater than zero but less than its mass. There's more to it than that, just zeroing out y velocity every FixedUpdate() if it's within a threshold causes weird velocity shifts and other issues, but it's still pretty simple.
This change of course only limits vertical bouncing, it doesn't help at all with objects bouncing off of walls, but addressing this gets rid of 90% of the weird floaty physics cases in the game and I wasn't having any luck damping bounces in other dimensions (using this or other strats like damping velocity along the collision normal), so I'm very happy.
After getting this working with generic objects, I decided to try and apply this to dogs as well.
As you can see, there were some issues. It made it super hard for the dogs to stand back up after being knocked down. They'd try to push themselves up but their velocity would keep getting damped and they'd just flail around. The way the script works, this velocity damping only happens for a certain amount of time after a collision that I detect as something that's causing the object to bounce. If, however, I allow the damping to stop early in the case that the affected rigidbody no longer has a y velocity within the bounce threshold, then the bounces are still damped but controlled rigidbodies like the dogs can break out of that once they've stopped their initial bounce.
Not sure how visible this is to people who aren't me because there's no direct comparison gif, but after making the above changes dogs are still perfectly mobile but way more weighty than before! There are also some planted turns going on there, just FYI, which means feet are actually jointed to the ground sometimes. That's separate from this damping. A long time ago I had the dogs feeling weightier like this but I had to add springiness to their joints to solve other issues, and that caused them to be super bouncy. Now, however, I have the best of both worlds. They feel heavier but the springs in their steps are still in tact. I wish I had a better direct comparison, but you'll just have to take my word that this feels a ton better. Rest assured, they're still very wobbly, they just no longer feel like they have the mass of a butterfly.
That's about it for changes, but I did also want to share a gif that got me really excited.
I like this gif because it's a perfect example of the type of emergent behavior I'd love for this game to be filled with. I didn't program this situation into the game, and I didn't realize this could happen before it did. I'm basically playing fetch with the dog and it's just a result of my systems working together.