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

learn more… | top users | synonyms

0
votes
1answer
26 views

Causing Update loop with Coroutine Unity

Total Noob Alert! < 7 days with C# and Unity My Win Game screen becomes SetActive and my Player is SetActive false when you are standing in a trigger and crouch. That all works fine except you ...
2
votes
1answer
32 views

Help understanding camera/scene Unity

I'm a brand new unity developer and I watched a few tutorials and then found a game on the Asset Store to provide a nice base for my game. However the setup, especially with multiple scenes is quite ...
1
vote
1answer
37 views

[Unity2D]Make a bullet move toward player and keep moving when past him

Basically I'm trying to make enemies attack player and shot bullets towards player and for now is kinda working, but my problem is the bullet stop when it reach the player position instead of keep ...
3
votes
2answers
72 views

Is developing 2D sprites as projections of 3D models viable?

I am a solid programmer and have a strong desire to make a 2D top down game. My immediate stumbling block, however, is the art. I am currently using placeholder images, but I really want to develop my ...
0
votes
1answer
21 views

Interpolate object collision stuck in Unity

I am working on a very basic test in 2D. The problem I am having is that, when my sprite collides with the ground, it is checking the event too frequently. The sprite stays in limbo, as it doesn't ...
1
vote
1answer
51 views

How to create a walkable crate box?

I have a 2D platformer with each platform having a PlatformEffector2D component. I want to create a crate that can be pushed. When I jump into the edge of the crate, my player gets stuck, so I added ...
0
votes
1answer
39 views

Trying to subdivide an ISO tile

I have code that calculates where the user clicked inside an iso tile in an isometric map. The tile has a width of 1 unit and a height of 0.5 units. My code calculates where they touched inside the ...
0
votes
1answer
31 views

OpenGL 2D camera

I'm trying to implement a 2D camera in modern OpenGL. Before I moved over to OpenGL, I used SDL to make my games and their concept of a camera is by creating a camera quad and each time the camera ...
0
votes
1answer
52 views

Top down 2D game: hole tiles

I'm making a top down 2D game in Unity, here's my doubt: how can I add "hole" tiles to it, so the player could fall (something like Zelda: Link to the past, or the water tiles in Enter The Gungeon)? ...
6
votes
1answer
62 views

How can I create a title screen demo?

I am writing a 2D game in Unity and I want to offer an old-school style title screen demo (like in super Mario, etc.) where it shows a brief run through of either one or various levels. How can I ...
1
vote
0answers
54 views

OpenGL ES 2.0 Framebuffer stays empty?

As first I want excuse me for opening another FBO question. I found alot of them but I still can not manage to get it working. I want to implement a framebuffer class for postprocesing in my 2D ...
-1
votes
0answers
22 views

Unity Engine : I want to move the player once while he is jumping

This is my move function which moves the player and stops it from moving if player isn't on the ground and canMoveWhileJumping is set to false I can't figure out how to make my player move once while ...
0
votes
3answers
70 views

How can I design an effective some sort of sequence system?

I am making a story driven game right now, and I want to create a system that will allow me to code sequences easily without creating a mess from the project. What I mean by sequences is for something ...
1
vote
1answer
30 views

Using Multiple Viewports in LibGDX?? help needed badly

I've asked this question before but i am still unclear of how to do this after hours of frustration I have messed up yet another decent project I've been working on. I had a fully functioning Snake ...
4
votes
2answers
82 views

Pathfinding in Isometric Phaser with Tunnels

I want to create a 2D isometric game. Currently I'm looking and testing Phaser game engine with isometric plugin. Almost everything at the moment looks possible except few things. I will create a ...
0
votes
0answers
12 views

Box2D crash on collision

I've got a really strange problem, that I can't solve whatever I try. So it's the following: I have 2 body's in Box2D, one, the player is a dynamic body, the other one, an obstacle is a static one. ...
1
vote
0answers
45 views

How to stop this object from overlapping tile's corners in 2D tilemap

I am using a tilemap to create my 2D world. All tiles and the player has an AABB. Currently, I'm detecting collisions with surrounding tiles the player is in, from the player's center. This works, but ...
0
votes
0answers
10 views

