Inspiration
I've always built some sort of vehicle game where the player avatar takes the "back seat" and not the main focus of the game. In this competition however, since it was mentioned in the requirements to stretch the limits of Horizon feature, I decided that it's time to focus on the Player avatar and test it's limits. What better way to do that than to build a fighting game engine with a fighting game for the Horizon World platform.
What it does
Mobile Kombat is a 1v1 fighting game for the Horizon World. Players can select from a list of heroes that they want to fight as. There are 3 heroes to select from: Ninja, Lancer and Berserker. Each hero, has it's unique fighting skills and special moves. Players can choose to practice with an NPC or invite a friend to join and battle with them. The menu option presents a Movelist option where you can learn the moves of the selected hero. There is also a Costume menu option to change your fighting costume. Lastly there is a leaderboard that shows players rank.
I also get to implement the WorldBroadcastCameraJoin api which can be used to show players viewing the page about ongoing actions in the game. I implemented for different scenarios for when a solo player is in the lobby or practicing as well as when 2 players are in lobby or in a battle. I added custom ui to show text of different scenarios.
How we built it
Mobile Kombat is a very challenging game to build. There are two parts to the game: the fighting game engine and the fighting game. The fighting game engine is the core of the game. It controls and coordinates actions that happen in the game. A few of some it's functionalities are Input Move Matcher which scans an array of user inputs to see if it matches a fighter move and Move Player: which plays the animation for a hero like Jump, Walk, Punch or Kick and also plays any sound or VFX associated with the move. The engine presents a configuration settings where you can define a hero and it's move attributes (e.g animation, hit point, hit point on block, input sequence, etc). With the configuration settings, I then have to configure the 3 heroes properties, listing all their moves. Each hero has around 45 unique animations for all the movelists. With these settings, the game core then have to harmonize the move animation, with the sfx and vfx to all play at the right time during battle.
Challenges we ran into
I ran into a number of challenges in building the game. The notable ones are:
NPC Invisible: The NPC player goes invisible when you get close to it. I created a feature request to give option to turn this off. Because of the current state, I held off on implementing 1v1 against NPC. Instead I only use NPC player for practice. It still receives hit but for best experience, inviting a friend to play with is good.
Avatar rootRotation: I use avatar rootRotation to rotate the avatars to face each other. I noticed that this is not instant. It takes a bit of time to rotate. I added a hack to make it work better but will be best to just work.
Platform Time for Sync: There is no authoritative time available to implement synchronization. Things like if 2 players attacked at the same time, the attack time needs to be compared to know who started first in order to deal damage to the other player. A server time would be good to use in this implementation. I had to implement a pseudo server time that uses the time the game started as a reference point in calculating attack time. This works but sometimes gives a player an advantage.
Avatar Gender: There is no way to tell if the avatar is masculine or feminine. This will be useful to set the voice during game play. I added a workaround menu for the player to select it.
Accomplishments that we're proud of
I like that the game engine works well considering the time I get to build it. It started as a prototype to see if this would work on Horizon and ended up working well so far.
What we learned
With Mobile Kombat, I learnt how to structure and build a fighting game engine. I also learnt a lot about the horizon player api.
What's next for Mobile Kombat
I still have a lot planned for Mobile Kombat. Combo breaker, Parry, More special moves and heroes. Also adding fight with NPC once the invisible feature is implemented.









Log in or sign up for Devpost to join the conversation.