top of page

TinyBattle

test.png

It's a big solo project, and it's through this project that I learned the basics of networking using Coherence.

It's a fighting game inspired by "Mount and Blade"

Coherence io

To start my first connected project, I looked at the possible solutions online. Without having really tested the available solutions,

 the documentation and ease of use of Coherence.io convinced me to give it a try for my first attempt.

Coherence is a Unity plugin that provides visibility within the editor and mainly works via a baking system. Variable replication and authority management are easy to debug, and Coherence also offers a free hosting system that allows you to quickly test your games with friends.

If you want to know more about how Coherence works, their documentation is clear with lots of project examples.

 

Feel free to check it out!

"I must also mention Synty Studios, who are the creators of almost all of the 3D assets."

I initially wanted to start with something closer to Mount and Blade, a third-person with four attack and four block stances (parries).

The animator for each stance was a bit complicated, it required quite a few animations per side, and also depending on the weapon being held.

If I were to redo it now, I would consider a more procedural approach for the arm animation.

Anim_12.png
Anim_13.png
Anim_11.png

I was able to test the first online interactions and server commands, such as teleporting all players. Most objects are owned upon pickup, and movement is also client-authoritative. Coherence.io makes animations syncing quite easy.

To organize the equipment, I set up dictionaries where the key was an enumeration that contained the armor, weapon, and inventory slots.

These dictionaries referenced either Scriptable Objects or GameObjects. ( interface was not really robust with Coherence IO) 

For the networking side, each object had a unique ID in an internal database.

equippedItems.png
equippedItems2.png

All theses items become rigidbodies that can be picked up once a player dies or disconnects.

Regarding the items, it's a hierarchy of Scriptable Objects.

they are referenced with a string and contain the necessary GameObjects along with their parameters.

I used Odin to create a tool to simplify the creation and edition of these items.

21.png
22.png

I needed another player for combat testing, so I created an NPC instead,  capable of attacking and parrying as well with a certain margin of error. I'm not using a NavMesh Agent, so I implemented a super basic pathfinding system for it.

I learned a lot using Coherence.io, but my future networking approaches will be taken elsewhere. The baking process is quite long and I struggled with the synchronized variables in the editor; I prefer seeing everything in the code.

I'm thinking of merging the project into something else that would be closer to FishNet. 

I keep in mind this is an ongoing project that I don't intend to drop anytime soon.

Hi !

 

 

I'm 25, and I've been working in video game development for nearly 5 years 

 

constantly seeking new things to learn. If you need a relentless technician to bring your projects to life, or a passionate and determined new colleague, please don't hesitate to get in touch !"

Contact me

bottom of page