Tagged Questions

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

1
vote
1answer
696 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
679 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
787 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
8k 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
383 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
654 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 ...
10
votes
2answers
2k views

Continuous Physics Engine's Collision Detection Techniques

I'm working on a purely continuous physics engine, and I need to choose algorithms for broad and narrow phase collision detection. "Purely continuous" means I never do intersection tests, but instead ...
2
votes
0answers
830 views

Best Frameworks/libraries/engines for 2D multiplayer C# Webbased RPG [closed]

Title is a mouthful but important because I'm looking to meet a specific criteria and it's complex enough that I need a lot of help in finding what I'm looking for. I really want people's suggestions ...
0
votes
1answer
390 views

Almost working 2D Collisions

I'm terribly sorry I'm asking this question YET AGAIN, but I can almost guarantee that this will be the last time I'll have to ask. I'm currently on the verge of FINALLY getting these collisions to ...
2
votes
1answer
399 views

How can I make a car follow the terrain in a 2D (side-view) game?

I'd like to create a game where a car drives over a 2D terrain. Which algorithm to use so the car will follow the mountain incline?
3
votes
1answer
1k views

Collision Detection on floor tiles Isometric game

I am having a very hard to time figuring out a bug in my code. It should have taken me 20 minutes but instead I've been working on it for over 12 hours. I am writing a isometric tile based game where ...
3
votes
3answers
4k views

XNA - Drawing 2D Primitives (Boxes) and Understanding Matrices in Computer Graphics

