Jump to content


Photo

3D Motion


  • This topic is locked This topic is locked
11 replies to this topic

#1 adder_astros

adder_astros

    GMC Member

  • New Member
  • 83 posts
  • Version:GM8

Posted 11 May 2012 - 09:22 PM

I've been experimenting with making games with gml that uses only one object. I've had quite a bit of progress and, long story short, it's no longer a matter of proving whether or not it's possible... believe me, it's possible... it's now a mater of figuring out how to do a lot of things that are needed for a lot of games. I've had to make a lot of things from scratch, since there are a lot of requirements that lack functions for such a thing, motion for example... if there are no objects, then there are no unique x and y values to alter. Now, although I've found a way (a few, actually) to get motion for every unique instance in a game, there's still something that I haven't finished yet: 3D Motion.

I am currently working on a script to include in my games that can be used as a substitute for traditional motion functions. 2D motion wasn't so hard... I even found a more efficient way to do it since I started, but 3D... In case you don't quite understand the gravity of this endeavor, think of a flight simulator that lets you go all over the place. Yaw, Pitch, Roll... the whole thing. Ever play Star Wars: Battlefront 2? Ever play a space battle, get in a star fighter and rip and tear all over the place at every angle??? Well, I need something that does that.

There are a few challenges: Rotation on the X axis and the Y axis, properly incrementing the values (you don't move forward as fast the more you climb. in fact, climb far enough and your direction changes by 180 degrees (and when you roll, you see a similar effect on how steep your climb angle is... and depending on the roll angle, climbing could change your direction + or -45 degrees, etc)). It's been pretty tricky so far, but it's coming along. I suppose that, if I have a question here, I have two:

1. If you're interested in this, say so. I don't mind sharing my results.
and
2. Did someone do this, already? Because I could find better usage for my time than re-doing something that's already done.

I've included a little code to let you know that I mean business. I know a lot of people hesitate to comment on topics like these for fear that they'd be wasting their time trying to explain complex things to people who don't know what they're doing. This is the 2D motion script that I've been using for a while. I'm not going to share the new version just yet.

{

// Motion

    //motion(argument0 , argument1, argument2 , argument3) {
    
    var_mode_01=argument0;       // Mode: 1. Characters,  2. Bullets
    var_object_01=argument1;     // Object: Which ne is it. Based on ID Number
    var_direction_01=argument2;  // Direction: DUH!!!
    var_speed_01=argument3;      // Speed: More of the same
    var_move_x=0;                // X increment, added to the object's X value
    var_move_y=0;                // Y increment, added to the object's Y value

        var_direction_01 = 11.25 * round(var_direction_01 / 11.25);  // 11.25 * 36 = 360

        // Keep the direction variable between 0 and 359
        if(var_direction_01 > 360){ var_direction_01 = var_direction_01 - 360; }
        if(var_direction_01 < 0){ var_direction_01 = var_direction_01 + 360; }
        if(var_direction_01 == 360){ var_direction_01 = 0; }

        // Showtime!
        if(var_direction_01 == 135){    var_move_x = -1.00;   var_move_y = -1.00; }
        if(var_direction_01 == 123.75){ var_move_x = -0.75; var_move_y = -1.00; }
        if(var_direction_01 == 112.5){  var_move_x = -0.50;  var_move_y = -1.00; }
        if(var_direction_01 == 101.25){ var_move_x = -0.25; var_move_y = -1.00; }
        if(var_direction_01 == 90){      var_move_x = 0;    var_move_y = -1.00; }
        if(var_direction_01 == 78.75){  var_move_x = 0.25;  var_move_y = -1.00; }
        if(var_direction_01 == 67.5){   var_move_x = 0.50;   var_move_y = -1.00; }
        if(var_direction_01 == 56.25){  var_move_x = 0.75;  var_move_y = -1.00; }
        if(var_direction_01 == 45){     var_move_x = 1.00;    var_move_y = -1.00; }
        if(var_direction_01 == 33.75){  var_move_x = 1.00;    var_move_y = -0.75; }
        if(var_direction_01 == 22.5){   var_move_x = 1.00;    var_move_y = -0.50; }
        if(var_direction_01 == 11.25){  var_move_x = 1.00;    var_move_y = -0.25; }
        if(var_direction_01 == 0){     var_move_x = 1.00;    var_move_y = 0; }
        if(var_direction_01 == 348.75){ var_move_x = 1.00;    var_move_y = 0.25; }
        if(var_direction_01 == 337.5){  var_move_x = 1.00;    var_move_y = 0.50; }
        if(var_direction_01 == 326.25){ var_move_x = 1.00;    var_move_y = 0.75; }
        if(var_direction_01 == 315){    var_move_x = 1.00;    var_move_y = 1.00; }
        if(var_direction_01 == 303.75){ var_move_x = 0.75;  var_move_y = 1.00; }
        if(var_direction_01 == 292.5){  var_move_x = 0.50;   var_move_y = 1.00; }
        if(var_direction_01 == 281.25){ var_move_x = 0.25;  var_move_y = 1.00; }
        if(var_direction_01 == 270){    var_move_x = 0;    var_move_y = 1.00; }
        if(var_direction_01 == 258.75){ var_move_x = -0.25; var_move_y = 1.00; }
        if(var_direction_01 == 247.5){  var_move_x = -0.50;  var_move_y = 1.00; }
        if(var_direction_01 == 236.25){ var_move_x = -0.75; var_move_y = 1.00; }
        if(var_direction_01 == 225){    var_move_x = -1.00;   var_move_y = 1.00; }
        if(var_direction_01 == 213.75){ var_move_x = -1.00;   var_move_y = 0.75; }
        if(var_direction_01 == 202.5){  var_move_x = -1.00;   var_move_y = 0.50; }
        if(var_direction_01 == 191.25){ var_move_x = -1.00;   var_move_y = 0.25; }
        if(var_direction_01 == 180){    var_move_x = -1.00;   var_move_y = 0; }
        if(var_direction_01 == 168.75){ var_move_x = -1.00;   var_move_y = -0.25; }
        if(var_direction_01 == 157.5){  var_move_x = -1.00;   var_move_y = -0.50; }
        if(var_direction_01 == 146.25){ var_move_x = -1.00;   var_move_y = -0.75; }
        
        // Return the Results
        // I made Arrays for the Player, the AI and the Bullets, so that I could 
        // have a single object that is responsible for multiple objects. 
        if(var_mode_01 == 1){
            fps_comm_01.var_characters_01[var_object_01, 2] += (var_move_x * var_speed_01);
            fps_comm_01.var_characters_01[var_object_01, 3] += (var_move_y * var_speed_01);
        }
                
        if(var_mode_01 == 2){
            fps_comm_01.var_bullets_01[var_object_01, 5] += (var_move_x * var_speed_01);
            fps_comm_01.var_bullets_01[var_object_01, 6] += (var_move_y * var_speed_01);
        }
}

That is all!
  • 0

#2 Jack Indie Box

Jack Indie Box

    GMC Member

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

Posted 11 May 2012 - 09:40 PM

I havn't done anything like this in game maker and im not entirely sure what your asking. but by the way ive done it in xna with and rotation matrixs. no idea if this helps you or even you you know thats best for 3d rotation already, you did mention yaw pitch roll already
  • 0

#3 Gamer3D

Gamer3D

    Human* me = this;

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

Posted 12 May 2012 - 09:17 AM

I've been experimenting with making games with gml that uses only one object.

That's quite simple. A GM object is nothing more than a set of variables and some functions that are called in certain situations; The most commonly used functions are called when the object is created, once per step, and whenever the graphics need to be re-drawn. Calling an object's child function is nothing more than calling a global function that references the object's variables.

The only thing that I'd expect to give you difficulty is creating a collision engine.

Yaw, Pitch, Roll... the whole thing. Ever play Star Wars: Battlefront 2? Ever play a space battle, get in a star fighter and rip and tear all over the place at every angle??? Well, I need something that does that.

Quaternions are a good way to go.

1. If you're interested in this, say so. I don't mind sharing my results.

Just post them and let people decide after. The [ spoiler ] tags are good for keeping posts short.

2. Did someone do this, already? Because I could find better usage for my time than re-doing something that's already done.

Yes, this has been done already. You may be the first to try to fully generalize it (most people just make what they need), but there has been at least one completed contest that required that the game use only one object (If I recall correctly).

This is the 2D motion script that I've been using for a while. I'm not going to share the new version just yet.

Spoiler

So many better ways to do that. Ever heard of sine and cosine? (Also, separating object types into differently named arrays is makes generalization much more difficult)

I am currently working on a script to include in my games that can be used as a substitute for traditional motion functions. 2D motion wasn't so hard... I even found a more efficient way to do it since I started

If the code you gave is any indication, I don't think you found an efficient way.
  • 0

#4 Jack Indie Box

Jack Indie Box

    GMC Member

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

Posted 12 May 2012 - 09:41 AM

Quaternions are a good way to go.

thats what i meant lol
  • 0

#5 adder_astros

adder_astros

    GMC Member

  • New Member
  • 83 posts
  • Version:GM8

Posted 12 May 2012 - 03:22 PM

Thanks for the input so far. I'm sure sine, cosine, tangent, and quaternions are useful for solving problems like these, but I am not a math guy... most people are not math guys. No, I'm the guy that has to practically increment by hand on a piece of graphing paper... trying to find the best minimum unit to increment by... trying to identify trends and patterns until the finally figure out that you have to add (or subtract) 0.022 every degree to either x or y... alternating every 90 degrees... being sure to add (or subtract) an additional 0.002 every ninth degree to make up for the lost precision only to realize that Game maker deals exclusively in doubles and to then hope to GOD that the altered values don't screw up your precious equation (thank heavens they do not) only to then move on to the next hurdle: doing the same thing in 3D.

At any rate, as I said earlier... I'm pretty sure I can do it... I just don't want to waste time doing it if the code already exists in here somewhere... but then again, if a math guy did it, I should probably just stick to doing it the way the Cave Men Do!

Also @Gamer3D:
One of the main reasons that the motion code I included looks so primitive is because it's based on the motion script I developed for Java games. Java isn't made exclusively or even primarily for making games, so there is no built in motion scripts like you have with Game Maker, so if you want to make a game with moving graphics, you either have to make your own motion script, or you have to find something someone else did and incorporate it into your script... which is what it is. I chose the former. See, with Java all X and Y values are integers... which means that the smallest increment value you can use is 1... which is a pain. All I did to adapt the Java code to GML was convert all those numbers between 1 and 4 to numbers divisible by .25 and then re-organize them to make up for the fact that Java considers 0 degrees to be the top of the screen while Game Maker considers it to be to my right. At any rate, it works and it's not resource intensive.

The recent upgrade is an array, so instead of asking whether or not direction is equal to this or that, you just use the array, so it's only one query and not 32... not to mention the other things that I removed since they're no longer needed, so yes it is more efficient. Depending on how good of a math guy you are, I may have just given away the surprise. Shame on you.

Edited by adder_astros, 12 May 2012 - 03:40 PM.

  • 0

#6 Jack Indie Box

Jack Indie Box

    GMC Member

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

Posted 12 May 2012 - 03:40 PM

no offense but im pretty sure YOU cant, 3d rotation involves proper math and you say your not good at it. Also why on earth are you trying to do this in game maker let alone reinventing the wheel? I would go use a proper 3d engine like XNA or unity or unreal ed or cryengine 3. they are all way better at 3d and already support stuff like math help in xna so you dont have to do any math really, matrix and Quaternions quite easily.
  • 0

#7 adder_astros

adder_astros

    GMC Member

  • New Member
  • 83 posts
  • Version:GM8

Posted 12 May 2012 - 03:46 PM

no offense but im pretty sure YOU cant, 3d rotation involves proper math and you say your not good at it. Also why on earth are you trying to do this in game maker let alone reinventing the wheel? I would go use a proper 3d engine like XNA or unity or unreal ed or cryengine 3. they are all way better at 3d and already support stuff like math help in xna so you dont have to do any math really, matrix and Quaternions quite easily.


Jack, I can show you better than I can tell you. Just because you (no offense) had the gall to tell Adder_Astros that he can't, I'm gonna finish it today and then post the results in this topic so you can find them. As for reinventing the wheel, since I don't have this magical wheel that you keep eluding to (rolls eyes in disbelief), I just have to make my own. That's how it works.
  • 0

#8 adder_astros

adder_astros

    GMC Member

  • New Member
  • 83 posts
  • Version:GM8

Posted 12 May 2012 - 09:26 PM

Bad news, Good news, Better news:

Bad: I did not finish today. It climbs right, it turns like a car. You can settle for that... if you're making an air combat game for SNES, but Battlefront II it is not. Also couldn't get the camera to stay on my tail when I climbed. Roll didn't work right. I am angry.

Good: Two out of Three Ain't Bad.

Better: I found this http://gmc.yoyogames...opic=137243&hl= and I actually understand how to use it!

Like I said, two outta three ain't bad.
  • 0

#9 Gamer3D

Gamer3D

    Human* me = this;

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

Posted 13 May 2012 - 02:09 AM

I havn't done anything like this in game maker and im not entirely sure what your asking. but by the way ive done it in xna with and rotation matrixs. no idea if this helps you or even you you know thats best for 3d rotation already, you did mention yaw pitch roll already

thats what i meant lol

I'd like to point out that rotation matrices are also perfectly valid ways of storing 3-dimensional rotations.


Thanks for the input so far. I'm sure sine, cosine, tangent, and quaternions are useful for solving problems like these, but I am not a math guy... most people are not math guys. No, I'm the guy that has to practically increment by hand on a piece of graphing paper...

Then this is probably not for you.

At any rate, as I said earlier... I'm pretty sure I can do it... I just don't want to waste time doing it if the code already exists in here somewhere... but then again, if a math guy did it, I should probably just stick to doing it the way the Cave Men Do!

See, with Java all X and Y values are integers.

Only if you insist on using integers for it. Otherwise, use floats or doubles and truncate to an integer when you need to display something. Even when restricting yourself to integers, you can use fixed-point rational numbers to have greater precision at the cost of range (Cut minimum and maximum representable value in half to make increments be 0.5)


The recent upgrade is an array, so instead of asking whether or not direction is equal to this or that, you just use the array, so it's only one query and not 32... not to mention the other things that I removed since they're no longer needed, so yes it is more efficient. Depending on how good of a math guy you are, I may have just given away the surprise. Shame on you.

2 table lookups could be faster than sine and cosine (Especially in GM, where a function call is slower than almost any other operation), but you lose enough precision (that and/or waste enough memory) along the way to make this not worthwhile.
  • 0

#10 Jack Indie Box

Jack Indie Box

    GMC Member

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

Posted 13 May 2012 - 09:47 AM

Two out of Three Ain't Bad.


well no one said you couldnt do 2. 3 is where it gets tricky... and youll most likely need Quaternions / maticies
  • 0

#11 adder_astros

adder_astros

    GMC Member

  • New Member
  • 83 posts
  • Version:GM8

Posted 13 May 2012 - 08:26 PM

Well, if it ain't the Passive Aggressive Twins again. What, are you trying to get this topic locked or something?? Don't give me that "I'm just trying to help" or "Offer Constructive Criticism" mess, either. If someone crapped all over you like that, I doubt you'd respond with a hug. You want to play it like that, fine.

You know what? I was done yesterday. You know, Jack, you're right... no one said. No one said 'Make Battlefront II... which was what I was trying to do. This was all about 3D Motion (moving on the X, Y, Z axis (without any bumps or stops for extra credit)), not any particular type. I've already got the script for that. So what if it turns like a car. What the graphics are doing aren't the issue... math is the issue. Anyway, here's the code:

{

// Motion

    //motion(argument0 , argument1, argument2 , argument3, argument4, argument5) {
    
    var_mode_01=argument0;
    var_object_01=argument1;
    var_direction_01=argument2;   // Turn
    var_direction_02=argument3;   // Climb
    var_direction_03=argument4;   // Roll (not used yet.)
    var_speed_01=argument5;       // The Speed
    var_speed_02=0;               // Your forward movement is altered depending on your climb angle
    var_move_x=0;
    var_move_y=0;
    var_move_z=0;

        // Keep the direction variable between 0 and 359
        if(var_direction_01 > 360){ var_direction_01 -= 360; }
        if(var_direction_01 < 0){ var_direction_01 += 360; }
        if(var_direction_01 == 360){ var_direction_01 = 0; }
        
        if(var_direction_02 > 360){ var_direction_02 -= 360; }
        if(var_direction_02 < 0){ var_direction_02 += 360; }
        if(var_direction_02 == 360){ var_direction_02 = 0; }
        
        /* Not Used
        if(var_direction_03 > 360){ var_direction_03 -= 360; }
        if(var_direction_03 < 0){ var_direction_03 += 360; }
        if(var_direction_03 == 360){ var_direction_03 = 0; }
        */

        // 11.25 * 32 = 360 (I needed this for Java)
        var_direction_01 = 11.25 * round(var_direction_01 / 11.25);
        var_direction_02 = 11.25 * round(var_direction_02 / 11.25);
        var_direction_03 = 11.25 * round(var_direction_03 / 11.25); // Not Used

        // Showtime!
        if(var_direction_02 == 135){    var_move_z = 0.50;     var_speed_02 = -0.50; }
        if(var_direction_02 == 123.75){ var_move_z = 0.625;    var_speed_02 = -0.38; }
        if(var_direction_02 == 112.5){  var_move_z = 0.75;     var_speed_02 = -0.25; }
        if(var_direction_02 == 101.25){ var_move_z = 0.875;    var_speed_02 = -0.13; }
        if(var_direction_02 == 90){     var_move_z = 1.0;      var_speed_02 = 0.00; }
        if(var_direction_02 == 78.75){  var_move_z = 0.875;    var_speed_02 = 0.13; }
        if(var_direction_02 == 67.5){   var_move_z = 0.75;     var_speed_02 = 0.25; }
        if(var_direction_02 == 56.25){  var_move_z = 0.625;    var_speed_02 = 0.38; }
        if(var_direction_02 == 45){     var_move_z = 0.50;     var_speed_02 = 0.50; }
        if(var_direction_02 == 33.75){  var_move_z = 0.375;    var_speed_02 = 0.63; }
        if(var_direction_02 == 22.5){   var_move_z = 0.25;     var_speed_02 = 0.75; }
        if(var_direction_02 == 11.25){  var_move_z = 0.125;    var_speed_02 = 0.88; }
        if(var_direction_02 == 0){      var_move_z = 0;        var_speed_02 = 1.00; }
        if(var_direction_02 == 360){    var_move_z = 0;        var_speed_02 = 1.00; }
        if(var_direction_02 == 348.75){ var_move_z = -0.125;   var_speed_02 = 0.88; }
        if(var_direction_02 == 337.5){  var_move_z = -0.25;    var_speed_02 = 0.75; }
        if(var_direction_02 == 326.25){ var_move_z = -0.375;   var_speed_02 = 0.63; }
        if(var_direction_02 == 315){    var_move_z = -0.50;    var_speed_02 = 0.50; }
        if(var_direction_02 == 303.75){ var_move_z = -0.625;   var_speed_02 = 0.38; }
        if(var_direction_02 == 292.5){  var_move_z = -0.75;    var_speed_02 = 0.52; }
        if(var_direction_02 == 281.25){ var_move_z = -0.875;   var_speed_02 = 0.13; }
        if(var_direction_02 == 270){    var_move_z = -1.00;    var_speed_02 = 0.00; }
        if(var_direction_02 == 258.75){ var_move_z = -0.875;   var_speed_02 = -0.13; }
        if(var_direction_02 == 247.5){  var_move_z = -0.75;    var_speed_02 = -0.25; }
        if(var_direction_02 == 236.25){ var_move_z = -0.625;   var_speed_02 = -0.38; }
        if(var_direction_02 == 225){    var_move_z = -0.50;    var_speed_02 = -0.50; }
        if(var_direction_02 == 213.75){ var_move_z = -0.375;   var_speed_02 = -0.63; }
        if(var_direction_02 == 202.5){  var_move_z = -0.25;    var_speed_02 = -0.75; }
        if(var_direction_02 == 191.25){ var_move_z = -0.125;   var_speed_02 = -0.88; }
        if(var_direction_02 == 180){    var_move_z = 0.00;     var_speed_02 = -1.00; }
        if(var_direction_02 == 168.75){ var_move_z = 0.125;    var_speed_02 = -0.88; }
        if(var_direction_02 == 157.5){  var_move_z = 0.25;     var_speed_02 = -0.75; }
        if(var_direction_02 == 146.25){ var_move_z = 0.375;    var_speed_02 = -0.63; }

       // var_speed_02 is how much of an affect your climb angle will have on your speed.

        if(var_direction_01 == 135){    var_move_x = -1.00;   var_move_y = -1.00; }
        if(var_direction_01 == 123.75){ var_move_x = -0.75;   var_move_y = -1.00; }
        if(var_direction_01 == 112.5){  var_move_x = -0.50;   var_move_y = -1.00; }
        if(var_direction_01 == 101.25){ var_move_x = -0.25;   var_move_y = -1.00; }
        if(var_direction_01 == 90){     var_move_x = 0;       var_move_y = -1.00; }
        if(var_direction_01 == 78.75){  var_move_x = 0.25;    var_move_y = -1.00; }
        if(var_direction_01 == 67.5){   var_move_x = 0.50;    var_move_y = -1.00; }
        if(var_direction_01 == 56.25){  var_move_x = 0.75;    var_move_y = -1.00; }
        if(var_direction_01 == 45){     var_move_x = 1.00;    var_move_y = -1.00; }
        if(var_direction_01 == 33.75){  var_move_x = 1.00;    var_move_y = -0.75; }
        if(var_direction_01 == 22.5){   var_move_x = 1.00;    var_move_y = -0.50; }
        if(var_direction_01 == 11.25){  var_move_x = 1.00;    var_move_y = -0.25; }
        if(var_direction_01 == 0){      var_move_x = 1.00;     var_move_y = 0; }
        if(var_direction_01 == 360){    var_move_x = 1.00;    var_move_y = 0; }
        if(var_direction_01 == 348.75){ var_move_x = 1.00;    var_move_y = 0.25; }
        if(var_direction_01 == 337.5){  var_move_x = 1.00;    var_move_y = 0.50; }
        if(var_direction_01 == 326.25){ var_move_x = 1.00;    var_move_y = 0.75; }
        if(var_direction_01 == 315){    var_move_x = 1.00;    var_move_y = 1.00; }
        if(var_direction_01 == 303.75){ var_move_x = 0.75;    var_move_y = 1.00; }
        if(var_direction_01 == 292.5){  var_move_x = 0.50;    var_move_y = 1.00; }
        if(var_direction_01 == 281.25){ var_move_x = 0.25;    var_move_y = 1.00; }
        if(var_direction_01 == 270){    var_move_x = 0;       var_move_y = 1.00; }
        if(var_direction_01 == 258.75){ var_move_x = -0.25;   var_move_y = 1.00; }
        if(var_direction_01 == 247.5){  var_move_x = -0.50;   var_move_y = 1.00; }
        if(var_direction_01 == 236.25){ var_move_x = -0.75;   var_move_y = 1.00; }
        if(var_direction_01 == 225){    var_move_x = -1.00;   var_move_y = 1.00; }
        if(var_direction_01 == 213.75){ var_move_x = -1.00;   var_move_y = 0.75; }
        if(var_direction_01 == 202.5){  var_move_x = -1.00;   var_move_y = 0.50; }
        if(var_direction_01 == 191.25){ var_move_x = -1.00;   var_move_y = 0.25; }
        if(var_direction_01 == 180){    var_move_x = -1.00;   var_move_y = 0; }
        if(var_direction_01 == 168.75){ var_move_x = -1.00;   var_move_y = -0.25; }
        if(var_direction_01 == 157.5){  var_move_x = -1.00;   var_move_y = -0.50; }
        if(var_direction_01 == 146.25){ var_move_x = -1.00;   var_move_y = -0.75; }
        
        
        // Return the Results
        if(var_mode_01 == 1){
            command_aces_01.x += ((var_move_x * var_speed_01) * var_speed_02);
            command_aces_01.y += ((var_move_y * var_speed_01) * var_speed_02);
            command_aces_01.z += (var_move_z * var_speed_01);

        }
}

I have a demo of a little flying saucer flying around a big flying saucer. I would have uploaded it and posted a link, but this wasn't about a demo... this was about math. It still turns like a car and it still won't roll... but this whole debate wasn't over turning like an airplane vs turning like a car, was it? No, it was about math. So I guess I'll buy myself a Klondike bar to celebrate. Besides, it actually looks kinda nice turning like a car. Instead of altering the ROLL value with a push of the button, I just arrange it so that it rolls automatically when you turn... just for the look and feel of it and not to affect the motion... no more than 45 degrees depending on how high the climb value is (less the further away from climb 0 or climb 180 you get). You can turn when you go strait up or down... but you won't actually move in the turn direction until you level off. It actually looks awesome in gameplay. But enough about that. This isn't about gameplay... it's about math. I also haven't figured out how to keep the camera on my tail when I climb. No matter what the XY direction is, the camera is right where it should be... but when I climb, the camera doesn't climb with it. That is a pain... but that doesn't matter, because this isn't about what the camera does when, no one said anything about a camera... this is about math, and as far as math is concerned, I made a 3D Motion script yesterday. I even told you about it, remember, Jack? Man, what happened? You seemed so cheerful and upbeat until Gamer showed up and Cut and Paste 'a Palooza broke out.

... and Gamer, you need to settle down. I have working Beta after working Beta, all of which using my Integer-laden scripts... but they're all working. My turns are flawless. I don't have lag. I don't have memory leaks. It all works fine. All you've given me is what if and maybe. You're not helping at all... you're just being offensive. What am I supposed to believe? All of these baseless claims about poor performance based solely on you looking at my code, or two thumbdrives full of GML, Java, ActionScript, C++, PHP, SQL and JavaScript coding that proves without queston that the 2D Motion Script that I made works and works fine? I used to have a buddy like you. Every sentence always started with "Why don't you just" or "This works better"... you'll notice I said "used to". I'll tell you like I told him: I may not be a math expert, but one thing I do know is that there's more than one way to get the right answer and one thing I learned from women is that there's always a better one than the one you have. I don't even understand why you posted here if my humble code is so far beneath you. Look, it works... and good ol' fashioned Lowest Practical Unit Incrementation never gets depreciated. The only reason I even posted that 2D Motion code was to show that I'm not just some lazy lump that wants someone to come in and do all the work for me, so way to totally miss the point on that one.

Look, I don't expect you guys to understand. I'm not a math guy... I'm a Programmer. It's what I went to school for. It's how I make my money. I get results and I love to make improvements. Drag and Drop is nice, but you don't learn Java by Dragging and Dropping. You learn Java by Inventing Wheels. I mean, why are any of us in here trying to make games? There are tons of game already out there supremely better than anything any of us have ever made. Well, I make Motion Scripts for the same reason. The guys that made Linux did it for the same reason. If you can't understand that, it really is your loss.

I'm still gonna keep working on this because I don't really like the one I found. You're all over the place with that thing. With me, the word 'Tailspin' comes to mind. I want more control than that. Also, to make the project a little sexier, I'm gonna put it in a DLL (that's C++ with Code::Blocks (Code::Blocks... another Wheel 2.0 )) and maybe also include a lot of awesome camera angles. I won't get into how I plan to pass and retrieve the info. You two'd probably just criticize my strategy, anyway. As for the rest of you, I'll start another topic when I have more substancial progress. This one all Passive Aggressived up.

... and I'm sorry I couldn't blow my top and cuss everybody out and get the topic locked and get thrown out on my butt.

... but seriously, if you guys just want to argue, just say your good byes and stop posting here.

Edited by adder_astros, 13 May 2012 - 09:00 PM.

  • 0

#12 TheSnidr

TheSnidr

    That guy

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

Posted 13 May 2012 - 09:20 PM

The topic started out nicely, and your questions were answered - quaternions and rotation matrices. I believe it's time to close this discussion
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users