Homegrown Devlog - Sprinklers!

Homegrown Devlog - Sprinklers!

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (2 сегментов)

Segment 1 (00:00 - 05:00)

Hey everyone, welcome to another delog video for Homegrown. And this week I am finally back working on some farming gameplay after about a year of working on the town area and then before that on the UI overhaul. So really happy to be back doing some farming gameplay. And I'm going to be jumping straight into the deep end this week. And I'm going to work on probably the biggest remaining feature and perhaps also the most exciting and that is automation. I'm going to be adding things like sprinklers and auto harvesters, things that are going to take some of the manual work off your hands. Um, I haven't done any work on this yet. I'm starting today. So, the first thing I need to do is, of course, a planning session. So, I've got three main types of automation that I'm going to be working on. The sprinklers for watering, auto planters, and auto harvesters. And I'm going to start off with the easy one, the sprinklers. Pretty self-explanatory. Pop the sprinkler down in the middle of a vegetable bed. It'll do a nice particle effect and keep all the nearby tiles watered. So, shouldn't take too long to implement this one. So, getting started with the implementation. I first just created a very quick placeholder model for the sprinkler. And then from that, I created the sprinkler item, and that allows you to place a sprinkler into your farm. Haven't had to program anything yet. That was all just adding assets to the game. Um, but now I'm going to program the sprinkler component to get this to start spraying water around. So, I've started programming the sprinkler component. I've given it a particle effect of course and then some very simple codes for iterating nearby tiles and keeping them watered. So in the game if I pop this sprinkler down here it'll start doing that particle effect and it will start watering these tiles. So that's a really basic sprinkler setup. Um I do just want to quickly try making this type of sprinkler though. You know these ones that rotate back and forth. I just think that might look a bit more interesting the movement than this one here. So, going to give that a quick go. So, just finished implementing this other type of sprinkler which oscillates back and forth which I think looks quite cool. But let me know what you think. Let me know which type of sprinkler you prefer. And next, I just want to quickly get this middle part of the actual sprinkler model to rotate as well, so that it's not just um the particle effect that rotates. So, the sprinklers have some moving parts now. For this one, the top spins around. And for this one, that middle bar now moves back and forth along with the particle effect. And I don't really have a full-blown animation system in my engine at the moment. So what I do instead is I split the entity into multiple parts. This is the entity file for one of the sprinklers. And it splits into the stand part and the rotator. And the rotator has its own transform. So that just allows me to apply the rotation to just one part of the model. And let me just quickly show you how this works in the code. So for the spinning sprinkler, it's a pretty simple matter of just increasing the rotation every frame and then that gets applied to the transform of the rotating part of the model. For the other type of sprinkler, the oscillating sprinkler, it's a little bit different. I create a triangle wave and then I use that to generate the angle. So that's going to make the angle go up and then down, up and then down. And again, that then just gets applied to the transform for the part of the model that rotates. So, these fully automated sprinklers are nice, but I think they're a little bit OP. I mean, it's unlimited water forever. You never have to water that bed again. So, I'd also like to have some cheaper sprinklers that you can get earlier in the game um that have the downside of having limited water. So, when they run out of water, like this one's about to, then the sprinkler stops sprinkling and you need to manually refill it. I know that's not how sprinklers work, but I need to have some sort of maintenance cost so that there's something for you to upgrade and so that there's a nice progression from having to water your crops manually, let's say every 5 minutes, to getting the cheap sprinkler, which needs refilling every 10 minutes, and then you can upgrade to a better sprinkler, which needs refilling every 25 minutes, and so on and so on. And then at the end, you get to the fully automated sprinkler. So, that's what I've just been working on this afternoon.

Segment 2 (05:00 - 07:00)

I've just been working on a few visual effects to notify the player when a sprinkler is running out of water. So, this sprinkler here And you can see it starts spluttering a bit. It's not a constant flow anymore. And that will get worse and worse until eventually the sprinkler just comes to a stop. And the way this works is I've got a noise function and I compare that with the water level in the sprinkler. And when the noise function goes above the water level, the sprinkler turns off. So when the sprinkler's full, obviously it never goes above the water level. So the sprinkler never turns off. But as the water level drops to below halfway, you can see it occasionally turns off. And the lower the water level drops, the more and more frequent those outages become. So, that's pretty much all I want to do with the sprinklers for now. And I think I'm actually going to end this video here and split the automation update into two dev logs. I know it makes this one a bit short, but I think it makes sense to have the next part of the automation in its own video because it's quite different from the sprinklers and it's also quite a lot. It would be quite a long video if I had them together. So, this is part one and part two of the devlog will be out in a week or so. I did just want to quickly mention how I see automation being part of the game cuz one thing I have to be careful of is it making the rest of the game play redundant. All of your manual tools. Um, I still want them to be useful. What I really want to avoid is something like this where you start the game just using manual tools and then you get to the point where you can afford automation and suddenly you can afford it everywhere and your entire farm is automated and it's like a whole different game and all of the stuff that came before. All of the upgrading of your manual tools suddenly becomes pointless. I'd definitely like to balance it more like this where you can get some automation quite early in the game, just on a few beds, maybe your most highmaintenance beds, and then as you progress through the game, you'll be able to afford more and more automation on a larger and larger part of your farm, but it's always just going to be part of your farm. And the rest of the beds, you're still going to be using your other tools. And yeah, in general, I just want the automation to complement the rest of the gameplay and not completely take it over. Anyway, we'll talk more about automation in the next devlog video. This was part one, and part two of the devlog will be out in a week or so. And there I'll be implementing some more exciting machines like the auto harvester and the auto planter.

Другие видео автора — ThinMatrix

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник