My First True Game

Hi all! I finally finished my first true game that’s not connected to any tutorial. I chose black jack since it’s probably one of the simplest card games and I practically live in Vegas. I tried to copy the most popular online version out there but I know I’m missing some features like insurance and double (I’m not exactly a gambler either, haha.)

Some of the difficulties I’ve had included:

  1. Spreading the cards like how it should be spread. (The last one I tackled, actually.)
  2. Perfecting (as much as I could lol) dealer phases and setting time outs.
  3. Disabling buttons in certain phases of the game.
  4. CSS!

Parts that was surprisingly less challenging:

  1. Drawing cards.
  2. Betting and bank.
  3. Card scoring system.

I’d like to know what I should focus on improving first. Please feel free to give any critiques regarding my data structuring, styling, etc. All in all, this took me four days and around 5 hours average per day. Should I be faster? Also, let me know of any bugs. I appreciate any feedback. Thank you very much!


I can’t get it to work. I bet and try to press Hit but it doesn’t do anything.

Design looks good though :slight_smile:

Did you try pressing deal before hit? And thank you! I mostly copied the design of the easiest one to find online. :sweat_smile:

Can’t see the deal button.

1 Like

Oh I see. I think I need to redo my CSS then. I need to make it compatible with phones too. May I ask, which browser are you using?

Google Chrome, laptop 14" :slight_smile:

1 Like

Hmm… It’s weird because it works on my chrome. I did my testing on Chrome. :sob: Anyway, I’ll work on it again tonight. Could you please come back when I update it? :slight_smile: Thanks for your help!

1 Like
Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure stylesheet ''. This request has been blocked; the content must be served over HTTPS.
script.js:461 Welcome to Cara's first app ever. Hope you enjoy!
script.js:452 Game has started.
script.js:29 Uncaught TypeError: data.decks.flat is not a function
    at Object.addDeck (script.js:29)
    at Object.init (script.js:454)
    at script.js:462 Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure stylesheet ''. This request has been blocked; the content must be served over HTTPS.

If not tonight, I’ll check in tomorrow :slight_smile:

:flushed: Problem with flatten? Interesting. I’ll look into it thanks!

Thank you. I appreciate it.

i would love to play the game but there still isnt a deal button

It seems my CSS is more flawed than it looks. I’m sorry! I’ll be focusing on using a better format for the CSS. Initially, I just wanted it to function. Have you tried resizing the window to make it show by any chance? I’m thinking it’s hidden somewhere below. Lol.

Okay, I did some tweaking to the CSS and played with the mobile compatibility (hopefully.) Please let me know if the deal button and such is still hiding. :sweat_smile: Would be glad to hear what you guys think of the gameplay! (And oops, I forgot to change the flatten. Will work on it some more plus the mobile version …)

I do it on pc and it looks good to me. There is a deal button, though the problem is, I don’t know how to play

1 Like

The game works just fine. The problem is fixed imo,seems like a cool and complicated project good job. The only thing i would like to change is to make the card under more visible.

1 Like

Sorry, maybe I’ll add instructions in the console at least on my next update. It’s usually bet > deal > hit or stand > repeat. If you meant you don’t know how to play Black Jack in general though, it’s basically who gets to 21 closest without going over. :blush: Thanks for playing! So happy people are trying it!

1 Like

I was clicking random things and I gt 15 points. while the other player had 6

:heart_eyes: Thank you so much for the kind words! Yes, it was quite the task. I didn’t think I’d have to do so much until I ran into problems. And I would love to make the cards move perfectly but it’s such a pain! If you have a very widescreen, I noticed that the cards start going the opposite way. I really need to brushen up on my css but I really want to learn the other things that go into web development first. What to do? :crazy_face:

1 Like

If you like making games then I’d say “processing JS” is the best language to learn

1 Like