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

learn more… | top users | synonyms

15
votes
2answers
2k views

How to avoid ghosting when pressing multiple keys?

I am working on a 2d side-scrolling pc game that uses SFML game library. The problem that I am not able to solve is that in many keyboards combination of three or more keys (like w + d + k) is not ...
1
vote
1answer
149 views

Libgdx are textures off screen rendered?

Let's say that my code looks like this: OrtographicCamera camera=new OrthographicCamera(); camera.setToOrtho(true, 100, 150); SpriteBatch spriteBatch=new SpriteBatch(); ...
2
votes
1answer
143 views

In a tile-based MMO, how do I decide which players need to receive what updates?

I am planning a tile based MMO, like Tibia or top down Minecraft. I'm using a client-server model. I've got almost everything figured out, with a notable exception of state updates. When information ...
2
votes
2answers
179 views

Pseudo 3D curve problem

I've converted CodeinComplete's Pseudo 3D road routine to use SDL2 - unfortunately for some reason the curves are incredibly jarring (both entering and leaving it). I've also converted it to ...
2
votes
1answer
180 views

Unity2D 5 - Flickering sprites on Android

So the game had been working fine for a few days on Android phone without any issues. Today, after adding some scripts and tweaking the game a little bit (tweaks which have nothing to do with the ...
4
votes
1answer
489 views

Memory-Efficient, Optimized Terraria-Like 2D Lighting

I am working on a terraria-clone and I am aiming for it to be able to be run on most Android devices. I am able to generate a world, jump around, etc but I am not looking to add in some efficient ...
1
vote
0answers
81 views

How to create 2D cameras in swing?

What is the best way to create a camera for a 2D platformer using swing, and I want to create a camera that moves instead of moving the background. This is because I'm going to have objects rotated by ...
1
vote
0answers
99 views

Bold black bar on right side of game in Unity (Android)

I am trying to create an endless runner. I have already created a system to generate infinite backgrounds from an array of some. However, on running the game, I get huge black bar on the right side of ...
2
votes
1answer
95 views

How to use Tiled Editor to recreate a 2D map?

Alright, to familiarize ourselves with the Tiled Editor, the teacher asked us to replicate a tile-based map of a 2D platformer. He gave us pretty much these two things: 1.) A selection of maps to ...
2
votes
2answers
618 views

How to achieve lighting like this in Unity for 2D games?

How could I accomplish a lighting effect something similar to this game?: I'm not talking about the shadows but about the glowing/lighting effect on the crystals and the torches. Anyone got any ...
-1
votes
1answer
44 views

precedurally generate blob-like surface? [closed]

Just looking for some direction, I'm making a 2d top-down game and need to make some random shapes for an asteroid surface. I want to have so control so I can have not too-circle-ish but not ...
-3
votes
1answer
136 views

Where can I download pixel characters for my game? [closed]

I'm a beginner in 2D game development and I wanna focus on the logic of the game. It would save a ton of my time if there is any source to download the game resource eg, characters, maps, etc.
0
votes
0answers
38 views

Is there a way to apply euphoria physics (ragdoll) to rigged Sprites in Unity2D?

With euphoria physics I mean the realistic object interaction and freefall as seen in most games like recent GTAs. But I want to do that in 2D. (I am a beginner :P).
0
votes
1answer
194 views

Generating objects randomly from prefabs in Unity2D

I am developing an infinite runner using Unity. I have already figured out how to loop a set of backgrounds randomly but I am having problems doing the same for the objects. So, I have a few objects ...
0
votes
0answers
47 views

What is pokemon-like game's view called? [duplicate]

I'm trying to make a game with a top down view, but angled, like pokemon, zenonia, zelda(I think), and most rpgs(specially the ones made with rpg maker). But I don't know what is this view called so ...
0
votes
2answers
146 views

2D TileMap smooth lighting

I want to implement (a smooth) lighting into my 2D Maps. I want to have the basic idea. What I thought of is 2 components. The Scene's Ambient light: The Tiles and Sprites are tinted into this colour ...
1
vote
0answers
135 views

