Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1327955 Posts in 60042 Topics- by 51313 Members - Latest Member: kretz32

January 18, 2018, 11:07:29 pm

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsProject_BuildTutto: a deep resource management building and crafting game.
Pages: [1]
Print
Author Topic: Project_BuildTutto: a deep resource management building and crafting game.  (Read 764 times)
ElkiwyDev
Level 0
**


View Profile
« on: November 03, 2017, 06:51:15 am »

Hello everyone!
I'm Stefano, and I recently graduated in Computer Science, and with that done I can finally work seriously on my project, which is temporary called "Project_BuildTutto".

The idea for the game
Project_BuildTutto is a managing-crafting-simulating-mindmelting game where you have to manage a company that builds buildings. To build those buildings first you have to build all the things: walls, cables, generators, furniture, facilities, and so on. All these things can be built however the players wants because he will start the game with only raw materials as resource and, through a blueprint system, he will have to invent all the items he will need.
By "however the player wants" I mean that, for example, to build a wall he first have to build bricks, and to build those bricks he can use whatever raw material he want (raw iron will make iron brick so he will make an iron wall, but raw paper will make paper bricks and he will make a paper wall which will collapse on itself if he build stuff over it!). With this logic the player would be also able to make engines with cloth which will catch fire as soon as he starts it up. Or maybe, if he is really rich, he could even make gold engines which will be a bit more resistant but also a lot heavier.
Once the player invents all the things he need through this blueprint process he will be able to set orders to his employees to build stuff in his factory. This location will be a level that you build yourself with your things, and it will be the production site where you build all the necessary items to transfer to the various location where the player will be asked to build the right buildings.
The goal of the game will be to satisfy all the requests for buildings and optimize their revenue that will be shared with the player.
The plan for it is to have a finite amount of levels (Buildings to build) with specific requirements (example: build a factory with 10 employee that produces 10 computers a day) and once the player finishes those there will be a procedural system to give an infinite amount of levels to the player at increasing complexity.

The development process
Right now the project is in a super early stage and there is no game right now. I'm still building the basic structure of it, but I decided to start early the devlog here to be able to document every part of the development and let all the people interested in it know what I'm doing and how the project is growing step by step.

Enough talk, show me what you have now.
Right, here is a screenshot of it:


Not really exciting, huh? Well, as I said I'm focussing this early development on the actual basic mechanics so maybe a gif will explain better what the game right now *can* do:


   •   In the gif you can see how the working guy can recognize that there is an order that can be completed (Building a wall object (the green thing)). To build a wall he needs 4 blocks, but there are only 2 available. So he checks if he can build the missing two blocks and he find that there a 8 raw resources available, so he build the two blocks and then when he has 4 blocks he is able to build the wall. Right now it's a basic AI but it already supports recursive building, checking for materials available, and also multiple guy working on the same job without creating a mess.
   •   Other than that the game also has the blueprint system and a menu to place the discovered blocks:


   •   Last but not least I also implemented serialization to have basic saving and loading.

What's the plan now?
The plan is to work full time on it and record myself working everytime I can, so everyday I should be able to post on Youtube a timelapse video (first one is already available here https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw ) showing roughly the progress and with a public changelog made with Google Spreadsheet anyone can see exactly what I did that day. This should help others keep track of the project as well as helping me working seriously and clean.

Contacts
So, if you are curious to see how things will go feel free click any of these links:
Discord Server: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
« Last Edit: January 14, 2018, 02:44:53 am by ElkiwyDev » Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #1 on: November 10, 2017, 06:41:11 am »

Hello everyone!
Stefano here, it's been a great working week for Project_BuildTutto and I'm so much excited with how it is growing quickly that I can't wait to share the progress I made!
First of all here you can find Monday, Tuesday, Wednesday, and Thursday timelapse videos. I still want to improve them and I would like to add some background music and some caption to explain to the viewer what is watching, hopefully I'll be able to do that for the future videos.


