Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
35 views

2d water animation is jagged and not smooth

As a solution for this question I implemented the shader with a test program: ...
0
votes
0answers
26 views

How to make a glowing circular progress bar like this in 2d?

Notice the glowing effect, gradient coloring, and that glowing spherical “head”. Note: I’m using CocosSharp, if that can help.
0
votes
0answers
37 views

why does a video game player cannot path through walls? [on hold]

Recently I saw in the Instagram a computer video game that the character (Similar to Spider-Man) of the game jumped from a building to the ocean and did not just don't fall into it, but instead began ...
0
votes
0answers
38 views

2D movement sporadic

Folks, My 2D movement is very sporadic when I press the designated keys. I have set "Space" for jump, "A" for left movement and "D" for right movement. Now I have used Update and FixedUpdate in ...
0
votes
1answer
44 views

What is best for 2D movement: velocity or AddForce?

So I have tried both Velocity and addForce but I'm not getting the result I was expecting which makes me wonder if I fully understand what they do. Move script (test script 1) ...
1
vote
1answer
34 views

How to implement multicolored flashing sprite effect like in Contra and the Messenger?

I want to implement an effect similar to what you see in this clip of Contra. When the boss takes damage, he flashes wildly with different colors. A similar effect can be seen in this clip from the ...
1
vote
0answers
9 views

How can I make a transparent hole with shaperenderer using stencil masking in libgdx?

I'm making a 2d game, where I need a resizeable, moveable rectangle outline. I'm trying to use stencil masking to do it by cutting a hole in a solid rectangle, and I thought this would help: How can ...
0
votes
1answer
76 views

Is it possible to make realistic animations in 2D?

I plan to make a skateboarding game and I am wondering about one thing: is it possible to make 2D realistic animations to simulate skate's and skater's rotations or should I resort to 3D for realistic ...
0
votes
0answers
18 views

(Unity) Flipping Character Sprite Depending on X-axis Movement? [duplicate]

I'm making a top-down perspective click to move game but my character sprite stays the same. How can I make it so that the sprite flips along the Y-axis depending on whether my character is moving ...
0
votes
0answers
18 views

Monogame Screen Tearing Between Tiles

I've noticed some 'tearing' or gaps appearing between tiles when the camera moves over a tile map, and I have no idea why. I should mention, the game is being drawn to a render target (320x192), then ...
-1
votes
1answer
53 views

Depth sorting issue

I've been working on a custom tile-based map editor for a while now, and everything works as expected, or so I thought until I've tried rendering the actual map including the dynamic objects as well. ...
-1
votes
0answers
11 views

Use touch to connect two objects by a line

I'm new to game dev in unity/C# and trying to make my first android game using Unity3d 2018.2. However I still can't understand the implementation of basic touch screen functions such as object ...
21
votes
4answers
3k views

How to animate abstract 2d top down water texture?

I currently implement a game with a top down view of the ocean. I use the following, a little abstract texture: The actual texture is transparent, I added the green-like color for clarity. The ...
1
vote
1answer
41 views

How to synchronize moving hazards?

