While working on big projects I occasionally find myself taking shortcuts when a subsystem needs more work. For example, when working on rendering weapons and attacks the focus might just be on the rendering part, but there is also work to be done on how to manage which weapon to render. Instead of getting sidetracked from my original goal, I’ll add an inline TODO comment and use a placeholder weapon to render.

In this post I’ll focus on how I manage and track these useful inline comment notes through my workflow:

Read more…

It’s been over a year since Dev Update #5 and although its a big jump in progress since then, I mostly took a break from game development and focused on other things for a while. With that said I’m back working on this and this update focuses on the following:

  1. Movement
  2. Combat System
  3. Particle System


I revamped the movement system and it now works much better. I used to try to predict all entities movement in the client via different information (who the monster was following for example). But on medium to high latency connections this would cause a lot of de-syncs between Client and Server entities. I changed it so that the position shown in the client is completely based on the position simulated in the server. Since the client is simply imitating the server now, de-syncs are a thing of the past.

I still do some entity client prediction, specifically for inertia. When an entity is pushed I simulate inertia individually on the clients (as well as on the server) and compensate a bit later. So it’s technically still possible to have de-syncs as like those seen in the older videos, but it’s very rare and less distracting. I plan on doing more optimizations, like lag compensation, as they’re needed.

If you’re more interested, take a look at Gabriel Gambetta’s Fast-Paced Multiplayer series. It was very helpful to understand the best ways to implement movement on this type of games. Take a look at his live-demo.


Combat System

Previously I only had some attack animations for the player entities, but these did no damage. I’ve started working on the combat system and now entities can damage each other.

I foresee this system will increase in complexity to cover the combat types and variations I have planned. Currently melee attacks are working. The way I envision it is having multiple weapon types for the player as well as attack types for the monster entities. So I developed it in a way that supports varying:

  • attack ranges
  • attack frames
  • attack animations
  • cool-downs
  • interruptions

I won’t go too much into details of the implementation but at the moment I do simple hit-box checks on client and server based on the different attributes. A players attack is calculated in their client, but verified by the server.

The red boxes are the enemies hit-box as simulated on the server

Particle System

I decided to implement this early on to test out to what extent I can use it, as in for animations or attacks. LibGDX supports particle effects so I’m utilizing their editor and framework for it. I made my own system to suite my needs. Wayward Souls does a great job of utilizing particle effects for attacks and ambiance.

Prototype dust, attack and blood particle effects

What’s next?

For Dev Update #7, I’ll probably do more work on the combat and status systems (attacks, health, deaths, etc…). A lot of tuning on combat to make sure it feels nice and snappy. More tweaking with the AI to make sure the fights feel fair and fun.

I’m planning on making 2 other separate posts:

  • Touch-screen Joysticks
  • Workflow optimizations

Subscribe to my newsletter

Remember to subscribe to receive monthly updates about Clash Legacy!

It’s been a few months since I worked on Clash Legacy, but I’ve restarted working on it this past few weeks. I’ve updated the progress widget on the sidebar to more closely resemble current state.

Current goal is to finish up the combat system, particle system, health, deaths and respawns.
Blog Construction:
100 %
Combat System:
75 %
Particle System:
90 %
State System:
5 %

The blog was down for the better part of the year. I quickly brought it up again, however, I lost the data backup. So I had to restore the posts manually and some links are slightly messed up.

I’ll work on post Dev Update #6 in the weekend.