AUTO RAP BATTLES

Re-Released July 2024

Auto Rap Battles is a Roblox game that I rebuilt from the ground up starting in March of 2024. A friend of mine owned the game and tasked me with giving the game a facelift. Having no prior Roblox developing experience, and very little Lua scripting experience – I spent a lot of time researching how the game engine works, its natives, and the programming language Lua. I had everything ready for re-launch finished on July 11th, 2024, and continue to work on its updates for the foreseeable future. The game currently has 675,000 likes, with 131 million visits!

ABOUT THE GAME

Auto Rap Battles is a social game where two random people are selected to go on stage and take turns rap battling each other. After they both get a set of two turns, the audience votes on the winner and then the cycle repeats. The game has numerous game passes and microtransactions that the player can purchase. The in-game currency “Rap Bars” can be used to purchase in-game cosmetics, borders, custom rap pads, loot boxes, tomato launchers, as well as tomatoes to refill their tomato launchers which are used to hit players and fling them around the map.

TECHNICAL OVERVIEW & DEVELOPMENT FACTS

  • Currently developed on about 15,000 lines of code
  • Utilizes some modular scripts to help with Object-Oriented Programming
  • Exploitation of databases and accessories are completely safe from hackers / cheaters
  • Implemented a custom admin system to quickly kick, ban, teleport, or turn anyone invisible
  • All UI implementation and animations were done by me
  • GetAsync, GetSortedAsync, and SetAsync requests are all well below the server thresholds
  • All models and map visuals were contracted out, I coded everything in
  • Custom inventory and backpack system. The default one from Roblox was disabled
  • Implemented AnalyticsService:LogEconomyEvent on all transactions to see analytics of where in-game currency is used

EXAMPLE CODE SNIPPETS

Here is a little snippet of the Loot Box logic. All items that are in the loot box has a rarity, image, and rarity chance defined above it. The function “PickItem” rolls the rarity. From there “CalculateDictionary” is called to pick out the item within the rarity that has been chosen. Finally, “CheckIfOwned” is called to see if the item is already owned by player. If the item is owned it will reroll. If the item is not owned it will clone the item into the player’s custom inventory
Above is a small snippet of the logic from the tomato projectile. It uses a combination of Raycasting and T=D/S (Time = Distance / Speed) to determine when to spawn a decal at the hit location or when it detects a player
This is just a simple script that updates the players percent chance to go on stage every second. To calculate chance, I implemented what I call a “ticket” system approach. Each player loads in with 10 “tickets” as default. After each round their tickets go up by 5. To get an individual’s chance percentage we take their value and divide it by the total “tickets” that everyone has and times that by 100.