Here you can also see the changelog relative to those days in the timelapses:



So, let's talk a bit more in depth of the major changes this week:


Job sharing between guys
This was a feature already in the project the past week but on Monday I managed to improve it and make it more reliable. The jobs/orders are a crucial point to the game and I took particular care in this part because I wanted to make that structure robust. The jobs are created from a controller object (Level) and are organized in a tree-like graph, where the root of the tree is the final order and each node child is an order that have to be completed before taking care of that node parent. I did it this way because Guys can then ask the controller object to get a random leaf(a node without any child) from the tree and begin to execute it without stealing jobs to other guys or without taking an order that still has some work to be done before completing it.


Item stacking
On Monday I also managed to fit in the implementation of proper item stacking. Previously if you tried to place an object on the same tile it would have simply create a new instance overlapping the previous one, but this method was crazy ugly and totally inefficient. Now if you try to place an item in a tile where there is already another item with the same ID the object there, first it'll add to his internal stack counter one and then it'll delete the new one. This way if you have a stack of 1000 item you will still have one single object with a stack value of 1000, instead of 1000 objects with 1 item each. This approach complicated few things a little bit, like object reservation and the creation of the orders tree, but now it should be all working correctly again.


Weights and properties to objects with .CSV and Google Spreadsheet

The main idea of the game is that you will be able to build everything starting always from basic raw resources. So these resources need to have tons of properties and detail to define their behavior. So on Tuesday I added a pretty handy system to manage all this information and fill it in the game. In fact I made a sheet on Google Spreadsheet where I'll store a table with all this data, then I'll export this table as a commas-separated-value file (.csv) and feed this file in the game through a function that will parse the file and create a 2D vector of all this information. Then I'll use these 2D vector to create a map of all this information to be able to quickly and simply access to any information I need by simply asking the game controller to get the value of the map at *object_material* + "_" + *property_I_want* (ex: "iron_weight").


|
V

|
V

Guy's ability to change the orders tree to simplify or improve efficiency of orders
With the weights and item stacking done, I wanted to limit the maximum lifting weight to guys to 50kg. So now if there is an order to get 8 pieces of iron (10kg each) the guy will not be able to grab them all, but instead will callback the controller object in order to change the build tree and make it easier for him. The build tree will split the nodes relative to that job creating 1 new grab node and 1 new place order. So instead of grab8 and place8 there will be grab5, place5, then grab3 and place3. In this way the Guy will be able to complete the job.




Another change similar to this one is the Node joining. Basically it's the opposite of the previous one. <br />In this case there is a Guy (that can lift 50kg) and 4 grab orders of one piece of iron each in different location of the grid. Before, the guy would take one, place one, take other one, place that, etc... But now with node joining the guy can recognize that grabbing a single piece of iron is an easy job for him and it could take more, so he callback again the controller object asking if there are other grab orders similar to the one he is doing now. In this case the controller will modify the tree joining nodes so the guy can then grab all the resource he needs one after the other, stacking them in the object he already have, and then place all 4 piece in a single place order.



Guys helping each other to lift heavy weights
Another cool features made possible with weights is the ability from the guy to call help to lift something. For example if there is a single item that weights 70kg, and this item need to be grabbed and placed somewhere in the map, that job cannot be completed from a single guy. So when a Guy take that order, he recognize that the item is too heavy for him, and he search if there is another guy nearby. If there is another guy, he will call him to help and they will both go at the item location and grab it together. This feature supports up to 5 guys helping each other to lift a 250kg object.



Ability to choose which save file to load in-game
Lastly, I changed the "load" button. Before it was loading the last savefile done, now it will prompt the user a list of all the save file he find in the "saves" directory of the game giving the user the power of choosing which file to load. This features come particularly useful in this state of the development since there are many "scenes" that need to be tested any time I add a new feature that could break them.


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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #2 on: November 17, 2017, 08:14:08 am »

