Jump to content


Photo
- - - - -

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


  • Please log in to reply
129 replies to this topic

#121 richicon

richicon

    GMC Member

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

Posted 22 June 2012 - 10:21 AM

I am new to Game Maker - I am running Studio.

I installed the Extreme Physics Extension - then tried to run this engine.

I get these errors:


In script scr_carUpdate_AI line 9 pos 10: Obsolete function: variable_local_exists
In object obj_block, event Create, action 1 at line 2: Wrong number of arguments to function or script.
In object obj_rock, event Create, action 1 at line 13: Wrong number of arguments to function or script.


Not really sure how to resolve. Crudely I tried just removing the lines, but then there were a whole new set of errors.
  • 0

#122 twenty90seven

twenty90seven

    GMC Member

  • GMC Member
  • 3 posts
  • Version:GM8

Posted 26 June 2012 - 01:20 PM

I also had trouble getting the engine to work with Extreme Physics...then realised I had downloaded Extreme Physics 2.2 (the latest) and not Extreme Physics 2.1.

Once I downloaded Extreme Physics 2.1 and installed the gex file it worked straight away.

Thanks Exylex for this fantastic engine! It's great to see such a great engine being shared. I am going to use it to try and make a Nitro style (Amiga) top down racing game.

I had a play around with the scripts and worked out you can have the car turn faster by editing the scr_carlnit script so that the variable for rotational friction is set to .12. This will suit the type of game I will be trying to make (ie more arcadey, less realistic)

/* VARIABLES FOR PHYSICS ENGINE */
// Default friction
eVar[0] = .01;
// Extra strafe friction
eVar[1] = .0003;
// Rotational friction
eVar[2] = .12;
// How quick strafe force is transfered over to forward/backward force
eVar[3] = .1;
/* ---------------------- */
  • 1

#123 richicon

richicon

    GMC Member

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

Posted 26 June 2012 - 06:27 PM

Thanks for the tip, much appreciated.

I wondered that, but the page before this said you needed EP 2.2!

Downloading 2.1 now - and thanks again for the post.
  • 0

#124 Magicnanners

Magicnanners

    GMC Member

  • New Member
  • 11 posts
  • Version:GM8

Posted 09 July 2012 - 02:09 PM

The download appears to be broken. I'm not sure if it's an issue on your end or the host's end though.
  • 0

#125 LordOfCats

LordOfCats

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM8

Posted 25 July 2012 - 01:34 PM

I am new to Game Maker - I am running Studio.

I installed the Extreme Physics Extension - then tried to run this engine.

I get these errors:


In script scr_carUpdate_AI line 9 pos 10: Obsolete function: variable_local_exists
In object obj_block, event Create, action 1 at line 2: Wrong number of arguments to function or script.
In object obj_rock, event Create, action 1 at line 13: Wrong number of arguments to function or script.


Not really sure how to resolve. Crudely I tried just removing the lines, but then there were a whole new set of errors.

I got this too, in the create events you have to remove the ",true" and ",false" Your other error is probably because of GM Studio, I didn't get that one on 8.1 Pro.

Great example I love it and will definitely make something with it when I have time. Just check your download link for the heavy.exe, I got a virus from it.

Edited by LordOfCats, 25 July 2012 - 01:37 PM.

  • 0

#126 kayla15

kayla15

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 September 2012 - 12:12 AM

Hello, I'm making a 3d car racing game. My main problem is how will the other cars (enemy/computer) automatically rotate on every turn. It follows the path but it stays only in one angle. I've executed a code on Step event image_angle=direction+180; but it doesn't work. The car follows the path but cannot rotate every turn. How can I fix this? Please help me. I need to finish my game ASAP because it is our project in school and due date is near. Thank you. :)
  • 0

#127 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 13 September 2012 - 01:53 PM

I haven't used Game Maker for quite a while now, and therefore it's kinda out of date. If someone is willing to share me an uptodate version for me to put on the first post, it would be apreciated... credit would ofcourse be given.

Hello, I'm making a 3d car racing game. My main problem is how will the other cars (enemy/computer) automatically rotate on every turn. It follows the path but it stays only in one angle. I've executed a code on Step event image_angle=direction+180; but it doesn't work. The car follows the path but cannot rotate every turn. How can I fix this? Please help me. I need to finish my game ASAP because it is our project in school and due date is near. Thank you. :)


image_angle is just for 2d sprites, doesnt rotate an 3d object... unless GM changed abit the last 2 years :P

Edited by Exylex, 13 September 2012 - 01:53 PM.

  • 0

#128 R_Jay

R_Jay

    GMC Member

  • GMC Member
  • 6 posts

Posted 14 September 2012 - 05:06 PM

Check what i made with This engine (3 years ago):http://gmc.yoyogames...howtopic=554047
  • 0

#129 Duplex

Duplex

    GMC Member

  • New Member
  • 1 posts

Posted 27 September 2012 - 07:27 PM

Using the simple version, what variable do I need to change to decrease the turn circle? I would like it to feel a bit more arcadey :)
  • 0

#130 androkid

androkid

    GMC Member

  • GMC Member
  • 37 posts
  • Version:Unknown

Posted 15 December 2012 - 04:46 PM

Thanks CrazyTM & fredcobain. I hope someone would plan to use this in a game.
If that's the case i might spend some time fixing some things.

* Improve wall collisions
* Add vehicle - vehicle collisions
* Making it more flexible.

So a shout or two and i might improve the scripts. :)/>


Very very nice engine dude, if i find some time, i will definitely use this in a game i'm working on!
Keep it up!

A.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users