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

6
votes
3answers
657 views

How do I make a moving object stop smoothly at the end of a path?

There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand. So I'm creating a floating platform that I would like to be able ...
4
votes
2answers
399 views

Detecting a ledge in Box2D [duplicate]

Possible Duplicate: Detect Open Space in Farseer How do I detect ledges? I'm making a 2D platformer with Box2D. The player needs to be able to grab onto a ledge and pull him/herself up. ...
2
votes
2answers
439 views

One-way platform collision

I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
4
votes
1answer
1k views

Friction in 2D game

I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
4
votes
4answers
1k views

Do 3d assets cost a lot more than 2d?

I'm planning to create a game on my own and will most likely hire an artist in the future. I just want to know if making a game in 2d will a lot cheaper than making it on 3d? Here's my plan: If it ...
5
votes
1answer
436 views

2D Magnet-like repelling behavior

If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...
3
votes
2answers
1k views

Platformer Enemy AI

I'm currently developing a platformer shooter. The game is multiplayer and while my net code could use some real work I have put that off for the time, so currently I'm trying to implement the AI. ...
1
vote
1answer
355 views

Ideas for 2d fire simulation [closed]

I want to simulate a fire in a flat and non flat* surface (fire spread modelling). I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be ...
1
vote
0answers
237 views

Outline Shader Effect for Orthogonal Geometry in XNA

I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA). the shape I ...
-1
votes
1answer
578 views

Resource not found?

When I write in my terminal, java -jar myJar.jar, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image. My folder in my ...
2
votes
2answers
5k views

What 2D game engines are there available for C++? [closed]

I just realized there are not C++ 2D Game Engines that I know of. For example, something like Pygame in Python, or Slick2D in Java. We have the following: SDL -> Too low level, not a Game Engine ...
0
votes
2answers
168 views

Unable to access jar. Why?

I was making a game in java and exported it as jar file. Then after that, I opeed jar splice. I added the libaries and exported jar. I added the natives then i made a main class. I created a fat jar ...
0
votes
1answer
764 views

Proper way to use a RenderTarget2D to draw multiple textures?

In the process of trying to resolve a split screen issue, I've been trying to use a RenderTarget2D to draw a portion of my scene to a Texture2D, and then again to another Texture2D, but the end result ...
1
vote
1answer
133 views

Possible to draw a select portion of a render target? (in XNA)

I'm going to try to do this in reverse fashion and skip straight to the punch line, and then give the back story afterward: Is it possible to, after drawing a scene to a RenderTarget2D, only draw a ...
-1
votes
1answer
347 views

How to make an Image still when at position at Slick 2D?

I wanted to have a build functions. When I press for example 2, the image will appear with my character. The question is, how do I stop it from following my character //build //I created many ...
5
votes
3answers
1k views

Best system for creating a 2d racing track

I am working a 2D racing game and I'm trying to figure out what is the best way to define the track. At the very least, I need to be able to create a closed circuit with any amount of turns at any ...
2
votes
3answers
4k views

Sprite sheet generator

I need to generate a sprite sheet with squared sprite for a 2D game. How can I generate a sprite sheet where each frame has x = y? The only think I have to do is to "insert" some blank space between ...
1
vote
1answer
228 views

How would I be able to get a game over screen using the pause function?

I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the ...
0
votes
1answer
2k views

How to create a simple side scroller game [duplicate]

Possible Duplicate: How to create games with scrolling? I'm still pretty new to game programming and any tutorial that I have worked with stuck to only games with the initial screen. I want ...
1
vote
2answers
134 views

How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
1
vote
1answer
450 views

2D SAT Collision Detection not working when using certain polygons (With example)

My SAT algorithm falsely reports that collision is occurring when using certain polygons. I believe this happens when using a polygon that does not contain a right angle. Here is a simple diagram of ...
11
votes
2answers
2k views

What should I worry about when changing OpenGL origin to upper left of screen?

For self education, I'm writing a 2D platformer engine in C++ using SDL / OpenGL. I initially began with pure SDL using the tutorials on sdltutorials.com and lazyfoo.net, but I'm now using SDL to ...
-2
votes
2answers
140 views

How do I add Destroy with radius on Java Slick2d? [closed]