Hello everyone!
Stefano here with the third Project_BuildTutto update!
Again, a lot of new features this week, but first, here are this week's timelapse videos (I forgot to record monday's video Sad )


Here is the changelog of this week:


Added Chest object and "store item" job
Having multiple resource objects all over the floor was a bit ugly and I wanted to have a rough storage system at this stage of the game. In the final game there will be much more complex storages, but for now a chest was good enough.
With the new chest object I also added the "store item" order type for guys, so if they are not building anything they will clean up the floor and store items around in the nearest not full chest on the map. When an object is stored inside the chest, guys will be able to take that item off the chest and use it to build something when needed.



I also made the chest's sprites but I'll add them in the game next week:


New grass/dirt terrain
The game now finally have a background! Bye bye old black void and hello grass and dirt!


Some tiles are still a bit rough and need some polish but I already like this first iteration of the tileset very much.
At the moment the terrain has no interaction with guys and items in the game but I'm planning to integrate it in the game with few mechanics.


Coding all 47 tiles autotiling has been a little nightmare but at the end I managed to make it work decently after some failures.

Added GUI TextBoxes and NumberBoxes
The terrain took me much more time than what I'd like to admit, but on the other hand TextBoxes and NumberBoxes took me way less time than what I thought when I planned out this feature.
The GUI system is custom made, and this means that I wrote it entirely from scratch and I would like to talk about it deeply on how it works but I would make this article too long, instead I'll do an article only on that in the future.
Having a custom GUI also means that I have to write all the pieces that make up the GUI, like buttons, text, sliders, images, scrollable lists, textboxes, etc... This week I added the TextBoxes because I wanted to give the user the possibility to choose a name for the save file, and that required that the user should be able to type somewhere in the game.


"Buy resources" menu
This feature is a leap forward in the development, since buying raw resources is a key element to progress in the game. This menu will give the player an interface where he can select which raw resource to buy.


After he select which one he wants to buy the game will prompt the player with another menu asking him how many resource wants.


This sub menu has been possible to make thanks to the number boxes (variant of the text boxes). Thanks to the number boxes I was also able to make both the user input type the exact number he wants or press the buttons to increment/decrement the current quantity selected.


NB: This features is only about *the buy resources menu*, I still have to code the actual action of buying resource and the delivering of those resources in the game to the player.

Box selection
Another pretty cool thing is the box selection. First the player was able to select one tile and do some debug action with that single object like destroying it or installing it. Now he can do the same thing but with multiple objects instead of one by one! This feature will be more useful later on in the development when the player will have the chance to make multiple orders for the guys or selecting multiple objects to compare them.


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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #3 on: November 24, 2017, 05:46:23 am »

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:


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.



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.


