A realistic, simple driving system, based on physics
Map attached, triggers not in library format but you'll be able to see how its done quite easily.
Will answer any questions, cheers maaate
also: I'm looking for some talented map makers skilled in either terraining, art (2D / 3D), or general scripting / data editor to join a team. So if you're looking for work, or a side project, click here and sign up
Awesome :D I was thinking about a Zombie Driving Game :D Killing zombies while powersliding in a corner an smack all brains out of the infested terran :D
This system gave me an idea, what if you can integrate a auto aiming weapon system to work along side it?
Think twisted metal.
Maybe easier if you make different cars with different abilities, and use the driving system to allow players to drive...
Too bad there is no ramp system to make the car actually fly in the air and land, while firing rockets.
I suppose this can easily be attributed to air units. That's amazing. We could have some really interesting Enhanced RTS based maps now too. Crazy Air Combat, if I ever get air units to actually keep flying while attacking, and realistic vehicular combat.
I wanna' take a closer look at this...
You also will be able to reproduce this for spacecrafts / aircrafts, simply change the unit it works for! And give the unit you're using a speed of 1, and a turn rate between 180 and 360.
Also for air units, if you want it to be realistic you'll have to change the physics around a bit (There is no friction in space, for example) But if you're happy with that style of movement in the air then it wont matter
You have set
Friction Force.x = 0.0 - CONSTANT_FRICTION * v.x
This makes the friction proportional to the velocity (later on). I think you meant to use the unit vector, <u.x,u.y>. It should read
Friction Force.x = 0.0 - CONSTANT_FRICTION * u.x
Likewise change v.y to u.y in the next line. You might have to tinker with the value of the friction constant once you do this, but it will make the physics a bit more realistic.
I haven't finished checking through all the code yet, but it is really inventive. I like all the possibilities it opens up.
I might be interested in joining your map project, but I have to run for now. Keep it up!
It's friggin' sweet. I'm currently playing around with making Vikings Dog Fight each other, it's absolutely nerd-tastic!
I dunno' how to make a script like this work very every unit that is built though. I know how to run triggers generically in WE, but GE seems a little different. Any suggestions?
I tried changing both values to u.x and u.y instead of v.x and v.x, but the hellion appeared to shoot off in one direction as i started my map. I'll have a think about this as I think I understand you to be right here. So perhaps my map has expressed something incorrectly.
Also, definitely do mate. If you're skilled enough then co-lead designer can be yours. Otherwise if you have some side projects, you can contribute as little or as much as you want and credit will still be shared (I need someone to upload to US servers either way.) That and all help is invaluable =].
@Pimpmunkeh: Go
Good point, I'll try re arrange the coding to make it easier to apply to every unit and then upload for you
@HaggisNZ: Go
I figured out what's wrong with my fix. Instead of using u.x, use v.x/Speed. The problem occurs when Speed is 0, so you have to use conditionals.
I tried this out, and what it says is 'error: trying to divide by zero' even after clicking to move the car
The car would move but I'm pretty sure it was just moving by its base speed of 1, and not by triggers, so it seems unable to pick up speed with the new formula?
I changed the constants around but this still stayed the same.
I did a Debug check on speed in the previous system and it doesn't stay on zero
are you sure it was previously proportional to speed?
I'm away from my computer. I can't write out the code write now, but you have to put in if/then/else's to prevent a division by zero. That's what I meant by conditionals. I'll be home in a couple hours. I'll write it out then.
A realistic, simple driving system, based on physics
Map attached, triggers not in library format but you'll be able to see how its done quite easily.
Will answer any questions, cheers maaate
also: I'm looking for some talented map makers skilled in either terraining, art (2D / 3D), or general scripting / data editor to join a team. So if you're looking for work, or a side project, click here and sign up
@HaggisNZ: Go
Very impressive.
Imagine now you add this system to a mod. Let's go create a "Race Mod". Well.... When the next driving championship will be occur ?
@HaggisNZ: Go
nice work, i plan on putting it in my Movie Makers map just for fun
Dude this is friggin' awesome. Nice work man. SO many applications for this. Thank you very much!!
Awesome :D I was thinking about a Zombie Driving Game :D Killing zombies while powersliding in a corner an smack all brains out of the infested terran :D
I wonder if this system could ne modiefied to adjust it to spacecrafts :)
This system gave me an idea, what if you can integrate a auto aiming weapon system to work along side it?
Think twisted metal.
Maybe easier if you make different cars with different abilities, and use the driving system to allow players to drive... Too bad there is no ramp system to make the car actually fly in the air and land, while firing rockets.
Someone needs to give that Hellion Reaper jump.
@HaggisNZ: Go
I suppose this can easily be attributed to air units. That's amazing. We could have some really interesting Enhanced RTS based maps now too. Crazy Air Combat, if I ever get air units to actually keep flying while attacking, and realistic vehicular combat. I wanna' take a closer look at this...
Hey thanks for your comments!
To answer a few questions; you can definitely integrate an auto aiming turret system along with this. Find out how to here; http://starcraft.incgamers.com/forums/showthread.php?t=3898
You also will be able to reproduce this for spacecrafts / aircrafts, simply change the unit it works for! And give the unit you're using a speed of 1, and a turn rate between 180 and 360.
Also for air units, if you want it to be realistic you'll have to change the physics around a bit (There is no friction in space, for example) But if you're happy with that style of movement in the air then it wont matter
I just wanted to pop in and say this is just all kinds of awesome, great work! :)
You have set Friction Force.x = 0.0 - CONSTANT_FRICTION * v.x
This makes the friction proportional to the velocity (later on). I think you meant to use the unit vector, <u.x,u.y>. It should read
Friction Force.x = 0.0 - CONSTANT_FRICTION * u.x
Likewise change v.y to u.y in the next line. You might have to tinker with the value of the friction constant once you do this, but it will make the physics a bit more realistic.
I haven't finished checking through all the code yet, but it is really inventive. I like all the possibilities it opens up.
I might be interested in joining your map project, but I have to run for now. Keep it up!
@HaggisNZ: Go
It's friggin' sweet. I'm currently playing around with making Vikings Dog Fight each other, it's absolutely nerd-tastic!
I dunno' how to make a script like this work very every unit that is built though. I know how to run triggers generically in WE, but GE seems a little different. Any suggestions?
@HaggisNZ: Go
This is smooth, even though i noticed you use action Move unit instantly every 0.01 seconds (and change its facing also)
@Mathhole: Go
Thanks for reading over the code,
I tried changing both values to u.x and u.y instead of v.x and v.x, but the hellion appeared to shoot off in one direction as i started my map. I'll have a think about this as I think I understand you to be right here. So perhaps my map has expressed something incorrectly.
Also, definitely do mate. If you're skilled enough then co-lead designer can be yours. Otherwise if you have some side projects, you can contribute as little or as much as you want and credit will still be shared (I need someone to upload to US servers either way.) That and all help is invaluable =].
@Pimpmunkeh: Go Good point, I'll try re arrange the coding to make it easier to apply to every unit and then upload for you
@progammer: Go
in my experience, 0.01 has always been low enough to make a unit slide smoothly
do you mean there's a better way?
@HaggisNZ: Go I figured out what's wrong with my fix. Instead of using u.x, use v.x/Speed. The problem occurs when Speed is 0, so you have to use conditionals.
@Mathhole: Go
I tried this out, and what it says is 'error: trying to divide by zero' even after clicking to move the car The car would move but I'm pretty sure it was just moving by its base speed of 1, and not by triggers, so it seems unable to pick up speed with the new formula?
I changed the constants around but this still stayed the same. I did a Debug check on speed in the previous system and it doesn't stay on zero
are you sure it was previously proportional to speed?
@HaggisNZ: Go
I'm away from my computer. I can't write out the code write now, but you have to put in if/then/else's to prevent a division by zero. That's what I meant by conditionals. I'll be home in a couple hours. I'll write it out then.
Blizzard should implement this. Yesterday.
omg that is EPIC, it looks so cool xD