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.
6
votes
1answer
310 views
How to create 2D shadows
Could help about creating lighting and shadows in a 2D environment, like the image below.
http://i.stack.imgur.com/0FEQz.gif
I did several searches but got no results
( ps: sorry my bad english i'm ...
2
votes
2answers
205 views
What kind of projection is used here?
Tibia is a 2d game, but it's sprites are drawn using certain kind of orthographic projection that is not the same I'm used to:
I'm trying to figure out what projection is used here. I've guessed ...
5
votes
1answer
132 views
Physics/Logic behind self-bounce
I have a game that I am currently working on and I have a problem.
What would a ball look like when it makes itself bounce. Say, for example that the ball had its own "inner power", was made out of ...
4
votes
2answers
138 views
Why is my collision resolution failing on the corners?
I'm tearing my hair out trying to work out how to handle my collision resolution at the corners of the rectangles that I'm colliding with.
The code that I'm working with is:
class Player(object):
...
1
vote
3answers
569 views
Need Guidance Making HTML5 Canvas Game Engine
So I have some free time this winter break and want to build a simple 2d HTML5 canvas game engine. Mostly a physics engine that will dictate the way objects move and interact(collisions, etc). I made ...
3
votes
4answers
381 views
XNA 2D Spritesheet drawing rendering problem
I'm making a tile-based game, using one spritesheet containing all tile graphics.
Each tile has a size of 32x32 pixels.
The main problem is: when I draw the tile to the screen, if the tile position x ...
8
votes
1answer
262 views
Optimal sprite size for rotations
I am making a sprite based game, and I have a bunch of images that I get in a ridiculously large resolution and I scale them to the desired sprite size (for example 64x64 pixels) before converting ...
4
votes
2answers
133 views
Collisions on complex map 2D
I'm currently thinking about collision and map system that I want to use in my next game and I'm kind of puzzled. Maps are going to be somewhat complex with lots of irregularities and thus tiling is ...
0
votes
0answers
80 views
Managing shots of the player [closed]
I'm currently developing a 2D Jump'n'Run and the situation is the following: The player has different weapons he can collect and is then able to shoot the weapon's projectiles (laser, rockets, ...
8
votes
3answers
489 views
Isometric smooth fog
I'm working on a simple 2d game with direct3d 9. It's a isometric game with diamond tiles and a staggered map. This is what I have:
As you see I have some kind of fog which is acomplished by having ...
2
votes
3answers
304 views
2d shapes in XNA 4.0?
Having some experience of XNA but none of 3D programming. I have an idea i want to realize but i have not decided to do it in 3d or 2d. Im not sure which one will be best in XNA.
I want to have a ...
3
votes
4answers
195 views
Sprite and Physics components or sub-components?
I'm taking my first dive into creating a very simple entity framework. The key concepts (classes) are:
Entity (has 0+ components, can return components by type)
SpriteEntity (everything you need to ...
1
vote
0answers
113 views
How can I use iteration to lead targets?
In my 2D game, I have stationary AI turrets firing constant speed bullets at moving targets.
So far I have used a quadratic solver technique to calculate where the turret should aim in advance of the ...
1
vote
2answers
406 views
Making a 2D game with responsive resolution
I am making a 2D game, however I wish for it to be resolution agnostic.
My target resolution i.e. where things look as intended is 1600 x 900.
My ideas are:
Make the HUD stay fixed to the sides no ...
1
vote
2answers
131 views
How do I cap rendering of tiles in a 2D game with SDL?
I have some boilerplate code working, I basically have a tile based map composed of just 3 colors, and some walls and render with SDL. The tiles are in a bmp file, but each tile inside it corresponds ...
-1
votes
3answers
325 views
Scale a normalized 2D vector always to the same length
For any normalized 2D vector, except for ( 0, 0 ), how would I scale the vector to always be the same length?
For example:
int length = 10;
vector v = vector( 0.1, 0.5 );
vector v2 = vector( 0.3, ...
0
votes
0answers
111 views
GameSalad | Draw lines and arcs
I'm new to GameSalad.
Can lines and arcs be drawn in GameSalad, respond to touch at a point, and be shrunk along their path?
5
votes
1answer
269 views
Performance of pixel shaders vs. SpriteBatch: XNA
Precondition: I read this question/answer about using shaders, or spritebatch, to render and mark a sprite.
I need to do something like that. I also have a 2D lighting PoC which I need to write. The ...
-3
votes
1answer
216 views
Character jump animation is not working when I hit the space bar [closed]
I am having an issue with my game in XNA. My jump sprite sheet for my character does not trigger when I hit the space bar. I can't seem to find the problem. I have also include the code below to make ...
-1
votes
1answer
184 views
How to create GoogleMaps-like camera for simple 2D strategy game? [closed]
I am just starting in game development (with web programming background).
I want to know how to create 2D game with camera that can zoom in/out and can be moved like map in Google Maps.
Could you help ...
3
votes
4answers
388 views
Is there an isometric 2d game that doesn't use tilemapping? [closed]
Is there an isometric 2d game that doesn't use tilemapping?
I want to do this in tilemap but the client doesn't want to use it (since it's easier to design maps without using tiles).
I've tried to ...
6
votes
3answers
768 views
isometric drawing order with larger than single tile images - drawing order algorithm?
I have an isometric map over which I place various images. Most images will fit over a single tile, but some images are slightly larger. For example, I have a bed of size 2x3 tiles.
This creates a ...
1
vote
0answers
60 views
2D map/plane with nodes overlayed that supports panning, scaling and clicking on nodes
I'm trying my hand at Android development and seem to be running into an invisible ceiling in trying to get what I want accomplished. Basically I'm trying to create an app that renders a 2D surface ...
3
votes
1answer
242 views
Batching dynamic sprites in OpenGL
I'm trying to wrap my head around how batching is done in a 2D sprite-based game. My understanding is I'd get the vertices that represent each sprite I want to draw and stuff them all into a single ...
3
votes
1answer
141 views
Applying prerecorded animations to models with the same skeleton
well my question sounds a bit like, how do I apply mo-cap animations to my model, but thats not really it I guess. Animations and model share the same skeleton, but the models vary in size and ...
1
vote
3answers
692 views
2D camera perspective projection from 3D coordinates — HOW?
I am developing a camera for a 2D game with a top-down view that has depth.
It's almost a 3D camera. Basically, every object has a Z even though it is in 2D, and similarly to parallax layers their ...
1
vote
2answers
611 views
Line Intersection from parametric equation
I'm sure this question has been asked before. However, I'm trying to connect the dots by translating an equation on paper into an actual function. I thought It would be interesting to ask here instead ...
-1
votes
1answer
187 views
The right way to start out in game development/design [closed]
Greetings everyone I'm a 19 year old student looking for some help in the field of game development.
This question may or may not seem a bit overused, but the fact is that game development has been ...
2
votes
2answers
136 views
Grouping surfaces in pygame to get an object with two movement points
I would like to create a simple tank using pygame. One would drive the tank by controlling he velocities of two caterpillar tracks. They should be the two single movement points of the vehicle.
I'm ...
-2
votes
1answer
511 views
The best way to structure/design game code [closed]
My question is quite broad and related to the 2D game code design/architecture/structure.
Usually the main game consists of the main loop where you update & render your world states.
However, ...
25
votes
3answers
3k views
2D water with dynamic waves
New Super Mario Bros has really cool 2D water that I'd like to learn how to create.
Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
8
votes
1answer
438 views
Rendering 8 bit graphics
I have a strong programming background just not from game development. I only made some pong and snake in high school and I did some OpenGL in college.
I want to make my own game engine. Nothing ...
3
votes
3answers
697 views
Gigantic 2d maps?
I've been thinking about a game idea for a week or two and the last few hours I was thinking of some technical stuff and came up with that the map would need to be 360,000x360,000 pixels in size. To ...
0
votes
1answer
119 views
Storing large array of tiles, but allowing easy access to data
I've been thinking about this for a while. I have a 2D tile bases platformer in XNA with a large array of tile data, I've been running into memory problems with large maps. (I will add chunks soon!)
...
3
votes
1answer
187 views
“Unclutter” units in RTS game
For intentional reasons, certain units in the game I'm currently programming don't have any collision detection and response among each other.
This enables them to clutter right on top of each ...
3
votes
1answer
523 views
Procedurally generated 2d terrain for side scroller on Sega Genesis hardware?
I'm working on the Sega Genesis that has a 8mhz Motorola 68000 CPU.
Any ideas on how to generate fast and decent 2d tile terrain for a side scroller in real time? The game would generate new columns ...
2
votes
2answers
273 views
How to create realistic 2d lighting using colour temperature
I'm looking for a lighting algorithm that produces realistic lights expressed in kelvins, from about 2500k to 6500k. What I'm confused about is how to make the lights properly interact with the colors ...
1
vote
3answers
844 views
How to add a scrolling camera to a 2D Java game?
I am attempting to create a game where the camera follows the player, always making sure the player is in the center of the screen. How would I go about this? This game is a 2D Java game, made with no ...
4
votes
1answer
447 views
Re-create 2D side-on wave effect from Worms game
I'm trying to recreate the waves/water effect from Worms ( see here http://youtu.be/S6lrRqst9Z4?t=31s ) From what I understand its not actually a sprite, its procedurally generated by something like a ...
-1
votes
2answers
146 views
Which engine/tool is suitable for me? [closed]
I want to begin developing 2d games. I have a lot experience in Java programming. I am looking for an 2d game engine that supports physics, support mouse actions and easy to use. I know Stencyl but I ...
0
votes
0answers
112 views
Automatically generate character face [closed]
I'm developing a 2D game for which I'm looking for a method to automatically generate unique cartoon faces like http://www.shutterstock.com/pic.mhtml?id=71872582.
I am looking for a art package that ...
1
vote
2answers
188 views
Need material for character anatomy in a 2D game. Spartan Like, See Picture
I'm creating my art for an 2d based IOS game. I know some basic anatomy as you can see by the picture but I have no idea how I will make draw the pics for animation of the character walking, attacking ...
-2
votes
1answer
84 views
How can I get macromedia flash 5?
I was used to draw and develop Flash games in the 2000's. For me that's the best vector drawing tool for 2d games ever, better than illustrator and new flash recent versions.
Can anybody tell me how ...
2
votes
2answers
318 views
2D Selective Gaussian Blur
I am attempting to use Gaussian blur on a 2D platform game, selectively blurring specific types of platforms with different amounts. I am currently just messing around with simple test code, trying to ...
1
vote
1answer
249 views
How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)
Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based ...
1
vote
2answers
122 views
Which structures to use for maintaining 2D objects on canvas? How to map clicks to objects?
I need to draw some 2D objects on a canvas. And I need to map the 2D coordinates of clicks to objects.
What is the usual way to maintain a 2D object's size and position (which data structures, ...
1
vote
1answer
210 views
Point inside Oriented Bounding Box?
I have an OBB2D class based on SAT.
This is my point in OBB method:
public boolean pointInside(float x, float y)
{
float newy = (float) (Math.sin(angle) * (y - center.y) + Math.cos(angle) *
...
1
vote
2answers
127 views
Perpendicularity of a normal and a velocity?
I'm trying to fake angular velocity on my vehicle when it hits a wall by getting the dot product of the normal of the edge the car is hitting and the vehicle's velocity:
Vector2D normVel ...
5
votes
2answers
414 views
how to implement motion blur effect?
I wanted to know how one would implement this motion blur or fade effect behind the soccer ball .
Here is what I was thinking . You have the balls current position and you also keep its previous ...
0
votes
1answer
86 views
enemy behavior with boundary to change direction
I'm doing space shooter kind of game, the logic is to reflect the enemy if it hits the boundary. With my logic, sometimes enemy behaves like flickering instead of changing the velocity. It's like ...


