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
0answers
14 views

Easily split up a ripped spritesheet with no downloads?

So, I'm new and all to game development, and I use the free version of Construct 3. I want to make a Mother 3 fan game, as it's one of my favourite games of all time and seems like fun practice for a ...
0
votes
0answers
10 views

Easily split up a ripped spritesheet? [duplicate]

So, I'm new and all to game development, and I use the free version of Construct 3. I want to make a Mother 3 fan game, as it's one of my favourite games of all time and seems like fun practice for a ...
1
vote
0answers
13 views

A* Pathfinding issues, player node is always off

so I am using Sebastian Lague's second video on A* pathfinding (https://www.youtube.com/watch?v=nhiFx28e7JY&list=PLFt_AvWsXl0cq5Umv3pMC9SPnKjfp9eGW&index=2), and since he is using a 3d model, ...
1
vote
1answer
33 views

Moving a GameObject to a position, waiting, and then moving it again

Hello hello :) Ive been attemping to move a platform (a door basically), and it has partually worked. What works so far is i can move an object from A to B and wait, however it will not move it ...
0
votes
1answer
16 views

OnCollisionEnter2D and OnCollisionStay2D not detecting anything or being called unless i turn off 'Is Trigger'

I was attempting to create a simple button prompt where when you are inside a 2d box colider it will give you the option to press the button within that range, below is the short code used to test ...
0
votes
0answers
24 views

How to do draw a “visibility polygon” in 2D top-down Unity? [duplicate]

I've made a very simple 2D top down prototype with Unity. Now I want to expand the thing and add a feature where objects change when the player looks at them. So I have to add a visibility polygon ...
0
votes
0answers
29 views

How to create fog effect over specific tiles in dungeon game

I'm working on a game in unity and I have areas the player cannot enter blocked off by game objects that are animated sprites that are supposed to look like fog. They don't look that great and I'd ...
0
votes
1answer
16 views

How to make a 'Picture-book Cutscene' in Unity 2D with simple 2D images?

I'm trying to implement a simple cutscene system in my Unity game, preferably one that allows cutscenes to play at the start and end of each of the levels. What I was imagining was pretty similar to ...
0
votes
0answers
19 views

Why does rb.velocity blurrs background?

My player controller code is bellow. So is my player inspector. This makes my character move yet it blurs the background, but when I use ...
0
votes
0answers
18 views

My colliders keep going through one another? [duplicate]

So, I have some platform with colliders and a character with a collider (everything in 2D). The problem is, while there is some noticeable effects (a certain push back) when the colliders collide, ...
0
votes
0answers
21 views

How do you make lights affect 2D sprites in a 3D environment using Unity's URP render pipeline?

I'm using Unity, URP and have 2d sprites characters in a 3D environment. I want 2D sprites to be affected by lights/shadows like the rest of the environment. -I know if I use a 2D renderer I can use ...
0
votes
1answer
54 views

Sprites draw-order sorting for top-down 2D game with floors and bridges

I am working on custom 2D engine for a game. I am having trouble figuring out a working system for sprite drawing-order sorting for this specific game. Game description: 2D Top-down perspective ...
0
votes
1answer
31 views

How to flatten the collider for a tilemap?

I am relatively new to game development, and am working on a simple 2D platformer. I have created a tilemap and painted some tiles for the character to walk on.. but he is getting stuck. Yes, I know ...
1
vote
1answer
34 views

How does the use of marching square and wave function collapse differ in a auto tiling?

I am discovering the techniques of procedural generation. I struggle understanding on the usage of those two techniques: Wave Function Collapse Marching Squares As I understand, both can be used to ...
0
votes
1answer
31 views

My Camera (In Unity) Is Tilting When My Character Moves (2D)

I'm trying to use Cinemachine to follow my player and whenever the player moves left or right everything shifts. I'm not sure whats causing this. I have tried giving the camera a Rigidbody2D and ...
1
vote
2answers
28 views

Can you use a sprite with uneven dimensions in Unity 2D?

I'm new to game development as a whole, so forgive me if this is an idiotic question in itself, but I want to use a sprite sheet where the entire sprite sheet's dimensions are 104x144, and the ...
0
votes
0answers
18 views

