What is FastCast?
FastCast is a module written in Luau that is designed for one purpose: To emulate bullet physics and hit detection in pure Lua. No physics replication involved.
To get started with reading the API, check out the FastCast object page. You can get the module and the example gun .
Why expend the effort?
You might be thinking "Why not just use bullet physics and a BodyVelocity"? Maybe you're asking "Why not just simulate on the client"?
Simply put, after encountering numerous issues from Roblox's physics replication in one of my own prototype FPS titles, I decided that I have had enough of the garbage caused by my bullets lagging. I mean seriously! All of these kick*** tracers and all they do is get stuck in mid air and shake.
As it turns out, I was never the only one with this problem. It's an issue that's existed in games since the dawn of multiplayer. A lot of people have come up with their own unique solutions, but unique or not, one thing has remained a constant in the design process: It's a pain in the neck.
With those two factors wreaking all sorts of havoc in FPS titles, I decided I was going to define the next-generation standard for FPS games on Roblox. It was at this moment that FastCast was born.
FastCast is an Interface
FastCast is an Interface. This means that it stays as hands-off as possible when making bullets do anything outside of travelling. Developers know what they want when it comes to how their projectiles should work, so FastCast strictly focuses on providing them with a means to do so - nothing more, nothing less.
FastCast is Accessible
Some developers are newer, and implementation of modules like these can be a daunting task for many aspiring new creators. While FastCast does what it can to stay as hands-off as possible (as mentioned prior), that doesn't mean it can't offer help when it's needed. This is why FastCast comes boxed with a couple features to make simulation easier, for instance, the Cosmetic Bullet system. It also comes with an example gun written from scratch and with plenty of comments going over what's happening in the code. The goal is to make sure everyone can use it.
FastCast is Powerful
FastCast's purpose is to be fast -- It's in the name! The module has been designed to handle hundreds of bullets at once. If you want to create absolutely insane battlefields with giant war machines slinging huge lasers and tracer rounds at eachother, FastCast empowers you to do just that.