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

learn more… | top users | synonyms

4
votes
1answer
217 views

Layering with slopes in Unity 2D isometric scene

I'm newer to Unity so bear with me. I'm using Unity2D and so far I have my character up and walking around, colliding properly with his surroundings, and I've implemented an effective "isometric ...
0
votes
1answer
43 views

My polygons only register a collision if they are the same shape and directly over top of each other

I'm trying to learn about 2d polygon collision detection/handling and have ran into a snag. After running through lots of tutorials and sample code I've attempted to implement my own polygon class ...
1
vote
0answers
65 views

2d grid vision(eye sensor) for a neural network bot?

I have a 2d grid and neural network bots living above it. What is a good way to give them vision of tiles in front of them? Below I describe my idea that I don't know how to efficiently(or ...
0
votes
0answers
31 views

Get entity at supplied world position LIBGDX

So I'm making a simple 2D rpg. What I need is to be able to interact with the entity that the player is looking at. I need to be able to look at E.g another player in the world and press 'E' and have ...
3
votes
3answers
98 views

Counter-clockwise angle limit

I'd like to limit rotation of an object, so I've written following snippet: if (targetRotation < constraintMin) { targetRotation = constraintMin; } else if (targetRotation > constraintMax) ...
2
votes
0answers
161 views

OpenGL Render Queue Design

I am currently designing the rendering system for a 2D game built in C++ and OpenGL, and am unsure about how to go about implementing a sorting procedure to maximise efficiency and minimize OpenGL ...
1
vote
0answers
63 views

2D Platform physics system with deltaTime

I'm implementing my physics handler in my own 2D "Platform" game. My main problem is that when the timestep ( deltaTime ) changes, maybe to some tiny lag spike or something like that, the running ...
0
votes
0answers
24 views

Different layouts?

I have had trouble in the past with optimizing my game for different layouts, so that the players don't see the game in different ways on different screens. Someone told me that the normal directory ...
1
vote
1answer
39 views

Rendering sprites on a Mali-400 MP device

I started developing a small cross platform game engine using OpenGL, I am working actually on a sprite batch renderer. Everything is working fine on OS X, iOS, Win32, and some Android Devices. Here ...
0
votes
3answers
101 views

Show 3D elements on 2D background

I'll make a navigation menu in my game and had the good idee to this the enemies to start games or go to the gun store. The problem is when I look in game mode, the enemy named ZomBear in hierarchy ...
0
votes
2answers
79 views

Positioning 2D (non-UI system) game objects

As an old Flash dev I'm slightly confused about how you position game objects on the screen in Unity since game objects have no width or height (only a scale). Let's say I have a container gameobject ...
0
votes
0answers
58 views

2D Voxel Game Chunk Question

I'm currently working on a 2D Voxel game. I started with a big blocks array with all blocks inside it, but it is not very good for performance, so I'm currently switching over to chunks. My question ...
0
votes
0answers
15 views

Java keyListener animating bufferedImages

I am making a game similar to a photo scramble/unscramble game which requires the use of keyListeners. I set up the logic but when I code the animations, they just sit there and do nothing and ...
3
votes
3answers
86 views

MonoGame - Ordering Movement Key Presses

I'm looking for a way to retrieve the last key pressed even when other keys might be pressed for a top-down four-directional game. For example: W is pressed → Move up D is pressed → Move ...
0
votes
1answer
108 views

2d raycast collision problem

I am currently making a 2d top down game in unity and have stumbled upon a problem with my raycast collision. I want my green player to stop moving when colliding with a wall, therefore i made my ...
0
votes
1answer
114 views

Copy a gameObject's collider at runtime (Unity)

I'm working on a small Unity 2D project in which I need to modify the collider of the player at runtime. I'm using Physics2D.Raycast to find the collider and then what I'd like to be able to do is ...
1
vote
2answers
95 views

Does Direct3D 11 enable Z-clipping/discard by default?

