Black Jack @ Wolfgang

Content and general development discussion, including quest scripts and server code. The Mana World is a project comprising the original tmwAthena server & a designated improved engine server based on evolHercules


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board. Its current use is for the continued development of the server and game it has always served: The Mana World.

User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Black Jack @ Wolfgang

Post by tux9th »

Hi,
I just played blackjack and found out that there are some flaws in the game mechanics.
  • If bank and player have the same count nobody wins nobody looses
set @croupier, rand(0, 4);
set @croupier, @croupier + 17;

makes it impossible for the Croupier to ever have less than 17 and more than 21?! What the F*** is that? That is more than unfair and btw not the rules of the game.
why should he only have 17 - 21 ?! thats completely illogical

I would really encourage a serious rewrite of that script as it is completely out of balance and nothing but a rip-off
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Black Jack @ Wolfgang

Post by Crush »

When it would simulate real black jack more accurately, it would still be unfair for the player. Every game you can play at a casino is unfair. Otherwise the casino wouldn't play it with you.


The one-armed bandits from Borderlands 2 are a good example how gambling in games can be done in an interesting way. You don't win money - you win unique items (and sometimes you win a grenade... a primed one).
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

okay rewrite is done.
http://paste.ubuntu.com/1360630/

this should be it. it however does not do all of the black jack rules but it does the most basic ones.
gives two cards at first, lets you choose between 1 and 11 if dealt an ace, when you're don playing the dealer also gets two cards then has to draw until he reaches 17.

well if you do not know how black jack is played just check your local wikipedia or casino.

I did not include split, double down, surrender.

Even when it does not cover all the features you can play in a casino it is a lot better than the old script, which basically wasn't black jack.

greets

PS: Dialogues can and will be adjusted.

Edit: 2013-09-08
Dead pastebin link -> checkout https://github.com/tux9th/tmwa-server-d ... /blackjack
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

It took some time because I dropped the project then but I rewrote everything added a function and this is now up on both testing servers.

Read the Testing Server news for further information.

regards
tux9th
User avatar
Alige
TMW Adviser
TMW Adviser
Posts: 1398
Joined: 09 Jan 2010, 19:22

Re: Black Jack @ Wolfgang

Post by Alige »

Making this be animated could be fun, especially if you can play with your friends! Playing blackjack alone is boring.
This could be a nice small project. :)
Image
Quinny
Peon
Peon
Posts: 48
Joined: 18 May 2013, 20:37

Re: Black Jack @ Wolfgang

Post by Quinny »

I saw a small bug with this one. We both lost I had 22 and he also had 22. In blackjack if I busted he shoulod not have drawn a card to also bust.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

The bank has to draw until 17. That's a rule it doesn't matter if you are over or not.

However if he also is over you shouldn't have lost. I will research this and think about it. Thanks for this report.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

I fixed the issue you described quinny. Please keep on testing.

best regards tux9th
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 653
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Black Jack @ Wolfgang

Post by AnonDuck »

Be careful with this. It's free money if it's bugged. The house was given such an advantage to prevent GP farming as it's pretty easy to script up optimal blackjack play in the client..
Head of the TMW Illuminati
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

What additions do you miss to make it like real black jack?
I don't think it's a problem to have black jack in game the way it is played in casinos. casinos never lose either :P.

So what addition would you make to make it more real?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Black Jack @ Wolfgang

Post by Crush »

MadCamel wrote:Be careful with this. It's free money if it's bugged. The house was given such an advantage to prevent GP farming as it's pretty easy to script up optimal blackjack play in the client..
That depends.

The first hand dealt in black jack is always in favor of the bank. The game only gets shifted to the advantage of the player when the cards of previous rounds aren't shuffled back into the deck and the players uses the knowledge which cards are out of the game to their advantage ("card counting"). When you do not simulate a deck of cards and deal each card from a random number generator without regard for which cards came before, this won't work and the player will lose, even with an optimal strategy.

There is, however, still a possible technical weakpoint: Random number generators in computers aren't really random. They are pseudorandom and in some situations the next result can be predicted when you know which numbers came before. In the context of an MMORPG server, however, there is a high demand for random numbers in all kinds of other contexts (like combat calculations). When they all use the same random number generator, it should be impossible for a black jack player to guess the next result, because an unknown number of results were created in between.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Quinny
Peon
Peon
Posts: 48
Joined: 18 May 2013, 20:37

Re: Black Jack @ Wolfgang

Post by Quinny »

I tried it again today a few rounds and it seemed to wrok just fine. I was not able to make money off of it I don't think it could be an exploit.I will keep trying it again later when I have more time to make sure.
User avatar
Kazenawa
Novice
Novice
Posts: 189
Joined: 18 Dec 2011, 09:24

Re: Black Jack @ Wolfgang

Post by Kazenawa »

I haven't counted how many times I've played the game, but at least 50 times.

I started to play with 100k gp and ended with 100k gp...

Currently, I don't think it's possible to really earn money from it. For sure, you could win some, but i don't think that doing it repeatedly would give you money, even if my at-least-50-times try is low...
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: Black Jack @ Wolfgang

Post by tux9th »

Thanks for testing Kaze.

I will leave this up for more testing and maybe bring it in the next release (not the upcomming one).
Quinny
Peon
Peon
Posts: 48
Joined: 18 May 2013, 20:37

Re: Black Jack @ Wolfgang

Post by Quinny »

Ok, so I tested again tonight I played 23 hands and won 11 of them. I saw on my debug window that some wins I got 2000 gp. I assume those are the times I got 21. But it seems to be working good and as I said before don't think we will be makeing money off this just a little fun.
Post Reply