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

learn more… | top users | synonyms

0
votes
0answers
24 views

Do I restart the service?

I have a long running service in my game, that consists of two threads. //MY SERVICE: if(userEnabledProcessOne) //Shared preference value that I'm getting from the settings of my app based on a ...
1
vote
0answers
55 views

Why do characters only move in 4/8 directions in top games? [closed]

In many top down games, like Zelda (4 directions) There are only 4 or 8 possible directions. Why is this? Is it a design choice or a technology limitation? I can't think of any reason that even ...
0
votes
0answers
62 views

Modern OpenGL and SpriteBatching

I tried to find tutorials regarding SpriteBatch done in Modern OpenGL 3.0+, but failed to find any good resources so far. So can anybody please provide me a good resource/tutorial to achieve ...
-3
votes
0answers
15 views

Need a Sprite creator program for Ubuntu [closed]

Is there any program to create 2D sprites for games with Linux support?
1
vote
2answers
77 views

Technical names for camera styles in 2D games

In 2D gaming, the camera movement method has a lot do with the play style of the game. I'm not super familiar with the technical terms for camera styles, so I'm going to describe them in hopes ...
1
vote
1answer
48 views

How do I deal with AABB sweep ghost collisions?

I've been trying to wrap my head around this for some time now. I wrote an implementation of AABB sweep collision detection. I though I understood the idea but it didn't work as expected. I rewrote ...
0
votes
0answers
24 views

Sub pixel Sprite jitter on moving platform

I have written a simple 2D platform game in C++. Coordinates are stored as integers, not floats. To facilitate smooth acceleration, the positions and velocities of the game objects are stored in sub ...
0
votes
0answers
25 views

Change list in game? [closed]

I am really frustrated because I have been trying this for 4 hours today, and I can't find a solution. For some reason, my on long click listener doesn't get detected sometimes! ...
0
votes
0answers
42 views

Problem with collision detection also affecting collision resolution

Hi I am making a 2d scrolling beat em up, I am working on the collision with obstacles like drums and platforms. So far I have the player jumping and falling from platforms but having problem ...
3
votes
0answers
78 views

How can I interpolate between two frames of a sprite-based 2D animation?

For example, I'm looking to animate at 60 frames per second, but clearly my artist isn't going to hand-author 60 frames of art for every second of an animation clip and even if he could, it would only ...
-1
votes
2answers
67 views

Help with drawing a polygon with N sides [closed]

I am at university on my games development, and I have been given work to fill in an empty pixel plotter program using the methods they have supplied for it to teach us the algorithms used in 2 ...
0
votes
0answers
9 views

Creating a Shop in the Game for alternative skins Unreal Blueprint [duplicate]

I'm a beginner developer and I'm trying to create a game with some alternative skins. So when the player gets sufficient money, he goes to the menu, open the shop, buy the new skin and select to play ...
0
votes
0answers
35 views

How can I change the color of the default android drawable star?

