Coin farming System in simulators?

Very popular games like pet simulator/blob simulator use a coin farming system Ex:

My question here is how do they do this? Are they firing a remote on the client or is it all server sided? I just don’t understand how a system like that works.

2 Likes

Most of the simulators I’ve worked with/played are server sided.

2 Likes

This ask is very generic. I’d advise rewriting it with a more clear explanation of your intended goal.

Are you looking to make an interact-able object that slowly generates a stored value and can be claimed at any time? Is the object a randomly spawned item that you collect for coins? To get effective help you should be explicit in what you are asking.

Also please note that this is not a “get free scripts” sub-forum. What solutions have you tried? Can you post any scripting snippets you’ve worked on for this? Is it just a general “What’s the idea behind the algorithm?”

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Based off what you stated: All coin granting should be handled on the server, and user-input validated. For example, if a player has to be near the chest and click and hold for a moment to get coins the client should use Remote objects to pass information about the player starting and stopping the click (and only do so when the player is close enough). The server should then listen for that information and also check the player is close enough (in-case someone’s client is firing the event when not actually close enough).

Those are just general guidelines to help point in the right direction!

4 Likes

Both.

  1. Client tells followers to begin ‘farming’ the chest/coins. Since the client has network ownership, their position automatically replicates to the sever.
  2. Once client determines the farming is done, fire RemoteEvent telling server.
  3. Server validates the farming based on time since last farm completion, etc, and processes the reward/cleans up the chest/coins.
1 Like

I think the server actually handles this, and fires the client. That’s how multiple people can mine the same item, depends on how OP wants players to interact with it.

Could you explain in more depth?

They are usually both client and server-sided.

The client side is usually used to fire an event when the mouse clicked on an object selected to farm (ex. a chest) which then fires a remote event to the server, telling it to start farming the chest that was clicked by the client.

The amount of coins farmed is held on the server but the client checks how much coins are left in the chest to display the amount. The server also handles the removal of the chest from the workspace once it does not hold any more coins.

Client clicks object > Client checks things like how much left to mine and etc… > Client decides which pet should handle it > Client fires server > Server verifies the object, its magnitude to the player, if the player can mine it, how much there is left to mine, if the player has the pet they are claiming otherwise check available pets or choose one to mine it > start mining it > fire the client > client loop updates themself on the health (whats left to mine) of the object > server tells client its done and makes the pet available for the next thing > client does cool animation to show its done and stops the loop, then also makes the pet available so the server and client are together on their understanding

Edit: this seems complicated but its probably the best way to do all of your checks, and only have the server do what it absolutely has to. The client should always do the exact same checks as the server, no need to fire the server if it doesn’t meet up to the requirements, and you can use a IntValue for the health of the object as that replicates for the number and goes to pretty extreme amounts. Just be aware its an Integer so no decimals or anything of the sort.

1 Like

Client sided for the click then it fires to the server to then tell it to take away it’s “health” from the coin pile then fires to the client and checks username and adds the certain amount. I am pretty sure that’s how they do it, if you want to learn how YouTube is a good source and AlvinBlox or Llyod has some good tutorials on that.