What is the best way to make a tycoon?

Hi, I am BrahGames. I have made a lot of tycoons over the years. But I always wondered, what is the best method to make them? That is why I am making this open thread to get feedback from other developers and to have a open discussion about this topic.

First, let’s talk about the builds,

1. Should you have cloned the builds on the server with only that as the reference?

I used this method where I would store the whole build on the server, so there were no physical parts in replicatedStorage or the workspace, if the tycoon was empty.

2. You should not clone at all, you should constantly change the build’s Parent to replicatedStorage to wait for the player to buy that build? (and then put it in workspace)

I have also tried this, and it worked out completely fine

How do you balance a tycoon’s economy?

Personally, I tried doing with math, so it would calculate it for me. But I could not get it to be accurate. So instead, I used a stopwatch on my phone and set a timer to 1 minute. I tried to make every button as close to 1 minute as possible, so between every buy button, you would need to wait 1 minute.

How should I hand out the in-game money?

For this I found two solutions,

First one is to depend on nothing but the server, you simply let the droppers drop their cash and then you wait for it to hit the collector part, all of that will be done on the server, which is the most secure way, however an exploiter still has the option to manipulate the cash’s CFrame, so it instantly goes to the collector.

Then we have the spawning of the cash parts, you only want the player to be able to see his own cash parts, so to achieve that you could put a childAdded eventlistener into the other tycoons, that will destroy the other tycoon players cash parts (to increase performance). This obviously needs to be done on the client.

The second method is surprisingly used in a lot of tycoons, and I always wanted to prevent this method, but it also makes sense why people do it. Instead of spawning any parts on the server, you spawn them on the client and only spawn the parts on your tycoon plot. The way you would gain the money would be by firing a remote, saying to the server “Hey give me money”. Now you may think it is very exploitable, and you are right it is. So, to prevent exploiters to constantly fire the remote, you let the server check how much money they are allowed to generate per minute.

So why does a lot of developers use an unsecure way to hand out in-game money?

The developer wants to make their tycoon as performant as possible, so instead of having ChildAdded eventlisteners for every tycoon plot, they just spawn the cash part on the client, and that is a lot of performance saved by doing this.

Disclaimer
This is my own personal experience and it may not be the most optimized ways to do it, which is why I made this topic, to get ideas on how to make the best possible tycoon performant wise and in terms on exploitablity.

2 Likes

everything you said is a solution XD, so thats why nobody is replying

4 Likes

Fair point, I just wanted some experience from other tycoon devs, I guess they are not here on devforum ;-(

because tycooners hates devforum

but why you change parent because if you do the other player tycoon would break and not work
Even if its because of performance, you should still use :clone()

Not really, but you are right that :Clone on the server is more performant

and can you send your tycoon game i would like to play it

I think the safest way to create a tycoon is to calculate the time of movement of the part from the dropper to the collector part (in a server script). We do the same with the cost of the part, we just take its initial cost and multiply it by total boost (total boost can be calculated by collecting boost all conveyor belt improvers).

As a result, it turns out that as soon as the dropper spawns the part locally, its final cost and travel time are immediately calculated on the server. And the hacker will not be able to do anything, because there is nothing on the local server that he could change

This will also help the server not to be heavily loaded with a large number of desks, because in fact it just waits as long as the parts travel from point A to point B.