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
5answers
3k views

How do i choose what technology to use for a 2D game like Pokemon? [closed]

I apologize in advance for the wall of text about to come. I've had an idea for a game for a while now, and am stuck at step 1 of game development: Choosing a language/engine. I've read a whole ...
2
votes
2answers
711 views

Do I have too many colliders on my screen?

I'm running into a situation where my frame rate drops from 70 FPS (on my desktop computer) down to 5 FPS (on my iphone) and I'm trying to understand why. At the moment, I'm only drawing simple ...
0
votes
1answer
205 views

Drawing at negative coordinates in XNA?

I am trying to make a 2D isometric RPG and I kind of hit a wall when it comes to lighting. I was thinking of using shaders, if I manage to understand them.The problem I am anticipating is the presence ...
1
vote
4answers
291 views

I'm making a board game: who should manage the player move if the board has specific locations for the players?

I know this is very specific question but imagine I have a board with spaces (like Monopoly) and a player that must go from one space to another after the dice are thrown. So my workflow: Player ...
2
votes
2answers
862 views

Changing sprite animation depending on direction

I'm working on an android game where my sprite is controlled by a joystick. I just added an animation to my sprite with 4 rows and 3 columns: Now I want to change the animation of my sprite ...
4
votes
1answer
2k views

The Physics behind 2D Platformer Games? [closed]

Is there any good book or tutorial that explains the physics behind creating a 2D Platformer game? Such as tile rendering, tile map reading, collision detection, camera movement etc.?
5
votes
3answers
2k views

What features do basic particle engines have?

I created a basic particle system for SDL in C++. It has some basic stuff like an emitter, as well as a simple particle class. It can load a image, or create a dot of a color. And that's it. What ...
1
vote
2answers
2k views

Trying to Draw a 2D Triangle in OpenGL ES 2.0

I'm trying to convert a code from OpenGL to OpenGL ES 2.0 (for the BlackBerry PlayBook). So far what I got is this (just the part of the code that should draw the triangle): void setupScene() { ...
1
vote
2answers
367 views

Techniques for lighting a texture (no shadows)

I'm trying to learn about dynamic shadows for 2D graphics. While I understand the basic ideas behind determining what areas should be lit and which should be in shadow, I don't know how I would ...
0
votes
2answers
213 views

Implementing a multishot powerup for a top down shooter

I have a top down shooter wherein I generate a projectile on each mouse click at the player's position and translate it in a straight line until it reaches the edge of the screen. I also have ...
4
votes
1answer
238 views

Create shape from points / lines in editor and mathematically calculate nearest points within shape

If I want an editor that accepts "points" of a minimum of three (a triangle) and I just add some points first, like this: how can I mathematically connect these corners (points) into an object of ...
3
votes
6answers
2k views

How to implement object velocity as a vector

I'm working on a Breakout game, and want to change the ball's movement code from how I currently do it, to something based on vectors (as I feel learning and implementing movement based on vectors ...
0
votes
1answer
436 views

Rendering Loop Problem (Java)

I'm not new to programming, but I am relatively new to game programming. I am trying to create a version of Breakout, as a good basic game to get myself introduced to 2d game programming. I currently ...
-2
votes
1answer
447 views

What's the best 2D animator?

What's the best 2D animator for creating sprite sheet animations for a game? Are there any that match this criteria? Cutout animation (I don't want to have to draw every frame) Exporting to images ...
2
votes
0answers
1k views

Why is my deferred lighting implementation so expensive?

I've implemented deferred lighting and I tried to put about 20-26 lights on the viewable space of my map, and it brings down the FPS from 61 to 28-31. It also makes my VGA temperature to go from 68°C ...
2
votes
3answers
603 views

Compressing 2D level data

So, I'm developing a 2D, tile based game and a map maker thingy - all in Java. The problem is that recently I've been having some memory issues when about 4 maps are loaded. Each one of these maps ...
0
votes
2answers
144 views

Collision on the first rectangle only - Why?

