Log In  

Cart #kilowar-5 | 2021-01-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

v1.0 - Played through about 200 matches (seriously) to find and fix the last couple of bugs hopefully (a race condition on coup fourré where you could end up with 8 cards in hand, hear the coup fourré sound, but not actually get the coup fourré and a condition where CPU could run out of cards first and leave the player unable to play or discard, thus effectively stopping the game). I had originally planned to update the sprites, but I honestly like them as is, so I'm keeping them!

v0.9.2 - Bug fixes related to end game no-winner nil conditions where player runs out of cards before CPU because player played one or more safeties after the deck ran out.

v0.9.1 - Fixed unchecked nil bug in case where CPU gets coup fourré with the emergency card and also has a Go card in hand (obscure devil of a bug!)


Hello everyone!

I made a PICO-8 version of the classic French car racing card game Mille Bornes! This is a game I've probably played thousands of times in my life from childhood through . . . not childhood (age is just a number, but it's a BIG number!)

In the game, you race against a CPU opponent to be the first to reach 700km (or, if you feel daring, extend the race to 1000km for a chance at bonus points). In addition to 1 point per km, you gain bonuses for playing safety cards, getting coup fourré (playing a safety card as the corresponding hazard is being played against you), winning a race without playing any 200km cards, extending to 1000km, winning after the deck has been emptied, and shutting out your opponent. You race until someone totals 5000 points and wins the match! You can see the cards and a brief rules description by pressing z on the start screen.

During the game, left & right arrows let you select a card to play or discard. x plays a card, z discards. The up arrow lets you play coup fourré if CPU plays a hazard for which you have the safety card. But be quick! You only have a short time to perform the coup fourré while the indicator flashes.

EDIT: I realized that the rules can be cumbersome to figure out if you've never played before. The Mille Bornes Wikipedia entry is actually a pretty good reference for the game rules.

This game is a lot of firsts for me: my first PICO-8 program, first experience with Lua, the first game programming of any kind I've done, first pixel art (quite obvious), first music composition (SUPER obvious). I'm proud of having created a fun, playable game, but it's very much the work of a game programing beginner, so don't expect highly optimized code or probably any techniques you should emulate :). I had 319 tokens left at the end and I'm sure there's plenty I could have done more efficiently.

Special thank you to @Krystman, whose Breakout tutorial was my impetus to give this a go, and from which tutorial I shamelessly grabbed the sash code to use for coup fourré. And thanks to everyone in this community. I think this is my first post, but I lurk & read the posts here frequently, amazed at all the cool ideas you all have and how willing you are to share your knowledge.

P#81787 2020-09-14 02:24 ( Edited 2021-01-29 18:22)

My first post, i registered here just because of this game.
I love it and i think it's a great resource to new programming persons who want to understand game logic,

P#81889 2020-09-16 08:05

Hey, thanks for the kind words, that really made my day! One thing I was happy about was having enough character count & compression size limit space left to leave the comments in the code so people could see what I was thinking :).

P#81892 2020-09-16 12:15

Just played it and enjoyed it!

I played Mille Bornes many years ago
so knew the general rules already, just had to learn the icons…

P#114495 2022-07-18 05:40 ( Edited 2022-07-18 06:20)

@icegoat Thanks - you really crushed that match! Yeah, the icons were a struggle (they were the first time I'd ever done any kind of pixel work) and some of them are more clear than others. I have the rules screen that lays out all the cards, but I think if I ever go back and optimize this I'd try to squeeze in enough tokens to do a tutorial race for people who've never played.

P#114502 2022-07-18 11:21

This is great. I too have played this card game since I was young and it continues to be a favorite. I think the best part of your game is the icons! It took a bit of trial & error at first but then it became obvious, so stupid me! Especially like how you represent the speed cards with the graph, very clever.

Lots of fun, man, nice job.

P#114510 2022-07-18 14:03

Hmmm..why doesnt't the deck reshuffle after it's empty? It's no good to have nobody win, lol. Might want add that in there. Much like the real game, I've had several that just end up being a lot of "throw away and wait".

P#114511 2022-07-18 14:09

@morningtoast Thanks so much! My uncle had a Mille Bornes set from the late 50s or early 60s that he & I would play when we all visited my grandmother, so it holds a special place in my heart. Glad you enjoyed this!

P#114512 2022-07-18 14:22

@morningtoast I'll have to recheck, but I think I did this because in the card game rules it's possible to have no one finish and there are points if your opponent calls for an extension but doesn't finish the race. But yeah, I have questioned the fun of that myself. I've had a few games where the entire match was a slow crawl full of unfinished races until someone hit 5000, LOL.

P#114513 2022-07-18 14:54

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-01-29 09:38:07 | 0.029s | Q:25