I have two issues which I wish to solve by creating 2D primitives in XNA. In my game, I wish to have a "debug mode" which will draw a red box around all hitboxes in the game (Red outline, ...
2
votes
5answers
1k views

Simulating water droplets on a window

How do I simulate water droplets realistically falling, gathering, and flowing down a window? For example, see http://www.youtube.com/watch?v=4jaGyv0KRPw. In particular, I want to simulate how smaller ...
3
votes
3answers
574 views

Tool for creating complex paths?

I want to create some fairly complex 2d predefined paths for my AI sprites to follow. I'll need to use curves, splines etc to get the effect I want. Is there a drawing tool out there that will allow ...
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 ...
8
votes
1answer
1k views

Set sprite to face direction of mouse

I'm building a html5 canvas game and I need a way to get my sprite to face the mouse cursor. I have the X and Y co-ordinates for the sprite, and also the X and Y co-ordinates of the pointer. All I'm ...
3
votes
2answers
689 views

Better to use fixed sprite size or variable sprite sizes in a sprite sheet?

you have N frames for an animation (an idle animation for example) of a 2D character. What is the best resolution to use for each frame? The problem is that if you save the N frames such that each of ...
2
votes
1answer
4k views

How move sprite in Java 2d (swing) with keyboard?

I'm practicing some simple techniques with Java swing games, to learn the basics. Right now I'm practicing how to move a sprite... but it's not working! whhyyyy Here is what I've come up with so far ...
2
votes
1answer
611 views

Rotating a group of sprites - How to calculate origin

I am rotating a group of sprites in XNA, which I developed with the help of the following example: http://msdn.microsoft.com/en-us/library/bb194912%28v=xnagamestudio.10%29.aspx It all works very ...
2
votes
2answers
1k views

Different ways to store a 2D map/landscape in XNA

I was looking around at this site about eight months ago and wish I saved the location of this topic but I was wondering the different map rendering styles that you can do in XNA. The one style I ...
1
vote
3answers
367 views

What name (if any) applies to this particular 3D rendering technique?

Is there a name for this technique where when instead of rendering certain polygons, you just calculate a few key points and do the drawings in 2d? For instance, instead of rendering a sphere, you ...
6
votes
3answers
2k views

Is there a good existing starting point for realistic 2d racing car physics?

I'm trying to get a realistic behaving racing car into my 2d top-down game. Making a very simple car that drives around is straight forward but I want a reasonably sophisticated model that models ...
2
votes
3answers
1k views

How do I move a 2D top-down racing camera smoothly and show what's ahead of the player?

I'm trying to make a camera that follows a race car. Right now, I'm smoothing the camera movement out by moving the camera's position a fixed percentage lerp'ed from the camera's position to the car's ...
0
votes
0answers
480 views

2D Terrain Generation [duplicate]

Possible Duplicate: How can I create a random “world” in a tile engine? I need some advice as to how I should go about coding a 2D Terrain Generator for a game written in C. I ...
1
vote
1answer
636 views

How can I implement “cut outs” for lighting in OpenGL?

So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over ...
2
votes
2answers
1k views

Problem With Smooth Animation In C++/SDL/OpenGL

I been working in the animation of a 2D platformer game in C++/SDL/OpenGL, and my team and I reach the point where we need to establish that every animation of the player (Walking, Running, etc..) ...
2
votes
2answers
1k views

How should I calculate world and projection matrices in this scenario?

I'm trying to understand transformation matrices. Suppose I use the camera from this StackOverflow answer, this is how my view matrix would look: Matrix.Identity * ...
7
votes
6answers
554 views

Is it possible to write a game that doesn't require a GPU?

I already know many computers today have a GPU that supports DirectX and OpenGL. But what about computers that don't? Can I write a simple 2D game that does not rely on the GPU, so that it works even ...
2
votes
4answers
689 views

What tool should I use to make this game? [closed]

A little background info: I'm just about to graduate university with a software engineering degree. I have a fair amount of experience with more "serious" programming languages (C++/Java/C#), plenty ...
2
votes
2answers
990 views

State of the art in image compression?

I'm looking for good algorithms for compressing textures offline (ie decompressing them at install or load time, I know about using DXT/3DC to save runtime video memory, but these create awful visual ...
7
votes
4answers
8k views

Which language and tools should I choose for creating 2D games? [closed]

Recently I have returned to my childhood hobby (programming games) and found it quite enjoyable. I've been tinkering with PyGame (for Python) for a few months, made a couple of projects for ...
5
votes
4answers
6k views

2D Platformer Collisions

I've basically asked this question before, and I know it's been asked probably a billion times, but I still can't seem to do it. All I want to know is how I should go about doing basic 4-way, ...
1
vote
5answers
2k views

Is there a SDK for 2D games that will deploy to PC, Flash and Android? [closed]

Is there such thing as an SDK or toolset that can produce Windows, Flash, and Android executables from the same source? Something like "write once, run in all three platforms?"
3
votes
3answers
2k views

How can I implement fast, accurate 2D collision detection?

I'm well aware of how to detect if two or more 2D objects collide but I'm interested in how to decide whether to check for a collision. In previous projects, I just had every object check against ...
14
votes
5answers
691 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 ...
-3
votes
2answers
3k views

Unity: 2D problem (I'm using Orthello package but any advice appreciated)

So instead of dishing out 150$ for SpriteManager 2 (Unity Package), I've been playing around with Orthello which a free SpriteManager package. I got most of everything I'd like working and it was ...
6
votes
2answers
2k views

How to handle a huge map?

Generically speaking, how would you handle a huge 2D Map of which only a part is displayed? Imagine the old top-down racing games like Micro Machines. I would know how to do something with a ...
0
votes
1answer
282 views

How do you get graphic? [duplicate]

Possible Duplicate: Where can I find free sprites and images? I'm talking about 2D graphic in this particular question. Do you create it, buy it, or..? I tried to develope something stuff, ...
14
votes
5answers
5k 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 ...
18
votes
4answers
4k 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 ...
0
votes
1answer
379 views

objective-c iphone sdk side scrolling

I was making a game and I did the side scrolling like this: if the player get past 150, the player stops moving and the background starts moving. But thats very annoying with placing objects in the ...
0
votes
3answers
450 views

How can I spawn multiple monsters in my game?

I made a little iPhone game in which I want to make multiple monsters spawn. I have one UIImageView called enemy that spawns at beginning of the game. But I want it to spawn many more monsters until ...
3
votes
1answer
583 views

How can I spawn monsters at random locations?

I made a little 2D shooter game for my iPhone. I want monsters to spawn at random locations. But I don't have any clue where to start to make them spawn. I already made the monster image and ...
5
votes
2answers
1k views

Calculating the angular direction from velocity

I'm trying to calculate the angular direction of a projectile, knowing it's X and Y velocity I can find the magnitude of its movement, but I'm having a hard time wrapping my mind around getting the ...
59
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 ...
4
votes
4answers
2k views

How do you organize your game files and classes? [closed]

Although it isn't necessary to exclude things like graphics and audio packages, I'm most interested in the organization of the folders for classes that deal with AI and game state. I'm thinking ...