I know unity has the wheelcollider and that you can make racing games, but is Unity suitable for more serious racing games such as Need 4 Speed, or is it limited to games like Mario Kart?
After playing some demo and samples I just get the impression that for fast car games performance might be an issue with Unity.
Anyhow:
Will Unity run a ‘very good looking’ game like need4speed at similar performance, or is there something about the engine that would hold it back?
I’m assuming the wheelcollider can be customized to get just about any physics feel you need for the car handling?
Does the wheelcollider use physX or does it use built in physics within unity? If it uses physX do we have to pay something extra for that?
I wouldn’t expect to be able to run N4S with full detail in the unity web client, but is there any reason why not? Can you get similar performance out of the games in a browser or is there something holding this back? (Apart from extra download times with bigger textures)
p.s. I’m not looking to develop a game like need4speed, more of a driving simulator, but it would likely need to have quite good graphics so I am using N4S to judge for lack of a better reference.
Yes. Performance or lack thereof is mostly down to the ability of the developer. You can make games run well or badly, depending on your coding and techniques.
You can make cars in a number of ways; you don’t necessarily need to use wheel colliders.
You don’t pay extra. The built in physics in Unity is PhysX.
There’s nothing particularly special about web builds as far as performance goes, aside from being fps-limited by the browser when not shown full-screen.
Thanks I was thinking that might be the case, considering you have to install special software for the browser stuff anyway.
To get a very basic car game going, is it almost as simple as
Creating a road mesh in an external program an putting it in your scene
Creating a car mesh and putting it in your scene
Applying the wheel collider and associated scripts to the car
Driving on your road mesh.
Obviously there is some scripting to get the game, commands, interface etc going. But is creating a very simple racing game (with the ability to drive around on a road) that easy?
I am under the impression that Unity is pretty ideal for rapid development, have I missed any big steps?
Actually one other thing as well. Is it a problem if you have really long roads that you are driving on?
I think I read somewhere about streaming in unity that makes really big scenes not an issue. Is it possible to set it up in such a way that you could drive between states or something? I guess GTA has quite long stretches of road, so that sort of thing. Do you need to make a lot of changes to get big scenes working or is it pretty straight forward.
To be a bit more specific, if I have a large terrain (which can be quite low detail), and have a road mesh that was imported in multiple segments but is around 25km long, can I do this all in one scene? (Assuming you can only drive on the road mesh).
I would assume that having a road mesh split up into sections would allow culling to only draw what’s necessary and increase performance.
I wrote a simple racing game (including AI) using off-the-shelf assets (Turbosquid, Dexsoft) in three days from scratch (probably about 10h total coding time). I didn’t have the time/budget to spend on doing things like particle effects for dust/collisions, but I’d have to say it was VERY easy, and the results look pretty damn good for a few days’ work, plus some tinkering now and then.
I did find the wheel colliders a bit frustrating to work with (the suspension stuff doesn’t seem to work the way I think it should, and I also found trying to implement AWD vs 2WD very odd, my dimly remembered high school physics were apparently not up to the job) – but then I didn’t spend a huge amount of time on it.
I should also note that there’s a pretty sophisticated car script on the Wiki, but I ended up “rolling my own” because (a) it seemed like more fun, and (b) I wanted to completely understand how everything worked.
Hmm, i’m also interested in making “long” roads, i recently completed a game called Jambuster EX (The Daily Click), which is a “single screen” 2D game that simulates driving on a motorway and causing crashes, it would be good to create a 3D version with a long road that you actually drive from A to B on… whilst making cars skid sideways and seeing others ram into them in the rear-view mirror, of course!
Hmm, then again if you can’t make a 25km long road with “normal size” cars, make your cars 1cm long, and scale the speed, then you can make a road that’s longer than the equator! (note: may not work like that XD)
I’ve taken an object that’s .2 units in size and made it move along a 10000 unit road with no problems… That might be about the scale you’re looking for.
If you don’t need drastic scenery changes while driving, you could just make one end of the road loop to the front again, too. Just have to clean up the crashes when they’re a certain distance away.
Whilst on the same topic, I was wondering about how you would make a racing game.
If it was a single player racing game against a number of opponents (say 20) on quite a large track, would you make each opponent a prefab using a physics script? Wouldn’t this mean each car would be running it’s own FixedUpdate()and would this cause poor performance?
I mean if you want cars that you can’t see to still have car crashes etc, then they always need to be using proper physics around the whole track. This is in addition to the AI controlling the car, which is probably done by following predefined path notes with a bit of randomness added in.
I’d imagine a game like GTA is probably done different, and may even randomly generate cars in your area.
Does anyone have some experience or suggestions with this?