Questions tagged [2d]

2D refers to two dimensional space where coordinates are represented with X and Y values.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Collision manifold between shapes

I am implementing the narrow phase collision detection of a 2d physics engine. The narrow phase takes a list of shape pairs: [(s1, s2), (s2, s5), ...] And for each ...
Eilan Laken's user avatar
1 vote
2 answers
64 views

Representing a concave polygon as a hull "minus" convex cavities

I am implementing 2D collision detection, and trying to tackle the problem of concave polygon vs. shape. The SAT works only for convex shapes. I was wondering if the following approach is a viable ...
Eilan Laken's user avatar
0 votes
1 answer
29 views

How do I move both the child & parent game objects at the same time?

My current code is: ...
Saltii's user avatar
  • 1
0 votes
1 answer
53 views

Circle to Polygon & Circle to Circle Velocity Resolution

I am working a 2d physics engine. Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
NoStepOnSnek's user avatar
1 vote
2 answers
44 views

Different Spacing of all Children Grid Layout Group

I am creating a top down 2D game, and I am creating randomized triangles on the ground. Such as this: This is to enhance the "knowledge" that you are moving. But it certainly doesn't look ...
sammyiscuul's user avatar
1 vote
1 answer
56 views

Tiled Map in Unity is Darker than in Tiled Editor

I have a problem rendering a Tiled Map in Unity (.tmx format): the Tiled Map is darker in Unity than in Tiled Editor. I tried to change properties but got same ...
Resorter's user avatar
1 vote
1 answer
56 views

Get Impulse force needed for parabolic projectile launch

I want to create a projectile that fires upwards and in a sense falls down onto the player, like this: I found through some research I needed to use a "parabolic" equation. However it wasnt ...
Pow's user avatar
  • 383
2 votes
1 answer
695 views

Creating a new camera in 2D mode sets it as default, despite not being the main camera

I created a new camera in Unity's 2D mode, and for some reason it's being set as the main camera, despite not being tagged as such. The original main camera is in fact tagged as "main camera"...
Jimbojaggi's user avatar
2 votes
4 answers
133 views

Performance issues with high-resolution maps in 2D strategy games

I'm currently developing a 2D strategy game, and I've encountered some issues with the game map. My idea is to use a single 2D image as the strategic map for the game. similar to this (Supremacy 1914) ...
NoPyDeal's user avatar
1 vote
1 answer
59 views

Issue with AttackArea Monitoring Before Attack in Godot 2D Game

I'm developing a 2D game where the player character can attack enemies using a designated attack area (Area2D node named AttackArea). I've encountered a problem where the AttackArea is active and ...
buzzbuzz20xx's user avatar
0 votes
2 answers
109 views

Max velocity for smooth deceleration to destination

I am able to update velocity of my agent every 0.5 seconds. My agents max speed is 5f/s and max acceleration/deceleration is 2f/s. I know how far away I am from the destination. How to determine ...
Peter's user avatar
  • 13
1 vote
0 answers
36 views

Stop Jitter On Rigidbody2D From Rotation

I'm currently working on a geometry dash like game, except it is a triangle instead of a square (rubrub calls it a cube). I want it so that it rotates back to 0, 0, 0, when it is touching the ground. ...
sammyiscuul's user avatar
0 votes
0 answers
30 views

Help with 2D Pixel art sizing in unity

I just got into making a pixel art platformer for fun and I wanted it to work so that I could have a scrolling parallax background and also a tile set for the actual level to be played on. I ...
Aiden's user avatar
  • 1
1 vote
0 answers
20 views

Is it possible to always make a trail crossing another trail on top in unity?

I have a couple objects with trail renderers. I was wondering if it was possible to make it so that when an object passes over the trail of another object, it always appears on top ? Because right now ...
Usylom's user avatar
  • 21
1 vote
0 answers
362 views

Y-Sorting in 2D Isometric Games in Godot 4.x

I am having a problem with Y-sorting in an isometric Godot game. More specifically, when my character moves behind/in front of larger objects than one standard tile size, the rendering is inconsistent....
Gergely Kovacs's user avatar
1 vote
1 answer
90 views

Curved Grid Layout Group

I can't find a quick answer anywhere, besides adding a 100 line script that I'm pretty sure is outdated. As the title suggests, I am trying to curve a grid layout group. I also want the children of ...
sammyiscuul's user avatar
0 votes
2 answers
37 views

Trouble setting camera position in Unity

