Importing car control scripts from other games

Hi, i have seen a lot of things with unity, even tried out the car tutorial… but i have a question… I am still working on making a high end script for car control and psychics

So, this bears the question… can i import another script from say… need for speed most wanted, or Rfactor or something like that to learn from it?

The reason I ask is because unity supports java scripting, which is similar to C+ programming, which is often used for these scripts.

Obviously i understand there’s is copyright issues if I intended to steal the script, but this was more for educational purposes, with the hope of actually improving it, or even just learning from it.

is this possible?

No. Discounting that c++ is much different than c#, the engines are different and have different function names and do different things. Need for Speed is also closed source, so there really isn’t any way you could get the source code. You can only learn from games written in Unity that are open source and allow you to use the code.

I understand what your saying and have done a little more research on the unity engine. I found a website mentioning that the unity team are no longer developing the high end side fi things as they claim people simply want to program and make games for mobile devices… (at least this is the impression i get)

So this brings me back to my question, since i cannot import scripts from elsewhere, and racing simulation is considered high end, does this mean, unity may not be the best choice engine for me?

I have seen some physics that i really like, and have made inital attempts to bring things together, but due to the lack of my knowledge in this area, it seems almost impossible… My initial intention was to make a car game with a reasonably high level of physics, namely those of the mad car physics as seen here.

This was done with 3dmax in 2008 and a few plugins, but i have not seen any help on creating this in unity.
I have seen and even tried the car tutorial in Unity, which is excellent by all accounts, however, the cars physics are relatively arcade like, and it suffers badly from the classic “hover” problem.
I had hoped that a different script for jcar would have solved this problem.

I have seen a game which is almost exactly what im looking for at

www.autoclubrevolution.com

however, i can only see the videos, as the game does not load… i would kill for someone to post tutorials for that on YouTube!

I had hoped that a different script for jcar would have solved this problem.

I understand that creating these physics are not easy (backing up my idea to learn from other scripts, and have also seen the X car engine, which is completely out of my price range.

any ideas on what i can try from here? …or should i be looking at another engine, maybe blender for instance?

I’m a little stumped as to where you get the idea Unity isn’t doing “high end” (non-mobile) from. If you check out their new release of just a few days ago, DirectX 11 / OpenGL upgrades and cutting edge skinned mesh animation tools are half of the new feature lineup.

I’m not sure what you’re talking about having seen done in 3DS Max (no link?), but Unity and 3DS Max are very different programs. Max makes models and renders static images or animations, where Unity does things dynamically and in real time. Or perhaps what you’re talking about is a model made in 3DS Max which was then used in another car simulator?

Different car scripts can indeed solve the “hover problem”, which is caused largely by input directly applying linear and rotational force the the model. Unity offers several different ways to skin the cat (the arcade controls you’ve already seen, using wheel colliders and their built-in functionality, or completely writing your own specialised simulation code off the top of my head would be the three major approaches) and within each of those there are of course virtually infinite variations. Yes, you can achieve what you want, and I’d say Unity is a reasonable enough place to do it (I wouldn’t say any other engine I’ve used is better suited to the task, and I doubt you want to code your own). It’s not a simple task, though, and you’ll need to do plenty of learning as you go.

hmm, you have very good weight and credibility in your previous reply, the “madcar” youtube link above was done in 3d Max with the “madcar” plugin.
however i think you are right… I had assumed it was done with a car physics script and then “driven around” in a 3d max environment. however, this may be untrue as the animation may have been engineered without real time.

Still I have seen other examples, only i have had unrelated problems with it, and have never experienced a high end car script for myself (testing demo’s and whatnot)… but, this atleast means unity is capable of it… the question is… am I capable of scripting it?, you mention earlier that Unity scripts are written in C#, so relly i need to know how to script it… I will be looking for tutorials so, any helpful suggestions would be gladly received… unless any one would like to maybe start a group effort on this? although i have never written anything apart from basic html!!! maybe the community could have a go at this… sort of open source it for everyone to use?

infact, come to think of it… since unity uses JavaScript… is it then possible to find a JavaScript file with this type of programming and then simply run it with my car model in unity, kinda like replacing the script which came with the car tutorial?

Get the Car tutorial and open the Alternate Physics Model. It uses Pacjka. Pretty much every sim you’ve ever touched uses Pacejka or Brushmodel… If you want to “acquire” a vehicle simulation, there are a couple good packages on the unity store - buy one and be done with it. If you want to write your own you can take a crash course in physics, calculus, and c#. The third option is to play around with what you can find but for the most part no one is releasing their hard fought simulations and the open source projects I’ve seen haven’t made it very far.

No, you won’t find a game engine more fleshed out than Unity.