Sign in to follow this  
Axesor

Need help. I'm a newb here.

Recommended Posts

Axesor    100
Hello. I have been in C++ for quite some time. I always wanted to do 3-D games. Maybe one day make a clone of StarWars. Anyway, I started small. I made some blocks colored them and got him walking in a white void. My problem is this: I can't get the guy to rotate and and go in that direction that he is positioned in. What is a Camera? I hear about it alot and I don't know what it is and how to use it. After a few steps of the guy walking, I want the view to follow him. How do you make spheres? How do you get shapes to have textures? If you answer any of these questions, Thank You. ~Axesor

Share this post


Link to post
Share on other sites
MARS_999    1627
Quote:
Original post by Axesor
Hello. I have been in C++ for quite some time. I always wanted to do 3-D games. Maybe one day make a clone of StarWars. Anyway, I started small. I made some blocks colored them and got him walking in a white void. My problem is this:
I can't get the guy to rotate and and go in that direction that he is positioned in. What is a Camera? I hear about it alot and I don't know what it is and how to use it. After a few steps of the guy walking, I want the view to follow him. How do you make spheres? How do you get shapes to have textures?


If you answer any of these questions, Thank You.

~Axesor


Well if you been working with C++ for sometime now you are going to have to do the same with OpenGL for there is a lot of information to learn with OpenGL. Have you looked at NeHe's tutorials? The sphere is all math based calculations and you can either do it in immediate mode or send it as VA, VBO's. The camera is very important due to you need to understand how to use it to point it at the scene. I recommend following some of NeHe's tutorials or buying "OpenGL Game Programming" book by Kevin and Dave the staff here at gamedev. The book is a great place for you to start learning OpenGL. As for textures you will need to use or code your own texture loader and then upload them as texture objects.

Share this post


Link to post
Share on other sites
Axesor    100
I have. I can't find anything about pheres or moving stuff in a 360 rotation rather than view.
~ About the book. I will try but I don't know. I'll look into NeHe's stuff.

Share this post


Link to post
Share on other sites
LilBudyWizer    491
The camera is the viewer. It represents the person setting at the computer. The near plane represents the screen. A projection is done by finding the intersection of a line from the camera to the vertex with the near plane. That's done using similar triangles, i.e. if all the interior angles of two triangles are the same then the ratio's of corresponding sides are the same.

Share this post


Link to post
Share on other sites
Undeadlnsanity    233
A camera is basically a viewpoint. A 1st person camera is where there's no visible model in front of the camera that you can control, instead, you are the character. If you've played a first-person shooter then you'll understand this concept. A third-person camera is one that follows a model around. The camera (viewpoint) stays behind the model and can usually be spun around the model (character) and zoomed in/out. Most MMORPG's use a 3rd person camera as their default camera.

Excellent OpenGL sphere tutorial.

Best of luck!

Share this post


Link to post
Share on other sites
haegarr    7372
Spheres: either you use the OpenGL Utility (glu) library function gluSphere, or else you have to build spheres "by hand" (means to create yourself faces, either triangles or quadrangles, that form a sphere).

Rotation: Use glRotate function to perform a rotation. However, you may be surprised if the function does not exactly what you wants. You have to be aware that the net transformation is sensitive to the order of the particular transformations it is build from.

Texturing: There is definitely a tutorial on texturing in NeHe.

Camera: Ups, LilBudyWizer has already answered.

3rd person cam: That is a little bit tricky. Look this threads:
http://www.gamedev.net/community/forums/topic.asp?topic_id=359381
http://www.gamedev.net/community/forums/topic.asp?topic_id=359642
(especially my answers ;-)

BTW: However, I would suggest you to make smaller steps. The 3D stuff is a very wide field, and some caveats are waiting for you. Do the basics right, and you'll succeed.

Share this post


Link to post
Share on other sites
Axesor    100
Thank you all. Where did you start out in OpenGL?
But back to the topic, I understand the view points. It's glRotatef, glTranslatef, and my DrawModel(GLfloat x, GLfloat y, Glfloatz) that I'm having a tough time with. I can't seem to get it to move right. But I'll look into this =)
Once again, Thank You.
~Axesor

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
computer says no

If only you knew how funny that was... Little Britain!

Anyways, ignore that slightly random comment, you'll probably only understand it if you're from the UK.

I started with NeHe's tutorials actually. I read them through 2/3 times so that I understood it and then I would create a blank project and try to code it off by heart. If I made a couple of errors I look back at the tutorial and corrected them.

Share this post


Link to post
Share on other sites
rip-off    10979
Quote:
Original post by Anonymous Poster
Quote:
computer says no

If only you knew how funny that was... Little Britain!

Anyways, ignore that slightly random comment, you'll probably only understand it if you're from the UK.

I started with NeHe's tutorials actually. I read them through 2/3 times so that I understood it and then I would create a blank project and try to code it off by heart. If I made a couple of errors I look back at the tutorial and corrected them.


personally i prefer not to do that. i prefer to take a tutorial, get it working and then go through it and find out what it does, piece by piece.

learning off all those function names before you've ever used them... ugh

Share this post


Link to post
Share on other sites
Axesor    100
I want to know all functions by heart ,but what I believe is if you dedicate yourself to it and use it alot, you will soon know them by heart. For instance, in C++ I hated constructing Sprite handlers. Now, I know how to do it without reffering to it. (Most of the time.)

Anyway, back to the topic,
@UndeadInstantly, that was a great tutorial! It's a whole lot easier using auxSolidSphere() then go through that whole thing ,but when making lightsabers, I need either a model or a flat cylinder that glows, possibly focusing LightPosition[] on it. But thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this