Implementing Ranged Weapons

In our poll from earlier, we decided that users would be able to carry two weapons, that were either melee weapons or ranged weapons. But we haven’t actually decided how we are going to have melee or ranged weapons work.

There are a few different options for how we can set the two different types of weapons apart from each other. One way would be to add an “ammo” counter to any ranged weapon – ranged weapons would then be different because players would need to carry ammo for them as well.

Another way would be to use an “extra hits” option – essentially, when a player is using a ranged weapon they get extra hits in a combat situation.

A far simpler way to differentiate the two weapon types would be to simply flag them – melee weapons communicate to the user somehow that they are melee weapons, and ranged weapons somehow communicate to the user that they are ranged weapons. Aside from being of one or the other type, there would really be no difference between the two types of weapons.

For the sake of our game, we are going to be combining all of these options. Certain ranged weapons will require ammunition, and all ranged weapons will identify themselves as ranged weapons and grant an extra hit in combat.

And that’s how ranged weapons are going to work! We’ll use our stats system to store the information on what type of weapon a specific weapon is, along with storing which weapons are the user’s primary and secondary weapons(another question: should users have to toggle their weapons, or can they dual wield?). We’ll also use our stats system to keep track of which item is to be used as ammunition for any particular ranged weapon.

Should a user toggle which weapon is active, or be allowed to dual wield?
View Results

With all that being said, it sounds like there is a lot of work to do! Unfortunately, I will be away until friday – but check back then for how to get started implementing our weapons system.

Wish there was more?

I'm considering writing an ebook - click here.

.

Luke is the primary editor of Building Browsergames, and has written a large portion of the articles that you read here. He generally has no idea what to say when asked to write about himself in the third person.

Tuesday, August 5th, 2008 combat, design
blog comments powered by Disqus

About

Building Browsergames is a blog about browsergames(also known as PBBG's). It's geared towards the beginner to intermediate developer who has an interest in building their own browsergame.

Sponsors

Got Something to Say?

Send an e-mail to luke@buildingbrowsergames.com, or get in touch through Twitter at http://twitter.com/bbrowsergames