Easy gun engine is a simple and customizable gun system that i made as easy as possible to modify, integrate and upgrade. This engine is 100% open source and it comes with those features :
[FEATURE]
Simple raycast system (no FastCast or other modules)
Projectile system (easy implementation of a projectile system)
Visuals system (easy and dynamic particles)
Animation support
Sound Support
Physics mode (change with ease between raycast and physics hit detection)
here’s my feedback and a few things I noticed after glossing over the code:
I wouldn’t call this an “Engine” or “System”
there are a bunch of memory leaks.
the “system” is very rudimentary and lacks customizability and an efficient way to create a new weapon or weapon type.
(E.g: if you wanted to make another pistol you would have to copy and paste all of your code.)
the projectile being on the server is 1, inefficient, and 2, laggy. There is a visible delay when shooting.
there is a lack of customizability with projectiles
instead of this being two variables you can just do the following:
there is a lack of error handling
you are creating variables that you already have
start of the script:
A random function creating variables it already has:
I could probably go on but I wouldn’t advise using this in a finished game.
Well thanks for the negative feedback, here’s a few answers to those problems : first, i uploaded to the forum this code just a few hours ago and i still need to fix one or two things. Second, you noticed that there many useless variables and my code is not really doing the best job; there’s a quite simple answer : I still didn’t implement OOP in this resource. In fact im probably gonna make a polished version of this (kinda messy) resource into one organized module script. Lastly i wanted to say that this resource is indeed to learn from it, not to use it in a finished game, or at least not without some more functions.
You shouldve waited until you finished the polished version before uploading this as a community resource
Beginners shouldnt be learning messy code, because they may look at messy parts of this and not know any better but to think its right.
You may want to put a disclaimer that this is still in an early state and not recommended for use yet. Although dont let this get you down, the system looks cool, but just needs some improvement.
Thanks everyone for all the feedbacks; when i have time i will delete this resource asap from the forum. If you’re reading this DO NOT use this engine. @baseparts@TheNamesLua@EvilVSCPlays
Yeah… i mean you can use this if you need to test something and need a quick gun for that. Now im working on a destruction physics system. Ill make sure to release a polished version in the first place.
ok i will credit you, btw projectiles take time to start moving and take time to get destroyed because of the other lines in the codes, i modified it very much but still look bad