I'm rendering simple 2D figures in DirectX 11.1 and I cannot get Z-values to be rendered; all pixels with Z != 0 get discarded. I'm doing proper world transform as far as I know. X/Y translations ...
2
votes
1answer
80 views

Java 2D Game Development - Best Performance With Rendering

I have seen two different rendering methods. One of them is rendering multiple bufferedImages like g.drawImage(image1 to imagexxx, x, y). Like in my game I have to render, on each tick, 880 buffered ...
0
votes
1answer
49 views

Mismatch between scene view and game view

In my scene view, it looks like the player is correctly lined up with the map. But when I see it in the game view, it's off. You can see the Game view in the top-middle, and the Scene view in the ...
4
votes
1answer
103 views

In a 2D multiplayer game should I send the position of user to the server all the time? [duplicate]

In a 2D game where the user moves with the keyboard arrows, should the user send all the time he moves his position (x, y)?. If the user has some speed, the user would send (x, y) like 50 times ...
0
votes
1answer
43 views

Objects fall off screen, because stay one behind another[unity]

I m learning unity, I placed objects on a scene, camera is looking at them and displays them fine. but in 3d, I can see they are one behind another, so when i hit play button, they just fall! Pic: ...
0
votes
1answer
196 views

How can I make my tiles fall smoothly?

I'm working on a Tile-Based game and I can't figure out how to make my tiles fall down smoothly like in candy crush. All column tiles fall-down at the same time. And spawn new like how many tile place ...
0
votes
1answer
52 views

My game has messed up layouts!

Earlier, I asked this question: Landscape mode for game? Where I had a directory for each and every layout, but the layout in the layout-land directory wasn't showing up when positioning my layout in ...
3
votes
1answer
149 views

How do 2D volumetric lights work?

Context So in my current project (written in Java using LWJGL / OpenGL, so GLSL for shaders) I added lighting quite a few months ago, which was already an interesting challenge, having never done ...
0
votes
1answer
197 views

How to find connected groups in a 2D grid of tiles

Firstly, my English is very bad, sorry for this. That's why I showed my problem with a picture. Block[,] sameTiles = new Block[ WorldController.Instance.World.Width, ...
0
votes
0answers
89 views

Landscape mode for game?

TL;DR: I have made 8 new layouts for each activity layout, but they are not showing up. For example, I have a layout-land directory with a layout, but that layout doesn't show up when I turn my phone ...
0
votes
3answers
69 views

Math.Clamp won't limit my position until movement is ceased

The program is in a top down view, with Y going up (or forward depending upon how you see it), and X going from left to right based on the camera view. I am attempting to set the minimum and maximum ...
0
votes
1answer
37 views

How to draw a sprite at a floating point xy coordinate with interlaced drawing?

I have a 2D game made in MonoGame (XNA 4.0 framework). Here's what I want to do: draw a 2d image at a floating point xy coordinate such as 125.5, 300.12 (and do NOT round them to an int). the image ...
0
votes
1answer
75 views

Basic Moving/Anim Script [Unity CSharp]

