Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411498 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 08:39:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsWobbledogs
Pages: 1 ... 32 33 [34] 35 36 37
Print
Author Topic: Wobbledogs  (Read 232381 times)
william.equal
Guest
« Reply #660 on: November 11, 2018, 07:17:06 AM »

Oh, I really like this goofy physics-based character movement. Looking forward to further development Smiley
Logged
ActualDog
Level 3
***



View Profile WWW
« Reply #661 on: November 26, 2018, 11:08:59 AM »

Also, glad to see that you're keeping up the tradition of including at least one gif of shellshocked wobbledogs

Haha, always.

This is such a special game. That's the only way I can put it. It's weird, it's unique, it's wonderful. Whether it's a crazy dog factory or a pet and gut flora simulator, it's still wonderful. Keep going~

Thanks so much!

Oh, I really like this goofy physics-based character movement. Looking forward to further development Smiley

Thank you!

--

Let's see. My development's been a little unfocused since last time. Last week was a bit split up due to Thanksgiving, so I decided to use the time to tackle a bunch of little things rather than start my next big feature.

I finished up the first pass at Gut Flora, which is exciting. It isn't balanced at all at this point but that'll come later.

After that, I spent some time adding in a new object. I'm trying to do this occasionally as I work on other features so that I get a real sense for what is and isn't easy to support and what sorts of features my placement system actually needs. I'm happy to say that this new object opened up a a new use-case for me, having placeable objects that dogs can actually interact with, so even if it ends up getting removed later it was worthwhile for that reason alone.







I'm really pleased with how the object came out, though. It's a little paw bopper that automatically smacks any dog that walks in front of it. Should be relatively easy to re-skin too, so I could potentially have a few variations. The physics for this guy were really fun to set up.

After that, I made a new (not so) little video about some of the technical details behind the dogs and their physics. It's something I'd been wanting to do for a while. I would've loved to have spent another few days on this, but I didn't feel like I could really afford the time. Regardless, the reaction to it's been nice so far and I hope people can get something out of it! It's always felt like there's been limited resources out there on physics-focused development.





And then I also spent a bit of time on some tool development to let me save/assign presets for ConfigurableJoints. It isn't quite polished enough to release to the public but at some point I might spend a bit more time on it and then release the source, because I think a tool like this could be pretty useful.



Basically it looks at the selected object and finds all ConfigurableJoints attached to it and its children. You can edit the joints directly in this window, and you can apply/create/modify presets for all of them either individually or globally. Ideally I'd create usable presets for each of the distinct types of joints Unity gives you (Fixed, Hinge, Spring) as well as a few others I find useful so that you can easily create a more flexible ConfigurableJoint starting with the base properties of a more limited one. The presets themselves can also easily be modified as they're just ScriptableObjects with public fields that mirror the fields available to you in ConfigurableJoints. I still need some quality of life features like error checking/handling, undo support, and a few more advanced options, but it's already functional.

That's it for now! Today I'm diving into breeding in earnest. Excited to share more progress!


Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #662 on: December 17, 2018, 05:49:49 PM »

It took me a lot longer than I wanted to get the first pass at breeding finished. Ultimately it was a combination of factors. A big part of it was that it's a difficult feature design-wise, and there's also a ton of UI work involved with no obvious design solutions for a lot of it; that stuff always grinds my progress to a halt. Also, I had minor surgery on my right hand (cyst removal, nothing serious) and it had me out of commission for longer than I expected. I probably lost about a week all things told because it was too hard to use a mouse for extended periods of time while recovering.

ANYWAYS, I've finally got the first pass down and I'm ready to move on to new things!

The main thing with breeding in this game is that I wanted to provide some way of directing mutations without leaving you with a wild amount of excess dogs along the way. A lot of these details are subject to change, but at the moment the idea is that the breeding center is a sort of mad scientist simulation space for you sift through generations of dogs and recombine them until you get the one you want. At that point you'll receive an egg with that dog's DNA to take home with you and raise from puppy form.



