Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Poker Game - Works this time!!!

Author
Message
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 6th Jun 2009 05:16 Edited at: 6th Jun 2009 05:17
ok, as many of you know I temporarily postponed my poker game a few months ago (I gave up)

well ive been thinking about it lately and I restarted the project, and I got farther than last time!!!

here it is, its nowhere near done (and its already over 500 lines long) but it works!!

note: it looks like crap in DBC, but thats cuz im doing it in pro (I havent quit DBC, pro is just what i us for my own projects)



click to cycle through showing the cards on table

and the suits work in pro, no idea why they dont in DBC

There are only 10 kinds of people in the world, those who understand binary and those who dont
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Jun 2009 05:58
Nice work!

Glad to see it up and running again, i like poker games

New Site! Check it out \/
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 6th Jun 2009 06:04
tnx, something just occured to me though, i have NO idea how to pull off an accurate AI system, when i mean accurate I mean different players will be more likely to call or raise to a larger bet, and some will be more..... evasive i guess is the word

i guess I could put values for each players skill level into an array and factor that into a betting system, but still regardless of their skill a big enough bet would scare them off, any betr ideas?

There are only 10 kinds of people in the world, those who understand binary and those who dont
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Jun 2009 07:13
Well you could have different AI "Player Types" where when they get there hand, based on what there hand is you could assign a type, like if they have a GREAT hand then bet high, if that have a ok hand then have RND(1) or something to figure weather to stay or quit. a bad hand then just fold, then you could have a random number to see if you want to bluff. course while i say this it doesn't sound to hard but implementing it is probably annoying lol

New Site! Check it out \/
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 6th Jun 2009 08:14
Quote: "and I got farther than last time!!!"

Yup everytime you revisit old code, if this happens then you're getting better ^_^. Keep up the good work.


About AI you can give the players stats.

Player 1 would have stats like the following which will be used for a random out of 100.
pINT(1) = 80
pRISK(1) = 15
pBLUFF(1) = 60
pCHEAT(1) = 8
ect...

or you can use user defined types.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 6th Jun 2009 08:23
i think what im going to do is have an array with 7 subsets (for the 7 comp. players) then im going to fill each with a rnd(40) value or something similar then the AI code to decide what to do would go like this:



then i would create kind of a library of those values for each possible hand

and after that i would have those values affected by the random skill value for that player

so example, a player with 20 skill has trip 7s after all cards have been shown (a hand situation that has a fold level of 30 and all in level of 80) so i would do something like change the fold value to 10 and the all in level to 70 based on skill level, then just check for the choice value to be between them or below or watevr

There are only 10 kinds of people in the world, those who understand binary and those who dont
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Jun 2009 11:45
Something else to factor in is how much the pot (total of all players' bets) has been raised.
If the pot is $40 and the player has bet $10 of that he is probably going to continue if he has good cards, he has a 25% stake in the pot. If the pot is raised to $100 before the player's next bet he is less likely to continue as he only has a 10% stake in the pot.
You also have to factor the number of active players into that. If there are ten players it's expected you'd have a 10% stake.

There is an eight letter word. You can insert a letter into it or remove a letter from it without changing its meaning. Answer
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 6th Jun 2009 19:43
ok, good idea obese

wow this is getting complicated

There are only 10 kinds of people in the world, those who understand binary and those who dont
Travis Gatlin
16
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 7th Jun 2009 19:19
it looks lame when i tried it on DBC but good job anyway..... i wish it was 3d though...

the modern government tries to make time,into money that is why clock are not free! in theory time is actually money!
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Jun 2009 00:02
It doesn't look that bad, and it's not final graphics i don't think

New Site! Check it out \/
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 8th Jun 2009 01:42
like I said the graphics are much betr on pro, and im not sure if this is final graphics or not, thats not exactly high on my list at the moment

There are only 10 kinds of people in the world, those who understand binary and those who dont
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 8th Jun 2009 01:59
Quote: "it looks lame when i tried it on DBC but good job anyway..... i wish it was 3d though..."

It would have been foolish for Smartguy to work on the graphics before he had the game working.

There is an eight letter word. You can insert a letter into it or remove a letter from it without changing its meaning. Answer
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Jun 2009 12:40 Edited at: 14th Jun 2009 12:49
@Smart Guy

Quote: "note: it looks like crap in DBC, but thats cuz im doing it in pro "

Careful with your wording. You programmed the code less compatible with DBC. You are using the same 2d graphics.

For DBC the font character set is important. Change your symbol fonts to Set Text Font "Symbol",2 and change your arial to
Set Text Font "arial",1

To fill an ellipse, use two of them and offset them slightly:



And Voila:



You'll still have to do some tweaking with the number positions on the cards.

Enjoy your day.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 14th Jun 2009 19:40
actually i developed a circle maker for making filled circles that i could probably adapt to ellipses

basically it just uses two for next loops to check every pixel from cx-rad,cy-rad to cx+rad,cy+rad and if the distance from that pixel to the distance is less than the radius then draw a dot

and actually im taking another of my temporary breaks on this game until I can come up with a more accurate AI system

There are only 10 kinds of people in the world, those who understand binary and those who dont
misifield
17
Years of Service
User Offline
Joined: 23rd Nov 2007
Location: ohio
Posted: 24th Jul 2009 01:13
Ive been working on a texas holdem text game. I am kind of new to programming also so dont make fun of me about my organization or my gotos and functions.It has been about 6months since ive looked at this code and I dont remember were to pick back up on it but you can see what I did for AI. I gave my hands a value and depending on how high the hand was that player would bet.


mfield

Login to post a reply

Server time is: 2025-05-15 19:38:04
Your offset time is: 2025-05-15 19:38:04