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

learn more… | top users | synonyms

0
votes
1answer
182 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
26 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
96 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
180 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 ...
1
vote
1answer
204 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
0answers
164 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
42 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
48 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 ...
4
votes
2answers
66 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
105 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 = ...
1
vote
0answers
61 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
78 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
157 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
71 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
185 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 ...
2
votes
3answers
186 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
239 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
22 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
89 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
163 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
72 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
128 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
88 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
116 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
358 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
76 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
137 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
225 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
64 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
71 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
121 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
40 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
168 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
38 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
64 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
581 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
180 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
213 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
384 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 = ...
4
votes
1answer
617 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 ...
3
votes
1answer
88 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 ...
3
votes
1answer
203 views

How to implement 'Fog of War' in SpriteKit or Cocos2D?

Take a look at the image below from the game Warcraft 2. There's a darkened area (like a fog) that represents the limits of the 'field of view' -- to the effect that you would not see any enemy ...
3
votes
1answer
438 views

Switching from Arcade to P2 physics in Phaser

so i just started using phaser for test i've followed the tutorial in the phaser website (making-your-first-phaser-game) everything is clear no problem . but since i've making a pool game i need ...
1
vote
1answer
96 views

Transform.LookAt rotates the sprite and collision not triggering

I've applied the below script to a gun object to instantiate bullets to the direction of the mouse position. The bullet collision is not getting triggered since the bullet has been rotated. How to ...
1
vote
0answers
54 views

Is this a good way to “get rid of the sprite shakes” for my sprites that “target” other sprites? (XNA)

I'm relatively new to XNA, but very proficient with C#. I want to know if this is the best way to solve the sprite shaking problem. I had a sprite class that can target a place/other sprite on the map ...
1
vote
1answer
39 views

matrix transformations 2D - place in world-space but keep size in “object/screen-space”

I have a question concerning matrix transformations. I Think I know how it could be done, but Im not sure its the best/correct way to do it. I want to apply World translations and rotation to an ...
1
vote
1answer
87 views

Python - Holding down key to move a sprite works, but only in one direction [closed]

I've been testing out movement for a fighting game that I'm creating in Python. The problem is that when I try to move the sprite, it moves correctly to the left, but only ever works in that ...
1
vote
0answers
60 views

2d stealth-type collision

I'm curious as to how stealth games work. I am working with 2d right now to get the hang of it, and so far I have come up with the following ideas. create a bounding circle around the player/enemy ...