A Week of Indie Game Dev – Bulldozing!

This week I’ve added a number of small features
to Lumbermill – rather than focusing on just one big feature. These will make working on the game much easier,
and also gets the game ready for the next big feature I’ll be working on. Let me know in the comments if you have any
ideas, suggestions or feedback – it’s really helpful, and gives me an idea of what people
think so far. Anyway. I began by adding a button to the
toolbar which I’ll be using a lot in development. It regenerates the world with one click, allowing
me to quickly see how the layout can vary from game to game. This will be particularly useful later on
when I flesh out the forest generator a bit more. It won’t be visible to players though, as
it wouldn’t make sense for the player to regenerate the forest mid-game, deleting all their progress! That was quick to add, so I got to work on
another feature I’ve been meaning to add for a while. Bulldozing. Having added the button to the toolbar, alongside
the regenerate button – I coded the bulldoze tool to highlight the current object that
is to be bulldozed in red, and simply destroying it when the object is clicked. Some things can’t be bulldozed, such as rivers,
the trading house, and the lumbermill building, but otherwise most other things can – including
trees. Buildings that have cost money to construct,
will return half of their value back to the player’s bank. This will serve as a quick way to regain funds
in the game if they’re running low. A major part of the game will be how the forest
is limited to the player at first, before they buy up land to build on. I decided next, I needed to implement the
boundary fence which will dictate to the player the area of land they currently own. At first I tested this with a plain white
square, where all the area within that square is represented as ‘owned’ in the code. I tested that with areas of varying size,
before I commited to drawing sprites. I drew 8 fence pieces in total, one for each
possible angle at which a fence might face. When I put the fence in the game, I discovered
that for some reason my code was only placing some fences. and when I fixed that, I discovered that none
of the corners linked up. This was caused by me accidentally switching
the north and south sprites in the code. and as you can see here – when I select the
fence that isn’t joined correctly in unity – it is stated as south, when it should be
north. I fixed that by just switching north and south
over in the code. The game basically just puts a fence wherever
there’s a boundary between owned, and unowned land, and then calculates the direction of
the fence based on which neighbours are owned. The next bug that came up, was that I was
able to place buildings outside of the boundary, despite the indicators showing red. I also discovered a similar problem, where
lumberjacks could straight up walk through the fences. I fixed the first by adding an extra check
to the placer tool, and the lumberjack issue was fixed by making sure all trees are checked
to be within the owned area before the lumberjack can chop it down. As you can see here, you can’t build anything
outside the boundary now – and the employees actually respect property laws! Anyway, that’s all for this week – remember
to subscribe, like the video, or leave a comment and tell me what you think – see you next

3 comments on “A Week of Indie Game Dev – Bulldozing!”

  1. Langelund says:

    Do you think this game is going to come on steam?

  2. Burtonmarc & Axasts says:

    Hey! Been following your progress so far! Keep the good work, it's looking realy good so far 😀

  3. SheepDog123 says:

    Ooh, you should make underground conveyor belts!

Leave a Reply

Your email address will not be published. Required fields are marked *