# Tagged Questions

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

7k 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 ...
5k 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 ...
6k views

### How do I implement parallax scrolling in 2D?

Suppose I have three layers: a foreground, an intermediate-ground and a background. What is involved in using these three layers to create parallax scrolling?
8k views

### Is there a 2d physics engine that can model fluids and gases? [closed]

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.
32k views

### In Pong, how do you calculate the ball's direction when it bounces off the paddle?

I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a Breakout clone. Keep in mind that I ...
11k 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 ...
862 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 ...
5k views

### How can I generate random lakes and rivers in my game?

I have a 2D block building game and am trying to make randomly generated lakes and rivers. I have looked into the Perlin noise algorithm, but, I couldn't get it to generate random and nice results. I ...
6k views

### Best way to mask 2D sprites in XNA?

I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures: The area to mask (in white) Now, the red sprite that needs to be cropped. The ...
11k views

### What is a good book on physics for game development? [closed]

I'm looking for a good beginners' book on the subject of physics in game development. Something that focuses on 2D games would be preferable.
6k views

### How can I generate signed distance fields (2D) in real time, fast?

In a previous question, it was suggested that signed distance fields can be precomputed, loaded at runtime and then used from there. For reasons I will explain at the end of this question (for people ...
7k 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 ...
3k views

### Procedural Generation of Infinite Level

What are some good approaches to procedurally generating an infinite 2d level? The level could be constrained in either dimension but not necessarily. The approach that makes most sense to me so far ...
2k views

### For 2D games, is there any reason NOT to use a 3D API like Direct3D or OpenGL?

I've been out of hobby Game Development for quite a while now. Back when I did it, most people used Direct Draw to create 2D games. By the time I stopped people were saying OpenGL or Direct3D with ...
8k views

### Examples of faking 3D

Does anyone know of any good examples of 3D being faked in 2D (not necessarily code, but games I could look up)? The player has the perspective that they are going 'into' the screen and things are ...
2k views

### How to avoid ghosting when pressing multiple keys?

I am working on a 2d side-scrolling pc game that uses SFML game library. The problem that I am not able to solve is that in many keyboards combination of three or more keys (like w + d + k) is not ...
2k views

### 2D tycoon games vs. 3D tycoon games

I fully accept that this could be just me, but I can't help but notice that I have never become addicted to any 3D tycoon or city-building games but I have become addicted to many older 2D tycoon ...
13k views

### Tile sizes in 2D games [closed]

While developing a small game using tile-mapping method a question came to my mind: I would develop the game on Windows but wouldn't exclude adapting it to another platform. What size(in pixels) ...
6k views

### What are the pros/cons of using a 3d engine for 2d games? [closed]

What pros or cons should a beginner be aware of when deciding between a 2d game engine (like Slick2D/Flixel/FlashPunk) and a 3d engine (like Unity) for 2d game development? I am just getting started ...
5k views

### How can I generate a navigation mesh for a tile grid?

I haven't actually started programming for this one yet, but I wanted to see how I would go about doing this anyway. Say I have a grid of tiles, all of the same size, some traversable and some not. ...
8k views

### 2D Planet Gravity

I'm trying to make a simple game where a spaceship is launched and then its path is effected by the gravity of planets. Similar to this game: http://sciencenetlinks.com/interactives/gravity.html I ...
4k views

### Creating an electricity/lighting/tesla coil effect in a 2D XNA game?

I'd like to create beams of electricity between two points very similar to this video: http://www.youtube.com/watch?v=eMJ8-56L3Lc. The effect is so dynamic, with varying lengths and pseudo-random ...
4k views

### How are “2.5D” art assets created?

By "2.5D" I mean the art style in games such as Roller Coaster Tycoon, Age of Empires 2 or Fallout 1 and 2: Everything in the games appears to be created with a "pixel art"-like tool. Am I correct? ...
836 views

### How to tie a bullet release with a firing animation

Lets say you have an animation that you want to happen when firing a bullet. How would you get the bullet to show up at the end of the animation. The only thing I can figure out is to know the time ...
5k views

### Where do I start if I want to independently learn game graphic design? [closed]

I want to learn how to create custom graphics, not use freely available resources. But I have been looking around for articles or tutorials on how to start with 2D game design in general, and I can't ...
15k views

### What is the difference between Unity's Sprite and Texture2D classes?

Unity has both a Texture2D class and a Sprite (with related SpriteRenderer). What is the difference between these two classes? Both represent an image, for 2D games should I favor one over the other? ...
2k views

### What is a suitable input method to use for a 2D platformer on a touch device?

I am creating a 2d platformer game like Super Meat Boy in which precision of movement of my lead character matters. I am using libgdx. The keyboard controls on the PC work precisely, but when it comes ...
8k views

### Implementing a camera / viewport to a 2D game

What is the most practical way to implement camera/viewport to a 2D-game? I've read, that I should store the object world position instead of position relative to the screen? Current situation: I ...
4k views

### Terrain Generation for Tile-Based 2D Platformer

I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out ...
3k views

### Seamless tilemap rendering (borderless adjacent images)

I have a 2D game engine that draws tilemaps by drawing tiles from a tileset image. Because by default OpenGL can only wrap the entire texture (GL_REPEAT), and not just part of it, each tile is split ...
879 views

### Keystone Correction using 3D-Points of Kinect

With XNA, I am displaying a simple rectangle which is projected onto the floor. The projector can be placed at an arbitrary position. Obviously, the projected rectangle gets distorted according to the ...
3k 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 ...
9k views

### Should I learn 2d game development before 3d? [closed]

I'm an iPhone app developer. I want to get into iOS gaming. The question is-should I start with learning 2D like Cocos 2D or Corona SDK before learning 3D gaming like Unity? I'm more interested in 3D ...
17k views

### Sorting array of points in clockwise order

Is there such an algorithm to sort an array of 2D points in clockwise order? I'm specifically dealing with right triangle in my case so only 3 points. However I'm interested in knowing if such an ...
2k views

### Should I have multiple small textures or a single big one? [duplicate]

I'm using SDL 2 to create a small 2D game. Based on the docs, this is what I would do: SDL_Surface *surface = SDL_LoadBMP("image.bmp"); SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer, ...
2k views

### Wall Jump for 2D Platformer

I've been looking for a way to implement wall-jump in my xna game, but I can't find any information about it, can someone could someone please help me out ?
19k views

### OpenGL ES 2.0: Setting up 2D Projection

This article describes in general, how to draw sharp OpenGL 2D graphics, using fixed function pipeline. http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL Because OpenGL ES 2.0 has some ES 1.x ...
15k views

### Can Unity 2D be used to make pixel-art games?

I'm looking at the new 2D features introduced in Unity 4.3, and I think I might be missing something. To me it looks like they are designed for high-res 2D games, where scaling the sprites is ok, but ...
3k views

### How do I calculate rotation caused by bounce friction?

Following on from my previous question: I have the ball quite realistically bouncing from surfaces it hits. Now I'd like to make it spin from the friction of the hit. Showing this is simple enough: I ...
2k views

### Making Procedurally Generated Top-Down Landscapes Interesting

I'm working on a game with a procedurally generated world. Ideally, I'd like to generate landscapes as beautiful as Minecraft's worlds are. Minecraft has chasms, and waterfalls, and mountains, and ...
5k views

### Real time shadow casting in a 2D isometric game

I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on this page and here is the result (light is located at the ...
26k views

### Best Way to Create A Map for a 2D Game?

I apologize for the subjective "best" keyword. My friend and I have started creation of a 2D adventure game. It will be top-down in the style of pokemon or zelda (just the perspective). We have been ...
2k views

### How do you handle uneven tiles while rendering a tile map?

Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [...
2k views

### In platformer games, what are “hole in the ground” obstacles called?

In most jump and run games, holes in the ground are common obstacles: You need to jump over them, or you'll fall down and lose a life. It would be helpful to know for documentation, variable naming ...
7k views

### Are high powered 3D game engines better at 2D games than engines made for 2D

I'm a software engineer that's new to game programming so forgive me if this is a dumb question as I don't know that much about game engines. If I was building a 2D game am I better off going with an ...
352 views

### Ensure house map maze with lifts can be solved?

In my game we see the floors of a house from the side, and the hero can take lifts -- a lift either goes up (to the next lift upwards), or down (to the next lift downwards), depending on the arrow as ...
8k views

### Fastest way to render lines with AA, varying thickness in DirectX

So I'm doing some DirectX development, using SharpDX under .NET to be exact (but DirectX/C++ API solutions are applicable). I'm looking for the fastest way to render lines in an orthogonal projection (...
4k views

### In a 2D platform game, how to ensure the player moves smoothly over sloping ground?

I'm developing a physics engine for a 2D platform game. I'm using the separating axis theorem for collision detection. The ground surface is constructed from oriented bounding boxes, with the player ...