Devlog #30-35 - Major update ****BankingSystem, FinanceSystem, Snapshots for charts, MoneyEvent... UI bugs, dev
**** Major update, Ui, bankingSystem, FinanceSystem,Snapshots etc. fun times!! ****
This was something I worked on in parallel to other systems, and now it finally happened becuase the structure and Ui was ready for it. Before it was just a written code and idea.
basically , the FinanceSystem is a system that counts all the MoneyEvents during the single turn. So for example, all the revenue goes to addMoney(amount, MoneyEventType..) and all the expenses go to the( from the) removeMoney(amount, MoneyEventType). The FinanceSystem basically calculates and adds each of those revenue or expenses into 2 float values, and in the end it shows basically in the accounting tab. Later the taxes will be aded, and system modified slightly, but for now this is how it works.
For example :
Anyhow, so now i applied this same system of snapshots into other values that we need to be memorised. ( not everything was implemented yet) , but for example, priceHistory per market per city, snapshot, city growth snapshot, THIS IS MAJOR litteraly a breakthrough... And it solved mostly everything regardless to charts and history.
So in essence, after each turn, the calculated value of all revenue and expenses is calculated and memorized in a snapshot and added to the list. amazing right?
________________________________________________________________________
MoneyEvent not sure if it was mentioned before, but, now we have the actual use for it, accounting ledger for 1, and for second we are using it to categorize expenses vs income. So basically MoneyEvent is Enum with all the possible moneyincome/expense values, like, storeSale, or StoreUpkeep, or Truckupkee, fuel etc.. Then when we deduct the money or add we say, addMOney(amount , MoneyType.Truckfuel, name:... description.. ) and then we have that in the account ledger, which basically registers each transaction and shows it on the list.
Simple sistem, yet it was somewhat frustarting, but good thing it applies to the existing strucutre. so adding new game mechanics comes easier.
Banking System!!! Maybe one of my favourite things to design
So basically we need loans, for players to get loans if the want to exapdn faster. now the bankingSystem is basic at the moment but it serves the purpose, and hopefully will be enough for now, for mvp. In essence , i did research about credits and loans, and some were fairly complex , while others were easier, but , i wanted something to do that i will clearly understand and it will be very easy to undersatnd how it works in game, and how it spossible to pay it off earlier if necessary.
So i made the system that works by simply calculating the amount of the loan with variable rate which would depend upon the time of paying back ( turns to payback(days)). In other words, you choose 50 days to pay off, it counts the interest, then breaks it down into equal parts including the interest, and then each day the daily amount is removed. Thats it! simple.
what will be added later, is
-How the maximum amount of loan is calculated
-Different type of lenders ( which was already added, only i never actually used it, draft)
Thank you!!

Comments
Post a Comment