D3d set projection ortho

Explanation
Use this function when you need to draw 2D shapes or sprites while in 3D mode. Basically, it allows you to draw a layer of 2D shapes and is useful for drawing the player's HUD. Any 2D drawing functions can be used normally with an orthographic projection.

A typical game would have the orthographic projection set like this: d3d_set_projection_ortho(0,0,room_width,room_height,0)

This sets the ortho to what it would be like in 2D. Sometimes this can be a bit blurry so setting the width and height larger will make all the drawn shapes, sprites and text smaller, hence more detailed, while setting them smaller stretches them, making them more blurry. Moreover, changing the scale of the ortho (instead of 640,480, 640,640) to make, say a square, the drawn shapes and sprites will have been shifted and stretched around making the game look a little weird. You should keep the aspect ratio.

The angle argument can be handy for an earthquake or huge bomb effect.