itch.io is community of indie game creators and players

Devlogs

Minor Bug Fix

Durham Drive
A browser game made in HTML5

There was a bug where no cars would spawn in the right hand lane, this was pointed out by somebody on Reddit.

Turns out the Unity Random range function didn't work how I thought it did:

I had:

"int laneNumber = Random.Range (0, 2)"

Thinking that Random.Range returns a number 0 to 2 inclusive, but it only does that if the number is a `float` rather than an `int`.

Switching it to:
"int laneNumber = Random.Range (0, 3)"

Did the trick! Just exporting the new version and will upload!

Files

  • DurhamDriveV3.zip 13 MB
    May 28, 2020
Leave a comment