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

learn more… | top users | synonyms

0
votes
1answer
32 views

Activate and Deactivate Collider with Click

i'm having some troubles working with this, it's basically a Sword that points towards your mouse position, and when you Left-Click, a Trigger Collider is activated and then deactivated, but i can't ...
3
votes
1answer
104 views

Fixing the size?

My app isn't compatible with all screen sizes. When testing on a small size, my textview overlaps with my button. So, as suggested on the Android Documentation, and many stack overflow pages, I ...
1
vote
1answer
250 views

How to use .fbx for 2D animation in unity 2D

I am new to unity so please bear with me. I have come to know that for animations it is better to fbx format in unity rather than sprite sheets. I am using unity 5.2 and till now i created all my ...
1
vote
1answer
97 views

Unity3D Sprite tearing on Android Smartphone

The game was running on Samsung Galaxy Trend 2. On other smaptphones and emulator it seems running properly without glitches. Sprites import settings are following: Could someone explain why ...
0
votes
2answers
210 views

How to handle multiple enemies with the same script?

i'm working on a basic Top-Down Shooter, kind of like... Nuclear Throne or The Binding of Isaac, but since i'm new to Unity, and it's something i'm required to do for school, i'm quite in a rush so i ...
7
votes
1answer
177 views

Get local coords from global coords

I need to get local coords from global coords. I did not find ready-made examples. Please help me how to do it on the example image. Thank you! UPDATED: Here's the method in the java, created ...
3
votes
0answers
149 views

Proper Line of Sight in tile based game

My rendering engine currently takes "xMin, yMin, xMax, yMax" to render a rectangular region of tiles, and will automatically scale based on the size of the panel it is rendering to. However, I am ...
0
votes
1answer
210 views

How do I organize and sync multiple animated sprites in Unity2D?