How to do in Godot 2D: game screen in one viewport and minimap in another. Different sprites on each

The second day I google the tutorials, but nothing comes of it. All tutorials link to splitscreen demo, but it is made under the second Godot and does not work in the third. The problem is this: I ...
1
vote
1answer
20 views

Unity difficulty placing text within the reference resolution of the canvas

I have a TextMeshPro GameObject, which I placed within the Canvas. The canvas is set to Scale with Screen Size and has a reference resolution of 1440x1080. The ...
0
votes
0answers
21 views

How do you exactly implement a Semi-Implicit Euler type of movement in a 2D platformer?

So I've been following along Sebastian Lague's 2D platformer tutorial, and to understand exactly how the physics of how a jump is done, I dug into the subject and noticed a lot of people, from ...
0
votes
0answers
24 views

Using delta time in game loop and physics calculations doesn't work as desired

I know there have been similar questions on this site and others, but after trying to apply the different things I read into my own code, none seem to really solve my issue or help my understanding. ...
0
votes
1answer
31 views

What is the best way to create a square grid in Unity?

So I need to create a square grid like the one below. And be able to click on a square, the square you chose then is filled with a different color as well as all the squares right and below the square ...
0
votes
0answers
21 views

Convert 2D lighting script to use 2D colliders instead of 3D

I have been trying to make a 2D lighting system and successfully been able to implement it. My script has been built for 3D meshes and not for 2D , so I have to create a 3D collider for each of the ...
1
vote
0answers
7 views

Custom shader with stencil breaks Unity built-in masking