I'm attempting to set the camera position in Unity through code. I have a simple 2D game and there's not much programming so far. I've attached a script to the camera, and in that script I've added ...
Nightmare Games's user avatar
0 votes
0 answers
28 views

Physics Material 2D Not Working When Object Rotating Around Player

I am trying to make a clone of florr.io (I'm not getting sued I know what I'm doing), assuming you don't know what that is, it is a game with petals rotating around you. I'm using a parent object ...
sammyiscuul's user avatar
0 votes
0 answers
46 views

How to align to 2D ground surface directly underneath?

I'm out of ideas at this point. I'm trying to set up a function inside my player controller that aligns the player with whatever is under it (usually the ground), ive tried using Raycasts, collisions ...
Pow's user avatar
  • 383
1 vote
0 answers
55 views

How to enable undo functionality in a custom Unity inspector?

I'm working on a custom inspector/editor for my player controller, the issue is every time I change something and click undo, the undo just undoes clicking on the object not modifying the value. After ...
Pow's user avatar
  • 383
0 votes
0 answers
25 views

Materials on 2D Objects Has Bad Lighting and Changes Shape

Whenever I assign a material on an object in 2D unity, it becomes much darker and if the material is assigned to a circle, the circle becomes a dodecagon. The material is completely white. I can fix ...
sammyiscuul's user avatar
0 votes
2 answers
71 views

How to make a character fall through a BoxCollider2D?

Currently trying to make a 2D game in Unity and I'm trying to make the part where if the character falls in a hole it goes back to spawn, but I currently have a ground box collider blocking it, which ...
TheEpikDuck's user avatar
0 votes
1 answer
145 views

Web application for efficient placement of blocks

Task: to develop a function that efficiently places rectangular blocks in rectangular 2D container. The location of the blocks in the container should be as dense as possible in order to rationally ...
Назар Саханда's user avatar
0 votes
0 answers
13 views

Help please I have task Web application for efficient placement of blocks [duplicate]

Task: to develop a function that efficiently places rectangular blocks in rectangular 2D container. The location of the blocks in the container should be as dense as possible in order to rationally ...
Назар Саханда's user avatar
2 votes
2 answers
206 views

Identify doorways to partition a collection of walls with gaps into rooms

I am looking for an algorithm that can find separate rooms inside a set of walls, by determining which openings should be considered doorways between adjacent rooms. All is defined on a grid. My main ...
Jamek's user avatar
  • 21
0 votes
1 answer
105 views

Weird effect during rendering pixel art in Unity

I am building a top-down 2D game in Unity engine. I have made a house on my own but when I try to render it in Unity, it shows weird effect when camera moves. See the roof of the house: I want the ...
kiner_shah's user avatar
1 vote
0 answers
86 views

How to smooth 2D procedurally generated terrain and create a collider from a Tilemap in Unity

I am making a 2D procedurally generated game like Terraria, and I want my terrain to be smooth similar to how games like Hill Climb Racing look. I have a Tilemap that renders my tileSprites and a 2D ...
Jacko_256's user avatar
0 votes
0 answers
53 views

How to display objects behind tall structures in 2D tilemaps

I'm interested in what happens when you have structures/buildings on a 2D tilemap that are tall enough to block the view of the player. AFAIK, there's a few approaches: Do nothing to display the ...
bli00's user avatar
  • 101
-1 votes
1 answer
90 views

Angry Birds style aiming (ballistic trajectory)

Could you please provide guidance on how to create the curved part? regard,
Saeed Asmani's user avatar
0 votes
2 answers
98 views

Why is my enemy not moving?

I'm trying to make a 2D Unity platform game for a school project, but I can't seem to get the enemy to move. ...
TheEpikDuck's user avatar
0 votes
0 answers
73 views

Pixel platformer character collides with blocks above while there's still a visible gap

I was trying to the set up a tile map for a 2D pixel art game in Godot 4.1 (following a tutorial) and realized that there seems to be an issue or something I am not aware of with the way collisions ...
JAL's user avatar
  • 1
0 votes
1 answer
52 views

Drag-select multiple units code Godot 3.5

The code from where I based my script. The code I have has the these 2 problems: The visual area for the player to see what unit are going to be selected doesn't work as intended, if I start dragging ...
Progs's user avatar
  • 93
0 votes
1 answer
118 views

Simulated light for a 2D tile-map with just SDL2?

I'm working on a 2D tile-map RPG with C++17 and SDL2 + SDL_Image. There are daily cycles, weekly cycles and seasons. Even a kind of weather engine provides atmosphere. The moods and times of day are ...
El_Codepone's user avatar
0 votes
1 answer
83 views