I've always thought it was fun to sift through dog generations like this and it provides a nice measure of control you don't get as easily through standard mutation. I'm going to have to keep an eye on how standard mutations mesh with breeding (I have to make sure both features have their place) but I think that's a manageable design task.



And of course, I've also added in a little risk/reward system. The longer you go without selecting a final dog, the smaller the litter size trends, eventually resulting in only a single dog, forcing you to either take that one home or go home entirely empty-handed.



Breeding costs money to do, so you'll want to be careful. Also, I'd like to eventually introduce genetic defects. Stuff like missing limbs. Once I have a system in place for stuff like that, I think I'd like the rate for those to increase here as well the more generations you simulate in a row. Again, this'll all need balancing but the main idea is that you can't just sit here as long as you want. There are also possibilities for upgrades to this space as the game goes on to reduce the potential negatives of all these systems.

While working on this stuff, the big thing that I kept feeling was that it felt very scientific and sterile. I feel like a breeding system needs some physicality to it, especially in a pet simulation game. So to that end I, uh, decided to implement a little thing for after the initial dog selection.



It's, well, I think it's probably pretty clear what's going on, haha. The system is surprisingly robust and it's honestly really funny to try it out with dogs of all shapes and sizes.



I'm pretty entertained by this all but I'm on the fence about keeping it as is. It's opt-in in the sense that you have to click a button to see anything, but it's not really that hidden. The dogs are so abstract that I feel like it's funnier than it is explicit, but it also might be a bit much. I'm keeping it in for now but it's something I'm continuing to think about. It might be that it ends up being more in keeping with the game's tone to have the dogs participate in scenes closer to like what you see in Viva Pinata (goofy, abstracted mating ritual-type things), or maybe just have them kiss or something.

That's it for now! Glad to move on from this feature for the time being. Got some fun stuff lined up next to work on!
« Last Edit: December 17, 2018, 06:22:40 PM by ActualDog » Logged

Ninety
Level 1
*


turnip boy


View Profile
« Reply #663 on: December 17, 2018, 06:11:40 PM »

this website truly has everything
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #664 on: December 17, 2018, 06:57:39 PM »

You could have them hurtle at one another from opposite points off-screen and impact in a massive explosion of hearts, like the large hadron collider
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #665 on: December 17, 2018, 07:47:50 PM »

The large hadron cuddler.
Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #666 on: December 17, 2018, 08:09:46 PM »

Maybe it's time...


Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #667 on: December 17, 2018, 08:12:02 PM »

Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #668 on: December 17, 2018, 08:16:14 PM »

God damn, I wish I had money to lob furiously at your patreon
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #669 on: December 17, 2018, 10:22:10 PM »

Did the dogs consent to being peeked at? Tongue

(he asked after a GIF of dozens of dogs being forcefully mutated and recombinated to create the perfect dog breed didn't faze him)

Also, this needs sound, so:



« Last Edit: December 17, 2018, 10:45:28 PM by JobLeonard » Logged
nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #670 on: December 17, 2018, 11:14:38 PM »

The large hadron cuddler.

Ok I'm like 4 hours late but I can't leave this joke alone

Maybe they'll find the Huggs Boson

[gets caned offstage]
Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #671 on: December 21, 2018, 09:45:59 PM »

I spent some time making it so you can import and export dogs! This is a feature I've wanted to support for a while now, and it's something that I've gotten more than a few questions about as well. It just seems like an obvious thing to include in a game like this.

Before starting, I had to decide what form an exported dog should take. There's a lot of data to store, which limits me in a few respects, but there were still a few different options. The main two I was considering were images, and codes.

I love the idea of dog data being stored inside of an image, which would most likely be a portrait of the dog itself, and it's a totally do-able way of going about things, but ultimately I decided against it. Doing things this way means that either I would have to implement my own file system browser and integrate it into the game (ew), or I'd have to force users to navigate through the game's directory and place their exported dogs into a very specific folder in order for them to be read. I don't really like either of these options. One takes up a lot of my time, and the other is a lot of work for the player.

With codes, there's minimal extra feature work (I had to encode the data somehow anyways) and the player never has to dig through file directories to figure out how to import a new dog, so that's the way I'm doing things for now.

When deciding on a paradigm for code generation, there were a few main goals. First is that I wanted the resulting code to be as short as possible. Second is that I didn't want players to be able to hand-edit a code without going through some effort. Ultimately I know people will be able to figure out how these codes work (people can de-compile unity projects pretty easily, and also I'm literally going to explain how it all works in this post), but I don't want it to be trivial to modify them. There's already one layer of abstraction in that you have to figure out what each part of a dog's gene actually does, but if you're going to edit these codes, I think it's fair that you have to go through at least a bit of extra effort to do so.

