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

learn more… | top users | synonyms

1
vote
2answers
39 views

LibGDX Gravity and Jumping

I'm trying to implement gravity and the ability for the player to jump in my 2D LibGDX game. At the moment, I have two handlers: One for gravity and one for keyboard input @Override public boolean ...
0
votes
0answers
29 views

What's the best way to store tiles' infos in a 2D table?

I need to know what's the less time / memory consuming way to store the infos about each tile in a 2D table. The first thing that came to my mind was creating a table holding the infos, and then ...
0
votes
0answers
20 views

Unet 2D sync problems

I've studied Unet but I still can't get it to work right :( I have 3 problems. The first: I can't force player 1 to always spawn from a specific spawn point (and same with player 2). Therefore I've ...
1
vote
0answers
54 views

What is the most efficient way to store world data for a 2D tile game? [closed]

I'm working on a 2D tile based survival game for my programming class and as I was working on GUIs I realized that I would need an efficient way of storing and recalling not only the tile data and ...
2
votes
1answer
145 views

How i can make better jump to my game? - C++ SFML

So, I ask question about my 2D game, actually it is not game, but it is something like poor game. Well i made moving system and now is time to make jump. I made some kind of gravity with tutorial but ...
2
votes
0answers
61 views

How can I connect multiple explorable regions into one large map?

I am planning a 2-D science fiction game involving spaceships. A major thing that I am having trouble figuring out is how to create a 2-d array of smaller maps that the player can explore. My ...
1
vote
1answer
81 views

2D Sprite batching in OpenGL: How to send transformation data to GPU

OpenGL newbie here. So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
0
votes
2answers
64 views

PYGAME: When i realese two directional keys together the player keep moving

I did the code this way to avoid the player to stop if a press two directional keys together making the moviment more smooth. It work well but when i realease two keys or more together the player keep ...
0
votes
2answers
37 views

Tag for Moving platform

My character is not sticking on the platform when jumping on it but I don't know why. Here is the code: void OnCollisionEnter2D(Collision2D other){ if (other.transform.tag == "MovingPlatform") { ...
0
votes
4answers
160 views

Faking 3D in a mostly 2D game [duplicate]

I want to create a sports simulation game, something along the lines of Championship Manager (if you're not familiar, you can check out https://www.youtube.com/watch?v=t2FlFWP3K28). It's essentially a ...
1
vote
3answers
63 views

Unity 2D, how to turn a bool true, after a set amount of time?

I have an enemy working to damage the player when they stay in collision for too long, at the moment, the enemy will attack about 30 times per second, however I want there to be a delay between each ...
0
votes
1answer
26 views

Unity, how can I shoot when I touch the Box Collider

I want to change the Computer Input to Mobile Touch Input, if I press Space Button it shoots but how do I change this [Code] to Touch Input ? I want it to have it into void OnTouchDown() but what do ...
-3
votes
2answers
81 views

Is it possible to use Java as a scripting language in unity? [duplicate]

I wonder if its possible to use Java as a scripting language in unity to create a basic 2d game?
1
vote
0answers
40 views

How can I make cars drive navigate an intersection without colliding?

I'm trying to create a 2D game with a traffic intersection: My car game-objects need to pass through the intersection without colliding with each other, and without stopping, if possible. How can ...
-3
votes
1answer
62 views

Create a game from scratch [closed]

I'm thinking in creating a simple 2D game to start learning something, but I don't know the best language to start. I know this can be a bad question, but I just know the basics of C# and a little bit(...
0
votes
1answer
38 views

Can't read input from keyboard

I'm new to game dev,and I just trying to create my first game,a simple pong game.But i can't handle the keyboard input. This is what i got : const Uint8 * keystates = SDL_GetKeyboardState(NULL); ...
0
votes
1answer
110 views

Top down 2d orthogonal view with 3D elements (Unity)

I've decided to give Unity a go with my project. I want to create a 2d RPG perspective world, but with elements of 3D mixed in. So for instance, I think I might make trees and grass 3D, for this to ...
0
votes
1answer
57 views

How to efficiently move in Unity2D? [duplicate]

If i want to use Physics in Unity2D what should be the most efficient way to move the object without interfering physics? 1. Transform.position 2. Rigidbody.Velocity 3. Rigidbody.addForce 4. ...
1
vote
1answer
57 views

Doubts on player movement strategy

What I want to achieve is the player moving to the touched position on a 2D grid-based game, stopping at the last reachable spot if the target position is unreachable. What is the strategy usually ...
0
votes
0answers
43 views

How do I structure code that triggers story events at certain places?

I am planning to make a small game with a story that I have thought about for some time now. I am trying to decide how to handle stuff like if the character walks to this hitbox then a guy will come ...
0
votes
1answer
41 views

How to “properly” display a 2d sprites in a 3d environment?

I would like to show "the classic" missile lock viewfinder (the target symbol) of a war aircraft. So the target symbol must follow the enemy, and became red when "lock" it. So i thought simply to ...
3
votes
1answer
71 views

How to make expanding ring with constant thickness?

I need to generate this burst or (donut-shaped) pulse. I'm having a difficult time how to generate such shape. At first, I was thinking of scaling the image but that didnt work out because the line or ...
0
votes
0answers
25 views

Making my game scalable? [duplicate]

I'm quite new to games development and just recently I've made my first Java platformer. I've been using Graphics2D to draw my spritesheets, but I've heard this method isn't very good in terms of ...
0
votes
4answers
119 views

How do I trigger just once and not multiple times if I the Player enters the Trigger? [duplicate]

I wanna trigger just one time and not multiple times. I have a Health System and I want that the Player takes damage from an GameObject if he enters the Trigger but it directly triggers like 65 times ...
0
votes
1answer
56 views

Sprites blurred in Unity (filter mode set to point)

I'm new to Unity and I'm developing Android game. When I connect my phone with Unity Remote and launch game, all textured are blurred and they look awfull. Did some research and set Filter mode to ...
1
vote
1answer
115 views

Tile base Farm Simulation in Unity

I am thinking of creating a sprite base 2d top down farm simulation game. The game uses tiles and I was wondering (conceptually) what is the best way to handle the farm tiles. Each tiles should have ...
1
vote
1answer
68 views

Procedural generation of evenly distributed random points (2d)

I am coming here because I've have a performance problem with my current implementation of an algorithm. I am the idea of Voronoi diagrams to distribute patches on an infinte 2d layer. For a Voronoi ...
0
votes
1answer
35 views

In 2d, how do I discern when a character is on top of an object, from when it is on the side?

I am building an auto-run platforming game. I have code so that if the character collides with a wall, they are pushed back until they are able to get past the wall. Unfortunately, this means that ...
0
votes
0answers
32 views

Using blend trees for a simple 2d character

Let me start by saying that I'm not a animator and basically have no idea what I'm talking about. The character in the game has 3 states : indle(looks at camera) walk left and walk right. I've set up ...
0
votes
1answer
35 views

Perlin noise looks uncoherent on higher z

I was experiencing with my Perlin noise function and I tried to animate a 2D noise by changing the z value of a small amount every frame. However, as z increases, the result becomes stranger and ...
0
votes
0answers
9 views

libgdx - objects are drawn elongated when width and height are the same value

I don't use view ports but my camera is set to the screen width and height of the device. My objects are drawn longer(taller?) then they should be. I check my sprites and they are square not ...
0
votes
2answers
56 views

How to achieve a sheet of paper unfolding from the center in XNA 2D?

I need to create an effect like a folded sheet of paper unfolding. I was thinking about transforming an image so it "scales" from the center to the borders by cutting the image in half and scaling ...
0
votes
0answers
10 views

Clicking an entity with transformation

I am trying to understand how best to implement a click detection function in a 2d JavaScript game. I can demonstrate using a simple example of two square 'entities' which can be selected when ...
0
votes
2answers
47 views

Unity 2D Following player on the x-axis only, at a constant speed

This following code does work, but I have one issue with it. Once the gameobject starts getting close to the player that it is chasing it slows down and does not continue going at a constant speed to ...
1
vote
2answers
59 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
1
vote
2answers
50 views

Rotating a Sprite and Moving It along That Angle in Unity

first time posting here. What I want to do seems extremely simple, but I'm not familiar enough with Unity to be able to implement it. Also, I wasn't able to find an answer that exactly solved my ...
0
votes
1answer
60 views

2.5D overlapping

I started making a game, wich has a 3d engine under it, but achieves a 2d look by using ortographic camera and billbiards. Similar to how Don't starve, Realm of the mad god and (I think) the new ...
1
vote
0answers
23 views

Unity Trail for Eyes 2D

i want to make some kind of an Eye Tail effect for this charakter: I found the Unity Trail Renderer effect but the start of the Trial is perpendicular to the dragged/moved direction: Can i make ...
3
votes
1answer
47 views

place sprites in grid pattern within an area

I have been trying to do this for a few hours in unity now but cant get my head around it. basically i have 4 points(vector3) 1 each for the 4 corners topleft, topright, bottomleft, bottomright. now i ...
0
votes
0answers
55 views

Basic chasing AI - deciding speed

We're working on a simple game where the player is pursued upwards by a malicious entity. I'm not sure on the best way to go about doing this, taking into account the following points: This is a 2D ...
0
votes
1answer
84 views

My bullet keeps going up

So I have a bullet script that fires a bullet straight in the Y direction that gets called as the bullet is instantiated. The plan is to always shoot in the same direction, straight in the Y, but to ...
0
votes
0answers
55 views

Why does my Point light turn off if Player walks in any direction in Unity 2D?

My 2D Sprite has a material, Sprite diffuse attached to it. Now when I set up a light, it works but if I play the Game and walk, the light turns off immediately and the Player turns black. The ...
0
votes
0answers
24 views

Ads are loading, but not showing?

TL;DR: My interstitial ads in my game are successfully loading, but when I call .show() on them, they don't show up! I have followed these directions, and the ads load succesfully, but don't show ...
2
votes
1answer
51 views

Why is my perspective layer is painted over ortho layer?

The entire game takes place in ortho with the exception of the background layer which is drawn on a perspective camera. Everything seems to be working well except that the background is displaying ...
2
votes
1answer
56 views

Unity, how do I pause the Audio in the Level? [closed]

I wanna pause the Audio if I press the Pause Button also, I need help.. Pause Script: #pragma strict var pausemenu: GameObject; public function pause() { pausemenu.SetActive(true); Time....
0
votes
0answers
21 views

LWJGL + Slick2D

Okay, so I know collision detection. I have made plenty of games in Java (without LWJGL or Slick2D) that use Side-Scrolling Tile Maps and collision detection, but the player seems to be glitching ...
0
votes
0answers
48 views

How to fix my issue with movement?

I am making a 2D tile game in Java, and I am having problems with movement, could someone tell me what I am doing wrong please? I am having difficulty in "calling" the function vectorFromKey in main. ...
1
vote
1answer
35 views

Unity RaycastHit2D sprites error C#. Figured out that this code only works on 3D colliders so how do I change it so that I can use it on 2D colliders?

Figured out that this code only works on 3D colliders so how do I change it so that I can use it on 2D colliders? Below is the c# code. using UnityEngine; // This script allows you to drag this ...
0
votes
0answers
37 views

LwJGL 2.9.3 2D Camera

So I've been messing around with cameras in 2d. But I came across a weird bug and I was wondering if anyone could help me figure it out? public static void createDisplay(String title, int width, int ...
0
votes
2answers
31 views

Getting input from just one Axis at a time

I'm trying to make a CharacterController2D Script for a simple 2D TopDown game, but i was wondering, what would be the best way to disable 2-axis movement? just allowing one direction at a time (Maybe ...