2D games are drawn in a two-dimensional space using two-dimensional objects. To represent its position, each game object will have an `x` and a `y` coordinate.

learn more… | top users | synonyms

3
votes
0answers
14 views

Efficient way to calculate “vision cones” on 2D tile map?

I'm trying to calculate which tiles a particular unit can "see" if facing a certain direction on a tile map (within a certain range and angle of facing). The easiest way would be to draw a certain ...
1
vote
1answer
61 views

Procedual level generation for a platformer game (tilebased) using player physics

I have been searching for information about how to build a 2d world generator (tilebased) for a platformer game I am developing. The levels should look like dungeons with a ceiling and a floor and ...
1
vote
3answers
108 views

Obstacle Avoidance steering behavior: how can an entity avoid an obstacle while other forces are acting on the entity?

I'm trying to implement the Obstacle Avoidance steering behavior in my 2D game. Currently my approach is to apply a force on the entity, in the direction of the normal of the heading, scaled by a ...
0
votes
1answer
44 views

Warp GameObject Size When Entering/Leaving Area

Below I have an image describing the desired functionality I am going for. Let's say you control a square and when you move this square into a given area, any part of your rigidbody/model inside of ...
1
vote
1answer
67 views

Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates?

I'm a noob and English is not my mothertongue, so please bear with me! I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based ...
0
votes
1answer
76 views

Simultaneous Animation for a GameObject - Unity3D

Its my second week with Unity. I am doing a 2D game and I have a small GameObject which should change its sprite along with following a definite path defined in Animation Curves. I did both of them ...
0
votes
1answer
78 views

HTML5 Canvas 2D lighting and normal maps

How using the HTML5 Canvas can I create a 2D game with light sources and also add an extra depth using normal maps. I have never really done lighting in 2D before and I'm not sure where to start. ...
47
votes
15answers
49k views

What tools do you use for 2D art/sprite creation? [closed]

What cheap/free tools do you use for 2D art and/or animation? I don't really like Gimp's interface, Paint.NET is limited and GraphicsGale is sort of archaic. Cosmigo ProMotion looks like it could be ...
9
votes
1answer
840 views

Algorithm for procedureral 2D map with connected paths

Problem to solve: Generate a random 2D dungeon map for a tile-based game where all rooms are connected. I am looking for better solutions than what I currently have. My current solution is that I ...
-1
votes
0answers
20 views

I need some 2d game asserts about Character animation ,how can i get it? [on hold]

![2d character animation][1] [1]: http://i.stack.imgur.com/PJDZU.png like this character,where can i download?
1
vote
2answers
114 views

Detecting Hitbox Collisions (Rectangle)

So I have some Hitboxes set up on 2 classes, HealthPickup and Player. public static Rectangle Hitbox; public override void Initialize() { Hitbox = new Rectangle(Pos.X, Pos.Y, 32, 32); } That's ...
1
vote
2answers
87 views

How do you break apart art into components for animation?

I am a programmer and brand new to the game world, trying to get a sense of what it would take to draw simple characters like you'd see in Don't Starve or indie games like that. I have seen in their ...
3
votes
1answer
181 views

How to compress Unity apk output?

I made a game with Unity but the size of .apk file got so large, it is about 70mb... Is there some way that I can compress my apk file?
1
vote
1answer
220 views

How can I simulate shadows for a 2D top-down game? [duplicate]

I'm trying to simulate shadows for a 2D top-down RPG (in Python), but I can't think of the best way to do this So far I've tried making copies of the original game entities and turning all opaque ...
2
votes
1answer
175 views

Animating feet seperately from the body

I have a character and I would like to animate a walking animation for it. However i get the following result when I animate it: (ignore the green lines/ markers/ sound) As you can see the foot ...
1
vote
1answer
86 views

Data structures for territories in a 2D map

I am diving into game development with a 2D game. The game will display a territorial map (borders, capitals, etc.). What is a common data structure to use for storing and manipulating the data in ...
-2
votes
1answer
78 views

State Management [Replaying the Game, Switching States] [closed]