So, I got this to do the anims for my sprite in Unity 2d... using UnityEngine; using System.Collections; public class Move : MonoBehaviour { public float Speed = 2; Animator anim; // Use this for ...
-3
votes
1answer
48 views

How/where can i learn everything unity2d [closed]

I just learnt unity basics and would like to learn everything else related to 2d development beginner to advanced in less time. Because i dont want to stick to game business/development for a long ...
9
votes
1answer
134 views

2D Physics: storing previous position vs storing velocity

I saw a number of 2d game tutorials and books where previous position of an object was stored in state instead of velocity vector. Velocity is then calculated each frame as a difference between ...
0
votes
0answers
111 views

Marching Square Generated 2d Terrain: Dealing with more than 2 tile types

I need some help with my random map generator. First, I use a noise generator (something like Perlin noise) to create my tile array. For now i'm using three tiles: water (0), beach (1), and grass ...
0
votes
2answers
156 views

Joystick like controls in unity for mobiles

How can i achieve joystick like controls on mobile? For example i have a 2D platform game where character should keep on moving right when swiped right and held and vice versa, just like a real ...
2
votes
2answers
191 views

How to allow multiple bullets on screen at once

Using my universities API, I'm making a basic 2D game where pacman can shoot ghosts I have a bullet class but at the moment, I only have one instance of the bullet could anyone help edit this ...
0
votes
1answer
63 views

Cast a circle around an object and detect other objects in range (with visual)

I have my "player" object moving around an arena type area, with miscellaneous objects scattered about. What I want to do is move the player near any of these objects, and on keypress I want to ...
0
votes
2answers
262 views

Gyroscope Parallax Effect In Unity

I want to make a parallax effect in Unity 3D with gyroscope like the one on this site: http://matthew.wagerfield.com/parallax/ I found an asset, but it is too expensive. So I need a script which I ...
0
votes
2answers
196 views

Unity 3D: How to stop/reset 2D sprite animation after releasing key?

Im following a tutorial to create animations with a 2D sprite character. But i put in my own. Which has 8 animation positions. For some reason when my guy walks around,then stop, the walkings ...
-4
votes
2answers
123 views

The Power of 2D Engines vs Modern 3D Games [closed]

I'm toying around a lot with Game Maker. I really like it. GML is very simple and with its nearly object oriented design you could create anything in 2D you can think of. However there is a limit. ...
1
vote
1answer
106 views

How to remove destroyed clones out of the Hierarchy in Unity2D

I made a 2D edge collider which on contact destroys the other gameobject. When I launch the game all the other gameobjects in fact get destroyed but the clones are still listed in the Hierarchy. How ...
1
vote
0answers
42 views

The new android studio? [closed]

I got the new android studio, and I noticed one thing when creating a new activity. The layout that corresponds with the java for the activity is made twice, once as a content: This new layout ...
2
votes
1answer
99 views

Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each ...
1
vote
0answers
71 views

Screenshot preview freezes a game for a few seconds

I have a screenshot preview at the end of the level, but when I show it my game freezes for a bit(low fps for a few seconds). This is code I use to load screenshot and crop it(for a little preview ...
1
vote
1answer
75 views

Different screen sizes? (landscape)

I want to make a separate landscape layout for each size of my original layout I have activity_main.xml. I have adapted it to be able to fit multiple screen sizes: Now, I want to create a ...
5
votes
2answers
163 views

Drawing circles at the background of a 3D scene and updating their size

So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it. Just like it would be if the circle was in ...
2
votes
1answer
92 views

Implementing attack animation in four direction movement

The way the program is supposed to run is basically, a character can be running/idle and if spacebar is pressed, all movement stops and movement controls are locked through the bool "canMove". The ...
2
votes
0answers
55 views

Sprite animation in Android view

I'm looking for a way to have different sprite animations in individual Android views. I try to use LibGDX and AndEngine but most I could find was how to get an Activity with the sprite animation. ...
2
votes
1answer
140 views

How would i go about implementing portals into my game?

I don't mean to ask a broad question, so let me explain. I'm creating a 2D top-down design game and I'd like to implement "portals" to be able to switch between worlds. Each world is a level class, ...
1
vote
1answer
100 views

Confused about this Timer function C++

I am confused about the argument "m" of this function. I also need to know how to make this work. I am working on a simple 2d game and I am really new to programming. I don't know how to make things ...
2
votes
1answer
59 views

Efficient Per-Tile Lighting Technique

Quite a few of the 2D games that I have seen use per-tile lighting, where each tile has a set brightness (continuous scale of 0 to 1, for example). One way of calculating the brightness of any one ...
0
votes
0answers
25 views

Layout is different?

I know that layouts can look different on different screen sizes, but I didn't take that into account when I made this layout. So, it is designed for normal screen size, by default, and my phone ...