Devlog #29 - Major Game design change, major TruckSystem update.

******Game design change-  instead of one city, all industry and everytihng in it, businesses and logistics,  and then spread to new cities in order to sell goods, or grow others, this major change involves actually having all 5 cities interlinked with eachother, because each city has different amount of starting products, and also different industries, so player now has to transport resources from one to another city, and vice versa. That is also the major updat for trucks, because now it can transport from different cities, not only within one.*******


Essentially, i thought about this a lot, it kept me thinking about it day and night, and it finally hit me. It was way better system, because, the first idea, you develop big company in a single city, eventually you have to spread to others. but, what happens with unlocked resources and items? should you then unlock same for each city, and build it from scratch in another city and wait months that city to grow? Also the cities have had the same products, each city same products. Bigger city would mean that for a product like bread which has a huge market, one would need huge stores only to supply it. - that is why i changed this. So now, all is interconnected, now the idea is to immediatly develop chains from beetween different cities, vbecuase the industries are already there. Now, you can still choose the route to work in one city, but , the logistics and everything is already inbetween cities.  ( it might not seem so major, but for my mind its huge , because of the overall gameplay and later game) 

TruckSystem, - now we introduced as we previously only had sourceLocationID / destinationLocationID, we now have sourceCityId, and locationCityID , which also has to be choosen before the truck can leave.

Major PROBLEM: One of the main issues and big problem with this was because of the turn based processing thhrough cities and all systems in a single turn. so basically it woudl go through one city, do evertything, then continue to next and such. but because it is using the ref constantly, if it is within the single turn, the reference values would be taken from the database in Ram, instead of being taken the local ref. That was bug i had so much annoyance with. In other words, lets say it runs through 5 cities, and first done, second done, third is going but instead of the current edits within the city, like StoreSystem, MarketSystem etc.. it doesnt forward the ref version of the edited city, but rather it takes the old version of the saved city fromt he last turn. So trhe values that the TruckSystem changes are wrong, so it takes wrong, and it delivers wrong, after which even bigger issue is that the data overwrites over the ref version which basically removes all that was calculated and done before in that city, and essentially breaks the economy hah.

So tis was the solution:




Basically, it compares in the given city turn for(int c =0;c<allcities) , and it says if the currentCity is the same as sourceLocationCity , then use the ref version, else, use the old already processed city in the list, or previous version if the city is 4th, for example, and we are now discussing the 3rd.



Very fun stuff!!!!

thank you! 


















Comments