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

120
votes
9answers
23k views

How was collision detection handled in The Legend of Zelda: A Link to the Past?

I would like to know how the collision detection was done in The Legend of Zelda: A Link To The Past. The game is 16x16 tile based, so how did they do the tiles where only a quarter or half of the ...
63
votes
26answers
47k views

Recommended 2D Game Engine for prototyping [closed]

What high-level game engine would you recommend to develop a 2D game prototype on windows? (or mac/linux if you wish) The kind of things I mean by "high-level" includes (but is definitely not limited ...
58
votes
5answers
8k views

Implementing a 2D destructible landscape (like Worms)

What steps would be involved in constructing a destructible 2D landscape, like in Worms? Ideally, What are some ways that this process could be made efficient as possible?
57
votes
8answers
5k views

How does one prevent homing missiles from orbiting their targets?

I am developing a 2D space game with no friction, and I am finding it very easy to make a homing missile orbit its target. I am curious about anti-orbiting strategies. A simple example is a homing ...
57
votes
15answers
59k views

2D Gaming Libraries/ Frameworks/ Engines for Android [closed]

Are any such things available to help me build my Android game?
53
votes
8answers
6k views

2D graphics - why use spritesheets?

I have seen many examples of how to render sprites from a spritesheet but I havent grasped why it is the most common way of dealing with sprites in 2d games. I have started out with 2d sprite ...
53
votes
15answers
24k views

Cross Platform 2D Graphics Engines [closed]

I'm looking for a 2D graphics engine that would allow me to release to Windows, Mac and the iPhone, much the way Unity does for 3D. Is there a good engine that does this and is specific to 2D?
52
votes
7answers
16k views

Why don't more games use vector art?

It would seem to me that vector art is more efficient in terms of resources/scalability; however, in most cases I have seen artists using bitmap/rasterized art. Is this a limitation put on the artists ...
49
votes
2answers
3k views

How can I get textures on edge of walls like in Super Metroid and Aquaria?

Games like Super Metroid and Aquaria present the terrain with the other facing parts having rocks and stuff while deeper behind them (i.e. underground) there's different detail or just black. I ...
49
votes
5answers
7k views

What to consider when deciding on 2D vs 3D for a game?

How much "harder" is 3D than 2D in terms of: Amount/complexity of the code Level of math skills required Time involved in making art assets Original title: How hard is 3D game development versus ...
47
votes
15answers
50k 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 ...
46
votes
3answers
10k views

Optimizing an XNA 2D game

Does it make sense to implement the logic to skip rendering objects outside the viewport or should I not care about it and let the Framework do it?
46
votes
4answers
20k views

How is 2D lighting implemented?

I am wondering what the best way to approach a "lighting" effect in 2D games is. For instance, if my main character is glowing, what techniques can I use to complete the visual effect of the character ...
46
votes
7answers
5k views

2D Platformer AABB collision problems

I have a problem with AABB collision resolution. I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png ...
44
votes
10answers
8k views

New to creating AI - where to start? [closed]

I am new to game programming and am trying to make a basic 2d top-down space game with 2 space ships that fight each other. I am doing well with the user controlled space ship, but have no idea how ...
39
votes
3answers
8k views

2D water with dynamic waves

New Super Mario Bros has really cool 2D water that I'd like to learn how to create. Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
38
votes
8answers
19k views

How to learn 2d animation? [closed]

Where can I learn how to do simple 2d animation well? Or is it really just literally drawing every single frame of something in photoshop? Is there tips or tricks? Tutorials to help get started? ...
36
votes
6answers
4k views

How would you handle different aspect ratios in a 2d platformer?

A long time ago, 4:3 pretty much the only apect ratio you would find on a pc. Today the most common one is 16:10, but most new monitors (especially laptops) are 16:9 I'm writing a 2d platformer and I ...
36
votes
5answers
1k views

Best Way to allow players to “Dye” images without losing color quality?

I am creating a 2.5D isometric (2D images) game. I want the players to be able to "dye" their armor, clothes, and other things. I find that grayscaling everything leads to losing out on some of the ...
32
votes
6answers
8k views

Learning To Create Better Art (2D Games)

Until one of my games "makes it" big, or I get flooded with gold ingots, I will have to handle most or all of my game art myself. The crux of my question is: how can I learn enough art to get beyond ...
32
votes
4answers
8k views

How to render 2D particles as fluid?

Suppose you have a nice way to move your 2D particles in order to simulate a fluid (like water). Any ideas on how to render it? This is for a 2D game, where the perspective is from the side, like ...
31
votes
5answers
4k views

Moving ships between two planets along a bezier, missing some equations for acceleration

OK, I already posted this over at math.stackechange.com but didn't get any answers :( First of here's a picture of my problem, the description follows afterwards: So I got all the points and ...
30
votes
1answer
6k views

Rendering SVG art directly in XNA

Suppose I have a bunch of 2D art in some vectorized format such as SVG. Is there an easy-ish way to render that directly without having to implement a full SVG renderer myself? Of course I could ...
27
votes
11answers
5k views

Do 2D games have a future? [closed]

I'm currently working on a 2D soft-body physics engine (since none exist right now -_-), but I'm worried that there's no point to spending what will most likely be years on it. Although I love ...
27
votes
4answers
2k views

Why does my object move faster at 45 degrees than at 90 degrees?

I have objects in my game that move faster at 45 degrees then at 90 degrees. Each object has Point (x,y) position Vector2D (x,y) direction Int speed And what I do during a update is that new ...
26
votes
4answers
4k views

Proper OO game engine design: how to parcel responsibilities

(note - I don't have the reputation to create new tags, so mod action may be needed to re-tag) I'm in the midst of developing a 2D sprite-based game for Windows 7 Phone using XNA. The training and ...
26
votes
3answers
6k views

How do you approach resolution independence in raster based graphics content?

Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. In a 3D game you might have a HUD or menu ...
25
votes
4answers
14k views

How can a programmer learn to draw 2D assets? [closed]

Are there any good tutorials for someone who wants to create 2D graphical game assets? Drawing classes for absolute beginners, preferably teaching skills that can be as relevant as possible to games - ...
24
votes
4answers
3k views

Finding the nearest object

I have a sizable game engine and I'd like a feature for finding the nearest of a list of points. I could simply use the Pythagorean theorem to find the distances. I know I can't simply add x and y, ...
24
votes
3answers
2k views

How does a 2D game like Zelda handle the character being behind buildings where only part of him is shown?

I'm trying to develop a simple Zelda-style game. I found this very useful topic How was collision detection handled in The Legend of Zelda: A Link to the Past? that I'm using as reference to develop ...
24
votes
2answers
2k views

Calculating the rotational force of a 2D sprite

I am wondering if someone has an elegant way of calculating the following scenario. I have an object of (n) number of squares, random shapes, but we will pretend they are all rectangles. We are ...
24
votes
6answers
6k views

A way to store potentially infinite 2D map data?

I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong). All entity positions ...
23
votes
6answers
2k views

Is OpenGL appropriate for 2D games?

I have been teaching myself the OpenGL library for a while now, and want to start making a game. However, for an easier introduction, I want to start with something 2D, such as a top down ...
22
votes
4answers
4k views

Top Down RPG Movement w/ Correction?

I would hope that we have all played Zelda: A Link to the Past, please correct me if I'm wrong, but I want to emulate that kind of 2D, top-down character movement with a touch of correction. It has ...
21
votes
2answers
1k views

Correctly Implementing a “Double Jump”

I'm working on a 2D iPhone game using Corona (Trial version, so I can't use their forums). The game involves the character falling through the sky, and I'm trying to implement a "double jump" for the ...
21
votes
6answers
2k views

How can I Intercept object with a circular motion

I am creating a 2d space game and need to make the spaceship intercept a planet. I have working code for straight line intercepts but cannot figure out how to calculate the planets location in a ...
21
votes
6answers
4k views

How to solve the big video memory requirements in 2d game

We are developing 2d game (Factorio) in allegro C/C++ and we are facing the problem with increasing video memory requirements as the game content increases. What we currently do is, that we gather ...
21
votes
2answers
1k views

Mega Man-style screen scrolling design

The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into "screens" which are ...
20
votes
2answers
1k views

How do I make a character capable of walking on walls?

I am trying to get a character to move like a spider: Given a rising slope which a ball would normally not be able to roll up, the spider would slowly crawl up. Similarly, given a mid-air rectangular ...
19
votes
7answers
6k views

Easiest, most fun way to program 2D games? Flash? XNA? Some other engine? [closed]

this is a post detailing my search for the most enjoyable way for a hobbyist game programmer to sweeten his free time with making a game. My requirements: I looked at Flash first, I made a couple of ...
19
votes
3answers
6k views

Is there a 2d physics engine that can model fluids and gases?

At this point the platform and programming language don't matter I would just like to know if something out there exists for this. Any help is appreciated.
19
votes
4answers
3k views

What is some good examples about creating 2D fluids?

Anyone have any good examples, tutorials, or snippets to share that preferably in C# or C/C++?
19
votes
4answers
5k views

How to deal with differences between 2D screen coordinates and Cartesian coordinates

Most 2D screen/bitmap coordinate systems have the positive Y axis pointing down (with the the origin in the upper left corner). This is counter to how most people think geometrically with the ...
18
votes
1answer
816 views

Which features belong to the engine and which ones to a game?

Right now I find myself implementing and testing new features of my 2D game engine by directly coding them into engine. Simultaneously I have a showcase game (with scripting support) which should call ...
18
votes
7answers
5k views

Efficient way of drawing outlines around sprites

I'm using XNA to program a game, and have been experimenting with various ways to achieve a 'selected' effect on my sprites. The trouble I am having is that each clickable that is drawn in the ...
18
votes
3answers
2k views

How can I identify feature regions in a procedurally generated world?

I'm building an Island. I use the classical heightmap solution : with a hill-building function, avoiding the corners of the map, I make altitude. Then, perlin noise give me some climatic variables to ...
17
votes
4answers
12k views

How can I calculate the angle and proper turn direction between two 2D vectors?

I am working on some movement AI where there are no obstacles and movement is restricted to the XY plane. I am calculating two vectors, v, the facing direction of ship 1, and w, the vector pointing ...
17
votes
3answers
3k views

How to procedurally (create) grow an artistic (2D) tree in real-time (L-System?)

Recently I programmed an L-system module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art ...
17
votes
4answers
3k views

How to deal with corner collisions in 2D?

I'm writing a top down 2d XNA game. Since its my first I'm trying to write the physics and collision stuff myself to learn it. Whenever my player sprite character attempts to move into a position ...
16
votes
6answers
2k views

What are some techniques for designing fun, challenging Mario-style platformer levels?

I have everything I need to make a Mario type game. I just have no idea how to design the levels to make it challenging or fun. Any tips? The only way to kill enemies is by jumping on them, so I ...