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.
1
vote
1answer
1k 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
301 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
138 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 ...
-5
votes
1answer
117 views
is object facing another object or facing it in opposite direction?
In 2d, in degrees, negative degrees possible.
What I want is to rotate the player to face the same direction as the door before opening it, but when I'll do the same again now from the opposite side, ...
1
vote
3answers
479 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
0answers
110 views
Rendering light rays that intersect the viewport but have off-screen sources (XNA)
I am creating a very simple 2D navigation app in XNA. The grid/world starts at (1,1) and carries on to infinity in the East and South directions. The view-port shows the world without any scaling ...
0
votes
1answer
328 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
833 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
124 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 ...
2
votes
1answer
279 views
android game-logic for shooter
Im creating a 2d game for android.
I'll just get right to it. I have a sprite controlled by a joystick that needs to shoot, sofar Ive managed to get direction and movement on my bullet, but then I ...
0
votes
0answers
213 views
Freedrag a sprite from a spritesheet around the screen (Windows Phone) [closed]
Hi I'm having trouble using the gesture freedrag, when I drag my displayImage rectangle which is the rectangle that display my sub-image, its just couldn't be drag, help is greatly appreciate, below ...
1
vote
1answer
125 views
How to Use Images Instead Of Drawing Primitives [closed]
I want to build backgammon game. I have successfully built the board using primitives such as lines, triangles and circles. I'm curious whether it's possible to draw the board using images which will ...
0
votes
1answer
544 views
Calculate the angle between two 3d vectors: Function always returns 89.1-89.9
I have my own 2d game and I am attempting to calculate the angle between 2 GameObjects.
My Problem: My function that is meant to calculate the angle(direction) between 2 Vector3's doesn't appear to ...
1
vote
3answers
766 views
How to efficiently manage animations and/or textures (resources) in a game?
I am using Java, particularly the Slick2D library. Seeing as this is my first game, I have no idea how I should manage the Animations and the textures in the game in a way to be both memory efficient ...
2
votes
1answer
727 views
How can I accomplish Pokemon-style movement over tiles in java?
I'm talking about where if you press a directional key once you walk over to the adjacent tile and can't do any other actions during the walk. I can get my character to move one tile width, but my ...
1
vote
2answers
121 views
Shape Centers as Vectors: Local space or World space?
Given a shape (any shape) in a 2D world where all positions, locations, and centers are two dimensional vectors, should the shape's center be described in local space or world space?
EXAMPLE:
World ...
2
votes
2answers
377 views
android 2d bullet-spawn (shooting)
This will be a quick question since Im pretty sure I'm overlooking something small that I for some reason cant see.
My sprite is moved using a joystick, and I want my sprite to be able to shoot. I've ...
0
votes
2answers
355 views
When to Use Collision Detection Methods
I've done some research into different collision detection methods but I don't know when I should be using one over the others. Some I've seen are:
Continuous Collision Detection (CCD) or Raycasting
...
1
vote
2answers
635 views
OpenGL ES high-quality 2D scaling
Let's say I'm making a 2D game and I want to implement a zoom in/out feature. Normally this is as simple as modifying the projection matrix to get more or less of the world to show. However, this ...
2
votes
1answer
605 views
Android 2D game, shooting and getting animation to stop
I'm developing a game as a learning-process, and since everything I do is new to me, I have alot of problems, usually I can fix it myself but right now I'm stuck and need help.
Link to a recording of ...
2
votes
2answers
259 views
Should a 4x game use one class per planet type?
I'm try to make a small 4x game for my own educational purposes.
Currently I have interfaces like IStarSystem which contains a list of IPlanets. My next step was to make classes implementing those ...
0
votes
1answer
413 views
Java2D Game Flickering
I'm in the process of trying to get familiar with making games in Java, using the Swing library.
Coding my Snake game however, I've got to a point where the game is flickering/ghosting and I haven't ...
8
votes
1answer
571 views
What is the difference between an impulse and a force related to a physics engine?
What is the difference between an application of an impulse and an application of a force in relation to a physics engine?
3
votes
3answers
397 views
Tile based platformer, using larger tiles?
So for my tile based platformer, It has a grid of tiles Occupying 1x1 block for each one.
However, What if I want larger tiles? Maybe doors, tables, etc. They wouldnt fit in a 1x1 tile, so what I ...
-5
votes
2answers
143 views
How about HTML 5 Write Online Mulitplayer Games [closed]
Some one said that HTML 5 is supported in modern browsers is it true ???
-6
votes
1answer
333 views
Choosing the right game engine [closed]
1 down vote favorite
I'm trying to create a game in java inspired by a Gameboy Color Zelda game. I'm exprienced in java but not in game programming. I've been doing a lot of research on game engines, ...
6
votes
1answer
519 views
Creating custom collision map for 2D
I have a 2D level that I have built in my map editor, and I was wondering the best way to create a collision map for it.
I have a collision map layer in my map editor, which saves each node (for ...
1
vote
6answers
964 views
How do i choose what technology to use for a 2D game like Pokemon?
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
368 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
168 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
192 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
343 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 ...
3
votes
1answer
802 views
The Physics behind 2D Platformer Games?
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
916 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
715 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
285 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
173 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 ...
0
votes
0answers
88 views
Good 2D Web/Facebook Game API [closed]
So I'm looking to develop some board game like web games. For instance, if I were to create a scrabble or chess derivative for the web (focus for facebook), what would be the best API to build on? I ...
4
votes
1answer
179 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 ...
2
votes
6answers
974 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 ...
-5
votes
1answer
1k views
2.5D Game Engines/Libraries - Which are the most popular and stable?
Like many other developers, I have experience with many programming languages. I've worked with C++, Java, JavaScript (+ HTML5 Canvas), etc. The question thing that I've found very difficult to ...
0
votes
1answer
229 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
351 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 ...
1
vote
3answers
417 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
136 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
1k 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
1k 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
265 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
350 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 ...

