Game
A Day In The Life

5 years ago

how not to code: A cautionary tale


Making great headway with the farming system at the moment with the bulk of the code concerning crops out of the way. but whats been stumping me for days was getting tools to trigger the correct events on the plants. This is also the start of the tool system so alot is riding on getting this first bit right.

Tools can have different grades like in Harvest moon so I've had to account for this in the use method which will need to take grade and the amount of time the button is pressed to control the outcome of the use. easy enough in the end but then came interaction.

After getting the charge value and the tool type the tools unique behaviour will be called. in the case of the watering can it just needs to detect a tilled crop tile and then call it to carry out its own watering method. Send message allows you to trigger public methods on referenced objects in unity, and because its more hit and miss it means it doesnt matter if it fails to find anything. At least when you notice youve not put the capital in the name of the method you've been trying to trigger for an hour.

to detect crops a boxcast is used and everything it hits is stored in an array. the array is then fed through a quick loop that uses send message. The crop picks this up. alters its sprites, then reports the change to the field data

Its been a long one getting it ready and it still needs a few minor tweaks and of cause animations. but the functionallity of the watering can can be easily modified to edit other crop data and just like that we've got a hoe and a scythe.



0 comments

Loading...

Next up

Finally, I've had some time to do some more work on the recode. There is hardly anything to see except for this utilitarian clock which can be swapped to 12 and 24 hours in settings. The lighting again changes through the day too.

I know it has been a while since the last update, but life got in the way. Here we can see how buttons can be customized and given functionality through the event system. More to come as the event system grows.

Wall height is being adjusted to accommodate things such as stages and lighting while also giving animatronics more breathing space.

I'm currently working on a new game with a team of people. Here's a mannequin being assaulted for test purposes. Gotta do what you gotta do for your damage systems.

Finally, you can sell the fruits/veg of your labour. :)

Hi everyone, I wanted to put my project back out there after taking some time off. Fnafkit is a game about creating custom fnaf games with no need for programming. I'm also looking for anyone interested in helping out! https://gamejolt.com/games/TKFNAF/444860

(Mines and menus preview build)

Available for testing now

I know updates have been slow but there really isn't much to talk about when you're just tidying up existing code. We're looking at updating the art style to be just that bit nicer. The crop system working with an overhaul to interactions with tools.

Quick update on the project, Dialogue system has been rewritten from the old version of the game, functionally the same but a lot easier to use. The camera has been worked on and the inventory is being expanded with things like drag and drop.

Asking the big questions today. We won't support changing your characters outfit or gender but you can give our beloved testguy a name. Character customization will come later, as it will take planning to get it as versatile as we want at the moment.