1 (edited by android272 2015-12-18 10:25:48)

Topic: Revamp Guns

I know that there has be a lot of requests to add more guns to TeeWorlds in the past. That is not what this post is about. With the current system if the developer wanted to add more guns they would have to add it to the sprite sheet and then every current game.png file on the net would brake. Minecraft realized a few versions ago that using sprites can be a hassle. I say that you strip guns away from the game sprite sheet and create a new system that would be a lot easier to add to. Here is my proposal.

Guns

cross_hair

ammo

The guns, cross hairs, and ammo above would all be their own separate image. They were also not created by me, who ever did these did an awesome job.

new file structure:
data
└ weapons
  ├ ammo
  │ └ weapon_name_ammo.png/.svg
  ├ cross_hair
  │ └ weapon_name_cross_hair.png/.svg
  ├ muzzle_flash
  │ ├ weapon_name_muzzle_flash_1.png/.svg
  │ ├ weapon_name_muzzle_flash_2.png/.svg
  │ └ weapon_name_muzzle_flash_3.png/.svg
  ├ particles
  │ ├ weapon_name_smoke.png/.svg
  │ └ weapon_name_explotion.png/.svg
  ├ sounds
  │ ├ ammo_pick_up.wv
  │ ├ weapon_fire.wv
  │ ├ weapon_hit.wv
  │ ├ weapon_reload.wv
  │ ├ weapon_pick_up.wv
  │ └ weapon_switch.wv
  ├ weapon
  │ └ weapon_name.png/svg
  └ weapon_name.xml


weapon_name.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<weapon>
    <ammo>
        <!-- Amount of ammo in a stack. -->
        <amount>10</amount>
        <!-- How many stacks of ammo a weapon can carry. -->
        <ammo_stack>3</ammo_stack>
        <!-- Name of the bollet/ammo. -->
        <name>weapon_ammo_name.png/svg</name>
        <!-- If no weapon can only carry one stack of ammo. -->
        <reload>yes</reload>
        <!-- Duration it takes to reload. -->
        <reload_spead>0.97</reload_spead>
    </ammo>
    <cross_hair>
        <!-- Name of this wepons cross hair. -->
        <name>weapon_cross_hair_name.png/svg</name>
        <!-- If yes when the player hits "Z" the chamera will move ferther. -->
        <zoom>no</zoom>
        <!-- How far the camera moves. -->
        <zoom_amount>0</zoom_amount>
    </cross_hair>
    <muzzle_flash>
        <!-- First muzzle flash image. -->
        <muzzle_flash_1>weapon_muzzle_flash_1.png/svg</muzzle_flash_1>
        <!-- Second muzzle flash image. -->
        <muzzle_flash_2>weapon_muzzle_flash_2.png/svg</muzzle_flash_2>
        <!-- Third muzzle flash image. -->
        <muzzle_flash_3>weapon_muzzle_flash_3.png/svg</muzzle_flash_3>
        <!-- X position relitive to the weapons image. -->
        <x>234</x>
        <!-- Y position relitive to the weapons image. -->
        <y>15</y>
    </muzzle_flash>
    <projectile>
        <!-- How fast the weapon can fire. -->
        <fire_rate>50</fire_rate>
        <!-- If yes ammo will ark like the curent grenade loncher. -->
        <ark>no</ark>
        <!-- Weapon projectile name. -->
        <name>weapon_projectile.png/svg</name>
        <!-- Weapon smoke name. -->
        <smoke>weapon_smoke.png/svg</smoke>
        <!-- X position relitive to the weapons image. where projectile and ammo exits. -->
        <x>234</x>
        <!-- Y position relitive to the weapons image. where projectile and ammo exits. -->
        <y>15</y>
    </projectile>
    <sounds>
        <!-- Sound for when the player picks up more ammo. -->
        <ammo_pick_up>ammo_pick_up.wv</ammo_pick_up>
        <!-- Sound for when the weapon fires. -->
        <fire>weapon_fire.wv</fire>
        <!-- Sound for when the ammo hits something. -->
        <hit>weapon_hit.wv</hit>
        <!-- Sound for when the player reloads. -->
        <reload>weapon_reload.wv</reload>
        <!-- Sound for when the player picks up a weapon. -->
        <weapon_pick_up>weapon_pick_up.wv</weapon_pick_up>
        <!-- Sound for when player switches to this weapon. -->
        <weapon_switch>weapon_switch.wv</weapon_switch>
    </sounds>
    <weapon>
        <!-- How much damage the gun deals. -->
        <damage>5</damage>
        <!-- Name of the image for this weapon. -->
        <name>weapon_name.png/svg</name>
        <!-- If yes a second hand will be holding the weapon when the tee looks left. -->
        <two_handed>yes</two_handed>
        <!-- Image of weapon for when the weapon is fired. -->
        <fire_animation>weapon_fire_animation.png/svg</fire_animation>
        <!-- X position of hand one. -->
        <hand_one_x>234</hand_one_x>
        <!-- Y position of hand one. -->
        <hand_one_y>15</hand_one_y>
        <!-- X position of hand two. -->
        <hand_two_x>234</hand_two_x>
        <!-- Y position of hand two. -->
        <hand_two_y>15</hand_two_y>
    </weapon>
    <explosion>
        <!-- If yes ammo will explode on impact -->
        <explosive>no</explosive>
        <!-- Image one for explotion. -->
        <explosion_1>weapon_explosion_1.png/svg</explosion_1>
        <!-- Image two for explotion. -->
        <explosion_2>weapon_explosion_2.png/svg</explosion_2>
        <!-- Image three for explotion. -->
        <explosion_3>weapon_explosion_3.png/svg</explosion_3>
    </explosion>
