The iteration is going well with the tree. I have the bottom layer finished. I can now drag and drop low level employees into the tree and it grows, and if I take low level employees out, it clips the tree.
Dragging Oliver Torre into Olivia Escalona's team
As we can see, got a bug with Sophia Lamarche being duplicated. Deal with that later. Now we drag Sophia into Olivia Atencio's team
And voila, the tree grows, and adds more empty slots to drag in employees. If I drag them out, it does the reverse, and it's a pretty nice system. I think I have some memory leaks with delegates, but I'm exhausted with the corporate hierarchy tree and I want to move onto something else, solve some other problems, and write down some ideas when I return.
Some of the problems I have with the tree is that it doesn't do odd numbered sizes correctly. The display of the empty slots is funky for the manager side of the tree. The bottom layer is easy, I just reserve an empty slot in the tree for each team lead. But the team leads and managers are averaged over their employees and placed there...so where do I place a new manager slot? If I place it directly under the manager, what about if I have an odd number managers? As shown here:
So, maybe I can put them to the right or left of the tree? But how does a manager know what underling to place? I want infinite tiers, you can just keep growing...how would a manager know to spawn a manager slot instead of a team lead slot? That's not an easy solution. And then we have to detect where to place them anyways.
I have a few ideas, and I'm not exactly sure where to go yet. I could just have all managers not care, and don't put a name to the slot, and let the slot detect what was placed in it. If the user wants to pay an extra 100k salary for a team lead, they can hire a manager and throw them in. I could then have some kind of array that counts the amount of tiers, and places tiles in their tier sequentially.
Another idea that I'm leaning toward is to look at how actual corporations deal with layers of management. Oh look, they just make up unique titles for each layer. Which brings up a light bulb. I could generate random strings to create tiers of management. I could even theme them for different ERP sections, like Human Resources could be "Overseer of Unhappiness" and Sales could be "Bringer of Rain." Honestly maybe I could even do both of these ideas, and we could have some emergent comedy for the player to discover.
The other thing is that the tree is unwieldly and hard to view. I think I'm gonna have to collapse sections with pluses and minuses, which will allow me to put everything super compact and expand as you go. I don't even want to think about the algorithm to make that, but I will almost certainly be implementing something like that.
So for now, the low level employees works perfectly. I want to start iterating on Companys. The first thing I need to do is merge the data models so that the economy side works with this new display layer I have, using interfaces. That should take a day.
And then I made a realization. I'm actually pretty close to starting Alpha than I thought. I almost have a playable game. Once I implement different types of companies, add in different skills and goods and recipes, do some polish and art and sounds, I'm pretty damn close to an Alpha, and that makes me excited. I've been working on this for two months, and to have something tangible and ready to tune and iterate over is awesome.
So we got a couple months or so to get things rolling, but I'm pretty happy with the direction this is taking, and I'm making the game I want to make.
So where do we move on from here? There's really 3 types of companies in my mind...Service, Retail, and Manufacturer. I have retailers and manufacturers in, but I want services as well. I want the player to roleplay as a janitoral company that works the black market and pushes the competition out by force. IT Services for companies, entertainment services, massages and salons. Things that don't sell a tangible product.
We then have retailers, which sell goods. Hardware companies sell the things you need to build a company...You have to have so much steel and so much wood to build a building. You have manufacturers that take goods in and does more advanced recipes. Artisan restaurants that people can go to for better food boosts instead of the super market for groceries. It's not going to be incredibly detailed, but enough abstraction to find some fulfillment for people to roleplay in.
With that system in place, I have a playable game. I will just need to finetune the economy for money sinks and money creation...ability for agents to die and immigrate in. I doubt I'll let agents have babies...Simulate sort of a community, and people leave and immigrate too based on how well the economy does. After Alpha begins, I want to create a government that will support people with welfare and loans, money creation, create laws that legalize or make illegal your competitors goods. Pass laws that restrict free trade. I can have a judicial system so that companies can sue for breached contracts, or individuals and companies for committing fraud.
And of course we still need to create the fraud system, which is going to be iterated and fine tuned with the economy. When does an agent want to commit fraud? What motivates them to? How will they have the opportunity to? I need a system of internal controls in order to regulate this, and I need financial statements for companies for the player to peruse through and catch people stealing from them. And I need it to be fun and interesting and playtested.
So exciting stuff. Every day is one step closer to playing the game that I've always wanted to play.