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
0answers
220 views

How can I apply a “genie animation” to a CCSprite?

I am new to Cocos2D and following this tutorial. I want to animate a CCSprite with the genie effect that OS X uses for hiding windows to the dock and showing them again. Here's an example from an ...
2
votes
0answers
91 views

Can the Shuriken particle system create particles with random shapes and sizes?

I want to create differently sized (but small, relative to the characters) dust clouds for player movement that move away from the player and fade away by shrinking. This animated GIF from Samurai ...
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
0answers
28 views

Dealing with back to front drawing with alpha blending and z buffer for a list of 2d quads

I'm using depth buffer as a layering system for my 2d render and I have to draw them from back to front to make semi-transparent quads work out. The problem is I have to sort my quads vector based on ...
1
vote
0answers
31 views

Unity 2D angular velocity center

I try to add angular velocity to my GameObject with this command: rigidbody2D.angularVelocity = Random.value * tumble; All works, but I want center of velocity be in the center of my rigidbody, but ...
1
vote
0answers
43 views

Resolving penentration after collision using Separating Axis Thereom

I implemented collision detection in my game using SAT. The detection works, but I'm trying to use the algorithm to figure out the penetration vector of the two OBBs and push them apart (before doing ...
1
vote
0answers
42 views

unity4.3 rigidbody2d unexpected force behaviour

So guys ive edited the question and here is what my problem is i have a player which has a rigidbody2d attached to it.my player is able to doublejump in the air nicely and stick to walls when ...
1
vote
0answers
406 views

Unity 2D loading Spritesheet Atlas at runtime from web and using it dynamically

I am new to Unity (came from AS3/Starling) and just started for 2D games in Unity. I have a spritesheet / texture-atlas (many different sized images packed in a single png) which I want to download at ...
1
vote
0answers
61 views

how to project a collision between a pair of polygons under rotation?

I am trying to create a physically plausible 2d physics engine. I have read many documents about detection of collisions, contact resolving, interpenetrations, projection, separating axis theorem ...
1
vote
0answers
116 views

How should matrix-based Parallax Scrolling work?

The question is at the end, as it requires a bit of context. I'm not sure if my understanding, my code, or LibGDX's ParallaxCamera is wrong. LibGDX's ParallaxCamera uses Matrix4s to achieve a ...
1
vote
0answers
234 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
1
vote
0answers
141 views

scale rotating boundingbox

I want to use basic rectangular collision detection. I have a rotating sprite and a method that calculates the bounding box every time in the Update() method. I simply check for intersection between ...
1
vote
0answers
345 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
1
vote
0answers
276 views

iOS cocos2d - sprite gets stuck in collision detection

I'm developing a top down game in cocos2d and I have collision code that checks collisions between enemies and the player so that they don't go through each other. The code seems to work but the ...
1
vote
0answers
58 views

Creating transparent image with localGraphicsConfig not always working

I'm trying to use GraphicsConfiguration.createCompatibleImage to create transparent images. This creates an empty image which I'm filling with a mosaic pattern later on in the code. This seems to ...
1
vote
0answers
368 views

Stacking Drawing Matrix for SpriteBatch in XNA

I'm trying to make a 2D engine for XNA with SpriteBatch. My object unit is Entity, which can include other Entities as its children. However, when drawing them, the rotation and scaling stacking do ...
1
vote
0answers
145 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
0answers
95 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 ...
1
vote
0answers
232 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
vote
0answers
2k views

bmGlyph alternative for windows (Bitmap font generator)

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 ...
1
vote
0answers
341 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 ...
1
vote
0answers
61 views

DirectWrite Producing Strange Artifacts?

I've written the basis to my UI system around Direct2D. I like it because it's fast and easy to use (even if I had to do some messy work to get it to work with DirectX11). However, I notice when using ...
1
vote
0answers
197 views

Sprite sorting issues

I apologize for the vague title, I'm not sure how else to phrase this problem. I am using tIDE to assist me in my game's world development. To give a dynamic effect to map layers within tIDE, it has ...
1
vote
0answers
283 views

Need help with objects moving toward the player

I am making a 2D game with simple "gravity": everything is just pulled toward 0,0. The speed at which they accelerate towards it is GravityAcceleration up to MaxGSpeed. I also want the player to be ...
1
vote
0answers
117 views

Fixed time step with Akihabara

How could I implement fixed time step with Akihabara framework? I would like my avatar to move by fixed distances of one block as in Supaplex.
0
votes
0answers
70 views

Picking tiles in an isometric diamond map