(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.



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.


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.


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


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.


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:



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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #4 on: December 01, 2017, 05:29:24 am »

Hello everyone!
Stefano here, and welcome to the fifth Project_BuildTutto Update!
This week's changes might seems fewer than the past weeks, but that's because I had to change a lot of stuff in the code to add the complexity level required by the introduction of the furnace object to give me better times when I'll need to add other "processing" objects. So here you have the videos and the changelog so then we can dive into the major changes!



Fire related properties to resources
This week's work started with a lot of researching and a lot of wikipedia. In fact I had to add to every resource some properties related to fire like:
   -melting temperature, to know how much heat a furnace should produce to melt a certain material
   -ignition temperature, to know how resistant can be a wood wall if it's near a source of heat
   -flame temperature, to know how much heat a furnace can produce when at work
   -burnup time, to know for how much a furnace can burn a certain material to produce heat


All this information at the moment are somewhat real but with some changes to make the game playable, you can see all this information in the third sheet in the Google spreadsheet changelog.

Furnace and Ingots objects
With all these new properties to play around I started to code the first material processing tool of the game, the classic furnace object. This will be useful to produce a lot of cool stuff in the game, but for now it will just produce basic ingots.
This took a lot of time to code completly because it required many changes to the code structure of guy's orders and item recipes.

I had to change the nodes of the order trees


and I also had to change the recipes of the items


These two changes required a lot of changes here and there in the code since those were a fundamental structure of the whole game.

So the final guy workflow when building something with the furnace will be something like this:




Changes to blueprint menu
The introduction of the new processing tool required some changes in the blueprint menu too because I needed to add something to tell to the system where the input items should be processed.
This problem was solved by introducing to my custom GUI system the "radio buttons" object type. Radio buttons are a famous gui element that consist in a list of buttons where you can only choose one of them at the time. This kind of object was perfect for my problem because it allowed me to add this toggle below the crafting grid and add a button for every processing tool I have, so in this way the system will always check what tool is currently selected and react according to it.


Minor quality of life changes
This week I had time to add some minor code to make the life of the player a little bit easier when doing certain type of things. For example I added the possibility to hold the click when placing a ghost and drag the mouse around to place multiple ghosts easier.


I added something similar to the blueprint menu too so you can drag to place multiple items.


And some other minor changes like the ability to delete ghosts and debug items autoinstallation.

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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #5 on: December 08, 2017, 05:51:47 am »

Hello everyone!
Stefano here with a brand new update!
There is a bunch of new cool stuff, new sprites, and even new python scripts!
So let me throw at you the timelapse videos and the changelog first, so we can let's dive in the changes right after!





New sprites
The first thing that we can see in this week's update is that some sprites have been changed and some have been added.
In the specific I changed for the third time already the terrain tiles (still not satisfied with that) and the road sprites (previously were only placeholders anyway). The camion sprite has been added and I'm very happy about how it looks. The furnace now has a sprite too, mixed feelings about that. This week I also added a lot of new objects and few more material types so I added sprites even for those.
Lastly I added sprites to the gui windows too, and I'm very very happy how those looks because are simple but effective.







Python scripts
The art side of the game keeps getting more and more complex to manage. In fact every time I add a new object I have to draw every materials variants for it, and everytime I add a new material I have to draw all the objects with that material to keep everything updated. So, I'm still thinking a way to automate a little the creation process of that thing, but for now that is all manual work. What I did automate is the exporting process to all the different sprite to load into the game.

I work with Krita and Gimp to create the sprites for the game and previously I drawed everything in a generic .kra file (like a .psd) with different layers, and when I needed to export that drawing I had to crop the image into a 64x64 containing that sprite, export as a .png, name it as the resource it represent, undo the cropping, and repeat that process for every sprite. That work was so tedious and slow that forced me to learn python and create a script capable of speed up that thing... And that surprisingly was super easy!

Now what I have is a .kra file with many layers and layer groups. Each layer group hold a item type (like block, wall, furnace, ecc) and in each group there are different layers: one for the black borders of the item(named "b"), one for the shading of that item(named "s"), and N layers one for every material in the game(named "ci" for iron, "cs" for sand, "cc" for copper, etc...).


I then save that file as a .psd and the python script parse all that and create all the different images by saving for each group the border and shade layer, merging them together, and merge that with the different materials layer. In this way the script can generate and save automatically all the images with the correct names saving me a lot of time.


Other than that I also created a python script to speed up the terrain making process by creating 1 image made of 48 different tiles starting from just one .psd file with 4 layers.



New resources, processing machines, and objects

Two new materials are now available: copper and sand. I added specifically this two materials because I wanted to prepare the road to have the first complex item which is a lamp, made with a light bulb, which is made by copper filaments and glass.


To be able to create those filaments the guys will have to go through a pretty complex processing path:


All those new items and machines as been added this week in the game.


Special blueprints
To be able to create glass material the player will have to create a special blueprint that can be discovered by placing raw sand in a furnace. In this way the player will be able to choose between the standard output of that blueprint or the special one which consist in obtaining raw glass.


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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #6 on: December 15, 2017, 01:58:15 am »

Hello everyone!
Stefano here, writing about yet another update!
Not too much going on this week on the "new features" aspect of the development but a lot of stuff was changed behind the scenes. In fact I took a whole week to deeply test and debug all the features that were added in the past weeks to be sure enough that the game until now is stable. I didn't wanted to record boring debugging session because I thought that the finally timelapse would have been too messy and not very comprehensible, this is why I only uploaded one art timelapse this week and here it is:





As always, here is the changelog too:



Complete testing and debugging
This is what took the major part of this week. Every features is tested when it's added to the game, but even the smallest change somewhere in the code could lead to a crash somewhere else where you don't expect that, so it's always a good thing to stop the development process for a bit and just focus on testing and make sure that everything is ok before making it even more complex and messy.

Here is the main test I ran (obviously they were not all "ok" in the first run of the test, I marked them "ok" only after I fixed them):


I also took advantage of the save system through the serialization of the game objects to take snapshots of the states of the game objects in various situation, and then I compared those snapshots in a diff checking program to see if there were unexpected differences. These were the test I did with this method:



Improved Save and Load functions
One thing that it has been a bit of a pain to deal with is the save system. Before it worked all nice and correctly when the scene was static, but it didn't support scenes where guys were working on something because orders serialization was not implemented yet.
Now after a bit of spaghetti code later it all work nicely even with complex scenes and guys working on multiple things.



New Sprites
Even if it was debugging week I still had a lot of images to do since last week I added many new objects to the game. So I took some time to do the continuous caster sprite, the roller machine sprite, and the rod sprite. I also finally decided that the majority of the game's sprites will be full top down (except some few special sprites like guys) because I like that style more, so I may have to redo some sprite to fit that style better.



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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #7 on: December 22, 2017, 06:58:34 am »

Hello everyone!
Stefano here with another update!
This week was a rough one for me, Tuesday I was very sick with a lot of messy things that I would like to not talk about it. Anyway, even if on that day I didn't even turned on the PC, Monday has been a very productive day so it compensated a bit.
I recorded only Monday and Wednesday so here you have the videos:








And here is the changelog:



Electrical Grid: Generators and Cables
So, the goal for this week was to make a stable and decently working electrical grid to be able to manage all the machines that will depend on electricity. To do this there is a new "management object" called ElectricGrid. This object will be the coordinator of a single connected grid of electrical components (There could be more than one if there are two grids that are not connected with each other).
The ElectricGrid has 3 types of objects:
-Sources: objects like generators which will generate electricity and will input that into the electric grid
-Cables: objects that will provide electricity to any component connected to them
-Machines: objects that will consume electricity to work.


ElectricGrid are capable to merge with another grid to create a single bigger grid, but also split into different grids if the player removes an object that serve as a bridge between two part of the grid.




New sprites
The day after the sickness I was able to draw some sprites while I was feeling better, so I drew the generators, plates, and fineplates sprites. I also tried to draw some decent cables sprites but after realizing that I had to make 16 different sprites for each materials I opted to draw some placeholders and focus on the implementation of those sprites.



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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing
Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
ElkiwyDev
Level 0
**


View Profile
« Reply #8 on: January 12, 2018, 06:08:57 am »

Hello everyone!

Stefano here. Man,it's been a while since the last update! Many things has changed and many new things are appeared, so let's dive in in the changelog straightaway!

But before that, here is all the timelapse videos of this week:



During the holidays I didn't record myself coding because I didn't worked regularly, that's way most of that work isn't recorded.

Fully automated electric workflow with electric machines
In the previous update I wrote about electric cables and generator, but this time those things actually are useful in the game, because now the game has machine that suck all that juicy electricity to work! Machines like the Roller and the Die Drawer now needs electricity to work, if they do not have electricity the guy will try to work on those but then it will get stuck and abandon that job until the machine will have electricity (more on stuck jobs later). Also, the process of working on an electric machine is fully automated if you plan out the right setup, because guys are now able to check if a generator is fully charged or not, if it could feed more electricity in a grid but it lacks of fuel a guy will be scheduled to grab some fuel and feed it to the machine in order to maintain a high electric charge in the grid.


Electric Conductivity of materials
Raw materials have now the Electrical conductivity property. Based on that electric components made of different materials will act differently and will have different stats. For example a cable made of iron will have a maximum capacity of 100 electric units and will output at a rate of 1 unit per frame, while a cable made of copper (which has a much higher electrical capacity) will be able to store up to 700 units and output at a rate of 7 units per frame. This will have an impact on how the game work because for example 1 unit per frame isn't enough to feed a roller machine which need an input of 3 units per frame while it works, so the machine will work slowly if connected to an iron cable instead of a copper one. PS:Making an electrical cable with wood isn't a great idea since it has no electrical conductivity, but you can still do it if you really want it


Stuck jobs recognition
Let's keep making the order's data structure more and more complex! Yay! Since the game is growing I keep finding faults while I test the game which leads to improvement on the main structures of the game in order to allow me to fix all that crap. This week I had to face the problem that my previous structure didn't support the fact that sometimes a job can't be done straightaway but it needs to wait for another job to be done.


To fix that I had to pair to each order tree a number which will tell to the system if that tree is currently stuck or not, and if it's stuck the system can check why it's stuck (based on which number it reads) and try to see if that could be unstuck now or if it has to remain stuck a bit more time.
The system now support the following condition:
    -NOT STUCK: the tree is not stuck
    -STUCK_NOELECTRICITY: the tree has one or more machine that doesn't have electricity to work.
        -Is triggered when a guy tries to work on a machine and see that doesn't work.
       -Is resolved when all the machines in the tree has more than a threshold of electricity stored.
   -STUCK_MACHINEBUSY: the tree has one or more machine currently busy.
       -Is triggered before a guy tries to grab an item to place it in a machine which is busy.
       -Is resolved when all the machines in the tree are not busy (it also check if there is more than one machine to do the job and tries to replace the old busy machine with another machine which is not busy)


Lights renderer and subtle effects
Since this week was the first week after the holidays I wanted it to be a good one and I took some time to add some spice to the game with few small graphical effects. The first obvious one is the presence of a light system to manage lights emitted from lamps and other future objects. This system will be remade partially next week because now it works with tiles but I don't like the results and it's not much scalable to bigger lights, so next week I'll remade it with raycasting to have a nicer effect.

(Yellow = light source, Red = wall object, White = lit area, Black = dark area)

Light will depend on the time in-game (day/night cycle will come next) and if a current spot is indoor or not to force players to take particular care of the lights inside their factories.
A more subtle light effect is a moving fog layer before every object in the game. It's a very soft effect but in my opinion it makes the scene a little bit more interesting graphically and reduces the "identical tiles" effects when a lot of tiles are repeated.


New Sprites
As always, a lot of new objects in the game and a lot of new sprites are done.
-Cables have their own non-placeholder sprites.
-Walls are now tilable with nearby walls just like cables.
-DieDrawer, wires, filaments, lightbulb, lamps have now their sprite
-Furnace sprites as been remade to fit the current "all the machines have full top down view" style


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: https://discord.gg/mSCn4BU
YouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Twitter: https://twitter.com/ElkiwyDev
Changelog: https://docs.google.com/spreadsheets/d/1kVIHUpf0jC8NFg5rxJF_hiWDkw-0VWnMI-Au4op0MiQ/edit?usp=sharing

Logged

Follow me and Project_BuildTutto by clicking any of these links: Discord Server: https://discord.gg/mSCn4BUYouTube channel for Timelapses: https://www.youtube.com/channel/UC2l3kcw6wUn4Z1-cr5UMLMw
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic