Skip to main content

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
101 views

Unable to Shoot Enemies Due to Proximity in a 2D Game

I’m developing a 2D top down shooter where the player has a pistol. However, I've noticed that when enemies get too close, the player can't shoot them because the pistol doesn't have a collider. I ...
Javier Triviño's user avatar
1 vote
1 answer
71 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 ...
John Hughes's user avatar
0 votes
1 answer
76 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? ...
luckee365's user avatar
0 votes
1 answer
277 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 ...
luckee365's user avatar
1 vote
1 answer
130 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 ...
soulaiman koursi's user avatar
0 votes
2 answers
301 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 ...
jaregax432-awinceo's user avatar
2 votes
1 answer
101 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 ...
Gary Allen's user avatar
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 ...
gamer1's user avatar
  • 65
0 votes
1 answer
113 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 ...
Ali's user avatar
  • 55
0 votes
0 answers
335 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 ...
Anees's user avatar
  • 1
1 vote
0 answers
693 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 ...
streng's user avatar
  • 31
1 vote
1 answer
797 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 ...
Rohan's user avatar
  • 135
1 vote
0 answers
33 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 ...
galbe-droid's user avatar
0 votes
2 answers
488 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, ...
tralph3's user avatar
  • 101
0 votes
1 answer
899 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: ...
random5999's user avatar
0 votes
1 answer
134 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 ...
Ethan K-B's user avatar
0 votes
1 answer
197 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 ...
Ethan K-B's user avatar
0 votes
1 answer
297 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. ...
WRECKER_1's user avatar
0 votes
1 answer
568 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 ...
Mingy's user avatar
  • 3
0 votes
0 answers
590 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 ...
FlorisdG's user avatar
  • 181
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 ...
Mark Gregg's user avatar
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 ...
AzulShiva's user avatar
  • 679
0 votes
1 answer
681 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 ...
Todd Weiss's user avatar
3 votes
3 answers
145 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 ...
Tr Sorin's user avatar
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'...
user avatar
1 vote
1 answer
86 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 ...
Zephyranthes's user avatar
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 ...
PayToPwn's user avatar
  • 123
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. ...
Toby Smith's user avatar
2 votes
1 answer
126 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 ...
NuBc4k3's user avatar
  • 31
3 votes
1 answer
193 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 ...
cube's user avatar
  • 228
5 votes
4 answers
21k views

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

Here's my code: ...
Ericson Willians's user avatar
1 vote
1 answer
594 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 ...
Doctor Win's user avatar
1 vote
1 answer
372 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 ...
user3772547's user avatar
0 votes
1 answer
232 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 ...
FrontEnd's user avatar
  • 1,737
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 ...
FrontEnd's user avatar
  • 1,737
1 vote
1 answer
677 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 ...
GuPe's user avatar
  • 77
0 votes
1 answer
521 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. ...
Gutsee's user avatar
  • 3
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 ...
Game Dev 4 Life's user avatar
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: ...
TobiasW's user avatar
  • 987
2 votes
1 answer
156 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 : ...
TobiasW's user avatar
  • 987
2 votes
1 answer
566 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 ...
Freakenknight's user avatar
1 vote
2 answers
138 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 ...
congusbongus's user avatar
  • 14.9k
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 ...
user2449865's user avatar
0 votes
1 answer
129 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 ...
Ahsan Ali's user avatar
  • 103
-1 votes
1 answer
985 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-...
Patryk Czachurski's user avatar
2 votes
1 answer
693 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 ...
G3tinmybelly's user avatar
1 vote
1 answer
924 views

DirectX Bullet Tracer Effect

I'm wondering if anyone knows some common and efficient ways to do a fast tracer for an instant bullet. I've seen people speak on forums of using primitive lines with DirectX, but I doubt this is up ...
Joseph Pla's user avatar
0 votes
1 answer
770 views

How can AI compute movement in 2D games

I know how to create a basic AI for a game, where the AI simple creates units that only march forward. The AI only decides when to create a new unit, taking into account a number of considerations. ...
user3150201's user avatar
0 votes
1 answer
295 views

Questions about networking theory in a 2d shooter game [duplicate]

So currently I am starting to work on a 2d top down space shooter game, and I have just got to networking. So far the client can draw a ship at a desired x, y and rotational coordinate with any set of ...
Lemon Drop's user avatar
2 votes
2 answers
424 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 ...
Vlad's user avatar
  • 199