Hey,
I was wondering how to implement bullet mechanics. It would help me if you could give the full code with all of the love function etc. cause I get to study the code and I want to understand it well thanks!
Gun Mechanics
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- MicroMacro
- Citizen
- Posts: 92
- Joined: Fri May 30, 2014 2:30 am
- Location: Boston, MA, USA
- Contact:
Re: Gun Mechanics
Well, I'm no expert. I have made simple gun mechanics before.
It depends on how you want it to work. If you want the bullet to follow your mouse, it's a bit trickier, but there's a great wiki article on how to do that.
It depends on how you want it to work. If you want the bullet to follow your mouse, it's a bit trickier, but there's a great wiki article on how to do that.
https://github.com/ebernerd- where you can find all my work.
Re: Gun Mechanics
Well... that isn't what I was looking for, sadly.
Re: Gun Mechanics
Then you should explain what you're aiming for instead - we cannot read your mind.Semeon wrote:Well... that isn't what I was looking for, sadly.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Gun Mechanics
Nor will we code it for you whole.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Gun Mechanics
To give an idea, if you want to have different guns. You have a table of characteristics for each type you will use in the game. This is loaded when the player equips the weapon or an NPC. You can tweak the modifiers to balance the game. In the game each gun would have its own unique instance in the game world so you could account for things like upgrades and modifications, wear and damage ect.. So that not each instance of the type is the same.
You can make it as realistic/complicated as you want. But you will have more of a simulation than a game then if you go down that route. Plus you model the guns that realistic it places a burden on you to model the rest of the game world in the same way.
if you model the bullet characteristics properly and the environment you will quickly find your game is totally unplayable. In a cover shooter for instance if the NPCs have AK47 or AR-15, and you take cover behind most available cover in a environment, they open up on you even in full cover the player is going to get shredded. Realistic but not so good from a game-play narrative perspective.
Trying to keep track of enemy ammunition levels, get them to reload and replenish in a logical way. That is not a trivial thing to implement and will become an accounting nightmare. I have yet to see a game where the NPCs actually adjust there attack patterns based on ammunition reserves.
You can make it as realistic/complicated as you want. But you will have more of a simulation than a game then if you go down that route. Plus you model the guns that realistic it places a burden on you to model the rest of the game world in the same way.
if you model the bullet characteristics properly and the environment you will quickly find your game is totally unplayable. In a cover shooter for instance if the NPCs have AK47 or AR-15, and you take cover behind most available cover in a environment, they open up on you even in full cover the player is going to get shredded. Realistic but not so good from a game-play narrative perspective.
Trying to keep track of enemy ammunition levels, get them to reload and replenish in a logical way. That is not a trivial thing to implement and will become an accounting nightmare. I have yet to see a game where the NPCs actually adjust there attack patterns based on ammunition reserves.
Re: Gun Mechanics
Hey thanks I did understand what you were talking about, but I managed to figure another way to implement gun mechanics using controller input!
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests