Author Topic: Blackjack  (Read 56343 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #105 on: June 19, 2020, 07:38:40 pm »
You are too kind...

Actually, I used a similar method to yours, for making the wall. Decreased the 'brightness' of the wall. Applied a multiplied black 'fog edge', Merged all the layers and bingo! The wall only took a few minutes to make. The neon lights... Everything done from scratch... Took considerably longer that a 'few minutes'... lol

When you stated, "we can replace the neon2.ttf and drop code for that.", what exactly did you mean? I have several 'neon' fonts. 'neon lights' (the same as 'your' wall. 'neon tubes 2' (the font used in my image) and a couple of others that didn't look so good... lol  In school, we were taught English Literature and English Expression, obviously English comprehension was, shall we say, somewhat missing... *sigh*

Animating the sign was just alternating images of two walls. One has a complete neon sign, the other will have missing letters... Random delay between the images... 'blink' in that way a few times... Use the 'complete' wall... then prompt the user...

Gimp has the ability to create animated gif's but I do not know if QB64 can play them...

Another alternative is to use separate images for the wall and the sign. 'blink' the sign 'on and off' for a fraction of a second a few times. Switch the sign 'on' and prompt the user. Blinking can be associated with an electrical buzz sound. Giving the effect of a dodgy connection.

Speaking of sound... I will grab an ambient sound track and shuffle....
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #106 on: June 20, 2020, 06:43:32 pm »
Ok. I managed to locate some free audio clips from soundbible.com (Ambience, chips and shuffle.)

Ambience.wav is quite large (5.3mb stereo, 2.6mb mono)
Ambience.ogg (1.6mb stereo, 756kb mono)

I will post the 'ogg' files (including stereo AND mono ambience)

Attribution:
Chips - Daniel Simion
Ambience Casino - Stephan Schutze
Shuffling Cards - themfish

* audio.zip (Filesize: 2.54 MB, Downloads: 190)
« Last Edit: June 20, 2020, 06:49:04 pm by johnno56 »
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Blackjack
« Reply #107 on: June 20, 2020, 07:15:03 pm »
Thanks Johnno,

Almost done with slider bar for variable betting. I'm debating various scales for players who have millions or billions of chips. I can work these audios in before next post.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Blackjack
« Reply #108 on: June 20, 2020, 11:28:50 pm »
Slider bar turned out great once I figured out how to get good increments for the maximum bet range.

@johnno56  the ambience.ogg file is good until the freaking loud laugh and chips.ogg, I don't know sounds jiingly for felt cloth table, shuffle.ogg is fine. Man we need a Dealer talking.

So here is BJ v2020-06-20 with new slider bar and some audio.
 
BJ v2020-06-20.PNG


2020-06-29:  see Best Answer for latest update of Blackjack Game
« Last Edit: June 29, 2020, 11:39:47 pm by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #109 on: June 21, 2020, 05:03:34 am »
Nicely done indeed... Cool...
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #110 on: June 21, 2020, 07:06:12 am »
Hmm... I noticed the "peak" in the waveform whilst I had the file within Audacity... I suppose I could try to remove it or shorten the waveform... I will run a few tests and get back to you...

Yes. A dealers voice would be good. I will look for a descent online text to speech application... In the meantime, what sort of statements or comments, do you think will work?
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Blackjack
« Reply #111 on: June 21, 2020, 11:13:34 am »
If we can't get text to speech for any OS, I can do text to speech in Windows, if you can do it in Linux, then we can get code to tell us which OS and then use the text to speech method for each OS, theoretically :)

More homework ;-)

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #112 on: June 21, 2020, 11:50:21 am »
Um... There I go with my poor communication skills again... I was not suggesting that we install a TTS system, but using one, to create the speech audio files. So far, just about all of the 'free' TTS programs, produce 'mechanical' voices. This would be ok for space shooter and the like... Finding a TTS app that has 'natural' speech are usually cost prohibitive. I had used Cepstral in the past, when I was using 32 bit Linux, and the demo produced very good quality voices and would output to an audio file. So I checked out the latest Linux version. It installed and ran without issue, but because it was not registered, it will no longer output to an audio file. There are several TTS applications for Linux, but I wouldn't use them on blackjack. I will try to attach a sample just to give you an idea. If you search for Cepstral, you may be able to test some voices online...

* welcome.wav (Filesize: 122.55 KB, Downloads: 200)
Logic is the beginning of wisdom.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Blackjack
« Reply #113 on: June 21, 2020, 12:56:26 pm »
Brings back memories. One of my earliest programs was a Black Jack simulation. I found the mathematically most sound betting program from books, and simulated play over millions of hands. What I concluded was that you needed to bet very large amounts to make any decent money, and if you made any mistakes, as humans do, a few would put a weeks work to no gains and a few more would put you in the poor house. That program was possibly responsible for my first practice. The money I saved up working while in high school and college would have gone straight to the casinos, had I not made that simulator, oh, and read a book that pretty clearly stated that if you believe the people who built Vegas on organized crime wouldn't cheat you at cards, think again. It only takes replacing a couple of 5s or 2s for 10-count cards in an entire shoe to tilt the odds back in the house's favor.

Anyway, long story longer.... beautiful background, neat layout, and it sounds like this baby will have all the bells and whistles of a first class made for prime time computer game. It's stuff like this that makes we wish Rob would have had a simple way to port the language to mobile device. Obviously I'm glad he didn't try with Windows phone, RIP, but it would be neat to see this game on tablets, Android phones and iphones, but I digress... In regard to the game, it's great that you included double down, insurance, surrender, etc. Very professional! I haven't read all the pages, so I'll ask. Did you consider a two version option, playing from a shoe, which is Vegas style, or playing from a 52 card deck, which is played in Reno?

Awesome project. Best wishes on its completion,

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Blackjack
« Reply #114 on: June 21, 2020, 02:02:29 pm »
Hi @Pete,

I did put in Double Down but ruled out Insurance when I read advice from I assume professional player never to take insurance. It seems it only comes up when dealer has Ace showing, even if you win your Insurance Bet you still loose the original bet so WTH? it's not worth the trouble of coding or taking the option in Casino, unless I misunderstood something.

Surrender when I first read about it sounded interesting to cut your losses on a bad set of cards, then again is it worth coding the complex situation? I might put it in if someone can give me a good argument for it.

It is thanks to you I did do Double Down way back... I think it makes the game more interesting.

and way back, I think I did do multiple "dummy" players, I know I considered it, I'd have to read through the start of this thread too :P

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Blackjack
« Reply #115 on: June 21, 2020, 09:54:35 pm »
Well this is coming along nicely!  Good work

I'm sorry that I haven't been able to locate the higher resolution card set that I once had somewhere.  I may have deleted it. 

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Blackjack
« Reply #116 on: June 21, 2020, 11:13:26 pm »
Thanks @Dav, I am not worried about cards. Lookup under Vector Playing Cards, I have an Open Source set 500 X 726 each card!

@johnno56  I don't mind a Dealer that sounds like a robot, we can work that to our advantage maybe but we need to understand what e says and offer sub-titles, but we were going to have to do that anyway. :)

You might record common speeches but what about saying total amounts?

I wonder if we could Shell to the Browser and have a site translate text?

« Last Edit: June 21, 2020, 11:21:57 pm by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #117 on: June 22, 2020, 03:30:46 am »
I had thought of something like that... But outputing specific phrases to audio would require a registered version of Cepstal. The application I used was Festival. It's free and can use various voices, but as you would have heard, a bit too much on the 'mechanical' side for my liking. But, as you have implied, it will do for now...

For Festival, or Cepstral for that matter, would have to be installed on each machine to enable producing 'live' comments. Making a list of some well known gambling phrases; card numbers and suites; regular and amusing dealer comments etc could be used to make a 'library' of sound bites...  I have never gambled before and would not be a good source of information. Perhaps we could crudely imitate Scratchjack comments? I will start with them and get back to you. If the files are too big I will post a link.
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #118 on: June 22, 2020, 06:33:06 am »
Here are the converted ScratchJack voices. I still have to do a collection of 'smart mouth' comments.

Review these and let me know if they are any good? These will 'do in a pinch' but I will still research something better... fingers crossed...

* basicComments.zip (Filesize: 1.27 MB, Downloads: 189)
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Blackjack
« Reply #119 on: June 22, 2020, 06:38:55 am »
Try this modified version of ambience....

* ambience-stereo2.ogg (Filesize: 1.21 MB, Downloads: 170)
Logic is the beginning of wisdom.