Welcome, Guest. Please login or register.

Author Topic: Trigonometry Question  (Read 3854 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline NickTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1189
    • Show only replies by Nick
Re: Trigonometry Question
« Reply #14 from previous page: May 26, 2008, 03:57:58 PM »
No its not object orientated. Its just like BASIC except simple commands load and move objects around etc. It can keep track of objects. The move commands I have (you can get extra plugins) won't do exactly what I want, so I'm trying to get around them. Its an easy programming language. Within my second day of using it I had made a simple 3D landscape using a displacement map (which was grabbed from a small bitmap I made). A simple 3D object was driveable with the camera following it. It also drove over the landscape properly, well except I didn't even start the problem of it not rolling on the hills, it only pitched up n down. It was a good start I think. No help was needed on that one! Its just this mathematical problem has got me. I've been wanting to make this game for like 10 years! :-)
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Trigonometry Question
« Reply #15 on: May 26, 2008, 04:11:52 PM »
Quote

Nick wrote:
No its not object orientated. Its just like BASIC except simple commands load and move objects around etc. It can keep track of objects. The move commands I have (you can get extra plugins) won't do exactly what I want, so I'm trying to get around them. Its an easy programming language. Within my second day of using it I had made a simple 3D landscape using a displacement map (which was grabbed from a small bitmap I made). A simple 3D object was driveable with the camera following it. It also drove over the landscape properly, well except I didn't even start the problem of it not rolling on the hills, it only pitched up n down. It was a good start I think. No help was needed on that one! Its just this mathematical problem has got me. I've been wanting to make this game for like 10 years! :-)


It's seems quite good... have you tried Blitz3D/BlitzMAX... they are object oriented and I found them pretty easy to get a 3D game together in no time at all... I'll have a look at Dark basic and see how it compares...

Anyway... if you are doing FP then it can be easier to actually update the landscape objects an keep the camera static....

Offline NickTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1189
    • Show only replies by Nick
Re: Trigonometry Question
« Reply #16 on: May 26, 2008, 06:45:46 PM »
I did read a lot about Blitz3D as well as DarkBASIC. For ages I was thinking Blitz, for one it looked quite easy, but also I have BlitzBASIC 2.1 for the Amiga  :-). Looking into it DarkBASIC looks the more powerful and more supported. Not having access to the forums while not registered didn't help either. I couldn't ask any questions. Ultimately I've gone with DB.

I did think about moving everything but the player. At the moment its just 3rd person. The camera is static but it follows the spaceship around. I've just been out and I now have a few new ideas to try out.
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: Trigonometry Question
« Reply #17 on: May 27, 2008, 07:24:50 AM »
Quote
This is getting annoying now. Basically I'm making a 3D space game. I'm new to 3D programming.

3D programming is a very different kind of animal than is 2D. I'm not sure this simple math is sufficient to get your ideas off the ground, really.

Quote
I want to make my spacecraft be able to rotate on all axis (which is simple) and be able to fire thrusters in any direction (on all axis). Its this problem which is halting my project. I've got it to partially work, but it just won't go in the direction the thrusters are facing. Do you have any thoughts? You seem better at maths than me! Once I've got my head around this I'll be happy!

First things first: the 3D formulas I gave above assume degrees as angle units. If your version of cos() and sin() take radians, you need to apply a conversion step just before plugging them into the equations.

Second: your problem has a fairly simply answer. If your thrusters are facing the opposite way of the nose of the ship, then all you need to do is to keep track of where that nose is, and move in that direction. That is, after all, what will happen when a thruster fires. If, on the other hand, you are making a ship with vector thrusts---in other words, where the direction of thrust need not be diametrically opposite to the direction of flight---then things get a whole lot more complex. You need to take into account the fact that the shapeship will not just move forward in space, but rotate on its axis as well. My advice in this case would be to look for this sort of book and work your way from there. But you'll quickly notice that such books do not use simple maths anymore, and for this there is no real remedy.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline NickTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1189
    • Show only replies by Nick
Re: Trigonometry Question
« Reply #18 on: May 29, 2008, 10:49:29 PM »
I've ordered the full version of DarkBASIC now, along with a plugin which makes this sort of thing more simple. When I get it I'll hopefully be able to cure this problem! Thanks for the help!

Nick