How to effectively switch states?Whenever I press the replay button, the two states shows alternatively (win & play). I believe that was an infinite loop but Eclipse does not print any errors. ...
-2
votes
0answers
33 views

Making game sound and art [closed]

I want to make a game with good pixel graphics like http://store.steampowered.com/app/264140/ (Pixel Piracy) , I use unity full version , so I am now broke , but anyways . I am really good at ...
0
votes
2answers
223 views

How do I add an image inside a rectangle or a circle in JavaFX?

Suppose we have a rectangle called r Rectangle r = new Rectangle(40, 20); and an image called image Image image = new Image("...src for image"); How do I fit the image inside the rectangle? ...
1
vote
0answers
142 views

How should matrix-based Parallax Scrolling work?

The question is at the end, as it requires a bit of context. I'm not sure if my understanding, my code, or LibGDX's ParallaxCamera is wrong. LibGDX's ParallaxCamera uses Matrix4s to achieve a ...
0
votes
0answers
9 views

OpenGL ES 1.0 Create a Trapezoidal perspective scaling on a texture while using Ortho

I am using an Ortho projection to do most of my stuff and i am happy with it since i basically do everything on the same plane, now however i need to create a simple "flip card" effect on an object ...
0
votes
1answer
240 views

Java 2D World: Convert from mouse screen co-ords to screen co-ordinates?

I have a 2D world background made up of a Grid of graphics, which I display on screen with a viewport (800x600) and it all works. My question is I have the following code to convert the mouse ...
2
votes
2answers
87 views

How do I get rid of this coloured border on my sprite?

I'm working on a 2D game in Unity. My triangle sprites display in-game with a line along one of the transparent sides: Larger view here. You might need to zoom somewhat. It's quite obvious on the ...
0
votes
1answer
126 views

Grid collision - finding the location of an entity in each box

I am trying to implement grid-based collision in a 2d game with moving circles. The canvas is 400x400 pixels. Below you can see the code for my Grid class. What I want it to do is check inside which ...
0
votes
0answers
44 views

How does character creation work in 2D games? [duplicate]

My question is how does character creation work in (multiplayer) 2D game? For example player wants to have long yellow hair, black armor and white leggings. What should I do? Already have all ...
1
vote
1answer
116 views

How to represent a map in a top-down perspective game with low algorithm complexity?

This is the first time I develop a video-game, and I am kind of lost. I would like to know about ways on representing 2D maps on a top-down perspective game... (Like this one: ...
4
votes
1answer
307 views

How can I have 2 different images seamlessly tile with each other?

If I Google for "seamless tile" I can find many great answers to create a single image that will seamlessly tile with itself. GIMP even has a filter that will automatically make an image seamless in 1 ...
1
vote
1answer
516 views

How can I skew my XNA sprites?

I would like to make a 2D tile based game, but, to make it look a bit prettier, I would need to skew textures so that it would look more like a 2.5D game. So I thought maybe I should skew textures to ...
0
votes
1answer
101 views

Adding a small slide when player releases left/right key

the aim is for the player object to slow down and stop instead of just stopping dead. The following codes works ok when the player is not jumping, but gets stuck in an object if the player is in the ...
0
votes
1answer
75 views

Surface creation algorithm using points cloud

I am looking for a realtime algorithm to create a 2D mesh using points. But I am quite confused. It seems that Delaunay triangulation can help me create mesh using point clouds, but Meta-balls seems ...
0
votes
2answers
177 views

Wall jumping collision detection anomaly

I'm creating a game where the player ascends a tower by wall jumping his way to the top. When the player has collided with the right wall they can only jump left and vice versa. Here is my current ...
0
votes
1answer
105 views

Gamemaker vs Unity2d - Speed of Development [closed]

I know coding, so programming is not a problem Money is not a problem at all, I can get both GameMaker Master Collection and Unity Pro I want to make a 2d game. So which one is better for speed of ...
2
votes
1answer
136 views

Can the Shuriken particle system create particles with random shapes and sizes?

I want to create differently sized (but small, relative to the characters) dust clouds for player movement that move away from the player and fade away by shrinking. This animated GIF from Samurai ...
1
vote
1answer
59 views

Spritekit - gradually apply force vector in different direction (space ship turning)

I have a space ship that I'm applying a force vector to using a joystick for control. I would like this to smoothly fly around when I'm switching directions.. Exactly like minisquadron if you've ...
1
vote
2answers
223 views

Bullet entry Point around Player Object

I have a player rotating by the mouse and want the bullets line up with the player's gun. Right now they simply come from the point of the player and shoot in the direction of mouse. I just need the ...
0
votes
1answer
168 views

Sorting for 2D Drawing

okie, looked through quite a few similar questions but still feel the need to ask mine specifically (I know, crazy). Anyhoo: I am drawing a game in 2D (isometric) My objects have their own arrays. ...
1
vote
0answers
96 views

UI rich Strategy/RPG UI - 2D Game Engine or UI Toolkit? [closed]

I'm on the fence regarding the graphics engine of my current game and hope for some advice. This is an UI heavy strategy/rpg. Although the game is played on a (simple) 2D map, it is largely turn ...
2
votes
1answer
2k views

How do you implement 2D collision detection?

I would like to know the best or most efficient way to test for 2D collision. I am currently using AABBs, but the problem with this, is that your objects will be hitting things when they shouldn't. ...
1
vote
1answer
52 views

Move an object up while touch is active

I'm trying to move an object towards the top of the screen while the touch is active. This is my current code. When I am touching the screen, the object I'm trying to move just keeps it's place (and ...
-1
votes
1answer
82 views

Code explanation

Can someone please explain whats going on in this code written by Paul Irish I did not understand the draw(). function draw() { var time = new Date().getTime() * 0.002; var x = Math.sin( ...
0
votes
2answers
196 views

How can I support objects larger than a single tile in a 2D tile engine?

I´m currently working on a 2D Engine containing an isometric tile map. It´s running quite well but I'm not sure if I´ve chosen the best approach for that kind of engine. To give you an idea what I´m ...
0
votes
1answer
205 views

Scaling background without scaling foreground in platformer?

I'm currently developing a platform game and I've run into a problem with scaling resolutions. I want a different resolution of the game to still display the foreground unscaled (characters, tiles, ...
0
votes
1answer
167 views

Is there a standard way to track 2D tile positions both locally and on screen?

I'm building a 2D engine based on 32x32 tiles with OpenGL. OpenGL draws from the top left, so Y coordinates go down the screen as they increase. Obviously this is different than a standard graph ...
0
votes
2answers
288 views

2D Rectangle Collision

I want to make a small 2D game. In the game you can go in all directions(with the bird's-eye view) and can shoot. (A little bit like BoxHead http://de.y8.com/games/box_head_2play) My problem there is ...
0
votes
0answers
96 views

Picking tiles in an isometric diamond map

I am rendering a isometric map with the following code: for(var x = 0; x < MAP_WIDTH; x++) { this.map[x] = []; for (var y = 0; y < MAP_HEIGHT; y++) { var screenX = ...
1
vote
1answer
98 views

Fire Delay Timers

I currently have a turret that can fire projectiles. I can control the delay between shots (fireDelay), and I can control the time needed to reload the magazine of the gun(reloadDelay). I do the ...
0
votes
1answer
48 views

Help finding time of collision

I am making a simple game right now and am struggling with collision response. My goal is to someday be able to turn it into a 2D platformer but I have a long way to go. I am currently making this in ...
13
votes
6answers
2k views

Creating a seamlessly looping 2D multiplayer level?

A discussion came up recently about how to create a 2D side-scrolling multiplayer game that can have an looping level design (Think of Starbound and how their worlds are looping). I thought the ...
2
votes
1answer
121 views

How should I set up 2D animations for weapons in Unity?

I have a character composed of several sprites (legs, torso, head, arms). The character has the ability to pick up weapons, which are of varied types. Each type of weapon has its own animation ...
1
vote
1answer
272 views

2D map/plane with nodes overlayed that supports panning, scaling and clicking on nodes

I'm trying my hand at Android development and seem to be running into an invisible ceiling in trying to get what I want accomplished. Basically I'm trying to create an app that renders a 2D surface ...