Friday 13th: Thinking deeply about the Human code. Essentially Humans have an 'Activity' and a 'Target', the conditions of which constantly helping them decide what to do next. I think the only problem with this is that it's messy, so perhaps I could start taking more steps to clean it up. It gets a bit awkward jumping around between 'find item', 'pick up item', 'bring item to my target' etc etc etc. 'Getting Food for Baby' and 'Going to feed Baby' kind of get mixed up in my head. We could try something I don't have a lot of experience with, which is co-routines. But I think this way is working fine and I don't want to break everything. I think I'm just going to do a bit of organizing in here. I'm thinking in terms of organizing code by function rather than trying to cut down on simple bools. For example, I prefer to ask more often per update 'if Dead == false' rather than putting all of them under that umbrella. Then, if/when there are problems, I can zone in on each thing separately. Think I'm going to start from scratch for the next base I build. Going to do as much as I can for a big update on December 23rd. Monday 16th: Added 'DropHeldItem' function for Humans. Used the 'Splash' I made before, so this is something that, at the beginning of the project would have taken me a day or so, now it took 10 minutes. Added a daycycle light which casts a shadow. I can't figure out proper baked rendering to look good, so I'm just going with real time. Had some trouble getting it to start on a specific frame (was to do with dividing an Int (hour) by another int (24) giving an int of 0). Looks pretty cool. Profiler tells me it will run at about 60 frames with this, so that's cool. I've turned it off for lower Quality settings. Simple but effective way to boost the graphics for the next run of marketing. Made it so dead eyes appear on Humans. Made it so Humans produce Milk when pregnant. The challenge is to make it so that the Mother still produces Milk while they have a child. I could make it realistic and difficult for the player so that Humans produce Milk through interaction with their child, but I think it will be better to put some kind of counter so that they keep producing milk for a set time after becoming pregnant. So this will be a float called 'Lactating' which is saved and goes up on pregnancy and goes down after. Taking a random guess, with the aim that there should be a bit of milk left over, and saying the lactation period should be 3 times the length of the pregnancy. Milk has a maximum of 2, so use it or lose it. Sorted out females Breastfeeding Babies. Essentially I'm using the same code as the feeding, except instead of getting an Item we go straight to the Baby and give them Milk, filling them up and pleasing them based on the Quality of the Human. I think a lot of this Human interaction code needs a proper looking at. Added Milk as an Item. (Added the Milk Pump, Birthing Station, Pacifier and Napp-omatic to my new Buildings todo list.) Tomorrow I have a ton of buildings and items to add, which for now I will use placeholder models. Tuesday 17th: First question today is about Cocktails and Bars. Had a think about how this should be done. For now we're just going to make the Cocktail Station, which will have inputs and outputs like any other machine. The Bar will be basically the same, only there will be no Output, but instead a Station so the Humans can drink from it, and the Inputs ought to be moved to the side. The key stat for making Cocktails will be Charisma. This is quite a funny feature. I want to avoid needless layers of complexity and this might fit into that category, but I think it's very Human and is a good way to get more out of the Drug system. Added the Cocktail Station. This is actually really simple, I just copy paste the Drug Lab, change a few names around, assign price, client and tier, etc, and there's actually no code to add because of the way my 'Fabricator' script works. I will do the Bar later as for now it can be easily done with a cocktail station and a fridge. Added Cocktails. Had quite a lot of fun naming them. Just 5 for now, 1 for each Drug. Before adding the effect of the Cocktail on eating, I'm going to take my 4-5 instances of Humans eating and wrap them up in a Function. Added the effects of a Cocktail. This took a fair bit of doing. Thinking that the length of a Cocktail hangover should be half that of a Drug hangover. What's the best way to code this without adding too many unecessary variables? Think I'm just going to leave it for now and address it when I zone in on balancing. The effect lasts longer for Cocktails, so the Drug/Hangover ratio is still better. So, we should now have Cocktails fully implemented into the game. Needs balancing, bug fixing and of course better cosmetics but that's not a bad achievement for the day so far. Added new Item 'Herb'. Changed the recipe for Precursor to use this instead of Fruit. Very simple. Ok that does it for Cocktails. Now onto a random idea I came up with recently, inspired by the film Dark Crystal. How about a machine that kills a Human and places its life into a Mana Crystal, turning it into an Essence Crystal. Then, another machine that consumes the Essence Crystal, transferring it into another Human, extending their lifespan. Pretty brutal, not really necessary right now, but as I said I'm just kind of working through this list and adding to it as I go, stream of conscious kind of way. [A better name for this item would be the Philosopher's Stone]. Made the Philosopher's Stone Item. Added 'Lifespan' to Humans to mark their maximum age. Made the code to extend a Human life using a Stone. Made it so you can place a Phil Stone on a Human to use it. Made it so you can feed a Human Food, Drugs or Cocktails using the Tentacle. Made it so that, if a Human is fed a Philosopher's Stone, they gain the effects of it. Now to make the Machines which extract and transfer the essence. Moving really fast this week, as expected. Focusing on logistics and getting all the ideas from my head to the code was a good idea. It may come back to bite me later but I'm getting loads done and enjoying myself. Backtracking a bit. Going to make the Philosopher's Stone only useful as an ingredient, which will be mixed with... Blood (maybe Milk, but Blood for now) to make Elixir, which will be what extends the life. A philosopher's stone on its own is just an empowered Mana Crystal. Added Elixir. Put the 'Use Elixir' code into the 'Eating' code, and added '|| x.name == Elixir.name' to instances of Humans looking for Food. (Also did this for Cocktails while I was at it). Added the 'Necronominizer', the Fabricator to build Magic Items including the Elixir. Very easy, just like the Cocktail Station. Added the 'Essence Extractor', the Building to make Philosopher's Stones. Programmed the Essence extractor. This one is a bit different. I'd say it's like the Injector, but after destroying the Item we make a Philosopher's Stone. It won't just try and use anything, it will search for a Mana Crystal. Wednesday 18th: Finished sorting out the Essence Extractor placeholder by sorting the Inpoints and Outpoints. Added Elder Battery, a Battery for Mana. Next task is the Speed Tiles. First need to think about it a bit. Should it be a separate object? Should it be part of the 'Paintbrush' mechanic? I think, until I have the Paintbrush sorted, I'll put this object in as a separate Object. How will it work? I start by looking at the 'Update Size and Speed' code I have on the Human, which is so far the only instance in which a Human's Speed is changed. Currently this happens on the 'Update Appearance' code and it tied to Size. Going to move this to the 'Slow Update' which happens once per second and so far handles 'Actual Stats'. That is where I will put the code. The code asks 'Are there any Speed Tiles near me? If so, my speed = speed * 1.5f.' Should work. Added the Pacifier short of coding it. I know that 'Pacified' is going to be a bool which stops the Baby crying and presents a dummy in its mouth, rather than an item or piece of clothing. The question I have is what should the materials to Pacify a Baby be? Should I keep it simple and have it use Squid like the Food Processor? I find that an inelegant solution. Perhaps it could use Wood, Ore, Mana Crystal, any or all non-organic objects. I think I'm going to make it work with Wood or Ore, so it will have to ask for those by name. This object is most similar to the Injector, since it passes an effect to a Human while consuming an Item. Finished making the Pacifier. The Pacifier uses Ore, which is not actually in the game at the moment. Added that so I can compile the code. Added the Nappomatic, which is almost completely identical to the Pacifier only it adds Nappies. What should the resource for Nappies be? Herbs? Skin? Hair? I think Herbs. Ok that deals with the easy Buildings. Got a few more complicated ones that require some thought and some new mechanics. Added the Bar[not really]. The processor side of this works exactly the same as the Cocktail Station, but the Station side is a bit more tricky. Thinking pretty deeply about the Bar. I feel like if I'm adding this, I ought to also have a kind of Bar that simply has a Pipe input and no Processor attached. That way the Player could sort of Build their Bar themselves. I just liked the idea of seeing a human in a bowtie making Cocktails while other Humans pick them up at the bar. In the end, I think I'm going to go back a bit and make the Cocktail Station redundant, with the Bar serving both functions. It can have an Output and a Human station, I just have to arrange things differently to the other Fabricators. I think I'm going to make an item called 'Bar Extension', which will be a 1x1x1 with Pipe Input and Output that can be used to extend the Bar or placed as the player likes. This will add Storage and allow/encourage the Player to build a Bar that actually looks more like a Bar. Bar continued: So one issue with the Bar is that it's the first object I've made which will have 2 Stations, one for the Barman and one for the drinker. So it won't be as simple as just designating the Bar's Outbox as a Food Container. Going to make this a start-of-the-day item as I think it needs better attention since I'm not fully confident or happy with the Station system. Was going to add a Manual Milker, but now it makes much more sense just to make the Milker accessible by a Human. This will make the Milker the first Building that uses both a Conveyor Input and a Station inpoint to accept Humans. Again, this will require a fresh mind, so after sorting a few things out and laying the groundwork, shuffling it down the list. Thursday 19th: Having multiple Stations actually is really easy. I've already kept things versatile enough. I just had to write an exception for Bars to look for a different transform... this will be revisited as more similar objects come up. [Ended up revisiting it within the hour] First thing I'm thinking of today as I add the code for Humans to drink from Bars and Bar Extensions, is how will a Human decide to eat a good balance of Meals and Cocktails? I don't want Humans to continuously drink Cocktails seeking nutrition. Possible solutions: Make the Human alternate between Solid and Liquid. Have a Thirst meter which causes Humans to prefer a Cocktail. Avoid Cocktails if under the effect of any Cocktail. Going with the third one. It's the most simple and accurate I think. This means that Humans will ignore Cocktails as a food source while they are under the influence of a cocktail or hung over. This is something I will definitely need to tweak through testing, but let me finish building my toys first. Added a second 'Waypoint' (just a transform to tell Humans were to go) to the Station script. Also, this way, instead of asking specifically for the 'Bar' and future exceptions, we can just ask if there is a second Waypoint assigned. The reason I did this is because I immediately thought of many multi-Waypoint-Stations I'll be making in the near future. That completes the Bar for now. I highly expect bugs. Now to finish the work on the Milker. Again, I was probably overthinking it yesterday. Just need to program the Humans to go and insert themselves into the Milker if there is nothing using its Inpoint. Big challenge was getting Humans to go to a Processor and load themselves in. Most of the heavily lifting had already been done, just some difficult surgery here to make this work. In the end it mostly came down to just a few lines of code 'if there is a processor attached to the station I am visiting, load me in' and in the Processor, making sure to do a distance check before loading any source (plus a couple of other little things). So that's the Milker for now. Birthing Station. If a Human is almost finished with their Pregnancy, they will try to seek out and use a Birthing Station. This Birthing Station will deliver the Baby, and may be connected with Conveyors to move the Baby around after. Realized I should make it so that more Buildings should eject Humans to an empty floor tile in front of them if there is no transport attached. Made a function and pasted it in a bunch of places. Put a note in my to-do list to give this whole script a bit of a clean. Now I can finish programming the Birthing Station. Went into town today to do some admin and a bit of shopping, so not a whole lot of work done today. I've started exercising more and I think if I spend 1 hour exercising I get 2 hours back in productive time. Friday 20th: It's been a long time since I've pressed play on the game. Undoubtedly there will be tons of bugs which I will have to carefully work through piece by piece. Next Item is the Body Freezer. This will Freeze a Human, pausing all of its functions including Age. Until I implement Hook Lines, which may stretch from the very beginning of the game, I'm going to make a Frozen Human like a cube of ice with the Human crouching inside. Now it's really time to clean and improve the Processor script. The line count is getting way out of hand and I can see a path to reduce it. It will take some time though. The problem here is that every time I make a new Building with a Processor (which is most of them) I have to write 2 scripts specific to this Building. LoadSource takes the Item that the Processor wants if it meets the conditions. And 'Do' decides what happens once the progress bar is filled. I can definitely improve LoadSource and cut down on I think about 7-800 lines of code (and more lines that will never have to be written). It felt for a while like each Building's method of loading a source was different, but really there's only about 5-6 types: Loading a Human, Loading an Item, Loading 2 Items, Loading a Human and an Item, Loading nothing. So, instead of having a about 50 lines of code for each Building, I can easily write 50 lines of code for each of these 5-6 conditions. Having a great time deleting big paragraphs of code since I've now refined it. Saturday 21st: Finished what I started on Friday with the Processor code. Very pleased with this improvement. It will speed up my progress even more. Sorted the Source Type for each Building Prefab in the Editor. Now I can get back to making more Buildings.
[ 2020-11-27 16:29: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 ]