For Example, There is a tree(image) and i want to destroy it. I want my character only destroy it (For example the character must be facing the tree to destroy it and there must be a range were you ...
4
votes
2answers
1k views

OpenGL Lighting [duplicate]

I have a simple day and night cycle by at day disabling OpenGL lighting and at night enabling openGL Lighting. When I enable everything appears darker. My question is How would I make it that at a ...
4
votes
1answer
335 views

Issue with distinguishing levels in isometric game [duplicate]

Possible Duplicate: How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes? I'm working on an isometric game however I ...
2
votes
1answer
682 views

OpenGL: Move camera regardless of rotation

For a 2D board game I'd like to move and rotate an orthogonal camera in coordinates given in a reference system (window space), but simply can't get it to work. The idea is that the user can drag the ...
0
votes
1answer
222 views

How to work with two layers or more in cocos2d?

I want to make a game in cocos2d. I don't know too much about it. My question is related to communication between two layers or more. For instance, let's say I want a layer with a scrolling road and ...
1
vote
3answers
1k views

Android, how important is deltaTime?

Im making a game that is getting pretty big and sometimes my thread has to skip a frame, so far I'm not using deltaTime for setting the speed of my different objects in the game because it's still not ...
2
votes
1answer
361 views

C# - separate sprite for 2d character and arms

I'm making a 2D action platformer in C# (not using XNA). So far I have the character drawn on the screen, animating and moving. The sprite sheets provided by the artist have the character and arms in ...
2
votes
2answers
3k views

How do I randomly generate a top-down 2D level with separate sections and is infinite?

I've read many other questions/answers about random level generation but most of them deal with either randomly/proceduraly generating 2D levels viewed from the side or 3D levels. What I'm trying to ...
1
vote
1answer
536 views

default xna 4.0 gametime don´t works well for 2D physics

I am developing a game using Visual Studio 2010 and XNA 4.0, after advancing to some extent with the project (a platform based 2d platformer msdn starter kit) I got to test it on different computers ...
1
vote
1answer
258 views

Viewport.Unproject - Checking if a model intersects a large sprite

Let's say I have a sprite, drawn like this: spriteBatch.Draw(levelCannons[i].texture, levelCannons[i].position, null, alpha, levelCannons[i].rotation, Vector2.Zero, scale, SpriteEffects.None, 0); ...
2
votes
2answers
315 views

Updating “Inactive” Chunks

In my game, the only chunks (4x4 areas of tiles) in memory are the ones that the player is in. However, chunks need to have updates applied to them over time. A (likely) well-known example would be ...
-8
votes
1answer
1k views

Is the game Wakfu really fully coded in JAVA? [closed]

If so, this shows that you can develop amazing logic/graphic wise games with JAVA. I think this should be used as an example when people ask about games developed in java instead of just mincraft and ...
1
vote
1answer
2k views

PokeMMO. How they do it? [closed]

Well PokeMMO is a JAVA game project which basically is the original FireRed title for the GBA made online. They know this type of projects don't last long because of the copyrighted material used, but ...
-2
votes
2answers
778 views

Coding games similar to Machinarium in Java? [closed]

I wan't to see how great of an idea is to start a game project like Machinarium coded in Java. I'm not really good at Java yet, but it's the programming language I decided to go with first. Not really ...
6
votes
2answers
937 views

android multitouch problem

Im aware that there a a couple of posts on this matter, but Ive tried all of them and none of them gets rid of my problem. Im starting to get close to the end of my game so I bought a cabel to try it ...
3
votes
2answers
181 views

Adding delay between damage

I have a bunch of enemies chasing my main-character, and if they intersect I want them to damage him and that's all good. The problem is that right now they damage him as long as they stand around ...
-1
votes
2answers
498 views

2D animations frames vs 3D animation for small indie project: timing considerations

pretty lame question but was wondering.. I am developing a 2D game using Cocos2D for iOS. The art work till now is all 2D (is a shooter game) but some of the characters would benefit of complex ...
4
votes
1answer
565 views

Collision Detection with SAT: False Collision for Diagonal Movement Towards Vertical Tile-Walls?

I'm developing my first tile-based 2D-game with Javascript. To learn the basics, I decided to write my own "game engine". I have successfully implemented collision detection using the separating axis ...
6
votes
4answers
5k views

How to create a Raining Effect(Particles) on Android?

I am developing a 2d android strategy game, it runs on SurfaceView, so I can't(or can I?) use LibGdx's particle system. And I would like to make a raining effect, I am aiming for something like this( ...
1
vote
1answer
527 views

Please help with bounding box/sprite collision in darkBASIC pro [closed]

So I just recently learned BASIC and figured I would try making a clone of pong on my own in darkBASIC pro, and I made everything else work just fine except for the part that makes the ball bounce off ...
0
votes
2answers
200 views

Looking for feedback on design pattern for simple 2D environment

I'm working in iOS. I am trying to make a very simple 2D environment where there are some basic shapes you can drag around with your finger. These shapes should interact in various ways when dropped ...
2
votes
1answer
2k views

Resolving bounding box collision detection

I'm working on a simple collision detection and resolution method for a 2d tile-based bounding box system. Collision appears to work correctly, but I'm having issues with resolving a collision after ...
0
votes
2answers
933 views

Order array of points in counter clockwise

I happened to see an answer to "Sort array of points in clockwise", could you please elaborate the 4th point of that answer: sort points relative to their a value, using qsort for instance. How do ...
1
vote
1answer
172 views

Can't work out how matrix is applied to 2D vertices

I have a texture, some 2D vertices, and a matrix. The matrix is used to calculate the texture coordinates for each vertex, but the problem is that the matrix comes with absolutely no documentation and ...
1
vote
3answers
797 views

What is a currently a good game stack for simple Javascript 2D multiplatform game?

I'm looking for advice from someone can help me avoid common pitfalls in developing light weight, quick-to-market games. Yeah, I've heard of Google ;-), but a trip down Google lane does not beat solid ...
0
votes
1answer
479 views

android basic Movement for array-objects

I was adviced to start a seperate question for this so here I go. Been stuck so long with this do if you can help, please do. Lets get to it! Im trying to set the speed for my bullets, but since Im ...
1
vote
2answers
2k views

Creating maps and tileset for a 2d java game

I'm not a completly beginner to java, so I decided to write a map loader and a tileset loader myself instead of using a tilemap editor like Tiled. I'm using Slick & LWJGL for my game. The plan ...
2
votes
1answer
163 views

Multiple images written and read from one meta-file?

Short version: I need a way to store multiple image files in one bigger file, to be used using C#, preferably easily compatible with XNA. The files will be read, written to, but also adaitional files ...