[ad_1]
Unity’s Technical System
skip this half in case you are not desirous about technicalities.
We approached weapons cautiously since they had been essentially the most vital a part of the sport.
Our essential programmer made a wonderful weapons system to help our wants. It has these settings:


As you’ll be able to see, there may be an space so as to add a modifier to a projectile. Basically, projectiles comprise “LEGO items” we name modifiers which might be added to a projectile. For instance, the revolver has bounce + DieOnSurface modifiers. Where plasma pictures have these but additionally have a pierce modifier that applies solely to gamers. So it bounces off partitions however goes by flesh. (you’ll be able to see how that works in mages)
There had been some ways to strategy this, however we used scriptable objects as our modifiers. However, some modifiers have information to be saved; as you could already know, scriptable objects are shared objects, and this information ought to be saved per bullet. The bounce modifier, for instance, has a quantity for bounces. And it must be saved per shot. The scriptable object has a dictionary containing all of the bullets (a listing of bullets) to maintain monitor of what number of remaining bounces for every bullet.
This approach is extra environment friendly than having a mono conduct per modifier. It additionally led to a cleaner inspector since we’ve a small space the place you’ll be able to throw your LEGO items in; as an alternative of getting many scripts connected.
Here is a code for reference:
{
non-public IDictionary shotsData;
public void SaveData(Projectile projectile, T information)
{
shotsData ??= new Dictionary<int, T>();
shotsData[projectile.GetInstanceID()] = information;
}
protected T GetData(Projectile projectile)
{
if (shotsData != null && shotsData.ContainsKey(projectile.GetInstanceID()))
return shotsData[projectile.GetInstanceID()];
return default;
}
}
Weapons Philosophy
For now, we’ve 11 weapons, and we don’t plan so as to add extra (for a very long time). And even after we do, it will likely be weapons tied to distinctive mechanics. as it is a aggressive sport, we would like the gamers to be very conversant in easy methods to use every gun strategically.
While play testing, I discovered the 3 most enjoyable methods on this sport.
1. Play cowardly round covers, block entrances with plasma pictures and mines.
2. Use hit and run to get nearer to your enemies and end them with a high-damage short-range weapon.
3. Suppress your enemies and blow up their covers whereas laughing like a psycho.
And we wished to capitalize on that (whereas eradicating a few of the not-fun) methods that I would discuss later.
So I broke down my weapons into three essential classes:
Assault: to help the suppression-aggressive sorts.
Safe: to help the tactical sorts.
Corner: to help the hit-and-run sorts.
Weapons Show Case
Art shouldn’t be executed but.
So far, we’ve made these weapons:
Basic: Pistol

Assault: Machine Gun, Combat Shotgun, Sawed-off Shotgun, and Bazooka. We may also add the Wrench right here.





Safe: Anti-Armor Gun, Energy Sniper


Corner: Revolver, Plasma Rifle, Mine Launcher



Charging Shots
I’ll let the pics communicate for themselves.



And by the best way, I want an concept for charging the mine launcher. Maybe different weapons as properly. Feel free to contribute.
[ad_2]