</weapon>

So the weapon_name.xml file is what tells TeeWorlds how this weapon acts and tells it what the names of the files to look for. TeeWorlds will expect to find the ammo, cross_hair, muzzl_flash, projectiles, sounds, and weapon in their repective folders and looks for the file specified in the xml file.

TeeWorlds will take care of everything the gun needs:ex if someone is making a bow n arrow weapon and wants it to arK like the current grinade loncher does all they need to do is set projectile ark to yes and TeeWorlds just knows what this means.

zoom is an atribute that TeeWorlds currently does not have.  When the player is holding a weapon that can zoom, when they press the "Z" key the camera will move the distance specified in the xml file away from the player.

ammo stacks and reload is another attribute that is new.  if reload is set then the weapon can have more than one ammo stack.  when the player runs out of ammo reload_spead is the amount of time it takes to reload a stack. ammo is not reloaded one at a time like the current postal but all at once.

This is a better system because if a server wants to add weapons that is not in TeeWorlds all they will have to do is add an xml file, images, and sounds to their game. if a player does not have a gun that the server uses it will be downloaded for them and placed where everything needs to go.  when a player joins a game TeeWorlds will check the xml file to see if they have modified it and redownload the weapon to insure they can not cheat.

Note: FileLocations, filenames, xml order and names are all subject to change. please let me know what you think and if you have any suggestions.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

2

Re: Revamp Guns

Hi

Your proposal has some heavy issues but I'm not going to dive into them now.

Adding a separate weapon sheet is cool idea but right now there's no need for it since there's no plans to add more weapons (as far as I know). Adding more weapons to vanilla should add something to gameplay, not just different damage, fire rate and skin but something unique.

-

I just recently added a separate weapon sheet to my client so you can play with "random" weapon skins. And if you play Killing Floor, each of the 17 weapons (except for Mjölnir, I still need a skin for it) has unique weapon skin.

My current weapon sheet:
http://ninslash.com/goreclient/weapons.png

3

Re: Revamp Guns

There is no official support for mods and probably never will be. So just things that concern the official version are relevant. The actual weapon layout is fine as it is and there are no plans to add any new weapons.

Remember the 80s - good times smile

4

Re: Revamp Guns

Siile

please let me know what would be wrong with this proposal.  I knew that there would be issues but that is why we have these forums to iron these out.

