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
2answers
988 views

How can I make a sprite move in the direction it's facing using radians?

I am using PGELua for the PlaystationPortable. I would just like to know how to make a 2D sprite move in the direction that the sprite is facing. When the sprite is blitted to the screen it should ...
10
votes
3answers
4k views

Can I achieve a torchlight effect (lighter area around a light source) in a 2D game?

I am thinking of writing myself a simple 2D game. It will not shine with perfect graphics or gameplay at first, but I'd consider it my first step in PC game development. So, imagine such simple ...
4
votes
1answer
946 views

Are there any good engines for isometric collision detection and platforming?

I've decided to resurrect an old game idea I had years ago. I currently have zero experience with programming, but I'm going to begin studying either C#, Python or both in the near future. The issue ...
1
vote
1answer
2k views

XNA 4.0 - Mixing 3D and 2D - SpriteBatch putting weird alpha texture over whole scene

I am working on a game in XNA 4.0 that has been entirely in 3D so far but now I want to incorporate a HUD. I have tried doing a simple test using spriteBatch as such: spriteBatch.Begin(); ...
3
votes
4answers
1k views

Tools for editing 2D sprite-based game levels

What are good free and widely used tools for editing 2D sprite-based game levels? I'm looking for one that allows exporting data to a custom format. One that I know of is Blender — a 3D tool, ...
7
votes
1answer
8k views

Tools for 2D skeletal animation [closed]

What good free and widely used tools are there for editing 2D skeletal animations? Preferably, one that allows me to write custom animation exporters. One pretty good indie tool that I know of ...
4
votes
1answer
3k views

How Plants vs Zombies animation is done?

I really like the plants vs zombies style of animation and it doesn't look complicated yet the result is really good. I doubt it's made of sprites seeing there's a large number of animations, ...
8
votes
2answers
728 views

Function for sun movement?

So, given a sun sprite set at the horizon (x = 0, y = worldheight/2) I'm trying to devise a function to make the sun rise, then fall. The best way to do this would be the sin function, but I have no ...
0
votes
2answers
178 views

Design of networked Asteroids

I am looking for some advice on what would be a good way for users to play Asteroids over the network. Its my first game and so far I have it working in 2D using polygons across a scrolling world in ...
17
votes
5answers
4k views

Quick 2D sight area calculation algorithm?

