Writing an FPS framework (2020)

making it fire requires a whole lot of other work. I’ll write something for it if i have the time, for now get yourself familiar with rays and server security due to filtering enabled.

quick update: i was writing it today. I managed to accidentally press enter midway through and post it to scripting support.

6 Likes

I don’t often give out praise, however in this situation it is more than warranted. This is a really well laid out and thought through tutorial that goes through each aspect and hurdle that people are going to encounter if they try and develop their own system. One of the highest quality tutorials I have seen on the forum so far. Well done :slight_smile: and I definitely look forward to any future releases you might make!

One question though: You use a few fairly complicated black-box modules (namely spring and velocity)
Is it possible that you can include a more in-depth explanation to their function, and if possible the mathematics behind them? I’m the type of person to take a deep dive into the background of stuff before I can plant my feet firmly in a subject, and this would be helpful!

8 Likes

I forgot to credit their creators, thank you for bringing it up. Neither of the used modules have that much complexity to talk about in my opinion. Velocity is mostly a glorified module provider with a bunch of useful functions, I didn’t play with It’s source that much, and the spring is just hookes’ law wrapped with a few settings and some protection against NaN numbers.

3 Likes

https://i.gyazo.com/27228719eb4156d9dc3db5e3765c7a6f.gif

Hey man, as you can see the springs isnt as bouncy as yours. I also added springs to the root of the gun but it refuses to bounce.

3 Likes

shove it a bit more or play around with settings, other than that idk

2 Likes

What’s the difference between SetPrimaryPartCFrame and what you did?

2 Likes

self.viewmodel.rootPart.CFrame = self.camera.CFrame:ToWorldSpace(finalOffset) Is this what you used to render the viewmodel onto the camera?

3 Likes

SetprimaryPartCframe has no differences between what you posted as long as primarypart is rootPart, i just forgot it existed
also yes

3 Likes

If you’re able to tell me what I can improve on my viewmodel through dm’s it would probably help me improve a bit. Video failed to upload on here.

2 Likes

No. I don’t want to go down a rabbit hole again.

1 Like

Ok, here’s the video of it. https://www.youtube.com/watch?v=yhSnFf-YeTI

1 Like

Looks good but I can’t for the life of me get the animation stuff working no matter what, the hierarchy is completely messed up even know i replicated how you did it.

1 Like

How do you load animations for idle, reload, and others so quickly? I am loading my animations around the same way you are so how come my animations don’t load quickly enough compared to your Untitled FPS game? Since it doesn’t load quickly enough, players see ugly arms for a bit before the animation actually loads.

I know that you are tweening the viewmodel for the equip, I tried that too, and it seemed to work, but sometimes the idle animation loads fast and sometimes it doesn’t. How do games like arsenal load animations so quickly to the point where it doesn’t even look like they are using an animation for the equip or they somehow preload the animation before it is equipped.

1 Like

these animations are just downloaded/cached at runtime, aka. when you equip, the “ugly arms” only appear the first time you equip unless you screwed something up

1 Like

Well I don’t want to see the “ugly arms” at all because players will automatically equip/unequip and don’t equip multiple times. So how could I load the animation faster? or will i have to make some cframe tween madness?

1 Like

https://developer.roblox.com/en-us/api-reference/class/ContentProvider#preloadasync-array-contentidlist-function-callbackfunction-

1 Like

what do you mean by shove it a bit more? i played around with the settings and didnt get anywhere sadly.

1 Like

increase the values you :shove() to the spring

i tried, didnt work out. Do you know what could cause something like that?

This is the most detailed tutorial I’ve ever seen.

2 Likes