Optimal Approach for Transmitting and Rendering Large Pixel Art Game Maps in Unity

I'm working on a pixel art game in Unity, and my backend (Which is actually written on Golang) has generated a massive dataset of tiles for a 1000 by 1000 world (it could be even more). I'm wondering ...
Resorter's user avatar
1 vote
1 answer
376 views

Area2D only detecting body_exited once

I am new to game development, I am practicing by creating a pong game. I currently have an Area2D set up with a signal listening for ...
zeroparity's user avatar
0 votes
1 answer
59 views

Sprite chasing a target using move_towards_ip does not move

I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
Lone's user avatar
  • 3
0 votes
2 answers
83 views

Bouncing balls miss collisions, bounce the wrong direction, of lose momentum on one axis when hitting a corner

I am making a 2D game where balls bounce from the edges of the screen, However, there seem to be two types of issues with this kind of bounce method, and every tutorial I checked uses the same method. ...
ZozeR's user avatar
  • 42
2 votes
1 answer
94 views

How to make redirected player movement respond to same key?

I have a 2d game (Godot 4) with different rooms with portals to go between them, and some portals redirect the direction of the player while still holding the same key. I have that working so far, but ...
value1's user avatar
  • 23
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 ...
John Hughes's user avatar
2 votes
2 answers
107 views

Fast way to calculate angular intervals and occlusion of circular objects in a 2D vision cone

Say I have an agent in 2D in a world filled with circular obstacles of different kind and across many scales (some may be very large, practically filling an agent's view, some may be very small). The ...
kram1032's user avatar
  • 121
0 votes
0 answers
36 views

Limiting shooting angle only works when facing right

I have a problem with the shooting being limited when the player is turned to the left side. When I set a range from -145 to 145, on the contrary, it does not shoot into this range, but shoots from ...
Lekr01d's user avatar
0 votes
0 answers
81 views

Set depth value in fragment shader

I'm making a simple 2D renderer and I want to avoid redrawing as much as possible. My Vertex layout has the 2d position and a float depth value. I want to assign a depth value to each of them after ...
FrameBuffer's user avatar
0 votes
0 answers
47 views

Sorting layer of wall in top down game 2d

I made tilemap using tiled app. I try to sort layer so the when the player is in front of wall he visible and when he is behind the wall then not viable, it's commonsense. But problem only one line ...
TECH VR Gamers's user avatar
1 vote
0 answers
70 views

2D grid game server - interaction system/dynamic blocks

I'm building a Server-side engine for 2D sandbox game similar to Terraria or Starbound. The language I use is Dart (similar to JavaScript or C#). Currently I'm trying to figure out how to make a good ...
Zekfad's user avatar
  • 11
15 votes
3 answers
5k views

How to make the player feel like giving up?

I am planning a game that has a level that is a confusing and illogical maze, and I want to make the player feel like giving up, but not so intense that they want to quit the game. Also, I'm probably ...
thirteen's user avatar
  • 188
0 votes
1 answer
73 views

Weapon flips upside down when aiming to the left

When the player turns to the left, the texture of the weapon turns upside down. How can I solve this? Shooting Script ...
Lekr01d's user avatar
0 votes
0 answers
36 views

Connecting circles of the same color

I've been following couple tutorials on making blobs with connected colors, and it works fine, but I have issues modifying it. I'm spawning circles with dot gradient of certain color. Then in a shader ...
John's user avatar
  • 1
11 votes
4 answers
6k views

How can I help my unpaid 2D and 3D artists improve their portfolio?

I'm part of a 20 people team working on a game for free but we've got intentions of starting a company soon. At the moment, not even the prototype is finished, but we've got 6 artists, half 2D and ...
Vcoder's user avatar
  • 121
0 votes
0 answers
87 views

How to animate a ball with fake physics from top down viewing angle

I am making a 2D American football game (similar to retro bowl) in Game Maker: Studio 2, and its main perspective is in 2D. I want to animate a ball that moves in a parabola and can interact with ...
Gabriel Toy's user avatar
0 votes
0 answers
59 views

Ideas for how to attach meta data to an arbitrary sprite sheet?

I am currently messing around with monogame and creating some silly sprite based games. One issue I have is when I get sprites for OpenGameArt or any equivalent they are often in spritesheets in a ...
kiooikml's user avatar
  • 101

1
2 3 4 5
71