It just matches two players and create a videocall that allows them to do a rap battle between them. It is not a big project, and quite simple to understand. You have tickets for battle, spend them on the game, you recover 3 a day, and you can allways watch adds or buy tickets.
Thats the loop, no progression, no campaing, quite simple.
That project was made in Magic Fennec for Beat the Flow
I did some things interesting in this project, techincal quality, new things, funny things to test and learn.
(The art was already done and given by the client, do not judge that because its horrible)
I already knew playfab like the palm of my hand from the multiplayer phase of chemical battles, and by teaching it on ut-hub. But i finally got the chance to use it on a released project.
Playfab its a backend service from Microsoft that acts as a Database for users, inventory, sales and that kind of stuff. Its free to use with limitations and cheap to escalate.
I did not choose eos or steam, even if they are quite popular, because the app is to be on PC and Android. As Epic games is in court against Google and Apple... there was no actual reason to choose them. As for steam, lets be honest... what Mobile game forces you to log in with steam? So i went with Playfab.
We had to make a videocall to allow users to see each other and be able to sing with a song in the background.
As the project was small and low on budget, i decided to use as many 3d party tools i can, so we can deliver the app fast and avoid as many bugs as posible.
Thats when i came up with Agora, which is a provieder for videocalls, with low latency, and affordable price with API compatible with Unreal. Well, kind of... SDK has trouble with Unreal 5.3 or higher, and as Google every summer decides to force update the API level to publish on Google Play, i had to recompile the very own plugin/sdk of Agora to make it work.
But in the end it was something new to use, and pretty cool. As every API you ever use, not enough documentation and a lot of debugging by crash. But its working now, ill use it again.
Now the versus part, how to connect two users from Android or PC between them, crossplatform. Well, fortunatelly Playfab already has a module for that and you only have to pay to make it work.
But i wanted to keep the project low cost, so i didn't. Instead i talk to the client about the needs of the "fight". What should really happen, what players can do in battle, ...
I ended up with a solution... everything is fake and both players are in a simulation. When the matchmaking starts, i create all the configuration of the battle every user would like to play:
Music
All the themes/words/questions that are going to appear in the battle
If any of them is VIP player (Vips player override allways the config of a common player)
So that way, when the match its made, and playfab returns "Nico its going to play with Alba" (codely speaking), i just merge the configurations by VIP config and redirect every single of them to their own Singleplayer window where they read the configuration result from the match and join to a videocall with all the sequence prepared and start at the same time, so... everything is... scripted, but the videocall.
Quite proud of that thing, really seems multiplayer, but its way cheaper and safer.
The last thing i wanted to talk about its the adds. The client wanted to show an add if you run out of tickets, so you get a new ticket by watching an add. Also if you are a freemium user, you are forced to watch an add before starting the game.
The classic, but here is the twist, they have to be custom adds. Like, they wanted to choose what video is going to play as an add, some kind of very custom add section.
So i needed to make a server where they can drop videos and somehow call those videos from the app and play them without really being inside the build, because you know, they change, they cant call me everytime they need a new video and re-compile everything for just a video.
The idea was to keep it cheap, web storage is not free so i thought, why not to upload to youtube or some free video hosting server and open a web browser from Unreal? Well, if you dont know, neither did i. There is a policy for web browsers, that they cannot autoplay vídeo with volume by default, and the browser from Unreal its a chromium that follows that policy... long story short, fuck.
So i really needed a place to store a video and let me download it, to play it from the app. I decided to use Google Drive, its free and has a way to get a link to a video without the... video control and shit, to direct download it. So that was the first part, i got the place, and the link for the video. Now, how to tell the app, dynamicaly, what vídeo to play without recompile?
Playfab again was the answer, i already had a place where players log in to retrieve info, like inventory, tickets, data, ... so i added some title info to the game a map of key-value, where you can put all the links to the adds you want to play. Aaaand the app reads that map when you log in, so when it needs to prompt an add, it already has the info without recompile.
Clever, cheap, easy solution.
Just the common things, nothing extraordinary:
Some connection with Playfab api, to login, register and so on
A shop to buy things with real and or game money
Matchmaking
UI responsive for android
Developement of a "jukebox"