O M G did you make all the guns? thats superb . . i love the bullet drop and everything! is there any place i can learn more directly how you did it? it is impossible that i can do it from scratch. . . it is REALLY good work. .
Yah, I made programmed the guns from scratch, the 3d modeling and the ui designing was done by my friend zzaotic. My guns use a projectile system.
I donât think there is any place to learn about projectile guns like mine, since a lot of tutorials use hitscan guns or body physics guns (which sucks no ricochets like mine). If you wanna make a hitscan gun itâs easier and thereâs a lot of tutorials for it.
Basically what hitscan guns do is raycast on the client to the destination and tell the server the info, the server checkâs it and applies damage it based on if the part had an humanoid. (This wonât really allow you to do things like richoets though).
But if your interested in some specific part of the gun I can tell you how I did it.
can i learn the projectile system? i am in love with it! ( if its something you cannot share, no worries ⌠i understand! )
Sure thing
Basically what I do is raycast to the next point the projectile moves to, the projectile is updated every hertbeat using the timefrompreviousframe itâs next position it goes to is determined by itâs FormulaCallback.
Here is an example of a realisitic path (aka bullet drop)
ProjectileFormulaCallbacks.Realistic = function(TimeFromPreviousFrame,Projectile)
local Velocity = Projectile.Velocity - (Vector3.new(0,Gravity,0) * Projectile.ElapsedTime)
return Projectile.Position + (Velocity * TimeFromPreviousFrame)
end
If the raycasts hitâs itâs behavior callback is executed here would be an example of a normal projectile behaviorcallback
function BaseOnHitBehavior(Projectile, Hit)
if Hit == nil then return end if Hit.Parent == nil then return end
local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
if Humanoid == nil then
return
end
if IsServer == true then
local DamageIndicator = Humanoid.Parent.Head:FindFirstChild("DamageIndicator")
if DamageIndicator then
local DamageText = game.ReplicatedStorage.Assets.DamageText:Clone()
DamageText.Parent = DamageIndicator
DamageText.Text = Projectile.InheritedProperties.Damage
DebrisService:AddItem(DamageText, 2)
end
Humanoid.Health -= Projectile.InheritedProperties.Damage
else
if Projectile.ClientIsOwner then
SoundService:PlayLocalSound(game.ReplicatedStorage.Assets.Sounds.ShotIndicatorSound)
end
end
end
ProjectileBehaviors.Default = {
OnUpdate = function(Projectile, RayCastResults, OldPosition)
local PositionToGoTo = Projectile.Position
BaseUpdateBehavior(Projectile, RayCastResults)
if RayCastResults then
PositionToGoTo = RayCastResults.Position
BaseOnHitBehavior(Projectile, RayCastResults.Instance)
Projectile:Destroy()
end
SetCFrame(Projectile, PositionToGoTo, OldPosition)
end;
}
I create a projectile without a model on the server to do this damage stuff. On the client I create this projectile with a model for visual effects, which acts like the server projectile but doesnât do any damage. A local projectile without a model is also created on every other client except the shooter. The reason I do this is fast feedback. Client projectiles will hide that delay of the projectile coming out of the barrel.
The server projectile is resynced using a formula to where itâs supposed to be after it got the remote event delivered. Remember remote events take some milliseconds. If the projectile was already hit before this time (checks it by doing a raycast with the formula callback) then it just destorys the server projectile.
Sounds similar to the Fastcast community resource on the forumn, anything done differently here?
Not really if your talking about the ray casting part since thatâs a pretty standard way to do things like projectiles.
Two of the most original weapons I have seen in a game for years. The fireworks gun looked fantastic when fired (more varied particle colours please) and but I also really enjoyed the ricochet gun. I just stood between the walls making patterns with it. Impressed by how you handled the reflection of the rays.
Do you have a game that the weapons are destined for?
Yah iâll add that to the fireworks gun, some of these guns will be used for zombiecade (the normal, realistic ones mostly). Zombiecade might also have other guns to though.
For the other guns such as the ricochets and fireworks theyâll be used for my pixel gun type of game im making. I have a lot of cool guns planned for my pixel gun game if you have any suggestions you can pm me them. Im trying to go for very unique guns lol, since im kinda bored of realistic guns, thatâs why I wonât be using any realistic guns mostly in my pixel gun type game.
New mini boss zombie with advanced AI added.
This zombie does things differently from the usual zombies. It poses a greater threat to the humans and is strategic about itâs engagement.
A quick introduction to the game mechanics have been added too.
Check it out and I hope it brings you joy
hey buddy. i double checked. the bullet is actually ray casting so am quite baffled as to the bullet lag.
local ray = Ray.new(handlePos.p, toTarget)
local part, position = game.Workspace:FindPartOnRay(ray, tool.Parent)
if part and part.Parent and part.Parent:FindFirstChild(âHumanoidâ) then
part.Parent:FindFirstChild(âHumanoidâ):TakeDamage(damage)
seems pretty standard to me . . too much zombies in game causing the lag?
Are you creating the bullet Part on the client or server. The part was the main source of lag, you should make it on the client.
The Repair Update is live!
Players can now repair the defenses themselves should they find the Combat Engineers a tad sloppy!
You will earn both COMMAND POINTS ( to deploy soldiers ) and STRATEGIC POINTS ( to upgrade soldiers ) when you repair.
The AI Director has been adjusted to accommodate this new advantage for the players. ie It is still not going to be a walk in the park!
Hope you enjoy playing it as much as i enjoy creating it for you
Iâm glad you are still trying to add on value and work on the game such as the repair tool which gives the player more options but the glaring issues still havenât been addressed.
Same problems, guns fail to work during server lag so anytime there are zombies the gun just doesnât fire as fast as it does before. Have you tested it out when you increase network replication lag on your own client?
The repair while a nice new option is flawed when the Combat Engineers fundamentally repair the wall faster. The same goes for the unit upgrades as there are no visual indicators of what has changed and no gameplay changes visible.
The core gameplay still hasnât changed except the increased difficulty spike which is more like a difficulty cliff from the new zombies. The worst part is the runner zombie for some reason it takes way longer to kill and is more difficult than the so-called boss zombie âgym zombie.â When the gym zombie was first introduced my 5+ marines just threw 5 grenades and poof he was gone.
They just charge straight to the soldier AI and the soldier AI just doesnât do anything about it really frustrating. Also, there is nothing you can personally do it about it too since all you are given is a bat and pistol that is prone to the same server lag.
Effectively you have just introduced artificial difficulty into the game where you just raise the zombies overall stats without giving the player an option to fight back and strategize since the only option you have are the same options to fight back you had when the game was released.
-
Hire Soldier with assault rifle
-
Swing bat and shoot pistol
Only two effective options to choose from, the turret doesnât count as it still misses and is not worthwhile. Meanwhile, in the games, Iâm mentioned like the Final Stand two look at the number of weapons and perks you get to choose in order to best defend your base:
There are over 50+ weapons and way more perks and itâs up to the player to decide which is the best option. Moreover, there are no clear answers to which of these weapons perform better than the other and itâll take multiple playthroughs to understand the intricacies of buying the right weapon at the right time.
Overall, still hoping for your game to be as thorough as the final stand 2. Do not rush updates and remember that good games take years to perfect and master. An example case is The Final Stand 2 again which was created in 2013 and is still being updated today so 7 long years of iteration. Hopefully, you will be able to do the same with the same level of dedication in order to create a truly great game and achieve a dedicated player base.
Thank you as always for the detailed guidance. I wonât give up and i am as dedicated as day 1 !
The truth is I tried implementing weapons and I spend many days but I failed. The Roblox official weapons kit is bug ridden and I manage to find solution and patch it until it doesnât freeze the mouse but the last progress is that when the weapon is equipped, the mouse doesnât pan and doesnât click. It is just frozen. I canât get beyond that no matter how hard I try and I canât seem to get any help from the forum.
I tried finding guns in the tool box and âreverseâ engineer it to learn but I realise that they are all from either pre filtering enabled days or full of reference to assets ids that I cannot learn / know what is it for.
I also tried reading the community guides but I couldnât digest it. I pray that it is not like I have hit the âlimitâ of my scripting capabilities. It will be very sad.
I was feeling rather disheartened so I switch to work on the repair gun which was within my means as I did not want to leave the players without any updates for too long ( i would like to imagine that there are people who are keen and following this game )
May I ask if you know of any gun script or guide that may help me learn?
For the weaker repair capability of the player, I did it to prevent the player from getting too over powered as it earns CP and WP. Do you mean such practices may not be âgamerâ friendly and it turns people off thinking itâs a bug or poor design?
For the level up of the marines and engineers, actually when you move closer to them, you can see a billboard of their level. Like Marine Level 2. I do agree that it may not be easily visible. I will work on it to improve.
The runner zombie will actually run away if the health is too low and hence I felt it brings something new to the plate. When you said the Marines did nothing I assume it is on the wall? That is by design as free movement during this stage sometimes confused the pathfinding during play test. When the walls go down, there is a flag that enables them to move. They should move back when a zombie comes too close!
I really thank you for your feedback. It allows me to see that many of my âwellâ thought intention is not translating into something visible to the players who may find it even a turn off. I need to get my act together and improve further!
Lastly if I may, I sincerely appeal if there is anyway you can help me on the weapons. I am REALLY at my wits end
Thanks alot buddy
I do like the repair tool update since it gives me more control of my base. Now I can attack and defend. The good thing is it doesnât even decrease the importance of the combat engineer since two combat engineers will always be able to heal the base faster than you (since your repairing tool canât get better). I still hope you find out a way to fix the gun lag as others have told you,
Some things iâd like is a shop where I can get more guns. (Not the same type of weapons with different models, each weapon has to be different).
it isnât your âlimitâ you just need to improve maybe you started on a too complex game based on your skill level (happened to me) BUT now is your chance to get better.
Could you tell me what you didnât understand, Iâll try to explain those better.
Wow, I actually didnât see those before. Just went to the game and saw it, I feel like the text needs to be bigger.
Thank you! I increased the size of the level display . . I will continue to work hard.
I am hoping to make weapons like this game . .
https://www.roblox.com/games/2158109152
The only reference I have is the broken roblox weapon kit
The shoulder cam doesnât play nice with other GUI elements . . I got frozen mouse . .no panning. No click to fire etc. The game I attached has a system that I like . . All players see the bullets fly and there is no lag. . Or should I use that current lag gun script and try to work from there?
Is it better if I PM you? No sure if I am making the rest of the folks bored . .
Much appreciated as always.
yah you can PM me about any questions you have iâll be sleeping in a bit so I might answer tommrow
Dear community! Am so happy to announce that i have finally revamped the Ranged Weapons System. Realistic bullets and reduced lag. Elements like bullet drop adds a new layer of skill based combat!
This is exciting as i continue to build my lifelong dream of making a game. With this new system, i can finally start to develop more weapons like shotgun / assault rifles for more fun.
My intention remains, to make games that YOU will have fun with!
Thank you for all the kind support / comments / guidance thus far.
MAJOR UPDATE ( THE BIG GUNS ) - 15 Oct 20
New Weapons Added - Shotgun / SMG / M16 / M24 Sniper Rifle / M249 LMG
Each has itâs own characteristics, Damage / Accuracy / Bullet Speed / Reload Speed / Rate of Fire / Effective Distance
For eg: Bullet speed affects bullet drop and leading. If the bullet speed is fast, the bullet drops lesser at a fixed distance versus a slower bullet and because the time taken to reach the target is faster, you need not lead as much. ( So if the zombie is running, you need not aim as much ahead to hit it when the bullet reached )
I am excited that this will bring a whole new level of fun! See you at the Base
Wow good job, the game is getter better almost ready to be released especially with the new shop. The UI is pretty good to.
https://gyazo.com/bf88f199c233514a3ed86a475e26d361
Except the projectiles donât spawn where you are when you shoot when you move, itâs probably because the projectile is spawning after a delay, because itâs being created on the server.