I don't really have any experience in this sort of data manipulation, so it was a lot of fun to try and come up with a way of doing things. I'm sure there are better ways of going about all this, but so far my way works fine and I had a good time coming up with it. There are two main parts to the code generation: encoding and scrambling.

There aren't a ton of parts to the data I'm exporting. There's the dog's genetics, the dog's name, the dog's age, and some facial information. A saved dog has more information attached to it than this, but a lot of it is sort of game-specific. There's no reason, for example, for me to included saved data about how soon an exported dog will need to poop.

Of all this, I'm only actually encoding the dog's genetic information. The rest of the data is raw and just gets scrambled in the next step. The reason for this is that the gene is by far the biggest piece of data I'm exporting, and it's really the only thing that needs to be shrunk down. It's also much easier to save space encoding binary than it is when encoding arbitrary data.

So, at the moment a dog's gene looks something like this:


010010101000000000100000000000000000000000000001000000000100000100000000010000001000000010000011001000000110001111
100110001110000001010001010000010001010100000000010100000100001000000000000000000010000000100010000000001000000000
100001010000000000000000000000000000000000100000000000000000000000000100000000000100000000000000000100000000000011
000000000000000000000000000000000000001000000000010000000001000000000010000001000000000110000000010000001000010001
000000000000000000100001000010000001010000000000000100000000000000000100000000000000100100100000000000001000000010
000011001000000000110000000001000000000000000000011000000000000010000100010000000000000000|00000|00000|01000|00000
|00000|00000|00000|00000|00000|00000|00100|00000|10000|10010|00101|00101|10000|00000|10000|00000|00000|00000|00000
0000000010|100100100000100


That's a lot of data (824 characters), and it's most likely only going to get longer as the game goes on.

The basic idea here is that I go through and encode chunks of this sequence to hex. I settled on hex as it's easy to convert to and from, and it leaves me with free characters to use for some other things that I'll talk about later.

Dog genes are basically ternary (base 3). All you have to do is turn the separator symbols into twos. I experimented with doing that and then going from ternary to hex, but that actually ended up generating larger codes than my current strategy. Someone who's better than me at math could probably explain this better than I can, but as I understand it it's because a binary string with a length of, say, 10, will convert to a shorter hex string than a ternary string of the same length will. Ternary is already effectively more compressed than binary, so it's harder to shrink.


BINARY: 1010001001 -> HEX: 289
Length 10 -> Length 3

TERNARY: 1010001001 -> HEX: 558A
Length 10 -> Length 4


So basically, if I can come up with a way to remove that extra bit, the data will compress further. And it turns out I CAN get rid of that extra bit. The cheapest way of doing this is to literally just leave it in, and that was my first way of going about things. The idea here is that I go through the gene in discrete chunks, converting each chunk to hex. I tested a few values with different gene inputs and the sweet spot for this value turned out to be 20, so that's what I'm using. Whenever I encounter a separator symbol, I just convert the chunk I've got, add the separator symbol back into the output, and then start a new chunk.

That gives us this result.


a95004tf80208f81010aC818F98E05cA08A8fA0840m80880b80214tl80000g80080j80060tm80100a80102hC0204b88000c84205m80002m920
0080832hC0100kC001088000a|e|e|a8|e|e|e|e|e|e|e|b4|e|10|12|b5|b5|10|e|10|e|e|e|m2|4904


Not bad! This takes our character count from 824 down to 199. That's 24% our original size. For completely random dogs the general number this gets me is around 30%. For dogs that are barely mutated, the number gets much lower!