This proposal is not about adding any new weapons to vanilla. I don't have any good ideas for a weapon that would add value to TeeWorlds.  and thats ok someone else will have an idea for a weapon that will change the game forever. This proposal is about making it easier for the devs and people who run servers to add new own guns.

once TeeWorlds understands how to read the weapon.xml files not much work will be needed to be done if anyone wants to add a new weapon that will enhance the value of the game. Who knows a machine gun with a faster fire rate could change the game play and add value.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

5

Re: Revamp Guns

There was some talk about new power-ups. Maybe these would require such a new approach?
But I understand that, as long as there won't be new official items, the devs won't touch the current system.

Loving TW since 2010 smile

6

Re: Revamp Guns

Yes power-ups could use the same system. add a new power-up.xml and you have a new power up.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

7

Re: Revamp Guns

Seems like the kind of engine that would be suited if Teeworlds had a dynamic set of weapons to play with, but this is not the case, so as well presented and explained as it is, it doesn't fit Teeworlds in its current state.

Not Luck, Just Magic.

8

Re: Revamp Guns

What do you mean by "a dynamic set of weapons"?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

9

Re: Revamp Guns

Where you would use a different set of weapon depending on the map or gametype you play.

Not Luck, Just Magic.

10

Re: Revamp Guns

Im sorry I don't see how that has anything to do with this. would not it be up to the map makers to put various weapons in the maps? The this would work what ever weapons the cartographer has on their computer would be made available while making maps. If the cartographer only puts rocket launchers or shotguns on the map then that will be the only gun made available on that map. no matter what weapons I have in my weapons folder.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

11

Re: Revamp Guns

android272 wrote:

Im sorry I don't see how that has anything to do with this. would not it be up to the map makers to put various weapons in the maps?

It doesn't matter, they cannot use any custom weapons. So there can only be hammer/pistol/shotgun/grenade/rifle/ninja.
So using this kind of system has no advantage really.

Not Luck, Just Magic.

12

Re: Revamp Guns

That is why I made this proposal.  If custom weapons existed I would not have to make this post.  TeeWorlds would have to change a bit to except these new custom weapons. 

I have seen over any over again people asking for various weapons to be added. They think that their gun should be added because they think it would add value to the game.  I don't know if it will or not I don't have any specific examples. But say that someone comes along with an idea that truly would add value to the game.  Instead of you having to go into the code and make modifications every time a someone with an idea for a new weapon that would add value comes along.  Would it not be better to write a system like this one now once, than to have to mess with the code multiple times?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

13

Re: Revamp Guns

android272 wrote:

That is why I made this proposal.  If custom weapons existed I would not have to make this post.  TeeWorlds would have to change a bit to except these new custom weapons.

I have seen over any over again people asking for various weapons to be added. They think that their gun should be added because they think it would add value to the game.  I don't know if it will or not I don't have any specific examples. But say that someone comes along with an idea that truly would add value to the game.  Instead of you having to go into the code and make modifications every time a someone with an idea for a new weapon that would add value comes along.  Would it not be better to write a system like this one now once, than to have to mess with the code multiple times?

Oy wrote:

There is no official support for mods and probably never will be. So just things that concern the official version are relevant. The actual weapon layout is fine as it is and there are no plans to add any new weapons.

I understand you're trying to please everyone - and I agree that this (sort of) system would be a good change if we were to add custom weapons - but the thing, we're not willing to.

Not Luck, Just Magic.

14

Re: Revamp Guns

Could we at lease discuss ways to improve my proposal? or could it be put in the bug tracker/feature list so that if anyone gets interested in implementing a feature such as this they could come back to this and improve it?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

15

Re: Revamp Guns

android272 wrote:

Could we at lease discuss ways to improve my proposal? or could it be put in the bug tracker/feature list so that if anyone gets interested in implementing a feature such as this they could come back to this and improve it?

I don't understand what would be the goal of that. The issue is not the implementation or how well designed it is.
This may take some tweaking but I'm pretty sure this can be done without too much work.

Not Luck, Just Magic.

16

Re: Revamp Guns

It's very helpful for everyone.
สล็อตจีคลับ