-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR closes #573. I added `bullet_spread` system to the machine gun because I think it balances the game and looks good, and added `empty_cooldown` because it would be really boring if `gun_empty.ogg` kept playing at the same frequency as the normal cooldown, so in this gun we have the shooting cooldown and the empty sound cooldown. I also made a very slight change in the main system for using items because it had to be able to shoot constantly, so now you can keep shoot input pressed with any weapon. Something I think is important to mention is that the shooting animation is synchronized to the rate of fire, so if you change the rate of fire the animation will also change. It could be easily changed with a new variable in the .yaml so let me know whether you think it should be faster or slower. The machine gun has two states (idle and shooting) and its only function is to reset and start animations.
- Loading branch information
Showing
20 changed files
with
369 additions
and
12 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
assets/elements/item/machine_gun/bullet/machine_gun.bullet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
lifetime: 0.65 | ||
speed: 650 | ||
body_diameter: 15 | ||
atlas: ./machine_gun_bullet.atlas.yaml | ||
|
||
explosion_fps: 12 | ||
explosion_frames: 3 | ||
explosion_volume: 0.025 | ||
explosion_lifetime: 0.4 | ||
explosion_sound: ../explosion/bullet_hit_dull.ogg | ||
explosion_atlas: ../explosion/explosion.atlas.yaml |
4 changes: 4 additions & 0 deletions
4
assets/elements/item/machine_gun/bullet/machine_gun_bullet.atlas.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
image: ./machine_gun_bullet.png | ||
tile_size: [30, 4] | ||
rows: 1 | ||
columns: 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
assets/elements/item/machine_gun/explosion/explosion.atlas.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
image: ./explosion.png | ||
tile_size: [11, 11] | ||
rows: 1 | ||
columns: 4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
image: ./machine_gun.png | ||
tile_size: [80, 24] | ||
rows: 2 | ||
columns: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
name: Machine Gun | ||
name: MachineGun | ||
category: Weapons | ||
data: machine_gun.yaml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
atlas: ./machine_gun.atlas.yaml | ||
|
||
max_ammo: 25 | ||
cooldown: 125ms | ||
empty_cooldown: 600ms | ||
bullet_meta: ./bullet/machine_gun.bullet.yaml | ||
bullet_spread: 0.1 | ||
|
||
shoot_sound_volume: 0.1 | ||
shoot_sound: ./shoot/shoot.ogg | ||
empty_shoot_sound_volume: 0.1 | ||
empty_shoot_sound: ./shoot/gun_empty.ogg | ||
|
||
bounciness: 0.3 | ||
can_rotate: true | ||
body_size: [32, 8] | ||
fin_anim: grab_2 | ||
angular_velocity: 0.1 | ||
throw_velocity: 360 | ||
grab_offset: [13, -3] | ||
kickback: 75 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.