Last week I talked about how math is hard. It still is, but fortunately I didn't have to do much of it this week! As I mentioned last time, one of the key components of this kind of game is moving stuff around on conveyor belts. Everything depends on it, so it was pretty important to get it sorted out. And I'm happy to say that I have:
Yes, there is a small bug that I only discovered capturing this gif, which I immediately fixed. There are also some visual glitches from the gif compression. Please disregard ;)
The items simply change direction when they hit a corner tile. That is subject to change, depending on the form and size of the items that'll end up going onto the conveyors. I'm still trying to find a suitable art style for the items.
Anyway, this marks a little bit of a milestone for me. It's crazy that something seemingly simple requires so much time and code. The entire project is sitting at around 3,000 lines of code. And it's still extremely bare bones with no UI, no state management, nothing at all except rendering of a static tile map and a few sprites doing things. So these are just baby steps. If I didn't already know how much work it is to make games, I would have found new respect for game developers who keep hacking away at their games for months and even years just because they enjoy doing so. With no guarantee whatsoever that their work will be noticed by anyone at all. It's something to think about. Not just for me, but for anyone that plays games. It's easy to underestimate and underappreciate what lies beneath the production of a game. Next time you enjoy a game, take a moment to look up the developer on twitter (many indie devs hang out there) and tell them they did a good job.
Well, enough of that. What's next for this game? I have multiple options of course, but I think it'll be a good idea to start exploring the core loop. What exactly do I want the production lines to produce? How and why? Do I go with natural/real world elements (coal, iron, copper etc), fanatasy/made up elements, or maybe a hybrid? I foresee a lot of research and experimentation ahead of me.
Until next time - Happy coding!