I have a matrix of tiles, on some of that tiles there are objects. I want to calculate which tiles are visible to player, and which are not, and I need to do it quite efficiently (so it would compute ...
9
votes
2answers
1k views

How to make a world-to-player inventory system?

I am running into an issue of trying to implement an inventory system within XNA (doesn't really matter, could be any platform) but so far. Here is the issue I am trying to wrap my head around: How ...
2
votes
1answer
328 views

How do games using physic engines for 2d games handle platform corners?

I have seen games like latest "2'5D" sonics that handle collision detection at platform corners pretty well. The problem I'm having is that my game uses an ellipsoid as my player's body to let it ...
2
votes
1answer
1k views

2D platformer multiple rectangle collision cause jitter

I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution. Problem is, when player intersects two rectangles that are inside each other, he ...
3
votes
3answers
315 views

How to efficiently handle registration/anchor points for graphics?

I am currently working on an iPhone project, but most of my work has been in Flash. Flash has a feature where you can place a bitmap into a MovieClip, set its registration point with the mouse and ...
1
vote
1answer
292 views

How do I make light objects in XNA?

Here's my dilemma : I want to have light sources placeable by the player, in terms of lanterns. I know the best way to do this is to use pixel shaders, which I have done a lot of research and use ...
1
vote
1answer
437 views

Effective SpriteBatching in XNA?

What is an example of efficient sprite batching in XNA? I don't know when (if ever) I would do something like this: spriteBatch.Begin() DrawSprite1(); spriteBatch.End(); spriteBatch.Begin(); ...
4
votes
2answers
4k views

How to get mouse position relative to the map?

I'm creating a game in XNA similar to Minecraft - Minecraft 2D It looks like this Here's how it works: All blocks are generated once with fixed x,y coordinates and just re-drawn. //generate ...
3
votes
4answers
1k views

Public format for 2D animations

What public animation file formats are there available for 2D games? I'd like to know about both formats for procedural/skeletal animation, as well as traditional animation.
4
votes
2answers
829 views

I need help with 2D collision response (of stacking rotating polygons, with friction and gravity, for a game)

Hi I am looking for suggestions on how to write a collision response for game programming purpose (so not a scientific simulation). I am dealing with 2D polygons that are rotating, and I want them to ...
6
votes
4answers
2k views

Is there a library that handles hexagon tiled 2D maps? [closed]

It would represent a map that is semi-square of arbitrary size. It would have a simple system for representation of the map coordinates such as 0101 (first column, 1st hex). I'd want the map to be ...
0
votes
1answer
673 views

Allegro Game Won't Fire 2D Projectile

To begin with I am developing a PSP application so I have no clue how to debug a PSP application. That doesn't mean I do not know how debug period. Anyway, when I run the game everything runs fine but ...
1
vote
2answers
918 views

Android Game, Blurring effect while moving camera

I have posted this issue on stackoverflow, but unfortunately nobody couldn't find solution, maybe someone here know this. I'm developing Side Scroll 2D Game, using AND ENGINE ...
-1
votes
1answer
2k views

How to create a map by coding in OpenGL

I have a very good knowledge about Java, C++, Qt, C# etc... and I wanted to start making a game... most the engine that the game per se since I don't like the "design" part of making a game.. I have ...
5
votes
1answer
1k views

How to create a 2D region where sprites are automatically wrapped?

Edit Finally managed to get this to work, after two separate questions! Here's a video demonstration: http://www.youtube.com/watch?v=nZ7e0jegvs0 Will write an article about it later when I have a ...
1
vote
1answer
9k views

Java 2D Tile Map and Moving Sprites with threads

I'm having difficulties understanding how to use threads and I'm not sure if my basic structure is right. This is my Board Class: package mortifera; import java.awt.Color; import java.awt.Graphics; ...
3
votes
1answer
242 views

How can I organize code for views efficiently?

I'm making a video game for the Android platform and I need advice on the overall set up of the activities and views in the code. I don't need actual code, psuedocode will do, but actual code always ...
14
votes
2answers
5k 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 ...
0
votes
3answers
180 views

How should I proceed next with my programming skills? [closed]

I am currently studying at University of technology in Brno (Czech Republic). This semester is almost over and I might say I have some knowledge of C. Since I went to this school just for the purpose ...
2
votes
2answers
982 views

Canvas Rotation collision detection on a sprite

I am using this code to detect collisions between two rectangular sprites. intersect: function(other) { return this.x < other.x + other.width && other.x < this.x + this.width ...
11
votes
4answers
4k views

How to deal with arbitrarily large images in 2D games?

Question When you have a 2D game that uses really large images (larger than your hardware can support), what do you do? Maybe there's some interesting solution to this problem that never occured to ...
2
votes
1answer
712 views

Ocean waves / ripples

Any suggestions for creating ocean waves / ripples as seen in the pictures here: http://www.pocket-lint.com/news-gallery/42042/crimson-steam-pirates-ipad-review/10#image and video here: ...
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 ...
3
votes
2answers
232 views

Does there exist a library of animations for easing, skewing, bouncing, and squishing?

I'm specifically referring to the types of animations that are typical in 2D hand held games on the Nintendo platform, where menus slide in, bounce, squish, etc. I'm looking for something that is ...
1
vote
1answer
251 views

Gluing Model and View Data Together But Separating Concerns

I've built a couple of 2D games that are roughly MVC; that is, the main game data and logic are separated into the model (and possibly controllers), and I have a bunch of screens/states that just pull ...
1
vote
3answers
2k views

Making smooth walk/jump/fly etc animations

i am soon gonna start with developing my own game for the iOS, i have the plan and idea of the game ready. BUT i have 1 question. How do people make such a smooth animation? Lets take for example: ...
2
votes
2answers
589 views

Z-order for cocos2d top-down game with sprite batching

I'm trying to understand how to create z-order system like you can see in http://www.realmofthemadgod.com/ Character is above the tree when he is in front of it and vice versa. Also, I'm planning to ...
1
vote
2answers
2k views

2d engine/library for android in C#

I'm looking for a good 2d engine or library (that supports physics) for Android. I have a restriction - language should be C#. It's not a requirement to use Mono Droid, but it seems that it is an ...
1
vote
1answer
1k views

DirectX 2D Sprite Texture

I am trying to make DirectX display a sprite from a sprite sheet I found on the internet but it doesn't seem to be displaying the texture in the correct position as I am specifying it. D3DXVECTOR2 ...
4
votes
1answer
744 views

Implementing jumping and heightmaps in 2D RPG/Adventure style games?

I've been putting together, albeit slowly, a traditional style game engine in flash/AS3 along the lines of Alundra/Final Fantasy 3/etc etc.. Everything so far is working smoothly (maps from XML data, ...
2
votes
1answer
609 views

Computer generated 2d graphics for games - how to get started

I've seen a lot of nice 2d games recently, like Geometry wars that have really nice computer generated graphics. I would like to know how is it done so game looks really nice even if it is composed ...
1
vote
1answer
703 views

Checking Collisions In 2D Platformer With Tiles

My team and I are developing a 2D platformer with C++/SDL/OpenGL, and we already defined a collision system, but we have a problem checking collisions with the tilemap. The tiles of the tilemap are ...
0
votes
1answer
682 views

Some help understanding and modifying a 2D shader

I have a similar question as the one posed here, except that I don't wish to use a 1D Color Palette. I simply wish to have it display 1 color of my choosing (red, for example). I plan to use this ...
7
votes
1answer
799 views

2d, Top-down map with different levels

So, I'm creating a 2d, top down, sprite based (tiled) game, and right now I'm working on maps (well, a map editor at the moment, but it will be creating my maps, so basically the same thing). The ...
2
votes
1answer
1k views

Steady zoom on center in LWJGL (Modelview)

I am having a problem in LWJGL with zooming in and out. I am using glScaled(zoom, zoom, 1) before glTranslated. There are 2 problems: 1. The rate of zoom speeds up a lot when zooming out (lower zoom ...
4
votes
3answers
9k views

Are there any good 2D fighting game engines that can be used to make a commercial product?

I'm looking for a good 2D fighting game engine based on sprites. I really dont care much about which language that it is programmed in. Specifically I'm looking for an engine I can use for a game I ...
7
votes
2answers
1k views

How can I factor momentum into my space sim?

I am trying my hand at creating a simple 2d physics engine right now, and I'm running into some problems figuring out how to incorporate momentum into movement of a spaceship. If I am moving in a ...
6
votes
2answers
367 views

How do walls affect lighting?

I have been trying to implement a simple form of lighting in my 2D game. In the screenshot, I don't think it looks very good, kind of just plastered over the top of the map. How would the wall effect ...
12
votes
2answers
1k views

Could I be going crazy with Event Handlers? Am I going the “wrong way” with my design?

I guess I've decided that I really like event handlers. I may be suffering a bit from analysis paralysis, but I'm concerned about making my design unwieldy or running into some other unforeseen ...
3
votes
3answers
387 views

Collision filtering techniques

I was wondering what efficient techniques are out there for mapping collision filtering between various bodies, sub-bodies, and so forth. I'm working on a physics engine and I need ways for a user to ...
1
vote
2answers
669 views

Axis-Aligned Bounding Boxes vs Bounding Ellipse

Why is it that most, if not all collision detection algorithms today require each body to have an AABB for the use in the broad phase only? It seems to me like simply placing a circle at the body's ...