It’s been about two years since I released my older open source lock on resource which ended up picking up some steam and being used in multiple projects. With the benefit of hindsight (two whole years of it) and much more programming experience, I have decided that the original project is extremely outdated and not an adequate representation of what can really be done with the concept.
The code was reused from my second ever game, Sabers Unleashed, notorious for poor optimization and spaghetti code. With this in mind I decided to change the goal of one of my projects to make an open source resource that will not only demonstrate the ideas better, but make it actually usable.
There are multiple key differences in both the code and the mechanics (One notable change is the removal of the directional wheel), but the system is overall much better.
As stated in my first post, I frequently found myself disappointed with the combat of most of the games on Roblox outside of a few hidden gems. It feels to me that many developers overlook the feel and design of combat in many games where it should be more important and fun. Some games even still use the extremely limiting and outdated linked sword system from way back in the day.
This isn’t to say these games are bad, far from it, but I do think that we are missing the huge elephant in the room that can really add to the combat experiences of many games with 3D combat, a system that most 3D games use today. This system is lock on combat, also known as Z targetting.
What is Lock On combat?
At its core, lock on combat is a targeting system that directs the player to face an enemy, or “target” to make aiming attacks easier, pioneered by The Legend of Zelda: Ocarina of Time.
This was done because when the jump from 2D to 3D was made, designers were made to grapple with the new axis and with the limited controls available to a player at any given time. In games previous, you really only needed to worry about one or, at most two, axis with the camera being mostly static, but now traditional combat systems were being tested and rethought entirely.
Many games right now use a system where the attack always faces the front of the character and the character always either faces the direction they’re walking or utilizes mouselock where it faces the camera.
While this system does work, it can severely limit the possibilities of the base combat system and the player’s interactions with it, the possible cinematics of the fight, and especially the immersion and creativity of the fight, gameplay, and weapons.
This can be seen in many games where the combat consists of a basic attack and a block with a lot of camera spinning. With this kind of system the camera is carrying most of the weight of the system, and thus it is much more difficult to add various elements without disorienting the player or harming the combat system.
As well as this severely limits how much a designer can play with the pacing of combat without needlessly overcomplicating the combat. With a mouselock it becomes into a camera positioning game more than interactions purely through the combat system. This works for some games, but is not a one size fits all.
With a lock on system you can give yourself much more versatility in many departments and explore many ideas, and if done right can make for an amazing and immersive experience whilst giving the designer even more creative freedom.
This isn’t to say that mouselock doesn’t have its uses or it’s value, but it is saying that our scope on combat in Roblox needs to be broadened beyond it.
What’s in the demo?
Now for the meat of the topic, the actual demo.
The mechanics are extremely simple and extremely fast paced. Left click to attack, Right click to block, time the block to parry or block during the build up of an attack to feint, left shift to dodge. You can take two hits before dying.
This extremely simple set of rules can be easily built upon if you wish to add more, but because of the way the camera lock works there is a heavy emphasis on footwork. Combine this with the low health and this can make for extremely intense fast paced gameplay. The simplicity offered has the benefit of an extremely low skill floor but a very high possible skill ceiling.
The system is also meant to be made more dynamic/modular for being built upon. There isn’t much in the wake of detail (i.e there is only one attack animation), but the building blocks are there to build from it.
The system does use a handful of scripts not created by me to add onto the combat/game experience. This is mostly because this was originally intended to be a full game projected that I turned into a resource. These are
As well as this there is support for NPC enemies, though you’ll need to program it yourself. I haven’t tried nor tested it outside of the test dummies.
This is meant to be a continuation of my first post two years ago and a more generalized approach to ways to implement lock on combat. With all this said here is the demo, enjoy!
I hope to see more lock on combat games in the future and thank you for your time. Have a great day and any and all feedback is greatly appreciated.