Questions tagged [2d]

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models.

Flat perspective, having no three-dimensional geometry. Including two-dimensional space and 2D geometric models, or two-dimensional images having only height, and width with no depth.

7489 questions
14
votes
1 answer

Difference between glOrthof and glViewPort

On OpenGL-ES i'm confused on what the difference is between setting glOrthof() glViewPort() GLU.gluOrtho2D() with it's respective parameters. Since I believe it's all setting the part you can see to the specified coordinates (width, height).…
user717572
  • 3,626
  • 7
  • 35
  • 60
14
votes
7 answers

XNA 2D Game Engines

I am just getting back into game development and I am really impressed with XNA. My only problem is that I want a free community based 2d game engine so that I can harness the power of the community. Does anybody know of a good XNA 2d game engine…
Khalid Abuhakmeh
  • 10,709
  • 10
  • 52
  • 75
14
votes
2 answers

How can I convert 3D space coordinates to 2D space coordinates?

I'm using a Lua API. I'm trying to transform 3D space coordinates to 2D space coordinates. I've asked google but I can't find anything apart from snippets using OpenGL function. I don't need source code or anything just a simple way on how to do it?…
Conros
  • 167
  • 1
  • 3
  • 7
14
votes
3 answers

HTML5 Tile Engine

Where can I find a tile engine for HTML5 , for writing 2D games?
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
14
votes
5 answers

2D game programming tutorials in C#

I want to learn about programming 2D games in C#. What are the best tutorials that are beginner oriented, written for C#, and preferably use GDI+ (or something equally simple)? I am relying on the experience this community has to direct me towards…
Bloodyaugust
  • 2,463
  • 8
  • 30
  • 46
14
votes
3 answers

calculate a perpendicular offset from a diagonal line

I am writing a music display program and need to draw a 'slur' between two notes. A slur is a curved line linking two notes - just to be clear. I know the note positions and calculate where the start and end points of the curve should be - Start…
Simon
  • 2,208
  • 4
  • 32
  • 47
14
votes
4 answers

Realistic 2D terrain map generation

I am looking for some algorithms which allow me to generate a realistic 2D terrain map. By realistic I mean that person will consider such map as a "normal" terrain map, not created artificially. I don't want to create photorealistic map. Just…
Wodzu
  • 6,932
  • 10
  • 65
  • 105
14
votes
5 answers

Scale a polygon so the edges match up

I'm working on a project using a JavaScript canvas and need to be able to snap the cursor to a certain distance from a polygon. I can already snap to the polygon itself, but I need to have the cursor farther away. As far as I can tell the best way…
davey555
  • 720
  • 1
  • 7
  • 15
13
votes
3 answers

Animation with animationSet() in android

OK here's the problem i have an ImageView in my activity, here's what it looks in main.xml:
user724861
  • 1,074
  • 3
  • 17
  • 33
13
votes
6 answers

Finding all cycles/enclosed shapes in a 2D grid

I have an "infinite" 2D grid and I want to detect closed/complete "structures" - areas of any shape which are enclosed on all sides. However, I need to identify each individual closed circuit - including the larger shape, if any. In researching…
helion3
  • 34,737
  • 15
  • 57
  • 100
13
votes
1 answer

How does an operating system draw windows on the screen?

I realized after many years of using and programming computers that the stack of software that actually draws on the screen is mostly a mystery to me. I have worked on some embedded LCD GUI applications and I think that provides some clues as to a…
Dru
  • 357
  • 4
  • 13
13
votes
2 answers

Scaling issue on Android - why is picture so clumsy?

I have no 2D graphics and gaming experience. I taught myself by hundreds of mistakes and tens of lost hours. I started with simple Dress Up game. I used Nexus 5x for development where a screen looked OK. When I finished one milestone I tried game on…
Leos Literak
  • 8,805
  • 19
  • 81
  • 156
13
votes
0 answers

How does Bitmoji work?

does anyone have an idea, how bitmoji or other similar services work? I have an idea for an app, which should have custom Avatars. There are multiple libraries for 3D-Games, which are based on Morphing. Easy. All the 2D-Characters however are…
Artishock
  • 131
  • 4
13
votes
2 answers

2D Elastic Ball Collision Physics

I am making a program that involves elastic ball physics. I have worked out all of the maths for collision against walls and stationary objects, but I cannot figure out what happens when two moving balls collide. I have mass and velocity (x and y…
0WJYxW9FMN
  • 231
  • 1
  • 2
  • 7
13
votes
2 answers

Generate 2D cross-section polygon from 3D mesh

I'm writing a game which uses 3D models to draw a scene (top-down orthographic projection), but a 2D physics engine to calculate response to collisions, etc. I have a few 3D assets for which I'd like to be able to automatically generate a hitbox by…
nornagon
  • 15,393
  • 18
  • 71
  • 85