Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411489 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 02:35:56 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsWobbledogs
Pages: 1 ... 6 7 [8] 9 10 ... 37
Print
Author Topic: Wobbledogs  (Read 232351 times)
nialltl
Level 0
**


pode racer


View Profile WWW
« Reply #140 on: May 27, 2016, 03:11:50 AM »

this is hands-down the most consistently enjoyable devlog I've read - I think every new dog gif warms my soul that little bit more. At this stage do you have any plans to apply any of the genetic algorithm code to other entities in-game e.g. external behavioural training through interaction with beings other than dogs (mice, etc) or are you first and foremost a wobbledog purist?
Logged

octopus racing -- Muddledash  |  first person skating -- flow state  |  twitter
ActualDog
Level 3
***



View Profile WWW
« Reply #141 on: May 27, 2016, 07:36:09 PM »

Every progress post you make is inspiring, you're doing so many interesting, thoughtful things

So happy to hear that, thanks! I've been trying to somewhat balance the gifs and the technical details.

I love the idea of being able to breed towards a dog that I want. I imagine there will be all these external, obvious attributes regarding their appearance, but also a bunch of internal ones involving their emotional characteristics, whether they're easy-going or grumpy or violent. Breeding in one direction might get you where you wanted the dogs to be, but along that line of breeding all sorts of unexpected traits may reveal themselves, and you can't go and undo that terribly easily, if you have a limited stock of Wobbledogs. Perhaps keeping multiple 'batches' would be a 'safe' way of doing that? But then having an even more limited number per batch will probably cause its own unforeseen conseqeunces!

Details still to be worked out, but that's definitely the gist of my high-level plan!

And I like how, even though I have so much more idea of what game you're creating than I did a few months back, there's still a million directions you could go in, and they're all very exciting.

Glad things are becoming a little less cryptic. To be completely honest, I've intentionally been keeping the direction of this project pretty open-ended, though it's started to narrow more. My approach has been to just sort of try and zero in on the aspects I've been finding fun and then let that stuff drive the game's direction.

this is hands-down the most consistently enjoyable devlog I've read - I think every new dog gif warms my soul that little bit more. At this stage do you have any plans to apply any of the genetic algorithm code to other entities in-game e.g. external behavioural training through interaction with beings other than dogs (mice, etc) or are you first and foremost a wobbledog purist?

Thanks so much! At this point I'm pretty sure I won't be trying to build any critters other than these dogs. Part of that is that it would massively increase the already massive scope of this project, but it's also that I'm really happy with my current vision for this game without any additional lifeforms.

---

Ok, let's see. Lots of boring stuff and bug fixes, but I've been playing a lot with look variation still. I think I'm about done for now, though. Definitely not for good, just for the time being.

A few more fun generated dogs.





Just want to mention, by the way, that I'm really really happy with the movement of that first dog with the golden legs. Sort of gorilla-like. I don't know if I mentioned this before, but with all these modified dogs there is zero special code or tuning or anything driving their motion or existence. Zero tricks!

I also spent some time today trying to generate procedural textures from genes.





Nothing too impressive yet. It became apparent pretty quick that this was going to be a lot of effort to make nice, so I'm shelving it for now and I'll come back to it later.

Last big thing was that I got the base in for in-game breeding.



This is NOT what I want for the final game, but it's great for testing and I want to have this functionality available on-demand for demo purposes.
Logged

maruki
Level 3
***


Making Aftertile


View Profile WWW
« Reply #142 on: May 28, 2016, 08:09:34 PM »

The multiplication of wobbledogs. :D
Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #143 on: June 01, 2016, 05:14:31 PM »

Tech post time! Really quick update before that though. I didn't end up submitting to Indiecade. I'm really happy with how things are coming along but the project's still way more a collection of tech than a game, and a lot of that tech isn't very noticeable at a glance. Much of it needs content and time to really shine. Regardless, the deadline was a huge motivator and it forced me to focus on some usability stuff I wouldn't have otherwise touched for a bit, so it's all good!

Now onto some new stuff.

Memory-Based Pathfinding


Up until now I haven't had any pathfinding in the game. A dog's range of targeted behaviors depended entirely on what was in their line of sight. That worked ok since rooms have so far been big and empty, but I don't want to limit myself to that long-term. The other motivator to this is that for a while now I've been wanting some way of associating behaviors with locations. I really like the idea of dogs having preferred sleeping spots, for example.

