Super Racer

Hi,

This is my first forum post yay, I’ve been hanging around in #unity3d for a while.
I’m working on an arcade themed racing game.
I thought it would be cool to share my progress with you guys as I love lurking in the WIP threads myself.
I will give a small summary of what I have done so far and followup with new posts as I go.

Inspired by games like Motoracer and Need For Speed High Stakes which I still occasionally play up till today :sunglasses:
I started playing with the wheelcollider ridgidbodies in Unity3d.

What probably took the longest to realize is that you should never override the position or rotation of rigidbodies and should
use forces instead. Overriding the rotation looked good until I you collided with walls … then it just exploded.

This went on for a few months :expressionless:

People seemed to like it, jumping over things and playing destruction derby with motorcycles (not my intention however).
Around this time I decided to try indie development, do this fulltime. Also because I wanted to learn and work with Unity3d in the future.

Started working toward a demo


In the demo you raced the top 5 players. I uploaded their replays to the cloud (Parse) after each race.

I’ve send it to ~20 of my friends. I got alot of feedback from that demo,
basically saying that the controls sucked :sad: (at least they were honest)

So I set out to fix that, it will be an ongoing task. I made some graphs to understand the problem better :sunglasses:

Inspired by Crashday I wanted to do tile based level design. As a programmer I though this was going to be efficient and easy to make content for + editor would be a nice bonus.
Inspired by Crashdays level editor.

I long thought this was the way to go … but I have dropped this now:

  • It resembles Trackmania too much
  • Games like MotoRacer and NFS4HS have very curvy levels with lots of elevation. This is what makes them fun.
  • All levels would have been very similar.
    I really liked this technique but doesn’t fit the style of game I want to make.

So I set out to use splines based roads

The new plan is spline roads + unity build-in terrain.
I made a custom terrain shader as the terrain is now going to be a big part of how the game looks.

Left is default blending, right is blending based on a heightmap in each textures alpha channel.
I also made custom ambient lighting in the shader taking into account the sky color and added a fresnell rim effect.

I made tunnels using alpha channel in terrain and a trigger that disables terrain collision.

It works, only the shadows are messed up a bit. Not sure If I will use this, could just make the tunnels on top of the terrain instead.

I created splitscreen mode and a virtual audio system to handle sound for each camera

Bought DiakonForge gui and got carried away, so easy :hushed: (not sure if this design will be used)

I made a facebook page (my attempt at marketing early )
facebook

In the meanwhile I’m getting comfortable with Blender3D.
Up till now most models I made in it have been placeholder.

So this is what I’m doing now:

Next up is getting it to work with mecanim and maybe with Final IK ? :sunglasses:
And work toward a new demo!

Thats a lot of work so far.

Yeah I waited a bit too long to start posting here :slight_smile:

Looks interesting! Any ideas for interesting gameplay or environments? Yeah I know, one step at a time :slight_smile:

I’ll be following this thread.

Thanks,
I’m thinking ‘cliché’ locations beach / desert / neon lit city.
I have plenty of ideas for game modes. Most of them need some prototyping to know if they will work or not.
But first I’ll be focusing on racing and making race tracks.

Love the spline road idea, it’s really looking pretty far in development!

Are you writing the spline road system yourself or using one of the systems from the asset store? I saw a Unity demo the other day that allowed for the track to be dragged around at runtime like your gif shows above, it is something I have been thinking of trying to do in my game project but I think it is likely a little beyond my skill set at the moment.

I’m writing it myself, mainly because I want to tryout some things with it. Like duplicating meshes along the spline or make it blend with the terrain etc. It is such an important part of the game that I want full control.

It is not complicated, I followed this tutorial http://cubic.org/docs/hermite.htm.
The 1ste formula there should be enough to draw a spline.

To divide the spline in equal part I go over it in very small steps, so It is an approximation but it works well.
At each small step I get the direction = (current step position - previous step position).normalized
To find the positions of the vertices I do the cross product of the direction and Vector3.Up multiplied by the width of the road.

To control the spline I have a bunch of gameobjects that are parented to a gameobject with my SplineRoad script.
Then I loop over its childeren and use those as the points in that hermite formula.

edit: to calculate the tangent I use the Cardinal splines explained in that article

Finally have mecanim working :slight_smile:
Still having some problems with figuring out how to get the fingers to rotate correctly.

Also found that a T-pose works much better.

Using run animation from Unity sample

I’m happy to see the project on unity forum ^^

Keep us updated please .

Checkout megasplines on the asset store, it’s extremely versatile and very advanced, does everything you could want.

I think this was a lot of work!

Spline road looks very good but I like your terrain tweaks most! I had the same idea with the tunnels at one of my first projects, but dont had the skills to implement it at that time. I´m very glad that you proof this funktionality!

Conratulations to your current progress! Keep it up, cant wait to see more of this!

Hi,

@1HpLeft
thanks, looking forward to playing yours aswell :sunglasses:

@imaginaryhuman
yes it does look similar, however most of the hard stuff is already done and I like to tune my system specifically for a (this) racing game.

@anszwa
thanks!

Created a test track!

Added a cool feature that allows to slide objects across the spline, will probably combine this with objects that can deform along the spline to make rumble strips, walls and asphalt extensions.

Also made a script for the terrain that checks the closest point of the spline for each terrain height and extents the road a bit and then blends into the rest of the terrain. It is brute force atm and quite slow.

Next up is fixing everything I broke since the last demo, no more tech for a while :expressionless:

Test for player customization shader
using rgb mask (similar to how the Unity terrain shader works)

Looks pretty slick! Loving the potential of where this game is heading!

Hey

Did you think about monetization?
Will you sell custom skins ? custom helmet ?

@Lemo76
thanks :slight_smile:

Yes probably, skins, upgrades and additional garage slots will cost money. Skins and upgrades will also be unlockable by playing.
Paying with money will just unlock them earlier.
There might be extra features for those who bought tokens. Like splitscreen / editor / etc.

Also upgrade won’t be better they will have different tradeoffs. You will start with a balanced setup.
And upgrades allow you to have e.g more acceleration at the cost of topspeed etc.

These things will still change depending on your the feedback :sunglasses: