Questions tagged [shooter]

A game where the primary player action is to attack and eliminate enemies.

Filter by
Sorted by
Tagged with
1 vote
1 answer
67 views

Why won't my bullets shoot?

I am making a top-down shooter in Unity (following a Brackeys tutorial for the top-down shooting mechanic). When I press the left mouse button a bullet prefab spawns, as it should, however there is no ...
0 votes
1 answer
256 views

How do I change only the angle of a certain PNG relative to the position of the mouse? (Python, Pygame)

Basically, I'm doing a game for a school project and I am not really sure how to make a player point towards the mouse pointer in a pygame tab. also if anyone has ideas of how i could point a bullet ...
0 votes
1 answer
69 views

circles originating from player position not showing up on pygame window

I'm kinda new to python and pygame, anyone know why this won't show bullets coming out from my character? ...
80 votes
30 answers
20k views

How can I discourage camping while still supporting a "sniper" style of play?

I am trying to add features into a third person shooter that suit a sniper style of play, in addition to the current rush/deathmatch style it was designed for. The current gameplay is similar in style ...
1 vote
1 answer
122 views

How to fix animation script so that humanoid character holds their weapon

I am trying to follow this tutorial video about setting up an third-person shooter character in Unity. But my character will not hold their weapon. I'm also getting the following warnings in my ...
0 votes
2 answers
459 views

"Instantiate" function in Unity spawns enemy but it doesn't show up

So, I'm making a top down shooter (2D) and I already made an enemy prefab. It walks to the player and damages it, and reacts to bullets physically until it eventually dies. The prefab itself is ok, ...
0 votes
2 answers
276 views

2D - How to make a gun muzzle aim at the mouse when the rotation pivot isn't on the muzzle?

I'm making a simple 2D shooter game in pygame and I've come across an issue when making the character aim its gun at the mouse. To make the gun aim up and down, I've set it so that the gun uses the ...
2 votes
1 answer
96 views

Should ammo limitations be controlled by the game class or the weapon class?

I have a simple shooter game with a GameLevel class and a Shooter class. The shooter has a set amount of ammo, and every time the ...
0 votes
1 answer
1k views

How to implement Vector3.MoveTowards follow with random movement