my custom shader works like a charm for what I wanted it, but if it is referenced in the scene, Unity built-in masking stops working (both the Sprite Mask component and the rect-based Mask stop ...
0
votes
0answers
75 views

Prevent sprite from rotating with camera

I am creating a small 2d game and looking for a way, to prevent certain sprites from rotating with the camera. I could not find any settings that would allow me to do so, so my next best guess would ...
0
votes
1answer
116 views

Wall sliding in JavaScript; works, but gets stuck at corners

this is a follow up to this other question: How do I handle player collision with corners of a wall In inspiration of the code given in its answer, I tried to write some new code. Basically, in the ...
0
votes
0answers
34 views

How to check public bool of different script in C# - Unity [duplicate]

I seem to have some trouble with a problem that I feel should be really simple, but I've been beating my head against this for a few hours and I can't seem to figure out what the hurtle is. What I'm ...
1
vote
1answer
75 views

What is the use case for slerp in 2D?

When searching for slerp, I get this text: Slerp is shorthand for spherical linear interpolation, introduced by Ken Shoemake in the context of quaternion interpolation for the purpose of animating ...
0
votes
0answers
11 views

The type or namespace name 'RigidBody2D' could not be found (are you missing a using directive or an assembly reference?) [duplicate]

using System.Collections; using System.Collections.Generic; using.UnityEngine; public class Player_Move_Proto : MonoBehaviour { public int playerSpeed = 10; public bool facingRight = true; ...
0
votes
1answer
25 views

Unity 2d, Animations start distorting

I'm making my first game and I just finished adding animations for walking and jumping. Everything looked good at first but with time they started distorting, even rotating (Rotation is Frozen). This ...
0
votes
0answers
24 views

What's the best type of Movement/collision detection for high-Speed games?

Before I begin I'd just like to make it clear that I am not familiar with many programming/development terms, so if anyone can link articles to any terms used it would greatly help things move along: ...
0
votes
0answers
26 views

How to APPLY part of an image over one image in canvas Unity 2D game

I would like to apply part of an image dynamically during the game-play. I believe I will have to use the collider on my object or something like this, but I have no idea how to get it all together. ...
2
votes
2answers
130 views

8-way 2D top down movement (diagonal) idle animation issues

Background I am working on animations for 8-way movement for my character and have done the 8 directional running animations using a blend tree. Now I need to do the same for the idle animations. ...
0
votes
0answers
26 views

Strange deviations while implementing alpha compositing

I've been trying to create my own 2d renderer for my game (for learning purposes) and I'm trying to implement alpha compositing. The formula I'm using is very trivial, which is ...
0
votes
0answers
16 views

In Godot 3.2.1 stable beta, in the 2D sprite shaders, how do I import a new PNG to test out those shaders?

I am using Godot 3.2.1. on Steam on Linux Mint. How do I take a pixel art image I've made and import it for using in Godot? I couldn't find it under Project.
0
votes
0answers
25 views

Change hero direction in place before movement on a grid based game in Unity

I've already implemented a grid based movement with all the necessary animations. Now I would like the make the hero face the direction of the input without moving first and move only if the input ...
0
votes
1answer
25 views

Raycast2D hits acting (seemingly) inconsistently

I'm using Unity to make a 2D game, and I'm trying to put together a vision cone/flashlight system that's a lot less of a headache than the systems that are currently out there. Despite this, I'm ...
0
votes
0answers
15 views

Sliding against a wall is “sticky”

I try to implement a ball sliding mechanism in my game. When the ball collides with a wall, it gets bounced. When it's close enough though (after many bounces) it will start to slide against it. But ...
1
vote
0answers
27 views

Adding underwater shadow to 2D top down boat

I have a boat/hovercraft sprite in my game. It's topdown 2D view, but it's actually a 3D scene, for better lighting and other effects. I want to add a buoyancy effect, so that the hovercraft floats ...
0
votes
2answers
72 views

How to implement a mechanic of entering a town

I am planning a game played on a 2-D map, where some spots are "towns". When the player walks into a town, he enters a high-resolution map of this town; when he exits the town, he returns to the low-...
0
votes
0answers
15 views

Speed after an angled collision?

I can calculate the speed when there is no angle, but I can't calculate the speed when it is angle. Physics paramaters: ...
0
votes
1answer
27 views

Follow behaviour with transform.LookAt on Unity2d

So i've been trying to make an enemy follow my player on Unity2d using transform.LookAt. While it does follow the player, It also rotates the enemy as well in 3D ...
1
vote
1answer
59 views

Issue with Sorting Layers with an NPC and Tilemap

I have a weird thing happening, that I can't quite explain. I have two scenes, my starting town, and an Arcanist's shop. When I go into the Arcanist's Shop, the Arcanist NPC stays on the same ...
0
votes
1answer
22 views

Remove Sprite Shape Controller Icons from 2D sprite shapes

How do I get rid of those "purple icons in my scene"? They are so annoying ... they literally covers the entire 2d shape! GIF showcasing it
0
votes
0answers
6 views

(2d) Error pops up when handling enemy knockbackS [duplicate]

So I created some code that will make the enemy take knockback upon taking damage from the player. I put this behaviour inside the EnemyInheritance script so that every enemy I have in the game will ...
0
votes
0answers
22 views

Rotate 2D Object Towards Mouse & Stop After Full Revolution

Essentially what i'm trying to recreate is a dial with a min and max setting. The player clicks and drags the mouse around the dial to move its position but I would like for it to stop at a full ...
0
votes
1answer
53 views

Why does my character move diagonally?

So i've been trying to make the player face towards the direction i pressed. That part works just fine but when I try to move the player it moves diagonally instead of left/right. Any clues? ...
0
votes
0answers
14 views

Unity2D: Colliding with Edges Issue

I am using Unity (in 2D). I have force being applied to the rigidbody2D when the player moves left/right. For some reason, when the player hits the edges of the tiles, it just pushes up and forward. ...
0
votes
0answers
16 views

How do I calculate sprites/frame usage on my platform's ram?

I plan on building a 2d game for mobile and possibly pc. I also plan on using sprites/frames for the animation of my 2d game. What's stopping me from doing so is because I can't figure out if the ...
0
votes
1answer
51 views

Unity: How to fix collision detection with fast moving objects in 2D?

I was making a simple pong game and it worked fine until I tried to increase speed of the ball. With increased speed ball moves across the walls occasionally. I've set no rigidbody for walls and ...
0
votes
0answers
8 views

Object reference not set to an instance of an object error? (Unity) [duplicate]

I am creating a simple 2d game in Unity. I tried to make the player able to pick up objects whenever they are clicked, but I keep getting the error I mentioned. Here are the scripts I used : (Both of ...

1
2 3 4 5
61