But, we can do better. By using essentially a lookup table, I can get rid of these separator symbols entirely, and take some surrounding bits with them.

Essentially:


|00 -> ;
|01 -> :
|10 -> [
|11 -> ]
|0  -> #
|1  -> $
...


Doing that gets the gene looking like this!


a95004tf80208f81010aC818F98E05cA08A8fA0840m80880b80214tl80000g80080j80060tm80100a80102hC0204b88000c84205m80002m920
0080832hC0100kC001088000a:c:c;c:c:c:c:c:c:c:c:4:c<c<a2:5:5<c:c<c:c:c:c:k2<a904


That brings us down from 199 to 192. Not incredible, but it's something. In this case it saved us 7 characters. In other cases it can save much more, up to 48 currently (max 2 per separator symbol). Why the inconsistency? Well, that brings me to another thing I'm doing with these codes.

Astute readers might have noticed that the above codes are not entirely hex with separator substitutions. I have both upper and lower-case letters. So where did those lower-case letters come from? Well, I'm using those to represent consecutive zeros.

Converting to and from binary has one big flaw for my usage. In binary land, the values "001" and "1" are equivalent. Leading zeros don't hold any value. In dog land, however, every bit is sacred and those leading zeros hold valuable information. This means that converting to and from binary chunks actually loses me a ton of data! To solve this problem, I watch for leading zeros. Once I've found the first '1' in my next sequence, I count up the number of zeros that came before it and I convert that number to a lower-case letter. 'a' represents one zero, 'b' represents 2, and so on. If the number of zeros is greater than can be represented, I just add more lower-case letters as needed.

This could technically be optimized more without too much trouble, but I don't think the benefit would really be apparent. 26 -> 1 is a way better conversion than we get by converting to hex, so if we're hitting that limit we're already most likely getting a smaller-than-average generated code.

So, back to the separator symbol replacement! The reason we end up saving fewer characters than it seems like we should is that in many cases we end up just optimizing out sets of preceding zeros. Those already fit into a single character, so pulling them out and putting them into a different character has no effect on the final code size. I tried out grabbing leading bits, as well as bits on either side of the separator, but the trailing bits method seemed to produce the smallest results, so that's what I'm sticking with.

Now that I've got a smaller gene, I append the rest of the data I need to it and I pass that entire string along for scrambling.


a95004tf80208f81010aC818F98E05cA08A8fA0840m80880b80214tl80000g80080j80060tm80100a80102hC0204b88000c84205m80002m920
0080832hC0100kC001088000a:c:c;c:c:c:c:c:c:c:c:4:c<c<a2:5:5<c:c<c:c:c:c:k2<a904!0.4304495!Olive!2!1


I came up with my own little scramble algorithm for this. The basic idea is that I go through the entire string bit by bit and swap indices based on the int value of the following character (wrapping around the string).

For example, take the string "ABCD". For simplicity's sake, assume the following int values:


A = 2
B = 3
C = 4
D = 5


Start at index 0(A).
Look ahead one index to 1(B).
The int value of B is 3. Looking 3 places ahead of index 0 and wrapping around the string, we end up at index 3(D).
This results in us swapping indices 0 and 3, thus A and D.

Now we have DBCA.

Following this pattern:


B[1] SWAP B[1] -> DBCA
C[2] SWAP D[0] -> CBDA
A[3] SWAP A[3] -> CBDA


This is also trivial to unwind. Nearly all you have to do is just iterate through the string in reverse.


CBDA
A[3] SWAP A[3] -> CBDA
D[2] SWAP C[0] -> DBCA
B[1] SWAP B[1] -> DBCA
D[0] SWAP A[2] -> ABCD


The only caveat for this method is that your first index can never be allowed to swap with the index directly after it. If that swap occurs, then the necessary information required to unscramble will have disappeared. It's a simple fix though, you just skip the swap step in that instance and move onto the next index. (That said, it was decidedly NOT simple to figure out that little eccentricity.)

But yeah, that's it! When you're done, you get this:


0t02ahC800:0a2f:808h010<68C8g080084005c43988:1A1m8<0bm59:00acCl2008::013a:;cf0m:50108t8:acc9c00vc02:c::c485jc::412
950c<5808c4:00Ac0048Ac!8i04!C80:!cl0!b2O0a002021tmk0800800898<c88F010E<00k0c082c2.0:84cc00421:f4e0


Not impossible to edit, obviously, but definitely not trivial to do so by hand. Plus, at least for now, dog codes fit nicely inside of a single tweet! There are still opportunities to shrink this code even further, but I think shrinking the raw gene size somehow would prove easier than optimizing all this stuff for the time being. Something to play around with later if I need to!

Oh, and if you were curious about the dog contained within the code I've been using, it's this one right here.


Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #672 on: December 30, 2018, 12:45:05 AM »

Olive is still precious no matter how compressed her genome is
« Last Edit: January 14, 2019, 05:32:35 PM by NovaSilisko » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #673 on: December 30, 2018, 12:58:05 AM »

I want to see Randy and The Beast as well Tongue
Logged
oahda
Level 10
*****



View Profile
« Reply #674 on: January 14, 2019, 01:38:41 AM »

dog tweetability is a hardcore consideration B-)
Logged

Josh Bossie
Level 3
***


Fly Safe, Pup


View Profile WWW
« Reply #675 on: January 14, 2019, 12:30:00 PM »

Olive is still previous no matter how compressed her genome is

I can only hope someone in the future refers to my trace DNA like this
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #676 on: January 14, 2019, 02:46:13 PM »

Olive is still previous no matter how compressed her genome is

I assume you meant to type precious Tongue
Logged

nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #677 on: January 14, 2019, 05:32:25 PM »

Olive is still previous no matter how compressed her genome is

I assume you meant to type precious Tongue

IT'S BEEN TWO WEEKS WHY DIDN'T ANYONE TELL ME
Logged

ActualDog
Level 3
***



View Profile WWW
« Reply #678 on: February 01, 2019, 03:39:25 PM »

Olive is still previous no matter how compressed her genome is

I assume you meant to type precious Tongue

IT'S BEEN TWO WEEKS WHY DIDN'T ANYONE TELL ME

If it makes you feel any better, I didn't notice either, haha.

---

The past month I've been working on construction/room customization. I've mentioned it before but making player-facing editors is a ton of work. I think this stuff is in a solid place now, though. It's not all perfect or finished and I'm sure there's stuff I'll have to revisit later but there's a really nice base there. I would love to spend longer adding in some quality of life and polish stuff to these systems, but I can't afford to spend any more time on them right now and I'd rather fill in the gaps going forward than try and anticipate needs at this point.

As far as base pen construction, for now I've decided to make pipes free but have rooms have a decent cost associated with them. At the moment I've decided to be granular with room sizes, having only 3, but it's something I'll keep an eye on going forward. I've added lots more pipe connection nodes, which you can see in the below gif.



Room customization should hopefully make up for the fact that there's now only a few base room types. Objects available to you in this mode will have to be bought or received elsewhere (shops or other events), and deleting rooms with these objects inside of them will just throw those things back in your inventory. It's all very non-destructive. You can change the carpets and wallpapers, and move stuff around as much as you'd like. Putting things on top of dogs or other free-placed objects will just cause those things to move around to a valid position.



I also fixed a ton of bugs with all these existing systems, and made it so objects and dogs move around correctly with the rooms they're inside of when those rooms are moved. A bit trickier than it sounds since everything's physics-based.


Happy to have all this stuff in place finally. The next month is going to be heavy AI work, which I was putting off until all this construction stuff was more solidified in case it impacted my AI designs at all. AI work should give me a lot more in the way of fun stuff to show off and talk about, so hopefully I'll have more to show moving forward!


Logged

danresn
Level 0
**


View Profile WWW
« Reply #679 on: February 03, 2019, 04:00:49 AM »

I love this game concept so much
Logged

Composer | Sound Designer
www.daniel-larsen.com
Pages: 1 ... 32 33 [34] 35 36 37
Print
Jump to:  

Theme orange-lt created by panic