How can I import a TMX file into a Graphics object?

I am creating an RPG-esque game and need to know how to import a tmx file and render it to the screen. I am using libtiled and have gotten it imported into my project. How do I read / parse the map ...
1
vote
1answer
32 views

Unity C# - Change color, or material of specific line segments on Line Renderer

We're making a game that plays with a LineRenderer, and we want to give it a different visual feedback relative to the side of the screen that it's on. We want to change the feedback of the specific ...
0
votes
1answer
47 views

Simple Java 2D Game : Player Doesn't Move

I'm a beginner at java and I'm trying to make a simple 2D game as a practice, and i have a problem here with the player, I've tried a lot to make it move but it didn't work. These are the classes that ...
0
votes
1answer
24 views

2D HUD overlay drawing based on 3D coordinates and camera azimuth and elevation

Assume you have the 3d coordinates of the player and another unit N as well as the azimuth and elevation of a camera always looking at the player. In the following illustration the sun would be the ...
1
vote
1answer
105 views

What is the best collision detection method or algorithm for a 2d platformer?

I'm working of a 2d platformer. It's a preety simple game, but the ground is flat and it looks boring. I did the collision detection for it and it's all working when the boxes are axis aligned, but I ...
1
vote
1answer
24 views

Spawning/Updating objects from client

I hope this is the right place to ask my question... I have been working on a game (all 2D) and I'm facing some problem with the networking part (pretty much a beginner). My game idea is a shared ...
0
votes
1answer
25 views

Raycast2D ray not follow object

