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.
5
votes
3answers
778 views
Is it possible to map mouse coordinates to isometric tiles with this coordinate system?
I'm trying to implement mouse interaction in a 2D isometric game, but I'm not sure if it's possible given the coordinate system used for tile maps in the game.
I've read some helpful things like ...
2
votes
1answer
405 views
Trouble with AABB collision response and physics
I have been racking my brain trying to figure out a problem I am having with physics and basic AABB collision response. I am fairly close as the physics are mostly right. Gravity feels good and ...
1
vote
1answer
538 views
Java 2D Tile Collision
I have been working on a way to do collision detection forever, and just can't figure it out. Here's my simple 2D array:
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
...
2
votes
1answer
118 views
2D SAT How to find collision center or point or area?
I've just implemented collision detection using SAT and this article as reference to my implementation. The detection is working as expected but I need to know where both rectangles are colliding.
...
13
votes
2answers
1k views
Best way to mask 2D sprites in XNA?
I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures:
The area to mask (in white)
Now, the red sprite that needs to be cropped.
The ...
1
vote
1answer
1k views
2D Grid based game - how should I draw grid lines?
I'm playing around with a 2D grid based game idea, and I am using sprites for the grid cells. Let's say there is a 10 x 10 grid and each cell is 48x48, which will have sprites drawn there. That is ...
6
votes
3answers
358 views
Smooth waypoint traversing
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
207 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
295 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 ...
2
votes
1answer
408 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
723 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 ...
4
votes
1answer
261 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
685 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
198 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
173 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
299 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
0answers
303 views
What is wrong with my game loop/mechanic? [closed]
I'm currently working on a 2d sidescrolling game prototype in HTML5 canvas.
My implementations so far include a sprite, vector, loop and ticker class/object.
Which can be viewed here: ...
1
vote
2answers
3k 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
120 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
278 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
98 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
222 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 ...
0
votes
0answers
142 views
Exporting .jar files with Jarsplice [closed]
Help! I'm Using Mac OS X 10.8 Mountain Lion and Using Eclipse. I'm using the library called Slick and Lwjgl. When i first exported it, it has a .jar file. I followed some You Tube Tutorials ...
5
votes
3answers
517 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
3k 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
200 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 ...
-1
votes
1answer
820 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
102 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
244 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 ...
10
votes
2answers
586 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
116 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 ...
3
votes
2answers
906 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
255 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
375 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
134 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
482 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
248 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
1k 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
325 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
182 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
204 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 ...
-7
votes
1answer
553 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
954 views
PokeMMO. How they do it?
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
494 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 ...
5
votes
2answers
527 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
140 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
388 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
325 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 ...
5
votes
4answers
1k 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
258 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 ...