• Register
Post news Report RSS Project_BuildTutto Development Update 4

In this series of updates I'll document the development process of the game in detail, post timelapse videos of the work, and talk about some features...

Posted by on

Hello everyone!

Stefano here, and this is the fourth Project_BuildTutto Update! As always, lot of progress this weeks so here you have the timelapses:



Here is the changelog of this week:

Screen Shot 2017 11 24 at 9 50 3

Completed "Buy Resources" menu

Last week I wrote about the buy resource menu, but this week I was able to finish it including all the functionality and being able to finally buy some resources!

I reworked the layout of the menu because previous one didn't support multiple items order enough. Now you have a single menu with a scrollable list of items, and on the side of each one you have the controls to input how many of them you want to buy.

imgGifBuyResouceMenu

Roads and transportation trucks

With the buy resource menu in place I was able to add a road to place trucks that will carry all the items you buy. The trucks behavior right now is pretty simple:

  • You buy an item
  • A truck spawns with that item
  • The truck will stop at the designated offloading location
  • The game will create an order tree to let Guys take care of the offloading process
  • When the truck will be empty it will leave the map.

imgGifTruckOffloading
(There are a graphical bug that draws the item sprite two times but that will be solved in the next update)


Each truck will be able to carry 4 stacks of 500 items for a total maximum of 2000 items. If your order is greater than that there will be more than one trucks waiting in a queue.

NB: obviously both roads and trucks sprites are temporary, next week I should be able to work on that.

Door and Floor objects

Walls without doors are pretty much useless if you want to build buildings, so I finally added them. Now you are able to build a somewhat decent structure complete of all the comforts!

Doors currently automatically open up when a guy has to pass through with no slows down for him, but the plan is to add an open/close time based on the weight of the material you used to build the door.

imgGifDoor

Indoors and room mapping

Now that the game has both walls and doors, it was time to add the room mapping. This means that the game is able to recognize what tiles are part of a certain room and what tiles are outdoor or indoor.

To do that I used a floodfill algorithm on the 2D matrix used to track down all the solid objects currently in the game.

Screen Shot 2017 11 24 at 11 30


This feature right now has no real impact on the game, but it will be extremely useful when I'll have to implement the light system and the room designation system.

Upgraded blueprint crafting grid from 3x3 to 7x7

This was a minor change because thanks to some good planned code I only had to change the parameter passed to the constructor function and everything worked out correctly.

Screen Shot 2017 11 24 at 11 32


But with this change I plan to expand the complexity of the build patterns to allow the construction of bigger and more detailed object.

Screen Shot 2017 11 24 at 11 32 1

Cache-like system to optimize ghosts build conditions checking

I usually don't write about optimizations or fixes here but I'm particularly proud of this one so here you have it.

When I was testing the scene showed in the image below, I noticed that the controller object, that has to do all the checking to see if a ghost object can be built or not, was taking significant amount of processing time. Then I saw that for each ghost object I was calculating a lot of things because I had to fall back recursively to its building parts, and if I had no building parts available I also checked if I could build those.
There was clearly a lot of work to be done for each ghost, but the main problem was that if it wasn't able to build the first wall, it was useless to check for all the other walls, because those were exactly the same as the previous one.

Screen Shot 2017 11 24 at 11 33


So, I added a cache-like system to save all the items that I for sure can't build in that frame and it works approximately like this:

IMG 20171124 114442854


Keep in touch

If you are curious to see how things will go feel free click any of these links to join our community:
Discord Server: Discord.gg
YouTube channel for Timelapses: Youtube.com
Twitter: Twitter.com
Changelog: Docs.google.com

Post comment Comments
ziv_iz
ziv_iz - - 48 comments

looks really interesting, good luck mate

Reply Good karma Bad karma+1 vote
elkiwydev Author
elkiwydev - - 10 comments

Thanks!
Really appreciated!

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: