Jump to content


Photo
- - - - -

Top-down Car Physics. Drifting, Collisions & Ai.


  • Please log in to reply
129 replies to this topic

#61 njp

njp

    Panda

  • GMC Member
  • 2325 posts
  • Version:GM8

Posted 28 May 2010 - 03:18 AM

u get this error, even with the extreme physics dll in the same folder.
___________________________________________
COMPILATION ERROR in Script: scr_carUpdate
Error in code at line 22:
x = ep_body_get_x(world,body);
^
at position 6: Unknown function or script: ep_body_get_x
  • 0

#62 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 28 May 2010 - 05:28 AM

XtraButter: Thanks, glad you like it :(
Newly Discovered: Damn, i forgot to fix it before releasing, will be fixed in next update :)

u get this error, even with the extreme physics dll in the same folder.
___________________________________________
COMPILATION ERROR in Script: scr_carUpdate
Error in code at line 22:
x = ep_body_get_x(world,body);
^
at position 6: Unknown function or script: ep_body_get_x


Don't forget to import scripts from 'ExtremePhysics.gml' when deciding to use dll instead of extension. I added that information to the mainpost now. :unsure:
  • 0

#63 12warr12

12warr12

    GMC Member

  • GMC Member
  • 678 posts
  • Version:Unknown

Posted 28 May 2010 - 05:51 PM

I had that error too, you need to get the extremephysics.gex, and install it.
  • 0

#64 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 28 May 2010 - 10:35 PM

Can you make a code that when you are hitting gas and break u go really slow smoke comes and u leave skid marks?????

Im a graphich artist not a programmer so can you give the code to Gizm0 he is the programmer thanks!


:)
  • 0

#65 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 28 May 2010 - 11:28 PM

Can you make a code that when you are hitting gas and break u go really slow smoke comes and u leave skid marks?????

Im a graphich artist not a programmer so can you give the code to Gizm0 he is the programmer thanks!


;)


I will add that to the next update, just check back later. :)
  • 0

#66 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 28 May 2010 - 11:47 PM

Can you make a code that when you are hitting gas and break u go really slow smoke comes and u leave skid marks?????

Im a graphich artist not a programmer so can you give the code to Gizm0 he is the programmer thanks!


;)


I will add that to the next update, just check back later. :)


u rock!!!!!!!!!!!!!!!! thanks!!!!!!!!!!!!!
  • 0

#67 njp

njp

    Panda

  • GMC Member
  • 2325 posts
  • Version:GM8

Posted 29 May 2010 - 03:01 AM

I had that error too, you need to get the extremephysics.gex, and install it.

where to i get the gex?
  • 0

#68 12warr12

12warr12

    GMC Member

  • GMC Member
  • 678 posts
  • Version:Unknown

Posted 29 May 2010 - 08:03 AM

search in 'ExtremePhysics' in the DLL forum, it will come the real thread, open, download, and there should be the .gex in the examples folder
  • 0

#69 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 30 May 2010 - 06:53 PM

Updated to 2.1, Turning is adjusted for more realistic steering. Also fixed backwards steering problem and added the small version. I'm not so satisfied with the collisions in the small version yet but it would be stupid to just have a topic for an extremephysics example so i posted it anyways.

Still waiting for my "license refill" from softwrap so i have to use lgm to convert .gmk (gm8) files to GM6 then open it with gm7 lite and edit things like sprites (transparent probs) and then save it as gmk (gm7) and then open with gm8 to see if everything went fine. If files are named wrong or the links is bad , please inform me. :)

Edited by Exylex, 30 May 2010 - 06:55 PM.

  • 0

#70 Newly Discovered

Newly Discovered

    Harmonious Genius

  • New Member
  • 2467 posts
  • Version:GM8

Posted 31 May 2010 - 07:06 AM

nice update!
  • 0

#71 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 31 May 2010 - 10:01 AM

I give you a month to work on your project.
ONE MONTH, AND LOOK AT THE GODLY SKILL YOU HAVE, AND THE AWESOME EXAMPLE YOU HAVE HERE.
I'm in love with this~

Well, now I can finally retire as a GameMaker car physics writer :)
  • 0

#72 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 31 May 2010 - 11:55 AM

Updated to 2.1, Turning is adjusted for more realistic steering. Also fixed backwards steering problem and added the small version. I'm not so satisfied with the collisions in the small version yet but it would be stupid to just have a topic for an extremephysics example so i posted it anyways.

Still waiting for my "license refill" from softwrap so i have to use lgm to convert .gmk (gm8) files to GM6 then open it with gm7 lite and edit things like sprites (transparent probs) and then save it as gmk (gm7) and then open with gm8 to see if everything went fine. If files are named wrong or the links is bad , please inform me. :)


Thanks Dude It rocks!!!

Do you think you can do one for Motorcycles is it possible???

Edited by nesto5000, 31 May 2010 - 12:32 PM.

  • 0

#73 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 31 May 2010 - 03:06 PM

Newly Discovered: Thanks for telling me about turning :D
RamboFox: :) Well, doesn't think i deserve all that praise since i used a physics engine. The version that doesn't use it (small) is far away from perfect, make a perfect non-dll/gex car physics example and people would scrap this ::lmao::
nesto5000: Thanks, Make a thin car and it would look like a mc :P
  • 0

#74 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 01 June 2010 - 12:12 PM

Newly Discovered: Thanks for telling me about turning ;)
RamboFox: :P Well, doesn't think i deserve all that praise since i used a physics engine. The version that doesn't use it (small) is far away from perfect, make a perfect non-dll/gex car physics example and people would scrap this :unsure:
nesto5000: Thanks, Make a thin car and it would look like a mc :o

Forget it. He does not want motorcycles.
But thank you for helping!!!
  • 0

#75 Newly Discovered

Newly Discovered

    Harmonious Genius

  • New Member
  • 2467 posts
  • Version:GM8

Posted 03 June 2010 - 03:58 AM

quick question, where is the force coming from?
can you set it up to choose whether it's front wheel drive or rear wheel drive?
not just that, but when drifting, skid marks are only coming from the rear wheels when really all tires would be sliding.
thanks.
  • 0

#76 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 03 June 2010 - 11:02 AM

quick question, where is the force coming from?
can you set it up to choose whether it's front wheel drive or rear wheel drive?
not just that, but when drifting, skid marks are only coming from the rear wheels when really all tires would be sliding.
thanks.


The force is currently comming from the center. When i find the time i'll test changing position the force are added at and add force to the front tires if 4x4 drive are selected.

Didn't though there was a demand for a drift/skid var for front tires, i'll probably add frontDrift and backDrift along with the drift variable.
  • 0

#77 Newly Discovered

Newly Discovered

    Harmonious Genius

  • New Member
  • 2467 posts
  • Version:GM8

Posted 03 June 2010 - 12:27 PM

well I'm making requesting because I'm setting it up so it's more of a driving engine, not only drift.
I changed down arrow key to brakes, and control as ebrake (I lower eVar[2] and eVar[3] to provide a nice slide and loose turn compared to normal settings for regular driving
(if pressEbrake{eVar[3] = .0175; eVar[2] = .15;}else{eVar[3] = .15; eVar[2] = .20;})

Plus, having the option to have front wheel and rear wheel drive cars adds diversity to games.
and then having both, as all wheel (4wheel drive) adds strength to the vehicle, especially if it's a larger one since mass is calculated based on body size.

forgot to tell you, in the ep_body_apply_impulse_relative functions,
I change the relative values (0,0) to lengthdir(-speed*(-pressEbrake), image_angle);
let me know what you think of this. personally, I find it more realistic feeling.
steers less as you're moving faster, and gives more control when drifting.
I'm pretty sure you already had something like this set up but this adds a bit more to it.

oh, one more thing. kind of a bug I think. when going real slow, it stops turning. can you look into this please? it's really affecting my gameplay. thanks!
edit I see now that the rotation stops because you're rounding the torque value. I removed round and see the obvious flaw...any ideas?

Edited by Newly Discovered, 04 June 2010 - 03:48 AM.

  • 0

#78 Jekyll

Jekyll

    GMC Member

  • New Member
  • 1 posts

Posted 04 June 2010 - 01:08 AM

Excellent list! I've learned more from this forum in about 2 days than I have at any other forum community.
  • 0

#79 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 04 June 2010 - 08:03 AM

well I'm making requesting because I'm setting it up so it's more of a driving engine, not only drift.
I changed down arrow key to brakes, and control as ebrake (I lower eVar[2] and eVar[3] to provide a nice slide and loose turn compared to normal settings for regular driving
(if pressEbrake{eVar[3] = .0175; eVar[2] = .15;}else{eVar[3] = .15; eVar[2] = .20;})

Plus, having the option to have front wheel and rear wheel drive cars adds diversity to games.
and then having both, as all wheel (4wheel drive) adds strength to the vehicle, especially if it's a larger one since mass is calculated based on body size.

forgot to tell you, in the ep_body_apply_impulse_relative functions,
I change the relative values (0,0) to lengthdir(-speed*(-pressEbrake), image_angle);
let me know what you think of this. personally, I find it more realistic feeling.
steers less as you're moving faster, and gives more control when drifting.
I'm pretty sure you already had something like this set up but this adds a bit more to it.

oh, one more thing. kind of a bug I think. when going real slow, it stops turning. can you look into this please? it's really affecting my gameplay. thanks!
edit I see now that the rotation stops because you're rounding the torque value. I removed round and see the obvious flaw...any ideas?


I can't say i noted anything different when applying force to the rear instead of center. I'm bad about noticing changes though :)

The rotation rounding you talk about sounds like the 2.0 version, i don't round anything in 2.1

I can't spend so much time at updating this atm but will when i can. :wacko:
  • 0

#80 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 04 June 2010 - 09:29 PM

Can you do a tutorial on NOS? The reason it is because or game we made it has nos now and 10 cars. So when the dude programmed NOS he said it worked and it went fast but it goes fast side... ways...

More Credits right now you have 200!!!
=]

Edited by nesto5000, 04 June 2010 - 09:32 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users