Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.

learn more… | top users | synonyms

21
votes
2answers
1k views

Mega Man-style screen scrolling design

The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into "screens" which are ...
5
votes
3answers
871 views

What does it mean to “strafe” the camera?

I'm looking at a tutorial in which both the terms camera moving and "strafing" are used. I looked onto dictionary.com and found: strafe verb (used with object) 1. to attack (ground troops or ...
2
votes
2answers
190 views

Can't figure get the conversion from cartesian to spherical(“polar”) correctly for my orbiting camera

The two angles from the polar coordinate system are defined as hRotation and vRotation This is how they are converted from polar to cartesian: // Get the distance between the object and the ...
3
votes
2answers
1k views

3D camera implementation

I've been bashing my head against the concept of a 'camera' for my 3D world for some time now, and I'm not sure I'm doing this right anymore. Maybe I've been working on this for too long and have ...
3
votes
3answers
1k views

How to determine what triangle in a mesh the cursor is pointing to?

I have a game I'm working on in which items are "placed" and "selected". In order to do this, I need to determine what triangle in a mesh the cursor is pointing to. I have no trouble with getting ...
3
votes
3answers
5k views

Camera Rotation using angles

I currently try to rotate a camera (using gluLookAt()) around a point , i successfully do it for rotating around one global axis. But when i want to use more than one axis , I'm stuck . I've ...
6
votes
2answers
461 views

Size of the world and clipping area

I have a 32x32x32 cube (I say 32 because that's the size of the texture). I can make the vertices of this cube go from (0,0,0) to (32,32,32). This mean the camera will be moving += 1 when ever a key ...
4
votes
1answer
908 views

FPS Camera Look Direction

I'm using XNA to create an FPS camera that uses a Direction vector instead of a Target vector control the camera's orientation. I'm having trouble with the math for looking up and down when the ...
2
votes
2answers
3k views

Camera field of view: 3D projections & trigonometry

Okay, here goes. I have a camera at (Xc, Yc, Zc.) The Xc and Yc coordinates are latitude/longitude, and the Zc coordinate is an altitude in metres. I have a point at (Xp, Yp, Zp) and a field of view ...
3
votes
2answers
2k views

Scrolling 2D sprites on a map with a camera

I'm working on a 2D sprite-based strategy-type game (ok, full disclosure: it's a tower defense game), and I'm having a problem getting the actors to behave correctly when I move the camera. I've got ...
29
votes
5answers
6k views

Realistic Camera/Screen Shake from Explosion

I'd like to shake the camera around a bit during an explosion, and I've tried a few different functions for rocking it around, and nothing seems to really give that 'wow, what a bang!' type feeling ...