How is curved 2d ground is implemented in real games?

I'm developing a 2d platformer (inspired by N game) and I already successfully implemented circle-convex, convex-convex and circle-circle collision. But now I want to be able to make platform that ...
-1
votes
2answers
46 views

Before I change position I want to check if the gameobjects are collinding

For starters I'm new to Unity3d. So my question is when I click on an object I want to change its position but without collinding with the other objects and I need a function to check that. I already ...
0
votes
0answers
66 views

Scaling geometry in an orthographic view

I'm having trouble understanding the results I'm getting from some of my matrix transformations. I've got an orthographic projection, and am drawing 2D circles on the screen. There is a camera matrix, ...
0
votes
0answers
128 views

Snap gameObject to grid tile

I'm making a 2D TD game and currently I have made using quill18 tutorials a simple building system. However I'm trying to have it snap on my tiles as I mouse over them. This is my script applied to ...
0
votes
1answer
64 views

The import aurelienribon cannot be resolved

I've been having problems with using the Tween Engine by aurelien ribon for a Splash Screen for my 2d game. I'm using Eclipse and libgdx. I've tried rebuilding, clean...-ing, and refreshing. I've ...
2
votes
0answers
63 views

2D Skeletal animations exported to SVG

I would like to create skeletal animations, and Synfig looks quite promising. This is a video walk through of its "bones" feature, used to do skeletal animation. Ticks all the boxes thus far, ...
0
votes
0answers
43 views

How many ways are there to animate a 2D sprite in Unity3D?

I know about the following animation methods, 1/ Spreadsheet Animation.. 2/ Unity's animation (with individual parts).. Beside these two, are there any other animation system available? Is there ...
2
votes
1answer
166 views

Add force towards a point in Unity3d?

I have a Vector2 and want to move an object towards it... (this vector2 is the mouse position when clicked and I made sure I get only one position when its clicked) My initial thought was to apply ...
0
votes
3answers
138 views

Making a 2d sprite based game in Unity? [closed]

I'm looking at developing a 2D sprite based platformer. Usually I make games in Gamemaker, because I find it very easy to use. I have never used Unity before but have heard a lot of good things. So, ...
10
votes
2answers
1k views

How to make my 2D character stand normally on slope?

I've got this character in Unity3D (2D Mode)... in a a slope which looks like this, But I want the character to stand along the red line..Like below How can I make it in Unity3d? I've got this ...
0
votes
1answer
97 views

How do I ensure consistent behaviour when using Unity's Collider2Ds for triggers and collisions?

I am experiencing inconsistent behavior using Unity's 2D Physics engine and their Collider2Ds to detect collisions and triggers on my projectiles. I will classify it into two problems. The first is ...
1
vote
0answers
98 views

convert 2d pt into non-affine coordinate system

Say I have a coordinate system that goes from (0,0) to (1,1). We'll call this screen_space. Within this coordinate system, I have 4 points that I would like to define another coordinate system. One ...
0
votes
1answer
217 views

Can't move character at all in unity basic platformer guide

so, I followed below tutorial. https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/creating-a-basic-platformer-game Going well until 18:50 (video time in tutorial), when the ...
0
votes
1answer
556 views

How to correctly draw a 2D polygon in Unity

I'm trying to draw a 2D polygon using GL.Line; however I'm not getting a polygon but separated lines instead. In the example below, I would expect a rectangle formed by the spheres: My code is the ...
0
votes
0answers
15 views

How to make multiple characters with similar design [duplicate]

I am making a 2d platformer RPG game and I would like to create a character creation system that allows you to create your character as you please in the beginning. Since I want at least 10 different ...
1
vote
1answer
415 views

Is it possible in Unity to Flip a 2D Sprite Without Flipping the Object it is Assigned to?

I 'built' (followed a tutorial) on a collision detection system, and when I flip the object to go left and right the collision messes up. So I have three options; find a way to modify the collision ...
9
votes
2answers
721 views

A* pathfinding for dynamic obstacles and player made blockages?

