# 2D with 3D graphics

8 replies to this topic

### #1 slam drago

slam drago

The slam drag

• New Member
• 422 posts
• Version:GM:Studio

Posted 30 March 2012 - 05:06 PM

So I want to create a 2D game with 3D graphics.

My projection code looks like this:
`d3d_set_projection(x-50,y-50,-200,x+50,y+50,0,0,0,1);`

It makes it my game look isometric, I want it to look 2D. What can I do to make it looks 2D?
• 0

### #2 Gamer3D

Gamer3D

Human* me = this;

• GMC Member
• 1589 posts
• Version:GM8.1

Posted 30 March 2012 - 07:47 PM

It makes it my game look isometric, I want it to look 2D. What can I do to make it looks 2D?

Isometric IS 2D. I think what you're after is a side-on or top-down view:
`d3d_set_projection(x,y,-200,x,y,0,0,0,1);`

If you don't want a perspective projection, look up the orthogonal projection in the manual.
• 0

### #3 Robert3DG+

Robert3DG+

VR Games

• GMC Member
• 1848 posts
• Version:GM:Studio

Posted 30 March 2012 - 11:22 PM

Can you please elaborate what you need help on a little bit better? You goal seems a little fuzzy here.

If you want it to look exactly like it does in GameMakers room editor use a topdown down camera projection.
• 0

### #4 slam drago

slam drago

The slam drag

• New Member
• 422 posts
• Version:GM:Studio

Posted 01 April 2012 - 01:38 AM

For the record, and isometric projection does not mean 2D.

Anyways I want a top-down view like in the room editor.

Would using d3d_set_projection_ortho make a difference?
• 0

### #5 Gamer3D

Gamer3D

Human* me = this;

• GMC Member
• 1589 posts
• Version:GM8.1

Posted 01 April 2012 - 09:02 PM

For the record, and isometric projection does not mean 2D.

Nope. Isometric is 2D.

Isometric projection is a method for visually representing three-dimensional objects in two dimensions in technical and engineering drawings. It is an axonometric projection in which the three coordinate axes appear equally foreshortened and the angles between any two of them are 120 degrees.

Anyways I want a top-down view like in the room editor.

Would using d3d_set_projection_ortho make a difference?

Orthographic projection would remove perspective and limit your view-angle options to top-down only. Sounds perfect for you.
• 0

### #6 TheSnidr

TheSnidr

That guy

• Global Moderators
• 2437 posts
• Version:GM:Studio

Posted 02 April 2012 - 07:09 AM

For the record, and isometric projection does not mean 2D.

Nope. Isometric is 2D.

Isometric projection is a method for visually representing three-dimensional objects in two dimensions in technical and engineering drawings. It is an axonometric projection in which the three coordinate axes appear equally foreshortened and the angles between any two of them are 120 degrees.

Anyways I want a top-down view like in the room editor.

Would using d3d_set_projection_ortho make a difference?

Orthographic projection would remove perspective and limit your view-angle options to top-down only. Sounds perfect for you.

Using your definition of 2D, even the perspective projection is 2D - that is also a method for visually representing three-dimensional objects in two dimensions (the screen). Though, that definition does not help us distinguish 3D and 2D, so I say we stick to the general definitions. Isometric graphics can easily be made and used without ever going into 3D mode, but when drawing 3D content with an isometric projection, you are in fact working with three dimensions.
For the record, an isometric projection can kind of be achieved in game maker by moving the camera far away from the target, and reducing the view angle

But this isn't related to the problem, as far as I understood. Unless d3d_set_projection_ortho was what you're looking for, could you perhaps make some illustrations of what you want?

Edited by TheSnidr, 02 April 2012 - 07:10 AM.

• 0

### #7 ean

ean

GMC Member

• New Member
• 190 posts
• Version:GM8

Posted 04 April 2012 - 07:03 PM

I think he just wants the numbers to put in the projection for an over head camera.

if you want a camera 100 pixels high put

height=100
cam.x,cam.y,cam.z,cam.x,cam.y,cam.z+cam.height,0,0,-1.

i think?

Edited by ean, 04 April 2012 - 07:05 PM.

• 0

### #8 Phantom107

Phantom107

Engineer

• GMC Member
• 2592 posts
• Version:GM:Studio

Posted 06 April 2012 - 04:45 PM

Here's the deal.

GM is always running in 3D. There is no such thing as "3D mode". All it does is enable the depth buffer.

So basically, to make a 3D game without perspective, you just start drawing 3D models and never bother about calling d3d_start() or calling a 3d projection function.

If you're looking for an overhead camera though, that has been answered in the post above me.
• 0

Stand-Alone

• GMC Member
• 565 posts
• Version:GM:Studio

Posted 14 April 2012 - 10:14 AM

Actually, any 2D game that have 3D Models is called 2.5D.
• 0

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users