RacetraCS: Car Racing Game

Demo: https://dashingdon.com/play/sciscidiego/racetrack/mygame/

Hi all. Here’s another little game I hope you’ll enjoy. This is based on an old paper’n’pencil game known as Racetrack (game) - Wikipedia. Your goal is to drive around the track in the shortest time (number of turns).

At every turn, you can adjust your horizontal and vertical speed by one unit each. The concept is very simple, but it gives you an interesting sensation of inertia, and it’s tricky to get the corners perfectly. You can drive using the keyboard or by clicking on the arrows (or the actual choices).

Let me have your thoughts. If people are interested, there are a few things I’d like to add. I am also looking for user-contributed tracks.

Have fun and post your times here!

Requested features
  • Undo move
  • Replay a completed game
  • Run with a “ghost”
  • Multiple traCS
  • Online scoreboard
  • Add a love interest :slight_smile:

0 voters

15 Likes

This is absolutely wonderful, great implementation of CS!

ended up with a time of 38 my first completion but i’m going to waste a LOT of time on this

e: down to 36!

e: 35!

e: 34!

e: 33!

e: 32!

2 Likes

I’m glad you like it. Your post made my day.

And wow, you are good. I barely made it under 40. Can you share your replay record (the long string of numbers at the end)? Can I use that as the ghost (or call it “AI opponent”)?

PS I was really impressed by your story’s concept (Interstellar Air gap). I need to find some time to read it.

Sure! depending on what you want to use as the ghost, here’s a 34 that stays in the lines the whole time:
333674875522212445774401000606330

Here’s a 32, which jumps a corner:
3333777825522515548300003036363

And here are a 31 and 30, I think 29 is probably possible but i have to go to work LOL

033678787222522284630000030666

03666888222225548300000336633

2 Likes

Interesting experiment. And why is it the sports-themed CS WIPs so often have way cooler titles than everything else? I mean, this is no Foal Throttle, but I still thought it was a good title.

2 Likes

Truly an awesome game and great implementation of CS.

1 Like

hairpin

Thanks all! I updated the game (link at top) with a second track, new theme song (can you recognize it?), and new replay mode.

@SpokesWriter great to see you are so committed. Your race is breathtaking. The way you started going UP and then perfectly jumped TWO corners! Unbelievable. You can watch it here: REPLAY

Let me know if you like the second track (or feel free contribute one).

PS. Really? You all want a love interest?? :slight_smile:

1 Like

I probably spent too much time on this :sweat_smile:
Very well done, I wouldn’t have even imagined something like this coming out of choicescript. A maze, sure. But a racetrack? Dang.

(I would post my scores but in the 6 times I attempted it… I crashed every time :joy:)

Again, great work. I am extremely impressed

1 Like

@choicehacker I love that second track! I tried it & ended with a time of 46. Not my best moment on that third turn, but I’ll do better next time!

Replay

I’d be interested in seeing a track with narrow sections, so it would challenge people to really watch their racing line. But I get that it may be too punishing, so…I have a suggestion.

I’m not sure how easy it would be to implement this, but instead of just having track and wall surfaces, have something like grass or sand that would negatively affect speed. That way people could run off course but not wreck their race entirely. How feasible would this be?

1 Like

Pro tip: They always want a love interest. If the person who did the game where you’re eaten by clowns put up a similar poll to this, add a love interest would still have won.

Although if you’re Armie Hammer, perhaps the game already did have a love interest…?

1 Like

track_2

Hi all. Another quick update. This time, the third track has grass. The grass slows you down by one unit in each direction. I’m sure @SpokesWriter will find amazing ways to exploit that. My lame test run is here:
REPLAY

Note: the tracks now should look all green. Dashingdon caches aggressively, you may still see the old red walls. Try to refresh the page or use an incognito window.

@Pheriannath if you want to play with the track, feel free to modify this data:

Track data
  XXXXXXXXXXXGGGGGGGGGXXXXXXXXXXXXXXXXXXXXXXXXXXGGGGGGGGGGXXXX
  XXXXXXXXXXGGGGGGGGGGGXXXXXXXXXXXXXXXXXXXXXXXXGGGGGGGGGGGGXXX
  XXXXXXXXXGG.........GGXXXXXXXXXXXXXXXXXXXXXXGGG.......GGGGXX
  XXXXXXXXG.............GXXXXXXXXXXXXXXXXXXXXGG..........GGGGX
  XXXXXXXG...............GXXXXXXXXXXXXXXXXXXG..............GGX
  XXXXXXXG................GXXXXXXXXXXXXXXXXG...............GGX
  XXXXXXG.....GGGGGGG.....GXXXXXXXXXXXXXXXG.......GGGG......GX
  XXXXXXG....GGXXXXXGG.....GXXXXXXXXXXXXXG......GGXXXXGG....GX
  XXXXXG....GXXXXXXXXXG....GXXXXXXXXXXXXG..S...GXXXXXXXG....GX
  XXXXXG....GXXXXXXXXXG.....GXXXXXXXXXXXG.....GXXXXXXXXXG...GX
  XXXXXG....GXXXXXXXXXXG....GXXXXXXXXXXG3....GXXXXXXXXXXG...GX
  XXXXXG...GXXXXXXXXXXXG....GXXXXXXXXXG.....GXXXXXXXXXXXG...GX
  XXXXXG...GXXXXXXXXXXXXG....GXXXXXXXXG.3...GXXXXXXXXXXXG...GX
  XXXXG....GXXXXXXXXXXXXG....GXXXXXXXG.....GXXXXXXXXXXXXG...GX
  XXXXG....GXXXXXXXXXXXXG.....GXXXXXG...3.GXXXXXXXXXXXXXG...GX
  XXXXG....GXXXXXXXXXXXXXG.....GXXXG......GXXXXXXXXXXXXXG...GX
  XXXG....GXXXXXXXXXXXXXXG......GGG.....3GXXXXXXXXXXXXXXG...GX
  XXXG....GXXXXXXXXXXXXXXXG.............GXXXXXXXXXXXXXXXG...GX
  XXXG...GXXXXXXXXXXXXXXXXXG...........GXXXXXXXXXXXXXXXG....GX
  XXXG...GXXXXXXXXXXXXXXXXXXG.........GXXXXXXXXXXXXXXXXG....GX
  XXG....GXXXXXXXXXXXXXXXXXXXGG.....GGXXXXXXXXXXXXXXXXXG....GX
  XXG....GXXXXXXXXXXXXXXXXXXXXGGGGGGGXXXXXXXXXXXXXXXXXXG....GX
  XXG....GXXXXXXXXXXXXXXXXXXXXXGGGGGXXXXXXXXXXXXXXXXXXXG....GX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG....GXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....GXXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG......GXXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXXXX
  XXG...GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXXXXX
  XG....GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG.....GXXXXXX
  XG....GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG......GXXXXXX
  XG....GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXG......GXXXXXXX
  G....GXXXXXXXXXXGGGGGGXXXXXXXXXXXXXXXXXXXXXXG......GXXXXXXXX
  G....GXXXXXXXXXGGGGGGGGGXXXXXXXXXXXXXXXXXXXG......GXXXXXXXXX
  G...GXXXXXXXXGG........GGXXXXXXXXXXXXXXXXXG......GGXXXXXXXXX
  G...GXXXXXXXG............GGXXXXXXXXXXXXXXXG.....GGGXXXXXXXXX
  G...GXXXXXXG...............GGXXXXXXXXXXXXXG.......GGGXXXXXXX
  G....GXXXXG.......GG.........GXXXXXXXXXXXXG.........GGXXXXXX
  G.....GGGG......GGGGG.........GGXXXXXXXXXXXG.........GGXXXXX
  G..............GXXXXXGG.........GGXXXXXXXXXXGGG......GGXXXXX
  XG............GXXXXXXXXGG.........GGGGXXXXXXXGGGG....GGXXXXX
  XXG.........GGXXXXXXXXXXXG............GGGGGGGGGGG....GGXXXXX
  XXGGG.....GGGXXXXXXXXXXXXXG..........................GGXXXXX
  XXGGGGGGGGGGXXXXXXXXXXXXXXXGG........................GGXXXXX
  XXXGGGGGGGGXXXXXXXXXXXXXXXXXXGGGG...................GGGXXXXX
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXGGGGGGGGGGGG....GGGGGXXXXXX
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXGGGGGGXXXXXXXXXX
4 Likes

Thanks! Though I recommend bordering the playing grid with walls. I tried running off the map where the edges are bordered with grass and I ended up with this:

navigate line 399: Non-existent variable ‘grid_-4_16’

That works too. Yep, now I crash as expected if I try to fly off. Perfect.

1 Like

Thanks for the bug report. I was checking if you were on grass before checking if you had flown out of the map! It’s not fixed. You can run safely on the very edge now.

@Jackpot1776 @Pheriannath No more crashes! If you fly off the grid or you hit a wall, you get penalized 1 sec and your speed is reset to 0. You may be able to game the system if you use this in a smart way!

1 Like

This does appear to break replays temporarily since it appears to use your time to read the appropriate character from the URL, which I tested successfully by manually editing this one:

https://dashingdon.com/play/sciscidiego/racetrack/mygame/?level=0&replay=036668882222221100x0x0 (24 time on track 1)

That said, it’s super cool and I can’t wait to break the other two tracks with it :smiley:

1 Like

24 is way beyond my expectations. My applause.

Great analysis on the little replay bug. It’s fixed now. The generated path will now have an X on collision as you just did. You can try now: https://dashingdon.com/play/sciscidiego/racetrack/mygame/?level=0&replay=036668882222221100x0x0x

2 Likes

Quick question, what is ‘show stats’ supposed to…show?
So far I’ve been getting this:

Couldn’t load scenes/choicescript_stats.txt?cb=300947
The file is probably missing or empty.

Also, just barely made track 3 with a time of 55. I played fair (no wall/out of bound exploits…I think).
https://dashingdon.com/play/sciscidiego/racetrack/mygame/?level=2&replay=666102012668678876811811222855871010111220136776666664

Edit: 51! (Fair Play)
https://dashingdon.com/play/sciscidiego/racetrack/mygame/?level=2&replay=66611010367777687811512122887100112112116666333676

‘Show Stats’ has not been implemented. It’s part of the package for all CS game. Let’s see if I can do something with it.

And, congrats on the 51. When you crash you get an ‘x’ as part of your replay, so it’s easy to see.

Hi all. A quick update. On request, I added a simple training track with no walls. Run your heart out. I also added links to the current records. Only clean run, no walls… even if walls are the new thing even in Mario Kart 64. :slight_smile:

(Demo link in the first post)

1 Like