I have a human with three parts: legs, body and head, 2D, top down view (GTA 1-2 alike). Head does nothing, legs have walking animation and body has 2 animations: walking animation (moving hands which ...
2
votes
0answers
27 views

2D orbital mechanics [duplicate]

I'm working on a 2D game which involves firing projectiles around a solar system and having the path of the projectile change based on the gravitational pull of solar bodies. I've been trying to find ...
1
vote
1answer
109 views

Positioning game object on a grid

I am learning how to code by programming easy, 2D games. Here I want to try to get only a map, like in strategy games (2D isometric) and put new objects (pictures) on it. In short: I want load a big ...
2
votes
1answer
213 views

Unity 2D Sprite Bending between Hinge Joints

I've created a tentacle that consists of multiple game objects, each attached to eachother using HingeJoint2D's. Gameplay wise this multiple segmented approach is great because I can use Unity's built-...
1
vote
1answer
289 views

Cocos2d Sprite 3D position

When I set a position3D for a Sprite in cocos2dx, it render two times the same sprite, i took a screenshot: I set the position3D because i want to use the Z position the give an effect of distance, ...
4
votes
1answer
199 views

Ledge climb animation and movement (2d platformer)

Struggling to make a decision on the implementation of a ledge climb mechanic for a physics driven 2d platformer. What is the best way to go about this without it getting overly complex? So far I ...
1
vote
2answers
89 views

Collision between complex polyominoes travelling at different velocities

My first post here if there's anything wrong please do highlight it :) First and foremost the problem I'm facing is practically identical to this earlier post here : Falling Blocks and complex shapes ...
1
vote
0answers
46 views

Spawn platform based on player location

I am trying to make an endless platformer game. I have made a lot of progress so far. I now want to be able to change platforms when I take an object(power-up or something). I modified my platform ...
1
vote
1answer
49 views

Question of tilesheet efficiency

For a 2d side scrolling game made in Java, should I make a sprite sheet for my character walking left and for walking right, or should I just do the one, and flip it when it loads? Also, the way I'...
4
votes
2answers
67 views

Displaying smooth borders given a coarse grid-based map

I've been messing around with different algorithms trying to make a grid based map look smooth, I have tested with various shader based methods and wrote a few of my own but none of them look right. ...
5
votes
2answers
124 views

Create.js CPU High load

I'm new in Create.js and I'm trying to make countdown progress bar. I have this simple code: var stage = new createjs.Stage("timerCanvas"); stage.canvas.width = document.getElementById('...
1
vote
0answers
71 views

2D Physics library for multiplayer in c++ [closed]

Im trying to create a top down shooter with multiplayer functionality. So far im using Box2D for my physics Simulation. The last few days I played around with syncing movement between Clients and ...
1
vote
1answer
81 views

Generate a 2d mesh terain out of triangles (low details)

I'd like to learn a good algorithm to generate a 2d mesh made out only of triangles to be used as a terrain. Its not important to get a high detail terrain. It should just have a triangle looking ...
2
votes
0answers
187 views

How do i add a rain effect to a top down design game in Java, using no external libraries?

I'm creating a top-down game for my A-level/college computer science project, and I'm trying to implement rain. The game needs to be usable on any platform, so the use of external libraries is out of ...
1
vote
0answers
85 views

Storing game resources in the *.dat file format to reduce file size [closed]

How can I store sprites(png) or audio files(wav) in the *.dat file format?
2
votes
1answer
305 views

My player sprite get stuck to walls while moving along

Hello, My player sprite is moving along the wall (not even diagonal, just straight down) and get randomly blocked in the corner of some walls. By blocked, I mean that the Y movement is stopped. If I ...
2
votes
3answers
206 views

How do you get the best rendering performance in a 2D Java Game?

I have seen a lot of tutorials, and they develop games with 2 different ways: The first one is using a virtual image (BufferedImage) and filling it's pixels. And displaying virtual picture. private ...
1
vote
1answer
277 views

How do I render a 2D overlay with DirectX 9?

I'm working in C++ with DirectX 9 on a 3D game, but I want a 2D overlay for rendering a HUD. I've heard that I could use D3DXMatrixOrthoLH, but I'm very confused on how to use it. I'm more familiar ...
1
vote
0answers
24 views

Unity - RageTools Performance

Has anyone used RageTools for Unity? What do you know about the performance? Is it more performant than using raster, for example with "puppet 2d" or the other way? I'm developing mobile games, so ...
3
votes
1answer
99 views

PhysicsJS on mobile devices: how to optimize for speed

I'm (physics n00b) developing a small animation (gamification) in a mobile HTML5 app (PhysicsJS, HTML5, Cordova, Ionic, JavaScript). This animation is derived from Basket of verlet constraints. This ...
2
votes
2answers
182 views

2D Collision at corners using C# - without xna or unity

I'm trying to make collision for a 2D game, the player (car) has to collide with the walls of the track when it hits them. I looked into pixel color detection, and X,Y -based collision (But since its ...
1
vote
1answer
81 views

Pseudo 3D Track editor [closed]

Does anyone know of a pseudo 3D track editor ? I now need one to design my stages, as manually trying to create segments, and position static and movable objects would be too time consuming.
2
votes
2answers
148 views

Rows of coins in libgdx?

I have my coin image in the assetLoader class, then I import it into gameWorld. My question is, how can I draw() rows of coins without having to write out 15 different coins? i.e., coin1, coin2, ...
2
votes
1answer
105 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
1
vote
0answers
40 views

Black bar in beetween the image when Background move infinite

I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be ...
4
votes
0answers
135 views

Can a sprite be rendered with thickness in Unreal Engine?

Is there a convenient way to have a 2D pixel art image with transparency (not partial) rendered with a thickness in Unreal Engine? Paper2D does exactly what I want, except it's a flat plane. I'm able ...
4
votes
2answers
441 views

Procedurally generate rivers for 2-d heightmap terrain

I created an algorithm to procedurally generate 2d worlds based on a heightmap grid. (I used a 2d simplex noise algorithm mapped on the inverse of the distance of each pixel from the center, to "...
0
votes
2answers
89 views

How do I make sprites overlap eachother based on a layering system?

In Unity, I am building a 2D puzzle game, however I need to make sure that certain sprites are rendered on top of other sprites when they are above them. Here is an example switch (left) and block (...
1
vote
1answer
175 views

Most efficient way to calculate angle between two line-segments that do not necessarily touch each other

Although I found answers on calculating angles from vectors, I didn't find a specific way to calculate angles between line-segments that do not necessarily touch each other (I say "not necessarily ...
2
votes
1answer
264 views

Unity 2d diffuse sprites not rendering on mobile

EDIT: Just an update, did change from sprite/diffuse to Diffuse and zordering of my level using t2dtk map stuff was backwards. Like the camera flipped around so i had to shuffle things around on the ...
4
votes
2answers
68 views

2D Collision Box Clipping

There is this strange issue with the collision in a game I am making. When the player is slightly lower than a block it is colliding with from the side, the player ends up clipping to the top of the ...
1
vote
2answers
78 views

Unity2D - Save everything in a scene before loading another and come back to it?

So I have am into this endless runner thing where everything is generated randomly from prefabs. Okay cool! But I am currently working on a bonus collectible which takes the player to another scene. ...
-2
votes
2answers
123 views

What software to use to make games for free with commercial use? [closed]

I am going to make a 2D game, I need free software for my team of five or less people. I should be able to sell in-game currency but the game will be free. The software should be able to compile the ...
1
vote
0answers
41 views

lwjgl Move 2D projectile in direction from coordinate pair

So I am having issues getting my projectile to move properly at all, the help I have found have only made this worse and have not actually given any heading as to what I am doing wrong. Can anyone ...
3
votes
1answer
190 views

How can use a 3D map with 2D characters (Unity)? [closed]

I tried to search something about it but I can't find any complete or well-explained tutorials about how to use a 3D map with 2D characters and items, like Ragnarok or Final Fantasy Tactics. If there ...
1
vote
0answers
40 views

Change gui in java game

im making a 2D Server/Client game, i have very little to no problems with the server but now i wanna work at the client. I think about using a JFrame and all the other gui classes/methods. My question ...
1
vote
1answer
67 views

2DRaycast is shooting slightly in wrong directions

I wanted just a simple 2DRaycast, which points from my character to my mousePointer. So I found the following code in the Internet, most people seem to use it like that. So I tried it, but it isn't ...
2
votes
2answers
748 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
3
votes
1answer
241 views

How can I exploit multithreading in collision resolution?

I'm trying to speed up my collision resolution by using multiple threads. I'v read through Box2D's source code and while it was challenging and educating, it didn't really point me to how I could use ...
1
vote
3answers
230 views

What are the basic equations in 2D physics collisions?

I'm making a 2D fighter, and I have gotten a basic engine, but right now I need to add the collisions, but I'm sure a basic AABB check will not be enough. I'm sure it needs some basic 2D physics ...
6
votes
4answers
406 views

Rotating sprite around another sprite

I am building a pool game, and I want to make the cue rotate around the white ball. Here is the live code: http://199.26.84.223/nocol.html Here is the code for the white ball: balls = game.add....
4
votes
1answer
681 views

Tetris: 2D Rotation Matrix?

I'm creating a Tetris clone right now. I've got the tiles of tetromino stored as an std::array<tile, 4>. Each tile holds its (x,y) coordinates relative to the piece. For example, the t-block is: ...
3
votes
1answer
93 views

Collision happens even though the objects are not colliding according to what we see

I'm trying to build a pool game as my first phaser project. The biggest challenge today was to make the cue rotate around the white ball. After hours of searching and not finding anything useful (...