I also really don't like the idea of dogs being omnipotent. Every time I add something I try to think about how it could play into dog uniqueness. The solution I've come up with for the time being is to base pathfinding on memory.

The high-level overview is that dogs will drop down Association nodes as they plod around the world. These nodes associate themselves with other nearby objects and nodes, and these associations strengthen or fade over time as they're either reinforced or not.

The first step is getting nodes out in the world. If a dog is more than a certain distance away from the closest node, a new one is placed. Placed nodes get linked to any other node within line of sight. There's slightly more logic needed for edge cases as far as more complex wall setups go, but I think you get the basic idea.




Step two is for nodes to associate with nearby objects. Whenever a dog is at a node, it will update that node's associations. The red lines represent where each node thinks an associated object is. These associations remain even after the object is moved or destroyed. Until the dog visits that node again, the association will not update.



This means that at any given time a dog's picture of the world is most likely not accurate. It operates based off assumption. If the last block of food is eaten and the dog is hungry, it'll wander around to all assumed food locations to try and look for more before giving in to hunger. It also means that if you drop food somewhere away from a dog, they won't necessarily know about it. If you consistently place food in the same location, however, dogs will probably just keep assuming there's food there, even if they don't yet know about the newly placed block.

The last step is pathfinding.

(Apologies for the gif quality. I was having recording troubles because my debug lines are the same shade of green gifcam uses to block out unchanged pixels.)



