How would I create a global Auction house?

I’m going to make this as simple and easy to read as I can;

  1. How can I make a auction house in a UI that is global?
  2. In that UI, players can bid on items like in the wild west for a set amount of time, the highest bid gets the item.
  3. The item is awarded to the player in a datastore (I might know how to do this)
  4. The one who won the auctions money is taken and the loser(s) money is given back.
3 Likes

I created an auctioning system for my game “Terenergy”, I’ll explain how it works, and maybe you can apply elements of it or all of it to your game:

First, the ui
I have three main elements:
1 - Invisible “parent” frame
2 - Player bid display frame sample
3 - Actual bid button to bid 5 “bidding points”
(Later on I added two more buttons, a (+) and (-) button to allow the player to change how much they bid it’s not necessary, but if you want me to go into it tell me)

When I want to show the auction, the game clears all children of the parent frame and then puts one “player bid display” frame inside the parent frame for every player.

The “player bid display” for a player shows the name, avatar, and the player’s “AmountBidOnBoost” aka the amount that player is bidding. (And it updates when a player changes their bid amount)

Don’t forget to put a UiGridLayout inside the “invisible parent frame” so it spaces out all the player bid frames, or if you want like I did you can animate manually by making the “player bid displays” space themselves out whenever a new one is introduced.

Then there’s the bidbutton which just fires a remote event telling the game that the player is trying to add 5 to their bid.

Now, you can do this a different way, but I made it so that when the player bids, their amount of “Bidding Points” decreases and another value “AmountBidOnBoost” Goes up and this tracks how much the player has bid.

Now, there’s the logic to see who won:
After the time runs out, the player with the top bid gets the boost/reward. If there’s multiple top winners, as of right now I made it so that no one wins. But I’m going to get to changing that sometime in the future.

After the winner is handled, the people who didn’t win get their “Bidding Points” incremeanted by their “AmountBidOnBoost” (aka their bid gets returned to them) then their “AmountBidOnBoost” goes back down to 0.

For the winner, their “AmountBidOnBoost” gets set down to 0 and their biddingpoints do not increase.

This is pretty long so tell me if there’s anything you would like me to add more detail onto.

2 Likes

I know that the auctioning system in TWW (and also global matchmaking systems) use Memory Stores to communicate between servers. There are plenty of guides and docs regarding Memory Stores also.

Memory Stores in this situation can be used to store the items currently on the global auction list and the bids and bidders for each item. However, you might have to cycle things like they do in TWW to manage storage (idk maybe).

I hope this helps