so recently I implemented a pretty basic movement and combat system into the game I have been creating (Progress on cyberpunk/futuristic city) and I wanted y’alls feedback on what I have so far. Yes, I am aware I am not the greatest at animating
each Video contains a POV from two players just so you will be able to see what it is like from other views rather then first person. Sadly, this leads to the tab I am not focused on having a lower framerate so some effects do not look as good this way.
Weapons
Basic pistol titled the “block 72”
Basic carbine rifle named “carbine rifle”
Basic bullpup rifle named “bullpup rifle”
Movement
Simple Dodge ability, somewhat inspired by the “Sandevistan” from Cyberpunk 2077 and Cyberpunk Edgerunners, obviously if I were to actually implement that it would 1. Not work 2. be incredibly overpowered. So I tried to recreate the basic effects from it and turn it into a simple dodge system
Went back and added your suggestion, found a much better spring module then the one I was using before. made the arms follow the camera as well with added hitmarkers
Now that is significantly better, much more feedback when firing, and even better it doesn’t look like you’re fighting the recoil.
^^
(here’s some code if you aren’t bothered making your own)
--[[
StartCFrame - CFrame the bullet instance is created
endVector - Where the raycast hit
raycastNormal - The raycast normal (can be deleted)
isHumanoid - if the hit target is a humanoid (can be deleted)
]]
function createBullet(startCFrame, endVector, raycastNormal, isHumanoid)
local bulletObject = nil --// Part instance with a trail, optionally can create with code
bulletObject.Parent = workspace
bulletObject.CFrame = startCFrame
local bulletTravelTime = (startCFrame.Position - endVector).Magnitude/450
if bulletTravelTime < 0.05 then
bulletTravelTime = 0.05
end
tweenService:Create(bulletObject, TweenInfo.new(bulletTravelTime, Enum.EasingStyle.Linear), {["Position"] = endVector}):Play()
debrisService:AddItem(bulletObject, bulletTravelTime)
--// CODE BELOW IS OPTIONAL
--[[ if raycastNormal and not isHumanoid then
task.spawn(function()
task.wait(bulletTravelTime)
--// For bullet holes to work properly, decal must be on the FRONT surface
local Hole = effectsFolder.BulletHole:Clone()
Hole.Parent = workspace.ServerVerification
Hole.CFrame = CFrame.lookAt(endVector, endVector+ raycastNormal)
debrisService:AddItem(Hole, 2.5)
end)
elseif raycastNormal and isHumanoid then
local Blood = effectsFolder.Blood:Clone()
Blood.Parent = workspace.ServerVerification
Blood.Attachment.Blood:Emit(10)
Blood.CFrame = CFrame.lookAt(endVector, endVector+ raycastNormal)
debrisService:AddItem(Blood, 1)
end ]]
end
Wow, thanks for the code, I am really am debating adding bullet tracers just so I do not make weapons too complicated. I do like how gta 5 does their bullets where it does take some skill to learn but the bullets are pretty much instant to their destination. I’ll for sure keep this saved in case I change my mind later (highly likely). Thanks again though this really helps!
I personally just add them for visuals and not to change how bullets work. Guns in my games are still hitscan, but the bullet tracers just make it look so good compared to not having them.
It also adds a little to PVP, as it allows other players to know exactly where you’re shooting.
Also, FYI, if you’re going to add them, make the effect client-side, else its going to be hella laggy.
Oh I did not realize it was all visual, if thats the case I probably will add it and yeah client side is a great idea seeing as this game has a lot of server side stuff going on.