I want to implement an AI behavior where an enemy runs towards the player while sidestepping randomly and aggressively (like in this video: https://www.youtube.com/watch?v=35Ut_C4eL40) Currently I am ...
5 votes
4 answers
20k views

How can I make the player "look" to the mouse direction? (Pygame / 2D)

Here's my code: ...
0 votes
1 answer
105 views

Why the enemy is flipping constantly when it collides with an obstacle?

I'm making a 2D platformer with Unity. I have an enemy patrol that shoots bullet. The enemy is working fine until it reaches to a point that should be turn around. (when collides with an obstacle or ...
0 votes
0 answers
325 views

Unity 2D Player Shoots at my joystick position

Hi I am new to unity and have only a little coding knowledge. Right now I have made my character shoot at my touch position on mobile but when ever I touch the joystick, whick I use to move my ...
1 vote
0 answers
656 views

Shot em up! Vertical or Horizontal "side scrolling"?

Question it’s about "Shot em up" style game (For example: Tyrian) also known as Top-Down shooters. These games in the past mostly exist as top down concept, it means player object can move ...
1 vote
1 answer
711 views

setTransform() Box2D physics not working

It's my first time posting here! I'm working on a top-down shooter game in LibGDX and Box2D (so gravity is set to (0, 0)). At the moment, to move my character, I'm ...
1 vote
0 answers
31 views

Unity problem with instantiated objects when destroyed

So this is my problem, I have a square that when destroyed spawn 4 smaller squares when shooting on it, but when I shoot one of the 4 smaller squares sometimes a different square that are not even ...
0 votes
1 answer
827 views

2D Topdown Shooter - Line of sight based purely on angle and rotation

In a game I'm working on, enemies constantly rotate around as they move around the map. I want them to only shoot the player if they're within a field of view. This is the function header: ...
1 vote
1 answer
668 views

Making only parts of a mesh destroy in UE4

I am making a 3d, 3rd person shooter game where I want everything to be destructible. UE4 makes this possible by making meshes destructible, but the problem is that when the mesh is damaged, it ...
0 votes
1 answer
286 views

Can't correct perspective of Main Camera in Unity 3D without losing field of view

I have been trying to create a space based rails shooter game following a particular online course and I find a tilt(roll) on my spaceship as I move it towards the left and right ends of the screen. ...
0 votes
1 answer
128 views

Animator from another gameobject keeps disappearing from script on play

I am working on a gun script and it worked fine until earlier today when I made a change to the script and it stopped working. I put it back, but for some reason now the animator object attached to ...
0 votes
1 answer
191 views

How do I make the player gun stop firing when sprinting

I am trying to get the players gun to fire when the player is walking and the stop firing when the player starts to sprint. The gun will work just fine and ire when the player is walking, but it will ...
0 votes
1 answer
522 views

PyGame - Top down shooter mechanics

I'm currently developing a game for some school work using the PyGame library for Python. I'm almost done with most of the game's core mechanics, but have gotten hung up on the shooting mechanics. My ...
0 votes
0 answers
572 views

Unity - Bullet spawns in wrong position in client

I am making a multiplayer game with prefab shooting, but unfortunately the prefab sometimes spawns in the wrong position when I shoot from a client. The bullet ...
0 votes
2 answers
1k views

How would I apply force to a bullet in 2D?

I wrote the code below in order to try to get a bullet to fire at a specific angle for my top-down shooter. However when I press space the bullet just spawns in front of the game object despite it ...
0 votes
1 answer
1k views

Unity C#: Accurate MachineGun Firerate at lower FPS

I have long accepted that my firerate will be more or less irregular and inaccurate. Now that I'm adding sound things are getting really ugly. My methods for getting the firerate are primitive and I ...
0 votes
1 answer
673 views

Rotating Weapon Towards mouse.position

OK guys i have tried lots of things and researched but cannot find a solution please someone give me hope.. So on my phone when i am playing i want to shoot with a screen button in the canvas that is ...
3 votes
3 answers
141 views

TypeScript Space Shooter movement

I'm trying to create a simple space shooter game using typescript and i've got kind of stuck at checking the movement.The thing is that if i only press one key it works fine but if i press 2 keys at ...
1 vote
1 answer
2k views

Unity - How can I make my player's gun point at the cursor, not the player itself? [duplicate]

I'm making a 2D top-down shooter in unity. Currently, I'm using the code below to point my player towards my cursor at all times, this works but isn't exactly what I want. ...
1 vote
2 answers
4k views

Programmatically creating a continuous scrolling background in Game Maker: Studio

I have 15 background images for a 2D horizontal scrolling shooter game and I have been wondering how to insert programmatically those background images in the first level room, as I want them to be ...
1 vote
0 answers
104 views

TBS Shooter targeting AI

I have some experience in developing all sorts of (small) games using Unity3D, I have a few personal game projects and I also work for a small game studio. The only subject in game development that I'...
2 votes
2 answers
417 views

About making damage between units

I am making my own Tower Defence game engine. I havent built one before and I don't know lot of stuff how games work. I will take Starcraft as an example. You have a marine shooting a zergling from ...
1 vote
1 answer
579 views

Twin stick shooter turning and animation using Vector3.Angle() in Unity

I am trying to smoothly transition between running, strafing, and running backwards by calculating the angle between the left thumb stick (move) and the right thumb stick (rotate). It is my ...
1 vote
1 answer
85 views

Help creating a new gunfire code

I am working on a top down shooter project, utilizing the Tumult Hype program ( this means I cannot use Canvas and anything that works within canvas does me no good.) I have hit a small snag. The code ...
2 votes
1 answer
116 views

2D bone animation - point gun at mouse

How is this handled? https://www.youtube.com/watch?v=egk3yD1w4Wo It's some form of kinematics which I kinda understand and I have a very solid grip of trig, but I don't know how to start with having ...
3 votes
1 answer
187 views

Detecting interesting kill in a 2D shooter

In Xonotic for some kills (and maybe even just hits?) the game plays a sound clip saying "Impressive!". I was wondering how does the game recognize that a kill was impressive. In Xonotic it feels like ...
1 vote
1 answer
358 views

Categorizing Projectiles in an arcade shooter (multiple inheritance?)

I have been working on a simple arcade shooter in Java in the vein of missile command/space invaders. I've made a base Projectile class and have been extending other Projectile types from it. This ...
0 votes
1 answer
3k views

How to make a top down shooter? [closed]

I want to know is with XNA 4.0 (and C#) How do I exactly make a top down shooter? I have been looking for ages, but have been unable to find out how. If someone could tell me how to get started with ...
0 votes
1 answer
213 views

How to map changing stances (southpaw/orthodox) to gamepad controls?

I am developing a third person hack n slash style game which features a variety of melee and projectile weapons as well as unarmed combat. The player will be able to dual wield any combination of the ...
0 votes
1 answer
515 views

Can this script be edited to create a "shotgun" type spread when firing? [Top down shooter]

I have this code and I'd like to add a shotgun to the game by slightly modifying the code. I've looked online for any example but everything I find is for FPS not a TDS. ...
0 votes
1 answer
1k views

Rotating A 2D Cannon Based On Mouse Position [duplicate]

I'm creating a game like bubble shooter, I have a cannon which is in the image bellow: I want to rotate the cannon based on mouse position. So far I tried various solutions I found over the web but ...
2 votes
1 answer
155 views

My bullet changes the velocity depending on where I click

I want to build a little 2D-Sidescrolling shooter and I'm now at the shooting script. I already figured out how to shoot a bullet towards my mouse pointer. I got something like this : ...
8 votes
3 answers
5k views

How to Effectively Create Bullet Patterns

I'm currently creating a top-down shooter like Touhou. The most important factor of the game is that there are many diverse patterns and ways at which bullets are generated and shot at the player, see ...
0 votes
1 answer
79 views

Rotating 2D-Projectile towards mouse, hides the projectile (Maybe changes the layer)

I want to shoot towards my mouse, which is working fine now. After this was solved, I wanted to rotate the projectile, so that it's looking to the mouse. This is my code: ...
2 votes
1 answer
557 views

Gamemaker - Change the fired bullets' direction using objects as guide

So I am trying to create a shooting-ship-puzzle game at sea on gamemaker. There is a playership that must shoot the enemy ships using only the available "whirlpools". There are many whirlpools in the ...
0 votes
1 answer
444 views

Using buttons on Smartphone shooter games [closed]

Just a simple and probably stupid question. I noticed that many iOS and Android shooter games tend to avoid using traditional buttons in favour to autofire. The very first reason to do so is to ...
0 votes
1 answer
126 views

3d rotation of a Gunner unit to shoot the target

I'm developing a scenario to shoot incoming targets by a specific gunner unit, however I'm confused to actual logic of shooting an object with a gun. I'm working in 3D environment. I'v target's ...
5 votes
3 answers
3k views

How to Align Gun with Bullets

I have a top-down 2D shooter. I have an image of a player holding a gun, that rotates to face the mouse. Please note that the gun isn't a separate image tethered to the player, but rather part of the ...
1 vote
2 answers
135 views

What factors affect the size of ammo limits?

In virtually all shooting games that use ammo, there is also a maximum ammo limit, which often varies between different ammo types. One obvious advantage of using ammo limits is to control the ...
0 votes
1 answer
1k views

Java2D Shooting in a line tangent to mouse coordinates

I am making a top down shooter in Java and I need to be able to shoot in a line tangent to the mouse coordinates. In other words I need to be able to click my mouse and have a projectile spawn from my ...
-1 votes
1 answer
975 views

Why bother with server-side hit detection?

Valve's hit detection tracks player positions from when the bullet fired and then tells clients only whether the hit happened, but I can't see why that is necessary in the first place. Does server-...
2 votes
1 answer
690 views

Bullets won't shoot out of barrel in top-down shooter

So I am working on a top down shoot and have been stumped on why my bullets refuse to come out of the barrel of the gun. I know about the rotation equation which is ...