Codes for First Person Cam?

M

Madeon Unity

Guest
Please help :( i am trying to make a maze game in first person but i don't know how..
 
E

Edmanbosch

Guest
Please help :( i am trying to make a maze game in first person but i don't know how..
3D in GM is not that complete and is pretty complicated to setup. It's really only good if you're just really curious, or you want to see what you can do with it, and not a full game.
 

Binsk

Member
What have you tried so far, Madeon? Your question is a bit vague, do you have something more specific we can help you with?

If you just don't know where to start then you should probably look up some tutorials.
 
M

Madeon Unity

Guest
What have you tried so far, Madeon? Your question is a bit vague, do you have something more specific we can help you with?

If you just don't know where to start then you should probably look up some tutorials.
I haven't touch anything yet.. Even doing the 3Ds? I can't.. .
 

Binsk

Member
Ah, then you won't be able to make a 3D game. You'll just keep having to ask people for code drops at that rate.

Start small, simple, and in 2D. Look up some tutorials and follow them through until you feel comfortable with GameMaker.

It's important to learn trouble shooting and thinking outside the box when it comes to game development. You can only get this through practice.

Pair this with an understanding of GameMaker's programming syntax and building something can be easy with a little research. And math. Lots of math.

Just doing a first person camera as you are asking requires knowledge of 3d vectors and trigonometry. These are the kinds of things you will be dealing with.
 
M

Madeon Unity

Guest
Ah, then you won't be able to make a 3D game. You'll just keep having to ask people for code drops at that rate.

Start small, simple, and in 2D. Look up some tutorials and follow them through until you feel comfortable with GameMaker.

It's important to learn trouble shooting and thinking outside the box when it comes to game development. You can only get this through practice.

Pair this with an understanding of GameMaker's programming syntax and building something can be easy with a little research. And math. Lots of math.

Just doing a first person camera as you are asking requires knowledge of 3d vectors and trigonometry. These are the kinds of things you will be dealing with.
Ah.. Bugs are normal.. Ok. But I do know how to make 2D games.. So far. I think.
 
N

Not Alan

Guest
Please help :( i am trying to make a maze game in first person but i don't know how..
Don't listen to those who say 3d with gamemaker is hard and you shouldn't go for it. I found the tutorials by Tristan Batchler very helpful when I wanted to learn how to work with 3d. It is not as hard as people make it seem. With tutorials like that and the gamemaker guide, you can become pretty good at it.
 
The first thing to do is to learn how to set your view and projection. In gms1, that can be done with the d3d_set_projection_ext() function. The first 3 arguments, are the position of the camera, the second three are the point that the camera is looking at, the third three are the up vector (must not be parallel to direction camera is looking). The rest of the arguments are (vertical) field of view, aspect ratio (width/height of view port), and then the near and far clipping distances (nothing nearer to the camera along the view's z axis than the near clipping distance will be drawn, nothing farther along the view's z axis than the far clipping distance will be drawn). The view's z axis points in the direction that the camera is looking.

In fact, you don't even need to use the built-in functions to create view or projection matrices. They are actually stored in gml as 16 element arrays, so you can build those matrices manually in gml. Learning how those matrices are constructed (and why) is a very good learning experience for anybody planning to work with 3d.

Actually, no. The first thing you need to do is learn about coordinate systems. When you use a perspective projection in gms1, using built-in functions, then you will be in a left-handed coordinate system. The handedness of the coordinate system defines the spacial relationship between the x, y, and z axes. To determine which coordinate system you are in, point your index finger in the +x direction (in world space), your middle finger in the +y direction, and your thumb in the +z direction. If you can do that with your left hand, then you are in a left-handed coordinate system. If you can do that with your right hand, then you are in a right-handed coordinate system. Example of doing this with a right-handed coordinate system: http://www.csharphelper.com/understanding_wpf_3d_2.png

The coordinate system is determined by the view and projection matrices, as well as your display (but the display is basically a constant, i.e., won't change). Note that while the built-in perspective projection functions will create a left-handed coordinate system, the built-in orthographic projection functions (including gamemaker's default 2d views), all use a right-handed coordinate system. This means going from orthographic (or 2d) to perspective will result in a change from right-handed to left-handed coordinate systems. The consequence of this is that everything will appeared mirrored: geometry, rotation angles, textures. Also far-side culling will be reversed. A change in coordinate system does not affect the logic of the game however, except if you need to distinguish between left and right.
 
Last edited:
Top