I've made a very simple collision detection, it works fine. However when i decided to load in all my rectangles into a list and then give each of them collision, it only adds it to the first one. Any ...
0
votes
3answers
2k views

How does changing weapons and character animation in 2d games work?

I know how I can make my character move by changing animation-frames. What if I want to use a weapon database? I want the character to fight with a bow and sometimes with an axe (different moves). Do ...
1
vote
1answer
2k views

2D Quads : Translation with OpenGL ES 2.0 on Android [closed]

I have a simple 2D engine that renders 2D textured quads, and right now I can scale the quad or rotate it, but when I try to translate it I have a strange distortion (the quad is squashed in the half ...
0
votes
2answers
382 views

How many Fringe/Base layers in a 2D map editor?

I'm creating a highly flexible 2D tile-based map editor in XNA to make some of my future projects easier (will work for side-scrollers and top-down games). This editor can work with any sized tile. ...
4
votes
2answers
490 views

Generate random starting points at same distance between them

Is there an algorithm to generate random 2D points that are at the same distance between each other? Useful for starting points. Check map: Don't be picky, I know in the image points are not at the ...
10
votes
3answers
451 views

How to simulate pressure with particles?

I'm trying to simulate pressure with a collection of spherical particles in a Unity game I'm building. A couple notes about the problem: The goal is to fill a constantly changing 2d space/void with ...
1
vote
0answers
2k views

bmGlyph alternative for windows (Bitmap font generator) [closed]

I have been using this tool (bmGlyph http://www.bmglyph.com/) to create fonts from apple machines, but now, I'm on windows and need a program with same / more features. The main features about this ...
9
votes
2answers
1k views

What is the best way to handle simultaneous collisions in a physics engine?

I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
1
vote
2answers
2k views

Advanced Animation for 2d Isometric Game?

I need help with workflow suggestions for a flash game. (although the concepts would apply to other game engines, too). In a game like: Hero Academy There are several different character models each ...
1
vote
3answers
906 views

Easiest way to create a 2d game in Java? [closed]

I would like to create a 2d game in Java, but tutorials online for game libraries such as LWJGL are usually filled with errors once I compile the project. Most people do not explain very well, and ...
4
votes
2answers
1k views

How to create biomes

I am creating an 2D XNA Tile Based Platformer. I have a tile engine and a world/terrain generator. However, I am trying to create biomes or areas, For example, Desert in one part of the world, ocean ...
8
votes
4answers
3k views

How do I convert between two different 2D coordinate systems?

I'm trying to convert a coordinate from one coordinate system to another, so that I can draw it on an image. Basically the destination coordinate system is as follows: X range: 0 to 1066 Y range: 0 ...
4
votes
5answers
981 views

How to generate water pools on a 2D tile grid?

I'm coding a algorithm that generate a map, fixed size 2D matrix of tiles (32x32, 64x64, ...), for a game. The game map contains 2 elements, ground and water tiles. I'm trying to flood some water ...
4
votes
1answer
185 views

What is the optimal way for updating different entities in an engine?

EDIT: half of my question seemed to disappear, but thankfully, it was still in the clipboard. When I say entities, I mean instantiations of various classes in my engine (example class: ...
8
votes
6answers
4k views

Map with 20 million tiles makes game run out of memory, how do I avoid it?

While loading extra huge maps, the loading method throws out of memory exception where a new instance of map tile is created. I'd like to have whole map processed at least on server app (and on client ...
0
votes
1answer
1k views

Random terrain generation with caves

I am currently working on a small game that will generate a world with caves and entrances to the caves, something like Terraria if you will. Today I reached some trouble on the world/cave generation ...
1
vote
1answer
563 views

How can I skew my XNA sprites?

I would like to make a 2D tile based game, but, to make it look a bit prettier, I would need to skew textures so that it would look more like a 2.5D game. So I thought maybe I should skew textures to ...
0
votes
1answer
126 views

How to properly simulate object aproximation towards camera in 2D?

I'm trying to make some objects come towards the camera but it just doesn't feel right... you can check the progress here: http://testing.fyrastudio.com/lab/tweetOlympics/v0.005/ You run by ...
1
vote
2answers
245 views

2D game libraries that support positional stereo sound?

I would like my game to have semi-realistic sound, where the left/right channel volume depends on the position of the sound source within the world. I've looked and it seems that it's not possible ...
0
votes
2answers
1k views

2D Tower Targeting (Tower Defense)

so just to be more specific this question isn't in regards to how to target enemies or anything like that rather its purposed towards a specific targeting issue i have with me enemies in its current ...
2
votes
2answers
400 views

Are my programming methods for java games sufficient

so I'm making a 2d Java game with the slick2d and MarteEngine libraries. This is the biggest project since I made checkers for my Java class. I am still pretty new to programming concepts and using ...
1
vote
0answers
355 views

Dynamic 2D soft shadows with concave polygons?

I've implemented dynamic 2D soft shadows from this article on gamedev.net. It uses an image for the penubmra and is fast, physically accurate and looks good in most situations, so I really like the ...
0
votes
1answer
409 views

Joystick example problem for android 2D

I've searched all over the web for an answer to this, and there are simular topics but nothing works for me, and I have no Idea why. I just want to move my sprite using a joystick, since I'm useless ...
1
vote
2answers
317 views

Boolean checks with a single quadtree, or multiple quadtrees?

I'm currently developing a 2D sidescrolling shooter game for PC (think metroidvania but with a lot more happening at once). Using XNA. I'm utilising quadtrees for my spatial partitioning system. All ...
-2
votes
1answer
699 views

Shaky Camera Effect 2D

The camera in my game engine can be modified by following a rectangle properties, that can be scaled, moved and even rotated. I need this effect for the shaking of the screen when a zombie attacks a ...
2
votes
2answers
1k views

How does sprite customization in 2D games work?

I´m working on the design of a new game concept at the moment and I would like to know how to handle a customization of sprites. (In 2D that is, hence the topic.) This is my scenario: The player will ...
0
votes
4answers
280 views

Big level objects collision system for 2d game

I read many variants today and get some knowledge in general, so here is a steps of mine thoughts in pictures (horrible paint.net ones). We need to develop grid system, so we check only thing near, ...
1
vote
2answers
211 views

How can I run and jump at the same time?

I'm having some trouble with the game I started. http://testing.fyrastudio.com/lab/tweetOlympics/v0.002/ The thing is that i have an athlete running and he must jump at the same time. A race with ...
1
vote
1answer
2k views

XNA 2D Collision with specific tiles

I am new to game programming and to these sites for help. I am making a 2D game but I can't seem to get the collision between my character and certain tiles. I have a map filled with grass tiles and ...
1
vote
1answer
655 views

Drawing 2D Grid in 3D View - Need help with method

I'm trying to draw a simple 2D grid for an editor, to able to navigate more clearly around the 3D space, but I can't render it: Grid2D class, creates a grid of a certain size at a location and should ...
1
vote
2answers
235 views

How to build Arena-ish level using grid tiles?

I had an idea of procedurally generating arena-type levels in which the player would either fight hordes of enemies, or another skilled opponent. The level would be built at the very start of the ...
0
votes
2answers
89 views

Crash when trying to detect touch [closed]

I've got a character in a 2D game using surfaceView that I want to be able to move using a button (eventually a joystick), but my game crashes as soon as I try to move my sprite. This is my ...
0
votes
2answers
1k views

How to draw lines between user draggable points?

I want to create a triangle using three different points on the SurfaceView using OpenGL. Line indications between the points with one color and fill the triangle with different color. I want to pull ...
2
votes
1answer
545 views

Why use 3d matrix and camera in 2D world for 2d geometric figures?

I'm working in XNA on a 2d isometric world/game and I'm using DrawUserPrimitives to draw some geometric figures... I saw some tutorials about creating dynamic shadows but I didn't understood why they ...