Hi I'm creating a TD in Unity 5 and need some help with my Pathfinding. I'm going to use Arons A* pathfinding for my AI which enables me to use dynamic objects and update the path during run-time. ...
0
votes
1answer
189 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
2answers
257 views

How to instantiate a sprite from a sprite sheet using script in unity?

We are creating a 2D top down rpg, and we have multiple textures, and we need to be able to change which sprite sheet its reading from in order to change the look of the walls and floor in each room. ...
1
vote
1answer
143 views

2D grid based game merging boxes

Basically what i have at the moment is a tile based game with a grid containing a number of colored cells. this is what i've done so far The prinipal idea of the game is that the user has to ...
0
votes
1answer
65 views

Unity2D Sprite gone / not visible when flipped using Vector3.x

I have create game object with code using UnityEngine; using System.Collections; public class CharacterBehaviour : MonoBehaviour { private bool facingRight = true; private float moveDirection = 0; ...
0
votes
1answer
186 views

How does orbital math work?

I'm writing a 2d space game, and I want the players to be able to 'orbit' objects and other players (if they're fast enough, of course), but I'm having trouble coming up with the right way to think ...
0
votes
0answers
93 views

Faking Perspective/Depth using 3D images converted to 2D sprites - Can't work it out!

after a lot of searching/reading/viewing old school game videos I am still unable to work out how to achieve the effect I am after. I am currently working on a 2D "overhead view" sci-fi RPG, using a ...
0
votes
0answers
43 views

2D sprite making tool for huge project?

I recently bought spriter 2D but it was a disaster, it is not a finished product at all and i encountered so many bugs and crashes with it, so please don't suggest it. I am looking for a 2D sprite ...
2
votes
1answer
363 views

How to create 2D shadows and lighting?

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites, and the ...
0
votes
2answers
211 views

2D Coordinate Based Game [duplicate]

I want to make a game for Android that has a 10x10 Grid Plane as UI.In this game users going to touch on a grid and tihs grid will be painted. My question is how do I understand which gird or tile ...
1
vote
2answers
145 views

Determine facing direction mecanim 2d movement

I'm using this script to move my character in my 2d world: public float speed; //Movementspeed public Rigidbody2D rbody; Animator anim; void Start () { rbody = ...
5
votes
1answer
554 views

Why do my game objects jitter when moving the camera?

I'm moving from Qt Widgets' QGraphicsScene to Qt Quick's QQuickItem for rendering my game objects. One of the things this involves is setting up a scene and the view onto that scene, as this was ...
1
vote
1answer
86 views

Find alternate shortest paths in Unity

I'm developing a game in Unity. It's a simple game where the rocket has to reach the point where the player touches on the screen. The movement of the rocket is physics based. When the rocket goes off ...
0
votes
1answer
313 views

Unity tiles with wierd border flickering when moving horizontal 2D

I recently made some Tiles using a program called Pyxel Edit to create some placeholder graphics. The problem I'm having is that when I move the camera horizontal the edge of the tiles starts to ...
0
votes
2answers
190 views

How to check if an GameObject exists in Unity2D? (Javascript)

Im making an AI that checks if the player exists or not. How do I check if a certain object exists and put it in a boolean variable?
0
votes
1answer
138 views

Pathing for 2D, sprite-based game

I'm making a 2D, oblique-styled sprite based RPG. My game does not live in a 2D matrix (like Tetris), rather it's sprites animating over a tilemap. I am trying to set pathing rules for NPCs. I've ...
1
vote
2answers
447 views

Proper way to handle Movement/Animation/AI functions of an AI character in Unity3D

My team is currently building a 2D game in Unity and we've run into some workflow/script organization blockades for many of our game's characters. For example, we're not sure what the standard method ...
0
votes
1answer
114 views

Unity: “Find” can only be called from the main thread, but moving variables to the Start() function causes other errors

#pragma strict var collided = false; var thrust: float; var pizza = GameObject.Find("pizza-small").GetComponent.<Rigidbody2D>(); function Start() { } //hand + pizza ...