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

learn more… | top users | synonyms

2
votes
0answers
56 views

Sprite animation in Android view

I'm looking for a way to have different sprite animations in individual Android views. I try to use LibGDX and AndEngine but most I could find was how to get an Activity with the sprite animation. ...
2
votes
1answer
141 views

How would i go about implementing portals into my game?

I don't mean to ask a broad question, so let me explain. I'm creating a 2D top-down design game and I'd like to implement "portals" to be able to switch between worlds. Each world is a level class, ...
1
vote
1answer
100 views

Confused about this Timer function C++

I am confused about the argument "m" of this function. I also need to know how to make this work. I am working on a simple 2d game and I am really new to programming. I don't know how to make things ...
2
votes
1answer
59 views

Efficient Per-Tile Lighting Technique

Quite a few of the 2D games that I have seen use per-tile lighting, where each tile has a set brightness (continuous scale of 0 to 1, for example). One way of calculating the brightness of any one ...
0
votes
0answers
25 views

Layout is different?

I know that layouts can look different on different screen sizes, but I didn't take that into account when I made this layout. So, it is designed for normal screen size, by default, and my phone ...
2
votes
1answer
83 views

Comparing the images

I have a drawable, which I want to compare to. I created a drawable object with it, and when I log it with toString, I get: android.graphics.drawable.BitmapDrawable@41f95548 I am randomly selecting ...
1
vote
2answers
209 views

Enemy moving towards Player in a 2D setting?

i want to apologize if this seems so basic, but I'm having trouble having an Enemy move in my Player's Direction in a 2D Top-Down game. I already saw a lot of other answers but they all use the ...
1
vote
0answers
49 views

Finding the components of Proportional Navigation in 2D

So, I've been scouring this, the Physics Exchange, Wikipedia, and the general web for information about Proportional Navigation, and I can't seem to wrap my head around how to find the individual ...
1
vote
0answers
59 views

Game is responding very slowly?

I have a very simple app which removes buttons and re-adds buttons to certain layouts when a button is clicked. The problem is, this process is taking a very long time. My question is: How can I make ...
1
vote
2answers
122 views

Swap buttons in layout

Say I have 4 buttons. I want to have button 2 always swap out with another button, randomly. So, when the user taps button 2, it should swap with another button (randomly). Now, button 2 is at the ...
1
vote
0answers
41 views

How can I move my button?

I am new to animations in android. I was wondering, is there a way to keep a button moving around the screen, bouncing off the walls, until it gets clicked? I was thinking to do something like this: ...
1
vote
1answer
142 views

How to combine tiles in a procedurally generated level in 2D tile based maps?

I am developing a 2D tile-based top-down game. It is currently instantiating square objects with a sprite renderer to procedurally generate the map. Each floor and wall is a 1-unit wide object. I ...
1
vote
1answer
63 views

Unity animations not transitioning properly

I am currently trying to animate transitions between four different directions. I have four total animations for walking, and another four for the idle state. I cannot seem to figure out why when I ...
3
votes
2answers
210 views

How to organize level blocks in an Infinite runner

I'm working on an Infinite Runner game. I have created many level blocks(sections) with different obstacles and pick-ups for the player. They are positioned and placed manually, in such a way, to give ...
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
95 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
213 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
90 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
181 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
172 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
137 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
199 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
98 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
199 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
241 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
181 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
45 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 ...
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
110 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
66 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
79 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
169 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
80 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
247 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
192 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
261 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
23 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
98 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
176 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
78 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
133 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
96 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
129 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
394 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
81 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
157 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 ...