I am trying to implement a saw blade hazard in my platformer. The saw blade simply moves from point A to point B, and back, at constant velocity. (Let's assume all saw blades move at the same velocity....
2
votes
1answer
36 views

Jumping to land x pixels ahead while not really moving (2D)

The player object in my game has its x-axis locked. It can only jump on Y. It's the ground that constantly moves to the left so that it appears like the player is moving to the right. The ground is ...
0
votes
0answers
13 views
0
votes
1answer
28 views

Transforming 2D viewport coordinates after scaling the viewport (zoom in/out)

I've been getting started with personal experimentation and have been working on a project for a few days now using SDL2. It is a 2D game, and at this stage I have it rendering game objects in a fixed-...
1
vote
1answer
40 views

Efficiently calculate 2d world position based on parent(s) recursively

I am writing a small 2d html5 game engine in javascript that relies on the concept of a hierarchy. The scene is the root node or entity, and its children make up the game objects. These children can ...
0
votes
1answer
40 views

2D Sidescroller Gravity

Ive looked up implementing gravity on several sites. Subtract a constant gravity (9.8 * DeltaTime) from the velocity each frame. My problem is, when implementing it as they say, when walking off a ...
1
vote
0answers
24 views

Does it make sense for a view matrix to have a scale?

When building a view matrix from an SRT matrix multiply, examples (here and here) only ever compose it with a R and T. Does it make sense to have the S component be anything other than the identity? ...
0
votes
1answer
20 views

Unable to add button in Unity

I am wanting to add a button to my scene in order to mute/unmute music. I can add the button to my scene, but it's not appearing on the UI. I can't see it anywhere, not on the scene nor the game ...
0
votes
1answer
12 views

Unable to add asset/sprite, not sure why

I'm using Unity and have a 2D project. I'm trying to add a background image to my project/scene, but I'm unable to. Adding smaller .png files to the project work fine, by simply dragging them onto ...
0
votes
0answers
43 views

procedural cliffs for 2d RPG?

How would I go about procedurally generating cliffs for a 2d RPG using tile sets like these found here https://opengameart.org/forumtopic/bluecarrot16s-wip-lpc-tilesetscollections? So far , I have 2d ...
0
votes
0answers
18 views

I want to generate obj at random places which can move in random speed in X axis in Unity

I am working on something. In this project I want to generate a object at a random position which can go left to right continuously. So far I have got this. This is inside start of a class that ...
2
votes
0answers
74 views

How to create a wavy beam?

I want to implement a wavy laser beam similar to the Proton Backpack in Enter the Gungeon. https://youtu.be/wl-o6gbMqFM?t=58 It's easy enough to draw a line from one point to another, but how to get ...
1
vote
0answers
63 views

Why is my control scheme is not casual enough? [closed]

I am building a game like counter strike but 2dimensional and for android, it is already in beta phase. I have already share it with my friends and classmates to play it. Almost all of them said the ...
1
vote
1answer
40 views

Unity2D: Vector3.Lerp - smooth movement

I have a script that randomly chooses a position to move a game object every 5 seconds, however instead of moving my object smoothly, my script make my object jumps, which is not desirable! How would ...
-6
votes
1answer
33 views

How can I make my character work in my 2d top down game?

I have two sprite sheets and they have to work together. I don't know how to make frames animation and everything. If you could explain it to me, it would help me so much. I am using unity c++ or c# . ...
0
votes
1answer
43 views

Unable to rotate a 2D object, wanting to move it like a ball/wheel

I'm using Unity2D. I have a very basic 2D space with a platform, a ball and 2D physics. Physics is being applied and ball sits on top of the platform. However, it will not spin. Below is the ...
0
votes
1answer
47 views

Checking distant 2D objects from the player in pure javascript

I'm checking if the objects are too far from the player to be able to disable some things, I'm doing so: ...
0
votes
1answer
54 views

Unity 2D: Inconsistent jump height in game window

Whenever I start the unity editor and play it in the Game windows, sometimes the object can jump higher sometimes it is just small jump. I didn't change any value in my script nor changed it in ...
-1
votes
1answer
21 views

Java 2d array to generate grid - java.lang.ArrayIndexOutOfBoundsException: length=4; index=-1

I am creating a Hashi Puzzle game (Islands and Bridges) I am generating a 2d grid with Islands that can be connected using bridges, I am also running a DFS algorithm to check if the map is solvable I ...
0
votes
2answers
44 views

Chunked A* Pathfinding Issues

I've run into an issue with A* pathfinding in a chunked world. This is my current setup: The world is designed in Tiled and exported as a .json file. I wrote a little program that converts the .json ...
0
votes
2answers
79 views

Coloring a Voronoi Graph

Intro: I want to convert a Voronoi Graph made with this awesome library by jceipek on GitHub into something I can work on. So far so good, this user provides with a demo to start with and shows how ...
0
votes
0answers
12 views

Unity (2D): Masking part of objects out of field of view

I'm working on a 2D Unity project where people can only see objects in their field of view. I have successfully created a quad overlay that masks out any ground outside of your field of view. What is ...
0
votes
1answer
40 views

Need help with sorting layers on a 2D game made in Unity

I'm busy with my full blown project in unity, it's a 2D game as I thought this would make a good starting point. So to the problem, I've got 3 elements in the game. The ground, an object and a beam. ...
2
votes
2answers
101 views

Top-down conveyor belt with Box2D

I'm trying to code a conveyor belt for a project made with LibGDX and Box2D and I would like to make it like this one from Bomberman Land Touch. As you can see, the entities standing on it should be ...
0
votes
0answers
14 views

Unity2D - Generate positions within a sprite outline or phsyics shape

I have a sprite in unity which has it's custom outline and physics shape setup in the sprite editor, I would now like to access this info at runtime and generate objects around the surface of the ...
1
vote
1answer
62 views

Unity: How do I only show parts of objects that overlap [2D]

I'm working on a 2D Unity project where the player can only see objects in their field of view. I have successfully created a mesh that overlaps anything that would be in the player's field of view, ...
0
votes
1answer
40 views

Rotating 2D positions without rotating graphics

I am working on a basic 2D game from an overhead/fake isometric perspective. Arrow keys move the camera left/right/up/down. The trouble occurs when I tried to add rotation. I want the player to be ...
0
votes
1answer
96 views

Queued rendering in LibGDX 2D

In my 2D game project, as well as in LibGDX in general, are a lot of different entities that need to be rendered(static images, sprites, animations, etc...), as well as have certain effects applied (...
0
votes
1answer
35 views

Generating nav meshes from tile based map (2D)

I'm working on a pathfinder for a MMORPG game, it's not mine; I'm RE it, now I need to create a pathfinder for monsters. But I figured that the client uses tiles for it's pathfinder (for players). ...
0
votes
1answer
83 views

Light and shadows like Diablo

I wanted to have shadows in my game and thought the way they were implemented in Diablo was good enough. Any hints on how to produce a similar outcome?
0
votes
1answer
71 views

2D Grand strategy map

I'm trying to make a 2 dimensional grand strategy type of map, similar to Stronghold Kingdoms: I've never dealt with these kinds of map before, but I assume this is a vector map (in svg format). I ...
0
votes
0answers
36 views

How to shoot to where the player is facing in a 2D top-down mobile game? Unity C# Mobile Development

In my project, I would like to shoot bullets into the direction in which the player is facing. I made a Player GameObject with a child, BulletSpawnPoint, in which the bullet should come from. The ...
0
votes
0answers
34 views

Rule to change orthographic size to fit object inside camera rect

I'm working on a 2D zoom effect using an orthographic camera. So far I have a zoom value that I'm using but I would like to know if there's a rule or formula to obtain the exact size for my ...
-2
votes
1answer
26 views

2D and 3D Tablet Games Definition

I would like some clarifications how to distinguish between a 2D and 3D mobile game, as mobile devices do not really have 3D screens. i) Do 3D iOS or android games really exist or are they 2D tablet/...
0
votes
1answer
34 views

Keeping instantiated grid in the centre of the screen?

everyone, I'm making a mobile game and I need help. In the game, I instantiate a grid of dots as seen in the first attached file below. My problem is the grid is not in the centre of the screen I ...
0
votes
0answers
21 views

psuedo-3d collision in Unity

I'm recreating the movement system from the DS game Dragon Quest Heroes Rocket Slime. In the game, the player controls a slime that can stretch himself and blast in the direction he was stretching. ...
0
votes
0answers
73 views

Dissolving fog of war when entering a room

I want to achieve a similar effect to what you see in the following clip from Enter the Gungeon. When a character enters a new area, I want a dissolving fog of war which begins dissolving at the ...