I have some Raycast2D problem. I want raycast follow the object like this: But when I drag object somewhere the ray looklike this : Here is my code where is my fault. Please help :( using ...
-1
votes
0answers
8 views

colona sdk function calling

i saw this code local ball = display.newImage("ball.PNG") ball.x = 123, ball.y = 234 ball.name = "ball" function touch(event) if event.target.name == "ball" print("ball touched") end end ball:...
0
votes
2answers
111 views

How does one calculate the surface normal, in 2D collisions?

I have a ball, which should bounce when it collides with a surface. I know the formula for reflections; (v1 - 2(v1 • n)n) However, I cannot obtain the required information. I know: the ball ...
0
votes
0answers
43 views

Scale mathf.clamp for different devices

Whats a good way to scale so the gameObject will be always clamped at the same place for all mobiles devices? transform.position = new Vector3 (Mathf.Clamp (transform.position.x,-2.83f, 2.83f)...
0
votes
2answers
52 views

How do I incorporate .tmx files into my game?

Ok, so I have made a .tmx file for my first level, but I am unsure how I would load it into my game. Currently I am iterating through an internal array to set the blocks, but I need to know how to ...
0
votes
0answers
11 views

How do i implement mulitplayer on my corona sdk project its a top down shooter zombie game does anyone here recommend appwarp

i have a top down shooter zombie game created with lua corona sdk but i have never done multiplayer before just wondering if anyone here can give me a few pointers let me know if you guys need my main....
1
vote
1answer
29 views

Android build has white image over game

In unity when I am playing my game it displays fine, but when I build and run it to my nexus 5 there is this white something I don't even know over my game. Any suggestions for fixes?
-1
votes
1answer
63 views

How should I store & read level map?

Ok, so I am trying to create a level map, but I don't know how I should store it. Should I use an array for every level? I feel like that wouldn't be very efficient though. I'm not sure what I should ...
0
votes
1answer
33 views

Can't find reason very basic collision detection is acting unreliably for me? (libgdx game project)

I am again trying to create a simple game to learn some libgdx coding skills. The game is a ball stuck on a track the track runs sideways, and there is also one that runs upwards which you have to hit ...
0
votes
1answer
56 views

Java 2D Game: Collision help

Ok, so in my Java2D Game, using swing/awt (I hear it is not the best to combine those), I am trying to finish collisions. So, the problem is, the "if (player.xvel < 0) { }" and the "if (player....
0
votes
1answer
52 views

How to make 2D bullet have smooth bounce?

I have an example: //Code that need to run var codeRun = ` function* example(x, y) { x = x || Shmup.advanced.data().scene.size.x / 2; y = y || Shmup.advanced.data().scene.size.y / 3.75; ...
0
votes
1answer
65 views

If I want to create a top-down 2D game should I rotate the camera?

Do I have to rotate the camera to top-down view if I want to crate a top-down 2D game or just disable gravity?
0
votes
0answers
53 views

A line algorithm with anti-aliasing for 2D LOS

I've been searching for hours on end for a working line algorithm with anti-aliasing for line of sight or field of view in my game (mixed with raycasting). I've found numerous algorithm's and ...
0
votes
0answers
14 views

Only render things visible on window/JFrame - Java

So I am making a 2d top down game in Java. It loads a picture of the level and on every yellow pixel it loads a block, and on every blue pixel it adds a water block etc.. These 'GameObjects' get added ...
0
votes
0answers
20 views

Edge Collision Problem in Unity

So the game is just a player going down and he need to step the clouds so he does not die, the clouds have an edge collider but I am having this problem here: As you can see, if I am falling and walk ...
1
vote
2answers
66 views

Unity 5.5 android scaling

The questions I've seen are outdated, explained, not to my liking, or just don't work. PROBLEM: -I want to be able to create a game that can scale on all mobile devices with ease and with no ...
0
votes
1answer
21 views

UNITY Prevent 3D Text Render Trough All Object Without Shader

im tired of those answer i found trough search engine that just keep saying " the trick is to modify the shader " without thinking because they want to gain reputation , in my case , i have 2 3D text ,...
0
votes
1answer
35 views

Unity transform.rotation not giving real value

i confused , when the object is at 0 rotation ( not rotated yet ) , it giving real value ( 0 ) , but when the object is rotated 180 degree , transform.rotation is giving false value ( 1 ) , this is ...
0
votes
0answers
46 views

Calculating voronoi sites with a 2D grid

I've been diving deeper into voronoi cells for use in a 2D game. There's a lot out there that explains the concept and describes how to calculate them but I'm failing to grasp how best to apply them ...
0
votes
0answers
22 views

Unity2D - Move object along path.

I am trying to move an enemy object to a set destination on a straight line. He will be walking to this destination. I have a GameController script that is attached to an empty GameObject called ...
0
votes
1answer
32 views

How to control a 2d charter in an top-down android game with the standard joystick?

So I'm building a 2d top-down game and I need to control my character using unity cross-platform standard asset single joystick. The problem is with the rotation, I don't want to use the dual-stick ...
0
votes
2answers
35 views

Efficient Storage of Objects in a 2D Grid

When trying to store data related to objects in my 2d top-down tile based game (specifically, blocks), I realized that I don't have an efficient solution to storing them. I could have, for example, a ...
0
votes
1answer
33 views

Non-existent instance in Game Maker

I'm currently trying to make the fire object (created by the fireball) stick to the enemy, by specifying the enemy type and its id. I'm getting the following error: "Unable to find any instance for ...
0
votes
0answers
15 views

Unity2D: How to disable all lights and add a spotlight which follows my player?

this is my first 2D project. back in 3D i could just simply delete the light and add new ones as i please but here there are no light items and the camera has its own light somehow. i want to make ...
0
votes
0answers
82 views

World vs Screen coordinates?

I'm using LibGdx 2D without any Scene2D or Box2D. My tiles are 32 X 32 and 16 X 8. And I'm currently using 480 X 320 for the camera. I'm currently doing all my tile and character drawing and ...
0
votes
2answers
72 views

2D HUD over 3D scene

I'm trying to create a 2D Heads up Display for my players in a 3D OpenTK environment. How I'm doing it is by drawing my 3D elements and then running this code. GL.MatrixMode(MatrixMode.Projection); ...
1
vote
0answers
111 views

Why is my 2D mouse aim not working properly?

I'm trying to program 2D mouse aim, where the arms and the gun in the arms rotates to point at the mouse. But for some reason, the arms and gun rotate and do not follow the mouse position. The each ...