I am rendering a isometric map with the following code: for(var x = 0; x < MAP_WIDTH; x++) { this.map[x] = []; for (var y = 0; y < MAP_HEIGHT; y++) { var screenX = ...
0
votes
0answers
37 views

2D Orthographic camera movement clamp in any orthographic size

I have a problem, which i currently can't figure out how to solve. I am trying to calculate a clamp value for world coordinates which have to respect any camera orthographic size.I bought an image ...
0
votes
0answers
33 views

Web-Based Traffic Simulation based on Discrete Event SImulation + AI

I'm working on the application of 2D web-based traffic simulation. I am looking for a library that is suitable for my application. I'm making an application based on discrete event simulation, each ...
0
votes
0answers
26 views

Using a Quad to cut out a Layer?

Looking for options on this, but I wanted to take a Quad (or other shape), apply a material to it, and have it cutout an entire layer, to reveal the layers below/behind it. Sort of like a portal ...
0
votes
0answers
87 views

How can I animate 2d sprite rotation without interpolation?

I would like to animate a weapon being swung in 2 frames - all I'm doing is changing the position and rotation of the weapon sprite. However, I don't want unity to interpolate the rotation (generate ...
0
votes
0answers
56 views

MonoGame - Fuzzy Pixels When Drawing (2D)

I apologize if this has been answered somewhere; I spent quite awhile searching but couldn't find an answer. I have any issue with my 2D sprites being drawn to the screen - either the non-moving or ...
0
votes
0answers
61 views

Tile Collision - subtracting a minor value to the box size

I'm having a certain problem when doing collision checks on bounding boxes that have their edges aligned with upper or right tiles. It shouldn't count as an intersection but I don't know a good ...
0
votes
0answers
87 views

Animation system for smooth character movement

For 2D games similar to the indie game Limbo, what kind of animation system or techniques do such games typically employ? I'm primarily interested in how the animation data is stored and used by the ...
0
votes
0answers
114 views

Zelda-style Top-down RPG. Storing data for each tile type

I'm creating a Zelda-style RPG using Tiled, C#, and MonoGame. When my code parses the .tmx file, it will get a number to associate with each tile type based off of their position in the tile sheet. If ...
0
votes
0answers
88 views

Sun & Moon Movement

I'm creating a 2D HTML5 Canvas Game and am stuck on how to go about animating my Sun & Moon. The current setup is basically setting the moon at -1024 on the X-axis and the sun at 0 and animating ...
0
votes
0answers
67 views

Pixel alignment algorithm

I have a set of square blocks, I want to draw them in a window. I am sure the coordinates calculation is correct. But on the screen, some squares' edge overlap with other, some are not. I remember ...
0
votes
0answers
48 views

box2dlights conelight rotation is off

I'm using libgdx/box2dlights for my game~ I have a conelight set up as such: ConeLight cl = new ConeLight(rh, 32, new Color(0f, 0.0f, 0.0f, 1.0f), 3, 0, 0, 0, 1); where "rh" is a RayHandler set to ...
0
votes
0answers
52 views

2D Platform Jump Animation

I have implemented the jump and want to add some animation to it. I have a tile for "preparing for jumping", one for jumping and one for landing. I use a time based system for jump and I already ...
0
votes
0answers
57 views

SurfaceView.Callback.surfaceDestroyed is called too early in Android

I'm making a simple animation application. Everything works as planned, except one little detail: About 50% of the time, exiting the application (Home or Lock button), makes the Logic throw a ...
0
votes
0answers
82 views

How to implement 2D Ai Wandering with 8 - directional movement using Perspective Images in unity 4.3?

My requirement is to move a 2D characters with perspective view images has to wander in game area by choosing dynamic path and according to that the AI character has to switch the animations based on ...
0
votes
0answers
155 views

Adding 2d hud/gui to a 3d game engine which has no 2d features

I have been following the 3d game engine tutorial series made by theBennyBox for a few months now, and have finally decided to create a game with it. My problem is that it is a 3d only engine which ...
0
votes
0answers
29 views

XNA 2D Stencil Buffer Rotation

I am currently working on a 2d game related to planets and am trying to get a stencil buffer working with rotation. I currently have a stencil buffer found from another related answer but it refuses ...
0
votes
0answers
78 views

How to make good looking bullets with a trail for top-down shooter?

So I am making a TD shooter and was wondering how to make fancy bullets. Right now I have a giant sprite of a bullet trail that is the bullet as well but it doesn't look that good. I am using libgdx ...
0
votes
0answers
98 views

Unity not updating sprite animations (possible bug)

I have a simple animation of a foot which i want to change sprites from one sprite to another, which is seen in the following two images: now as one can see in the animation timeline there is a ...
0
votes
0answers
48 views

Rendering bug in java

I'm using a simple rendering method in java to render tiles. Everything looks fine, but I notice that some rows grow 1 pixel when I move, and dhen shrink back, but I have no idea why. Infos: I'm ...
0
votes
0answers
256 views

Unity 2D - SpotLight and Shadow

I've been having some trouble in the process of creating my 2D game. Here is the thing, i want to create a light source on the top of the screen, blocked by some rocks and letting only go through some ...
0
votes
0answers
80 views

How to design basic physics and movement behavior for 2D platformer?

I want to make a simple 2D platformer. I know some basic 2D physics and how to implement them in a game. How to make a character jump, accelerate, decelerate, etc. But I have no idea how to actually ...
0
votes
0answers
56 views

how to do picking in 2d lwjgl

I searched the whole internet, but I couldn't find something useful. How to do picking (like ray picking) in lwjgl in orthographic mode (2d)? I think this is less confusing than picking in 3d, but I ...
0
votes
0answers
124 views

Improve interpolation in 2d multiplayer game

I have a problem to solve while prototyping networking for a 2d game. Here's what I have so far and what's giving a headache: I run a multi-player session where one host is an authoritative server ...
0
votes
0answers
61 views

Efficient 2D Drawing Manager Pattern

Most 2D game development tutorials use frameworks that already have a drawing management system or simply the host computer running the game has so much power that the game runs fluently. Now ...