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

learn more… | top users | synonyms

0
votes
2answers
376 views

Gyroscope Parallax Effect In Unity

I want to make a parallax effect in Unity 3D with gyroscope like the one on this site: http://matthew.wagerfield.com/parallax/ I found an asset, but it is too expensive. So I need a script which I ...
0
votes
2answers
308 views

Unity 3D: How to stop/reset 2D sprite animation after releasing key?

Im following a tutorial to create animations with a 2D sprite character. But i put in my own. Which has 8 animation positions. For some reason when my guy walks around,then stop, the walkings ...
-5
votes
2answers
133 views

The Power of 2D Engines vs Modern 3D Games [closed]

I'm toying around a lot with Game Maker. I really like it. GML is very simple and with its nearly object oriented design you could create anything in 2D you can think of. However there is a limit. ...
1
vote
1answer
121 views

How to remove destroyed clones out of the Hierarchy in Unity2D

I made a 2D edge collider which on contact destroys the other gameobject. When I launch the game all the other gameobjects in fact get destroyed but the clones are still listed in the Hierarchy. How ...
1
vote
0answers
43 views

The new android studio? [closed]

I got the new android studio, and I noticed one thing when creating a new activity. The layout that corresponds with the java for the activity is made twice, once as a content: This new layout ...
2
votes
1answer
119 views

Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each ...
1
vote
0answers
86 views

Screenshot preview freezes a game for a few seconds

I have a screenshot preview at the end of the level, but when I show it my game freezes for a bit(low fps for a few seconds). This is code I use to load screenshot and crop it(for a little preview ...
1
vote
1answer
89 views

Different screen sizes? (landscape)

I want to make a separate landscape layout for each size of my original layout I have activity_main.xml. I have adapted it to be able to fit multiple screen sizes: Now, I want to create a ...
5
votes
2answers
203 views

Drawing circles at the background of a 3D scene and updating their size

So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it. Just like it would be if the circle was in ...
2
votes
1answer
106 views

Implementing attack animation in four direction movement

The way the program is supposed to run is basically, a character can be running/idle and if spacebar is pressed, all movement stops and movement controls are locked through the bool "canMove". The ...
2
votes
0answers
61 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
146 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
103 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
67 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
89 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
228 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
58 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
148 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
46 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
198 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
66 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
277 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
108 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
273 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
102 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
230 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
179 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
162 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
233 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
2answers
134 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
225 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-...
3
votes
1answer
325 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
217 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
90 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
48 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
69 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
128 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
73 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
86 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
202 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
89 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
346 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
223 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
291 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 ...