When a dog wants to do an interaction that targets an object, it first searches through all its Association nodes to see if it thinks an object like that exists. If so, it does a search and finds a path to what it thinks is the best node associated with that type of object. (If you're observant you'll notice in the gif above that the path is not optimal at the moment. That'll be fixed soon!)

Dogs follow node paths by walking towards the current node in the path until they either reach it or have line of sight to the next node in the path. At that point they switch up their target and keep moving. Because my physics-based locomotion is very imprecise, I also have fallbacks in place for reversing back down the path or cancelling it all-together when line of sight is lost. Once the dog has line of sight to the final object, it either walks towards it and uses it or cancels the interaction depending on whether or not that object still exists.

---

That's where I am currently with this system, but the really exciting stuff is still to come! Building things this way opens up a ton of possibilities. I already mentioned that I want to be able to associate specific behaviors with locations, but there's other things as well. For example, I can vary the time associations stick around for based on dog intelligence. Maybe some dogs can only hold so many nodes in their heads at once, or can only remember shorter routes. Older dogs might stop exploring new areas and always stay in the same few known locations. Lots of this won't come for a while, but it's really fun to think about!
Logged

GekidoRising
Level 1
*



View Profile WWW
« Reply #144 on: June 01, 2016, 06:33:35 PM »

This memory based pathfinding is actually a wonderfully novel idea! I can definitely see where this might bring about some really interesting and slightly hilarious interactions between the dogs. I get this sad image in my head of a dog navigating to a node where it remembers there being food only to find it barren but I also find this imagery rather humorous given their constant facial expression being a perfect portrayal of how they would feel when they find out their food is gone! I sort of want to make a Pavlov's Dogs reference here to sound smart, but honestly, this system sounds like it'll have many more applications than simply training a dog where to go when!

Quote
Apologies for the gif quality. I was having recording troubles because my debug lines are the same shade of green gifcam uses to block out unchanged pixels.

If you go to edit the gif you just recorded, right click it and highlight "Green Screen," you can actually change the color Gifcam references unchanged pixels with which I'm pretty sure fixes the problem you're having (I think)!
Logged
ActualDog
Level 3
***



View Profile WWW
« Reply #145 on: June 02, 2016, 06:26:56 PM »

This memory based pathfinding is actually a wonderfully novel idea! I can definitely see where this might bring about some really interesting and slightly hilarious interactions between the dogs. I get this sad image in my head of a dog navigating to a node where it remembers there being food only to find it barren but I also find this imagery rather humorous given their constant facial expression being a perfect portrayal of how they would feel when they find out their food is gone! I sort of want to make a Pavlov's Dogs reference here to sound smart, but honestly, this system sounds like it'll have many more applications than simply training a dog where to go when!

Quote
Apologies for the gif quality. I was having recording troubles because my debug lines are the same shade of green gifcam uses to block out unchanged pixels.

If you go to edit the gif you just recorded, right click it and highlight "Green Screen," you can actually change the color Gifcam references unchanged pixels with which I'm pretty sure fixes the problem you're having (I think)!

Haha, thanks. I'm really hoping it opens up a lot of opportunities for different emergent behaviors! Also, thanks a ton for the gifcam tip. Should save me a lot of trouble in the future.

---

Quick update, I'm trying out this video devlog thing with a more in-depth look at breeding so far. Most of this info isn't new, but I wanted to show off the breeding in real time.





Way more time consuming to do this than I was expecting! I haven't decided yet, but I might do more of these as the game goes on. There are certain features that I think really lend themselves to being showcased in vid form versus just gifs and text.
Logged

SafetySnail
Level 0
***



View Profile
« Reply #146 on: June 03, 2016, 03:58:17 AM »

More dev vlogs!
That was great, watching them slowly morph into almost terrifying creatures was awesome. I'd buy the breeding simulator as is right now. Keep it up man, I can't wait to see how behaviours play into this.
Interesting stuff also with the memory based pathfinding. I'm currently working on something pretty similar in my own game and that post helped me solidify those ideas!
Were there any plans in the future to modify facial features as well?
Logged
io3 creations
Level 10
*****



View Profile WWW
« Reply #147 on: June 03, 2016, 09:22:14 AM »

In the beginning of the devlog it might have been better to include a screenshot (or video) of the dogs and perhaps title instead of the "mystery" image. 

The memory based path finding reminded me of another bodily function that I was going to mention: peeing.  Dogs, like many other animals use it leave information about themselves  That way they can get an idea of who's in the neighborhood.  Since you mentioned keep track of various info (age, dominance, etc), that info could be "deposited" and could also play a role in the dogs behavior.  If a submissive dog finds the mark of a dominant one then it may avoid a certain area.  Since dogs, like wolves are pack animals, if a dominant one finds another one with similar dominance level, then it may look for it to establish the pecking order.  That info could also be used when looking for potential mate (for both sexes).  There are lot more possibilities depending on your vision of the game.  Smiley
Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #148 on: June 06, 2016, 09:07:02 PM »

Were there any plans in the future to modify facial features as well?

Yeah, I really want to at least have different facial sets for the dogs! It'd be cool to be able to dynamically combine specific features (eyes, mouth, brows, etc), but I'm not 100% sure how to approach that. I'm probably going to leave the faces alone for a little bit.

In the beginning of the devlog it might have been better to include a screenshot (or video) of the dogs and perhaps title instead of the "mystery" image. 

The memory based path finding reminded me of another bodily function that I was going to mention: peeing.  Dogs, like many other animals use it leave information about themselves  That way they can get an idea of who's in the neighborhood.  Since you mentioned keep track of various info (age, dominance, etc), that info could be "deposited" and could also play a role in the dogs behavior.  If a submissive dog finds the mark of a dominant one then it may avoid a certain area.  Since dogs, like wolves are pack animals, if a dominant one finds another one with similar dominance level, then it may look for it to establish the pecking order.  That info could also be used when looking for potential mate (for both sexes).  There are lot more possibilities depending on your vision of the game.  Smiley

Agreed! I'll definitely have something less cryptic as the intro image for the next vid.

I love those ideas about peeing and marking territory. It wouldn't be too crazy to do, at least on a small scale. I'll want to wait on it until I get deeper into dog/dog interactions, but there are a ton of possibilities there!

---

Spent a lot of today updating some of the dog look gene stuff.

Something multiple people have asked is whether or not there are limits to all the dog modifications. The answer was yes, but there really wasn't a great reason for why. It was just implementation details that made it that way, so I dived in today and refactored the system to allow for infinite value ranges.

Basically, I implemented the concept of a "super mutation". It's a low-chance mutation that allows genes to add an additional bit. When additional bits are added, the max value for the appropriate modifier gets increased. This took some doing to get things integrated cleanly with the existing breeding, mutation, and dog generation code, but I got it set up and the resultant gene still holds 100% of the information required to generate its dog! I did have to introduce separators into the genes in order to keep track of these dynamically changing sizes without external variables, but it works.

Some fun stuff from testing today.









That last guy is especially neat because he's got a new emergent problem. His awful bloated legs will constantly spasm because of their size. Because of that, he can't get any real sleep. The twitching muscles will keep jolting him awake.

Still lots of tuning and fixes I need to do, but I'm really happy with this! The more extreme dogs you see above will be extremely hard to get near. I'm leaving the possibilities there, but those guys are the result of me artificially pushing the system to its limit. Additionally, I'm going to be capping a few things in code. For example, legs won't be able to get so thick that they clip with their parallel neighbors. I'm going to be allowing for leg setups with wider stances and I'll be able to determine clipping limits in code and stop the legs from expanding to the point of causing physics freakouts.
Logged

ArzNova
Level 0
**



View Profile WWW
« Reply #149 on: June 06, 2016, 11:20:20 PM »

I've never read through an entire devlog like this before, but this entire thing is just so fun to look at! Please don't actually overlay these models with real dogs. I mean, maybe update the model a little bit, but I'm kind of fond of just a weird tube body and that face on the front. It'd be great if they got a smoother body, but kept the same aesthetic. Because referring to these goofy guys as dogs makes the contrast that much funnier.  Tongue
Logged

Composer / Audio Designer / Animator / Programmer (I do a lot of stuff.)
www.soundcloud.com/lukepena
www.lukepena.org
ActualDog
Level 3
***



View Profile WWW
« Reply #150 on: June 08, 2016, 04:35:23 PM »

I've never read through an entire devlog like this before, but this entire thing is just so fun to look at! Please don't actually overlay these models with real dogs. I mean, maybe update the model a little bit, but I'm kind of fond of just a weird tube body and that face on the front. It'd be great if they got a smoother body, but kept the same aesthetic. Because referring to these goofy guys as dogs makes the contrast that much funnier.  Tongue

Thank you! Still undecided about final looks for these guys, but I definitely won't be going realistic and I really do like the way they are currently. There's at least a few things I have in mind to try out at some point, but no matter what I'm gonna be really careful to preserve their charm.

---

Today I got the memory-based pathfinding working with pipes.



This was one of those things that seems simple in theory but has a ton of hidden gotchas. It was sort of tricky to get in and it's still not completely without issues, but it seems pretty solid at the moment and I'm really happy I got it working.

The basic idea is that there are special nodes for pipes. These nodes auto-place themselves in the center of the first pipe segment when laid down. Nodes are allowed to form connections to them, but connections from them are strictly controlled. When a dog enters a pipe, the final connecting node is chosen to be the first node the dog reaches once out of the pipe again. This could be a node the dog has to create, or it could be an existing one, but dogs have to be grounded to be at a node so the end result is they will remember roughly where the physics system drops them off once shot out the end of a pipe.

Now that this is in, the only big part of this system I have left to implement is allowing certain behaviors (e.g. sleeping) to associate themselves with locations. Once that's in, hopefully soon, I'll be able to move on to new stuff!
Logged

DireLogomachist
Level 4
****



View Profile
« Reply #151 on: June 08, 2016, 09:46:48 PM »

Subscribed! I laughed so hard at the dogtube gifs on page 4!  Cheesy
Logged


Living and dying by Hanlon's Razor
ActualDog
Level 3
***



View Profile WWW
« Reply #152 on: June 09, 2016, 06:02:27 PM »

Subscribed! I laughed so hard at the dogtube gifs on page 4!  Cheesy

Dogtubes have turned out to be so much better than I would've ever imagined. They were originally just gonna be a throwaway feature but I'm so glad they aren't anymore.

---

Spent some quality time bolstering up that pipe pathfinding and I'm very happy with how it's working. The system I built has turned out to be flexible enough to get me pipe->pipe paths without any special code, and if I have more of these types of physics launcher objects in the future it should be pretty easy to scale the code to work with them too.



I've also started in on location preferences for behaviors. Trying to make the system general so I can apply it to anything. Right now I just got the basics, but it's already sort of working to get dogs to prefer sleeping at more isolated nodes.



Still need to do a lot of work on this stuff to get it to really score nodes better. It doesn't take route time into account right now, and its calculation of what qualifies a node as "isolated" is probably not completely valid. I'm just looking at the number of node connections, which kinda works, but we'll see how well that holds up. I also need the nodes to keep track of some other things so I can take those into account for scoring. If a dog keeps getting woken up at a location, for example, he should stop sleeping there.

Anyways, all these things should really amp up the emergent behavior probability for these guys, so I'm very excited!
Logged

SafetySnail
Level 0
***



View Profile
« Reply #153 on: June 10, 2016, 03:34:13 AM »

Hahaha, The speed at which that dog falls asleep is great. Wish I could crash that fast!
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #154 on: June 12, 2016, 12:25:37 AM »

Woah, it's Framsticks, the game!

http://www.framsticks.com/

Have you thought of making the boxes contractable? (within a fixed range of course). Then you could get soft-bodied wobbledogs like this:










PS: You might also want to check out Lee Spector's work, as a topic of general interest and possible inspiration for how to model your genetic programming:

https://www.youtube.com/watch?v=HWMJdO4klIE
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #155 on: June 12, 2016, 03:35:41 AM »

I feel like I just watched a rave
HOW ABOUT THIS VERSION?
Logged
ActualDog
Level 3
***



View Profile WWW
« Reply #156 on: June 13, 2016, 07:12:01 PM »

Hahaha, The speed at which that dog falls asleep is great. Wish I could crash that fast!

Haha, yeah these guys got it good.

Woah, it's Framsticks, the game!

http://www.framsticks.com/

Have you thought of making the boxes contractable? (within a fixed range of course). Then you could get soft-bodied wobbledogs like this:










PS: You might also want to check out Lee Spector's work, as a topic of general interest and possible inspiration for how to model your genetic programming:

https://www.youtube.com/watch?v=HWMJdO4klIE

Woah, awesome resources thanks! I've seen those soft body guys before but not the other two things so this is some great stuff!

Playing around with contractible boxes would be cool, but as I understand it PhysX does NOT like it when you resize stuff at runtime. It's a rigidbody physics system and I think I'd need a custom solution to do softbody stuff like that. I'm also a little far along to want to try and revisit the base physics. Really neat stuff though!


Also very helpful.

---

Ah, so some exciting stuff today.

First is that I finally finished up my first pass at the memory pathfinding and the location-aware behavior system. All the known bugs with it are squashed and although there are still a lot of things I want to add to it, it's working pretty nice so far!

Since I finished that up this morning, I moved on to something very different. I decided to give my dogs a body upgrade. It's nothing major, but I wanted to try and give them a single skinned cube for a body instead of two interlocking ones. Not only does it look pretty nice, it'll also make applying dynamic textures and such a reality. When their bodies were two visible cubes, the textures would z fight all the time and it was no good.

Their body cubes are still there under the hood, they just have their mesh renderers turned off. The new body mesh has its bones attached to the front and back body cubes by joints, and the original cubes are still what's used for collision data.

This actually turned out to be a bit trickier than I thought it would be.



You can see here that the back cube gets super disconnected from where it actually wants to be. I'd never done this sort of thing before so it took a lot of searching to figure out the issue.

One of the main things this body needed to do was resize and scale cleanly since there are a ton of different configurations for dog body proportions. I was able to scale the body's bones no problem at runtime, but I discovered today that you can't just go applying non-uniform scale values to bones and expect things to work. When you do this and then rotate the bones, the model skews itself.

There is, however, a way to get around this! I finally found the answer to my problem here: http://answers.unity3d.com/questions/137667/scaling-widthheight-of-a-characters-headbody.html

Essentially, you can create an auxiliary node in the object's bone hierarchy and apply an inverse scale value to that node in order to keep things in sync.

With that fix in place, I was able to finish things up and now I have many nice and smooth dogs of all shapes and sizes.





I'll probably revisit the weighting for this body at some point, but for now the flow is proven out and it works great!
Logged

supermega_peter
Level 1
*


cool


View Profile WWW
« Reply #157 on: June 13, 2016, 10:10:20 PM »

The singular box body looks soooo smooth! So nice, great work!!


I also only just clicked this and I was super glad I did, everyone should


If you keep dogcam in the final game I 100% recommend the game music transitioning to some fast paced dance music. I love to think that's what's in these guys' heads all the time
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #158 on: June 14, 2016, 12:32:54 AM »

Ah right, forgot about how soft-bodied physics is a bitch (hah) to do real-time.

Funny how you just implemented a fake soft-body though Tongue. Looks really nice!

PS: I'll promise not to use big font again
Logged
jctwood
Level 10
*****



View Profile WWW
« Reply #159 on: June 14, 2016, 04:12:23 AM »

WOW that single body is so wonderful and so beautifully simple!
Logged

Pages: 1 ... 6 7 [8] 9 10 ... 37
Print
Jump to:  

Theme orange-lt created by panic