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

2
votes
2answers
588 views

2D AI Engines/ Resources?

i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by the Euphoria engine, and want to use whatever is already out there to make something like it in 2D, where the ...
13
votes
2answers
1k 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 ...
7
votes
3answers
1k views

Find a unit vector exactly halfway between two connected line segments

Seems like a quick and easy question but I haven't been able to find exactly what I'm looking for so: How to calculate a unit length vector that is pointing along the line which is exactly 50% of the ...
5
votes
3answers
768 views

What's the best control scheme for an arena shooter on a touchscreen phone?

I am developing Android an game. It's going to be a top-down shooter with stealth features. I am now thinking about how to the make controls. Most top-down games are now twin stick (joystick on the ...
2
votes
3answers
1k views

Java tilemap not working, Think it has something to do with my image rendering

Hey can someone help me out, I've been trying to fix this for about 2 hours now, and I'm a noob when it comes to game programming and Java(only been reading and programming with it for a week now, ...
8
votes
2answers
2k views

How to calculate the vector of an interception?

Given are a twodimensional space, and 1 friendly spaceship standing still, one foe is moving NOT directly to the friendly ship with known actual position, speed and direction. The friendly ship wants ...
1
vote
1answer
757 views

LWJGL Rendering a 2D Object at a Certain Position On-Screen

Okay, so in LWJGL, how can I render a 2D object (maybe for like a menu, or meter that shows up on screen during the game), and have control over size and position on screen? So I can tell it what ...
5
votes
2answers
802 views

Collision response for 2D racing game

The title is fairly self-explanatory. I have a 2D racing game that utilizes per-pixel collision detection (the track is essentially two bitmaps, one for the graphics, one for collision data). The ...
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 ...
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, ...
1
vote
2answers
2k views

Android landscape mode game

I am beginner in android game development. I want my game to run only in landscape fullscreen mode (currently I have Optimus 2X with resolution 800x480 in landscape), and I don't know how to set it. ...
2
votes
4answers
12k views

What's the best program to learn/create 2d vector sprites? [closed]

I have Photoshop experience and a bit of drawing experience, and am looking to learn how to create sprites like this: http://www.lostgarden.com/2009/03/dancs-miraculously-flexible-game.html Any tips ...
1
vote
1answer
4k views

Where to find free platformer sprites for commercial use? [duplicate]

Possible Duplicate: Where can I find free sprites and images? I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link? The sprites need ...
4
votes
3answers
4k views

Where to look for good 2d c++ opengl game engine architecture?

I'm writing own game engine and want to look how other peoples implement game engine architecture. So any advices about well architected engines (even paid ones) are welcome.
6
votes
5answers
1k views

(Where) Can I learn to create art for my 2D games?

I'm currently bad at drawing. If I want to create something looking acceptable, it usually takes me hours and hours to fiddle around just to get the basic looks right. I think that I'm not completely ...
3
votes
4answers
15k views

How to transform a 2d drawing in a 3d model in easy steps? Where to start?

I have a great draftsman, but I don't know how to take his drawings to 3D My basic notions guide me to get a front picture and a side picture and then put in a cross in a z-axis and give them ...
1
vote
2answers
454 views

Level Creating Help

I am making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile ...
2
votes
6answers
948 views

Random Position between ranges

Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block. Blocks will ...
10
votes
3answers
797 views

Drawing particles as a smooth blob

I'm new to game/graphics development and I'm playing around with particles (in 2D). I want to draw particles close to each other as a blob, just as liquid/water. I do not want to draw big circles ...
4
votes
3answers
955 views

Render angles of a 3D model into 2D images?

Is there a tool out there that you can give a 3D model file, and it will output 2D renders of it from various angles? For example if you were making a 2D RPG but you want to make your character look ...
5
votes
4answers
2k views

What language to use to create a browser-MMO? [closed]

I have a game ready to be implemented (Class Diagrams and other UML stuff are good). Here are some characteristics: MMO. Browser game and download-game. Multiplatform. With 2D graphics. Real time. ...
6
votes
2answers
907 views

Casting a shadow over a whole scene with GLSL in 2D?

I'm making a (non-isometric) side scrolling 2D game and I want each fragment that I draw to cast a small drop shadow when it is near another object. What sort of algorithms are used in fragment ...
8
votes
5answers
4k views

How do I detect the direction of 2D rectangular object collisions?

After this question, I need some more help. How can I find out which side of a rectangle a collision came from and react accordingly? The blue arrows are the paths that some circular objects ...
10
votes
1answer
2k views

Angle of Reflection

I have this "Breakeout style" game. I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like: I've managed to get the collision per ...
11
votes
1answer
2k views

Draw real time fog of war in 2d game [duplicate]

I have game situation as shown in picture: Red dot: player Brown dot: obstacle ( rock, tree, etc) Grey: non visible area ( under fog of war) My question is: how can I draw that kind of shape, ...
0
votes
2answers
710 views

Advice on rendering a 2D scene

My game will be made up of objects. Essentially the level editor will give me a bunch of objects to choose from and I can drag them in and thus a level is made. The objects could have animation in ...
1
vote
2answers
520 views

2d game tools , what to work on first?

My friend and I would like to program a 2D game. We were discussing about tools needed, so while I am working on the tools, he will work on game logic and stuff. Probably I will put our tools into the ...
0
votes
1answer
385 views

Is it a good idea to render many textures into one texture?

I'm making a 2D game with OpenGL. In order to avoid changing the state machine and binding at runtime, I want to make consolidate my textures into bigger textures, for example, taking 4 128x128 ...
2
votes
2answers
205 views

android game - lock_layer timed out

I'm developing a (scroll) game and i'm getting weird messages in LogCat: lock_layer() timed out but didn't appear to need to be locked and we recovered(..) lock_layer timed out (is the CPU ...
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 ...
7
votes
2answers
364 views

android game - how to store game elements so gc wont fire

I'm developing a android game and I have a question about storing the game elements without firing garbage collector. My game needs a collection where the game elements are stored according to x,y ...
3
votes
1answer
512 views

XNA beginner - can't display cannon in 2D tutorial

I taking my first steps with XNA. I'm building the old 2D tutorial that used to be posted on the XNA website. I got to the part where I display the cannon, but its not showing. Can someone please take ...
5
votes
1answer
802 views

android game saving game state

I'm developing a game and i've ran into some questions about saving and resuming the game. Let's say i have 10 animated sprites drawn every frame (which move side to side) and everytime i press the ...
9
votes
3answers
8k 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 ...
3
votes
2answers
516 views

How to deal with procedural terrain, pre-load or real-time calculation?

I have developed an algorithm that generates 2D terrain coordinates for my iOS 2D game. This may be a possible visual output: The coordinates are stored in a 2D array. mVertices[i][0] = ccp(sx, ...
1
vote
2answers
3k views

Game Sprite Editting Help(PNG-XNB)

I converted my project's .xnb files to .png files using a program and I can't seem to find a way to transform .png back to .xnb. I don't want to lose the work I've done. How can I change the images ...
6
votes
2answers
951 views

OpenGL 2 and back vs 3 and forward: What are the key differences for 2D graphics?

OpenGL contexts before and after OpenGL 3.0 are rather different. So far I've really only worked with buffers on either side anyway, I do know the most notable difference is lack of Immediate Mode. ...
2
votes
1answer
470 views

Best way to create a 2D right-triangle grid

I would like to create a 2D right triangle grid for a game I am working on. Currently I am creating creating a 2D square grid, and each square contains 2 triangles. I am wondering, is there a way to ...
2
votes
1answer
946 views

android zoomable and scrollable board game

I'm developing a Android board game and have a question regarding creating a board that is zoomable and scrollable. The board contains a static background, characters (players) and the actual "level" ...
1
vote
2answers
658 views

Which axis-aligned line does an AABB collide with first?

I am making the collision resolution system for my 2d top-down game, and I managed to find a solution where I query which surfaces of other AABBs the current entity can collide with in the next frame. ...
4
votes
3answers
2k views

2D basic map system

i'm currently coding a 2D game in Java, and I would like to have some clues on how-to build this system : the screen is moving on a grander map, for instance, the screen represent 800*600 units on a ...
8
votes
2answers
2k views

How to create 2D game terrain?

Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me. I developed ...
1
vote
2answers
807 views

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

I've been working on a 2D (tile based) 2D platformer for iOS and I've got basic entity collision detection working, but there's just something not right about it and I can't quite figure out how to ...
4
votes
1answer
557 views

Communication between objects in games?

I want to make a simple game where I have some characters fighting on a plane (level). I find the trickiest part as figuring out who should do what here. I want my terrain to have friction (so you ...
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.
4
votes
2answers
4k views

Starting Java 2D Platformer using LWJGL [closed]

Getting started on a 2d platforming project in java. I've decided on using LWJGL and OpenGL, but I don't quite know where to start. What is typically the first thing one would work on with a ...
2
votes
2answers
2k views

Java 2D Game looks like 3D

i have fair experience with java game programming, i already made a simple mario game (side-Scrolling) i'm wondering how can i make a "Java" Game like that ...
2
votes
2answers
286 views

Testing for 2D collision outcome

I'm currently building a small 2D game in Processing (and it has to be Processing) for a school project. The basic makeup of the game is 4 different cells (objects, all are circles): An avatar, ...
1
vote
1answer
852 views

moving 2D camera

I've got a camera that places the character about a 1/4 way into the screen. The problem I'm having is that when the character moves left the character stays in place now placing the character 3/4 the ...
4
votes
3answers
635 views

Determine animation frame from interval

I have an array of sprites that are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a ...