Advertisement

3D movement engine

Started by February 01, 2000 12:15 PM
10 comments, last by webspynner_99 24 years, 8 months ago
I need help with a 3D movement engine maybe for a first person shooter. All I want is the mathematical formulas needed to plot the position of objects relative to the viewer and for moving the player based on a direction and a distance (vector quantatie). I''m using a 3D coordinate system to locate each object, but what I need to do is convert this to a first person view. I think the idea is that the position of the object on the screen is based on what angle it is to you and how far away it is. You''ll probably want to shoot me, I''m doing this in a web browser using java-script (no, not Java, java-script), so I need to convert the x, y, z coordinate to something viewable defined by an x and y axis and width and height for on the screen. If you want, you can email me and request the current code, see where I''m at. You''ll need IE4+ to view it.
Okay, so you want to program without using a programming language. ---*sigh*--- Oh, boy.
I can''t help you with your problem, but I''d suggest looking into VRML or Java before you get to involved. I''m just afraid that you''ll hit a brick wall on your current path.
Advertisement
I agree. You might think that you are making it easy on yourself by not learning a programming language, and just learning a scripting language, but you''re not. Do you actually know Java or C or anything? If you don''t, learning one of them would make things easier on you in the long run, and will also be pretty fun, and rewarding.
Good luck.
I''m only still learning C. It won''t do me any good to learn C to make a 3D game if I don''t know the formulas for calculating the position of the object. I need the conceptual stuff, not the actual code. I''ve been told that Jscript is very much like C, so I''ve been practicing on that, trying to come up with something that really stretches the technology, kindof testing my ingenuity.
You are wrong. You need to learn how to program before you do anything else. Learn the "formulas" when you actually know how to apply them. You are just spinning your wheels right now.

Jscript is nothing like C. Give me a break. C is like C, Java is like Java, Jscript is like Jscript, etc. Very simple concept. If you want to do 3d programming, learn C or C++. Write some basic apps and go from there. It doesn''t happen overnight, but you will get the hang of it if you stick with it.

There are a lot of articles on this board that deal with the math of 3D. You should go to them. Check out Programming under reference on the left hand side of the main page. Check there first. Also go to Start Here. You''ll get a lot of information. I would check there first and on other site using search engines, before posting a message.

Domini
Advertisement
Actually, learning jscript made it much easier for me to learn C++. It has some syntaxical similarities. Declaring variables, incrementing, objects, functions, it made my life a bit easier when making the move.

Dare To Think Outside The Box
_____________________________
|____________________________|
http://www.inversestudios.com
Write more poetry.http://www.Me-Zine.org
Thanks Domini, INVERSED. I think I might know the problem with my engine. It deals a lot with angles and calculating angles. I realized I had to convert degrees angle to radians to use the trig functions it Jscript. Did that. But I forgot that an inverse trig function would return a degree measure in radians also. So I had an angle, thinking it was in degrees, and tried to convert it to radians. I''ll try to fix that and see where it goes from there.
Maybe he want to write a web bassed game
Hardcore Until The End.
No one said you can''t write a web-based game with C...

>>Actually, learning jscript made it much easier for me to learn C++. It has some syntaxical similarities. Declaring variables, incrementing, objects, functions, it made my life a bit easier when making the move. <<

syntaxical similarities = java does too. why not learn a real language?

the same could be said for qbasic, vb, perl, java, cobol, foxpro, delphi, pascal, bla bla bla. All that you learned was logic. The language itself isn''t any more similar than any other language is. Vb has ''if'' statements. Does that mean if I only knew vb I would be able to program C++ too because it has if statements? no it doesn''t. Any type of scripting/programming will teach you basic logic. Why waste that time learning logic on jscript when you can do so using a real language? There is a lot more power to C++ than most people think there is. Even people that supposedly know what they are doing with it.




This topic is closed to new replies.

Advertisement