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
2answers
667 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
268 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 ...
0
votes
3answers
2k 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, ...
5
votes
1answer
398 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
343 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
257 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 ...
2
votes
4answers
577 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 ...
7
votes
3answers
3k 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
1answer
298 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 ...
5
votes
1answer
630 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
207 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 ...
2
votes
4answers
3k 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
2k 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
vote
1answer
330 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
288 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
2k 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, ...
42
votes
3answers
9k 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
827 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
1k 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
183 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!) ...
4
votes
1answer
514 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
746 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
474 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 ...
2
votes
3answers
5k 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 ...
6
votes
1answer
1k 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
178 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 ...
1
vote
2answers
414 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
95 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
608 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
389 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
157 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
341 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
214 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
651 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
127 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 ...
1
vote
3answers
669 views

Making an AI walk on a NavigationMesh (2D/Top-Down game)

For some time I have been working on a framework which should make it possible to generate 2D levels based on a set of rules specified by level designers. You can read more about it here as I won't go ...
1
vote
1answer
179 views

this.BoundingBox.Intersects(Wall[0].BoundingBox) not working properly

I seem to be having this problem a lot, I'm still learning XNA / C# and well, trying to make a classic paddle and ball game. The problem I run into (and after debugging have no answer) is that ...
2
votes
2answers
442 views

Making an interactive 2D map

So recently I have been working on a Legend of Zelda: A Link to the Past clone, and I am wondering how I could handle certain map interactions (like cutting grass, lifting rocks, etc). The way I am ...
1
vote
3answers
317 views

Need game development sandbox like Etoys to do 2D games prototyping [duplicate]

Possible Duplicate: Recommended 2D Game Engine for prototyping I am new to game development, and currently working on development a mobile 2D game (for android). As the part of the ...
9
votes
2answers
517 views

Boat passing under a bridge in a 2D tile based RTS

I'm writing a 2D tile based RTS. And I want to add a 'pseudo 3D' feature to it - bridges over the rivers. I havent't start any coding yet, just trying to think how it fits the collision detection ...
8
votes
2answers
476 views

How do display a “mucus spreading” effect in a 2D environment?

Here is an example of such a mucus spreading. The substance is spread around the source (in this example, the source would be the main alien building). The game is starcraft, the purple substance ...
3
votes
5answers
1k views

2D Collision detection for Pinball Game

So far in previous games I have used simple 2D collision with boxes then checking at pixel level for a collision. If making a pinball game in nearly a lot of frames the ball will be in contact with a ...
1
vote
1answer
255 views

Absorbtion 2d image effect

I want to create a specyfic 2d image effect. It consists in modifying a sprite so it looks like it is being zoomed to a point or "absorbed" by that point. I'm not really sure what is the technical ...
2
votes
2answers
2k views

Dynamic Terrain Texture

I've been looking at a 2D physics game called 'Hill Climb Racing' (Android and iOS) and was wondering how they went about texturing the terrain? I've had a think about it and I've come up with ...
1
vote
1answer
594 views

Infinite detail inside Perlin noise procedural mapping

I am very new to game development but I was able to scour the internet to figure out Perlin noise enough to implement a very simple 2D tile infinite procedural world. Here's the question and it's ...
4
votes
1answer
1k views

2D Tile Game - Smooth Biome Terrain Transitions

While working on my 2D tile based game, I encountered a problem. I use Perlin Noise to generate the terrain. Some biomes (Desert, Forest, etc) have different flatness values depending on terrain, ...
3
votes
1answer
954 views

Engine for 2D Top-Down Physics-Based Skeletal Animation

I just watched at the Sui Generis video, and was completely amazed. Specifically, the part where the big troll thing is beating up the player with his flail. This got me really excited, and I would ...
1
vote
0answers
100 views

Audio Panning using RtAudio

I use Rtaudio library. I would like to implement an audio program where I can control the panning (e.g. shifting the sound from the left channel to the right channel). In my specific case, I use a ...
11
votes
1answer
464 views

How can I cleanly and elegantly handle data and dependancies between classes

I'm working on 2d topdown game in SFML 2, and need to find an elegant way in which everything will work and fit together. Allow me to explain. I have a number of classes that inherit from an abstract ...
1
vote
3answers
406 views

Question about creating a sprite based 2-D Side Scroller with scaling/zooming [closed]

I'm just wondering if anyone can offer any advice on how best to go about creating a 2-D game with zooming/scaling features akin to the early Samurai Showdown games. In this case it would be a side ...