Monday 11th: Ok got a few medium sized things to address next before I can push ahead. Transport Panel. In the build currently on Steam, there was a little window just for Transports. This would show the item going through and give an idea of how far along it was. This is a purely cosmetic feature so for now, I'm going to put a pin on this until I can get a much firmer grasp on the UI. There are certainly more important things. 'HeldBaby'. Remember I decided on this when I was figuring out the outpoints for the 'Birthing Machine'. I think Humans should be able to pick up and carry babies, and this should be their default positions when they are born. I already have an Item variable for 'HeldItem', now I can do the same with 'HeldHuman'. Did the easy part first, essentially copying all instances of 'held item' in saving and loading and all of that. Now I have the function on the Human. After some thought, I don't think this is the right approach. Going to undo what I've done so far today and instead think about another way around the Birthing Machine (probably, after releasing the Mother, make the Baby its 'Occupier' and set its phase to 4. We'll cross that bridge when we come to it. Next two things on my list are smaller: Bug when placing a Human on a Feeding Trough (since their 'Intent' does not become 'Eat' when they are placed on by the player). Easy fix. Exporter doesn't attempt to Export when I place an Item in. This is probably for all similar Processors, so if I fix this it will fix all of them. I think I just need to find the right place to prompt the Processor to LoadSource(). Pipe for some reason isn't making it to the Exporter. Not working for the Feeding Trough anymore either, so it must be something recent I did. Simple coding error, just had to find it. Both of those things now fixed! Ok now to keep playing the game and see what I run into first. Now that I've started the McCthulu and Ivan quest lines, I should be able to see or at least unlock the next Buildings in the Shop Panel. Can't see them though, just white squares, so next I need to figure that out. Added a light to the back of the Sun light to act as the Moon light, so that the night time looks less grey and stupid and more like 'night time'. Just a blue light with shadows off. All known issues with the Shop fixed. Some other minor things. Pah, now they're not getting into Bed on approach? Why? 1 step forward, 2 steps back?? Was a big trouble, to do with targeting the Object vs targeting the 'Entrance'. Found it eventually and was an easy fix. Didn't get far after that when, after waking up from their sleep, Unity crashed! And again, and the game crashes at some point after a while. This has happened once before but I still don't know what causes it, so 3 times now means it's not Unity randomly crashing and I probably have a bit of death code somewhere in there. Some loop that's calling itself, or some impossible number being made. How will I find out what it is? No idea! 4th time now, might be the toilet. If it happens again around the toilet that might be a clue. Ok, this time, instead of crashing, my computer was able to actually render some huge explosion of Poo from the toilet after freezing for a while. So, I think that's where the problem lies. Before hammering my computer again, I'll see if I can see what the problem is just by looking at the code. How amusing. Yep, I forgot to write 'Waste -= 50' on 'PooOnFloor'. They were Pooing on the floor, then deciding next move, which in each case was to Poo on the floor again because their waste was still high. Also, as with the build currently on Steam, Humans shouldn't poo on the floor straight away after failing to find a toilet, so that's the next thing. Before, I did this with a 'PooCounter', which would cause them to wait 30 seconds before attempting to look for a toilet again, with them finally Pooing on Floor at 100 Waste. Now, with the new setup, it should be enough to just let them finish an idle cycle [walks to random spot, waits 3-6 seconds] before trying again. Big problems with the Bed I think might be to do with me not having saved the Stations properly. At least, I need to do that anyway so that's where I'll start. Need to save and Load the Station's Counters (progress in each stage of handling the Human). At least if I sort this out it will be easier and smoother to hone in on the problems. Tuesday 12th: Sorted out saving and loading the 3 different timers on each Station. Now to test and fix again, I have a clean road in front of me. Just waiting for that day when I suddenly break through and clear through all the content currently in the game. Could today be it? A bug free build. Ok, first bug is good news and bad news. Good news is that the Humans are engaging in Mating! The bad news is it's not quite working. I see a Human stuck in 'Waiting', which is only triggered when it's about to mate, but nobody is approaching them. So, I guess I'm bug fixing that now. Would be cool if the mating was super tight and I could upload the build by February 14th! Forgot to set the target before making the path when Human is looking for a bed they have already claimed. This might fix the mating bug too. Putting cosmetic and animation based bugs on a list for later. On the mating, I wasn't expecting to deal with this today, but we'll see what we can do. So, why isn't it working? For starters I forgot to put 'return' at the end of this part of the script so it continued on. After fixing that, they now go and run into each other. Now I just need to rewrite the code to conceive the baby and we will have functioning and very cleanly refined and easy to debug mating! Nice bonus to achieve today! First thing was to save the CurrentMate in case the player quits and reloads in the middle of Mating. Instead of saving the Human, I just made a 'HumanSave' of them. Wow, awesome, it looks like I can confirm that basic mating with be working well in the next update. I'm really pleased with how well its working and right now I just need to test and fix how the baby develops, with asking for food and pooing on the floor and whatnot. So the Baby actually reaches 3 years old, thus becoming able to feed and poop itself, before it ever actually needs to eat or poop. Quick fix is just to change the starting Fullness and Waste of the Baby, meaning it will require it at least once. I think that's enough to motivate the player to make use of the baby care mechanics. Fullness now starts at 55 and Waste at 40 for Organic Humans. Having a quick look at the code for the baby to beg for food/to poo first to see if anything sticks out before I run it for the first time ever. The Nappy changing won't happen because that's for when the Nappo-matic is built. I actually deleted the code I wrote for begging for food so that will take some time. Let's go. Did some of the ground work for Feeding the Baby before going to bed. Wednesday 13th: Finished programming the whole process for feeding Babies. Now to see if it will actually work. Having some trouble when the Human gets to the Feeding Trough to pick up food for the Baby. Getting through it but I think I might make some fairly big changes here. Making a common function for 'CheckContainerForItem' to tidy code and clarify. Containers held 'GameObjects' rather than 'Items'. Changed that and all the red lines that came with it. Processors now remember their 'SourceItem' and 'SourceHuman' components for optimization purposes. Big change to the way mating/summoning Humans will work. Instead of interrupting their current activity, it can change their intent, and make it so they finish what they are doing instead of interrupting their current activity. The person waiting for them should also wait (with a time limit). This means I can also make the Human choose their target based more on preference, like a Baby calling its mother. Doing a lot of cleanup. Refining Human's decision on whom to mate. Considering a future idea that some Humans will be monogamous while others are not. I think at this stage it would be best to ignore monogamy since it seems like the simpler option. These Humans are like monkeys and will shag the human they like the most whom they can reach. Until now they were just going for the nearest Human who meets their criteria. Sorted Mating so that when they decide to Mate, they will simply set Intentions and start waiting. Then, on 'DecideNextMove', if Intent is 'Mate' then they will seek out their Target Human and continue as normal. This should avoid a lot of potential bugs and make a lot more sense. Now to do the same for Humans feeding Babies. I just had a very entertaining line of thought. Considering how breastfeeding will work given the life of the Baby is so short. I'd really rather not have to balance out Milk production so there's some ready in the one occasion that the Baby gets hungry. So, instead of women storing a certain amount of milk, they should simply be lactating or not. When she feeds the baby or is on a Milk Pump, if she is lactating she will produce Milk and it will drain her Fullness. So what about milk production? Seems it will be a bit difficult to make it work, since the lactating period is so short it's barely worth it. However... what if there was a Drug you could make that could trick women into lactating indefinitely? What if you could breed women to produce more milk and for longer? Really excited to see what players come up with once this is all implemented. Did a bit of research on milking and milk cycles. Got a growing list of new ideas for improvements to the code and game and little things to fix. For now, I'm going to focus on the task at hand; feeding the babies. Made sure to time 'Waiting' so that it times out eventually and they reset. Ok coded that. We'll see how it works. Works! Animation needs a lot of smoothing out and I need to test it a bit more to see what happens with saving and loading and grabbing a Human during the process. But I'll fix those as I find them. That's actually a pretty big achievement! Now, what I need to do is put a bit of a cap on it so they don't breed quite so much, and get back to the basics. Very cool to have this harder stuff done now. Did some research on Garbage Collector and how to reduce it. Will do some of the suggestions at some point. What's next? Next up is lactating and breastfeeding. Should be fairly straight forward, especially with my new designs. Need to implement that. Also want to really encourage the Baby to prioritize the Mother and ignore if she is busy and simply wait for her. Then some of the cosmetic fixes I have in mind. Then I can either get back to testing and fixing the content so I can release the update, or I can get to this list of optimizations I want to make to the code. The former gets the update released quicker and the latter is probably more efficient in the long run. We'll see when we get there. Got rid of the 'Milk' stat on Humans and changed Lactating from a float to a bool. Also modified the Milker to work with the changes. Now all I have to do is modify the code for when a lactating woman is feeding a Baby. A few little things to fix as I go, like making sure Humans don't attempt to mate with Humans who are under 18. Luckily I caught it before I ever had to see it happen. Thursday 14th: First task today is to make it so Lactating women will breastfeed hungry Babies instead of getting them Food from a Container. Pretty simple. We'll see how it works as I play. I thought about making the Baby wait for the Mother if she is at all within reach, but I think that sits comfortably on the low priority side. Next problem: When I load the game, the animations and sounds of Stations don't update until they are changed, and both the Human and the Treadmill remain static on load. I should be able to copy some of the code from 'Station' and put it into 'GM' where I load the game. Got on my list to make the Baby cry extra annoyingly when it fails to find a Human who can Feed it. I think this is a layer of complexity I don't really need at the moment, and when I make the Pacifier I will be prompted to think more deeply about it. Fuel Burner didn't have a 'SourceType' set so wasn't working at all, easy fix. Also added a 'TriggerPreviousBuildings' at the Processor for when it uses a Source. Having some really frustrating issues with the Baby waiting and things like that. It occurred to me that I've programmed Baby tending really badly. It's causing this complication, as well as not really being true to life. Currently the Baby seeks out a Human who can feed it and will summon them. But surely, Humans who see the Baby should try to feed it? Solution: It should be really easy for me to program a Human to seek out 'Hungry Babies' in the same way they would seek out a Treadmill or Bed. Then Babies can just focus on being Babies. I'm thinking about ways to fine tune this so that the Mother does most of the feeding if she is anywhere near. Perhaps Babies could have a designated 'carer' which will work like the ownership of Beds. Perhaps Mothers could seek out hungry babies at a lower threshold. Going with the latter for now and we'll see how it plays out, with lactating women feeding Babies at <75 and others at <25. Ok, should work. Now to test it. Ok so now I can either jump into some optimizations or go back to testing the game. Decided to hold off on optimizations for now. So I'm going to take a quick break and then get into some testing, again hoping for the day that all the code just finally fits in place and I can race through the content. Need to make it so Humans don't feed the same Baby at once. Going to use the Baby's 'TargetHuman' to reserve the Baby. The next thing is to stop the Babies from moving then they are waiting to be fed. Ok so while the Shop is loading all nicely, the buttons don't do anything, so that's the next thing to address. Also, a lot of things have suddenly stopped working :D Easy fix for the Blueprints in the Shop. Working nice and smooth. Yeah the Stations/Processor stuff is starting to feel a bit complicated. I'm thinking of doing a bit of an overhaul, with the Station acting mostly as simply a Container for Humans. Bare with me while I entertain that thought. I think I'm going to go for it. Not quite gutting everything from the Station, but making many changes nonetheless without losing the principle. Very happy with the new 'Station' script. Today has been a day spent mostly under the hood, just tidying and smoothing things out. Ok testing and fixing and everything is working super smooth. However, I need to re-do the sound and animation code for the Stations. Friday 15th: First thing to figure out today is why Unity now crashes when I put a Human in the Grinder. Found out it only happens when I prompt 'Container', which I don't need to do anyway, and when I prompt 'Processor' on placing the Human in the Grinder. I think there's some ambiguity now between Processor and Station. I made 'Working/Moving/Working(station)' all tied to the Building since I thought that would be more efficient. I don't know exactly how, but I think this is causing the issue. Entertaining the thought of doing some restructuring but will probably just undo that change which I think caused this. Took a while but I undid the change. Split Building.Working into Processor.Working, Station.Using and Transport.Moving. Hopefully that fixes this. So when I place the Human in the Station, when should I prompt the 'Station' side of it so I can place them on the Treadmill and Toilet and so on? If I prompt the Station, then in the case of the Grinder it will end up ejecting the Human because it thinks its finished. I need to delineate between Stations which are accessed by the Human and Stations which work using Transports (which in both cases need to accessed by manually placing a Human on them). So, I think a simple bool 'Manual Station' for the former which which prompt the Human to use the Station on Place if it is true. Consolidated the code to start the Station in the Station script to save on some copy-pasting. Ticked the 'Manual' box on the appropriate Stations. Seems to be working smoothly. Hit a very strange bug when I loaded with one Human Waiting as if they had been called to Mate or be Fed, and another at <0 Hp and <0 Fullness dying on the Bed, but with no Occupier. This was probably caused by Mating, but I couldn't figure it out. Put a debug.log on it so I'll know if it happens again. Other than that, all good with some minor fixes. This time, I got as far as building my Conveyors. Seems to be some errors here so with progress made, back to debugging. I think the main issue was with the Conveyor Builder when click dragging, and I think I'm fairly confident to debug/overhaul that. [little bug with Smart Splitter item display, easy fix] Ok next one to test is the new 'Human Gate' (replacing the Wall Flipper). Guaranteed bugs here. First one was tricky to find, was because I had a list of Inpoints with one null item. Now to get them using it. I'm actually thinking instead of this machine Summoning Humans and potentially interrupting their activities, the Human should go to it. So, on Decide Move, the first thing they will always prioritize is finding a Human Gate with a matching Human Filter. Programming the Human Gate: So I'm actually starting from scratch here but it's all in the noggin. Programming from the Human's end is very simple. On DecideNextMove, Before Pooing or Eating, but after Mating, Feeding Babies and Pooing on the Floor, the Human will check for Human Gates. Quite simply using my premade functions: TargetNearestBuilding(Name: Human Gate, Item: null, Needspace: false, Ownership: false); if (Target != null) { MakePath(); return; } Pretty cool huh? Now I just need to figure out what happens when it reaches the Human Gate. So the set path will happen as normal and since it's a Station, it will automatically aim the Human at the Entrance, and have the Human 'Use' it. So, I can set the Human Gate's 'UseTime' to about a second, set its Use Animation to 1 (Walk), it will automatically move to the centre and then set the Human's 'Target' to the exit. (Had to add the Exit). One problem with that: The Humans will now go to the Human Gate if there is no Filter on it. So, I need to make an exception just for Human Gates that if there are no Filters, they are by default not allowed. Fixed and the Humans are now going to it properly. Another fairly significant problem: when they get there, it doesn't work! Made some adjustments. Now they go through the Human Gate just fine. Except, I now need to program it so they go straight onto a Transport if there is one attached. Ok and it all works! Now, bugs when we try to eject a Human from the Blood Drainer. Let's see what that's about. [Easy fix, but more bugs later] So, I have those to bug fix, but again that was always expected. Everything up until then is working super smooth (except for that one bug I think to do with Mating, but I'll test that more thoroughly later). Also, I need to re-do the UI for the Item Filter, and that's a bit of a job. I want to improve this quite a lot, so that will be first thing. I'm just going to restrict the Item Filter to only filter out 1 item per filter.
[ 2021-01-18 12:43:33 CET ] [ Original post ]
- Human Factory Linux [257 M]
Raise and feed Humans.
Build all the necessary items to make the Humans feel at home. Make sure they are fed and put to work. As you learn more about the Humans, you can learn to better accomodate them.
Process Human byproducts.
Human waste can be deconstructed into pure matter and used for building. Many parts can be used for cloning, allowing for potentially infinite expansion. Watch as they churn their own milk for you to sell.
Butcher the Humans
Take their skin, their flesh, their brains. Build ever more elaborate and beautiful factory lines. Remember, Human meat tastes best when cut from a living soul!
Trade with the other cosmic space deities. Analyze and gain new technologies. Become the greatest great one in the multiverse.
- Processor: 1.7+ GHz or betterMemory: 1 GB RAM
- Memory: 1 GB RAM
- Graphics: Radeon HD5450 or better; 256 MB or higher
- Storage: 1 GB available space
[ 6133 ]
[ 2120 ]