Implement a finance class for a sim/tycoon game

Hey guys,

I’m currently creating an Airport sim game.

What is the best way to implement a financial system?

I’ve created a finance manager class that will keep track of money, loans etc. I have a time/date system in place already. I’ve create a finance actor component that can be attached to anything that I want to have a monthly cost/income. Now I just need to tie those together.

Should it be up to the actors that have a finance component to tell the finance manager, or the other way around? Should the finance manager track all objects that have a finance component?

Whats the ‘proper’ way that a typical sim/tycoon implements a financial system?

So I was looking at the source code for open RCT 2 to see how they go about it. So I was on the right track to create a finance manager class. It then has individual functions for collecting funds from different things that are relevant. So in my example, I might have a function call GetBuildingFinance and it loops through all the buildings and gets their monthly cost/income. This is kind of useful as the finance manager can easily keep track of where money is going/coming from.

Also, for keeping historic data to show in game graphs etc, and array for each thing can be kept. For example:

`MAX_MONTH_DATA = 12
int monthly_building_income [MAX_MONTH_DATA]
int monthly_building_expense…
int monthly_transport_income…