I asked a question before and I got an answer to do this: Drawable drawable = getResources().getDrawable(android.R.drawable.btn_star); drawable.setColorFilter(Color.YELLOW, ...
0
votes
0answers
33 views

Create a new layout?

After the user gets to a certain score in my game, I wan't to display a medal next to the users name. Doing this pro grammatically will make the image disappear after the user leaves the app. How can ...
0
votes
1answer
57 views

Will this impact my game's speed?

I have read the android developer guide to working on different screen sizes. My question is, if I only provide an image in the drawable file, and let android scale it for me, will it impact the ...
1
vote
3answers
87 views

Get the tile that my mouse pointer is currently over?

I want to get the tile that my cursor is over in my game. I did some googling though most of the examples we're in other languages/libraries and if they weren't, they didn't work for me because I use ...
1
vote
1answer
25 views

How to add images?

I was adding images after reading in the documentation: This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for ...
1
vote
1answer
49 views

Circle to Polygon collision response

I'm working for collision response for my 2d game. Character is represented by circle and obstacles are represented by Polygons(in my example it would be rotated rectangle for simlification). The ...
3
votes
1answer
50 views

2D deferred lighting calculations not working

I have the following code for my HLSL pixel shader. Modified from another post here on GameDev (Link), but I have a few problems with it: // calculate UV and get texture and normal. float2 UV = ...
-4
votes
1answer
80 views

How can I extract sprites from a SNES games? [closed]

Planning to use some sprites for a fan project but the sprites I want haven't been ripped yet; how can I extract them in a usable form?
3
votes
1answer
92 views

How to blur entire scene but a specific spot in Unity?

What I want is basically: A way to blur every object/sprite on the scene, but have a "blur-free" circular zone, that can move. And everything that's behind that circular zone won't have the blur ...
1
vote
1answer
36 views

Using .svg in unity(2D)

Creating resolution independent sprites is tough and memory consuming. How can .svg assets be used in unity for any kind of 2d game? What are alternatives to .svg that can be used in unity? Can ...
6
votes
2answers
752 views

Where to cast light/shadows in a 2.5D view?

I'm working on a tile-based 2D pseudo top-down/side-on game very much in the graphical style of Prison Archiect. More specifically, I'm referencing their style of drawing wall tiles where you can see ...
4
votes
2answers
65 views

Restricting Maximum Velocity in Space

I'm making a top-down 2D space ship game in which you rotate and thrust. I'd like to impose a maximum velocity for different engine types, meaning that a certain engine can only get you going up to a ...
1
vote
1answer
46 views

Repaint() in gameloop does'nt work [closed]

Recently I'm working on a PAC-MAN clone. I created 3 classes: StartingClass which extends Jframe and uses KeyListener Board which extends Jpanel Sparx which is responsible for changing the ...
1
vote
1answer
30 views

find Vector2 libgdx

I need to get coorinates of red point. Coordinates are just for example, it would be better to see the common formula. Found code like this, but it gains wrong result.() Vector2 o = new ...
2
votes
3answers
154 views

How to test if procedurally generated level for infinite runner can be passed?

I have a 2D infinite runner platformer game built in Unity 5, where the level procedurally generates itself. I need to check if it is possible to pass the holes on the level. How could I do that?
5
votes
2answers
114 views

How to apply friction vector to acceleration in top-down 2D game?

I'm making a top-down view 2D RPG game, meaning the player can move in any direction on a 2D plane, and I'm trying to implement a somewhat realistic non-orthogonal acceleration/friction physics model ...
7
votes
1answer
105 views

In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?

In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way: FixedUpdate(dt) // I use fixed timestep foreach collide c1 in allNotStaticColliders ...
2
votes
0answers
51 views

Would this 2D Lighting and Shadows implementation work? [closed]

I'm writing a top-down 2D tile-based game and I'm trying to decide on how to implement lighting and shadows. The game will have a large number of light sources, some static and some moving around the ...
0
votes
0answers
24 views

how to pin down a sprite partly in unity?

I am working on a simple do not let the bombs hit the floor game for android. You control a stick which can rotate to left or right depending on where on the screen you touch (left or right). But I ...
0
votes
0answers
39 views

How should player be able to hear 2D spatial sound?

Let's say there is a multiplayer 2D game and a 2D spatial sound system, in which sound volume decreases, when distance to the sound position increases. E.g. explosion happens. Should player hear it if ...
4
votes
1answer
76 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
38 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
42 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
24 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
85 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) ...
1
vote
0answers
65 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 ...
-3
votes
0answers
65 views

Unity 2D tiled game, big map

I am developing a 2D game in Unity. The size of the map is: 11264 x 3072 which I have divided into 32x32 tiles ( 112 rows , 400 columns ) What Is the optimal way to draw/handle collision in ...
1
vote
0answers
45 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
21 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
32 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
60 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
41 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
30 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
10 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
65 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
55 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
45 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
81 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 ...