GLBasic forum

Main forum => Beta Tests => Topic started by: shadok85 on 2011-Mar-02

Title: Poker Game
Post by: shadok85 on 2011-Mar-02
Hi there!
I just completed my first small game. It's a variation of the poker game (five card draw poker), common in places like casinos. Currently, a system of doubling your winnings is missing, and the graphics is far from be jaw-dropping. I hope you like it. Feel free to storm me with feedback, criticism and bug reports! =D



[attachment deleted by admin]
Title: Re: Poker Game
Post by: Kitty Hello on 2011-Mar-03
I don't really understand the thing. There's only one button "Deal" and there's no real message when each round is won/over. Also no message if you've won/lost.

It works pretty good and recognizes the matches fine for my quick tests.
Title: Re: Poker Game
Post by: shadok85 on 2011-Mar-03
Quote from: Kitty Hello on 2011-Mar-03
I don't really understand the thing. There's only one button "Deal" and there's no real message when each round is won/over. Also no message if you've won/lost.

What do you mean? Can you read the messages (You got a Jack or high, You got three of a kind, You won 1, etc) in the middle of the screen when you have a winning hand? Is this method to visualize winnings too uncomfortable?
Title: Re: Poker Game
Post by: Kitty Hello on 2011-Mar-03
I'm just not familiar with this type of game I think.
Title: Re: Poker Game
Post by: shadok85 on 2011-Mar-03
Eheh, I just know this variant of the poker... I don't like to play with money, following the rule of the other variant like, say, Texas Hold'em, and stuff like that. This is just a conversion of a videopoker that my father made about fifteen years ago. It was coded first in AMOS (on Amiga platform), then in Blitz Basic (again on Amiga) and finally in Visual Basic 6.0 on Windows.
Ok, in the next release I will attach a guide for those who have never seen this kind of poker.
Title: Re: Poker Game
Post by: shadok85 on 2011-Mar-24
Hi,
a friend of mine has a HP pavillon dv6000, and the game doesn't run at all. All that we can see is a black window, then the computer hangs itself up and we have to restart manually. Here are the specs:

Windows Vista Home Premium SP2 32bit
Intel Core 2 Duo processor T5600 (1.83 GHz)
NVIDIA GeForce 8400M GS
4 GB RAM
300 GB Harddisk

The .dat file is in the same directory of the .exe file, it is the only computer where the game doesn't run, as far I know. What could be the problem?
Title: Re: Poker Game
Post by: Slydog on 2011-Mar-24
I haven't looked at your project, but I would suggest adding logging at various points in your program.
This way you can track if your program reaches a certain routine and such.

When your program crashes, you can narrow down searching for your problem by checking the log and see the last section the code was in.  Your culprit is most likely very close.

Create a function such as
FUNCTION Log: message$
   ... open a file (on C drive? or wherever the user has write access, or pass this function a file name)
   ... write 'message$' to the file (optionally prefix with current date / time)
ENDFUNCTION

Title: Re: Poker Game
Post by: shadok85 on 2011-Mar-25
Ok, I will try this way. Thx for the help!
Title: Re: Poker Game
Post by: shadok85 on 2011-Apr-01
I did as Slydog suggested me and my friend had the same results: the application didn't start at all! On my computer I can view the log file, while on my friend's computer no log file is created.
I did like this:

Code (glbasic) Select

// --------------------------------- //
// Project: PokerGame
// Start: Tuesday, February 22, 2011
// IDE Version: 9.018

OPENFILE(0, "log.txt", 0)

SYSTEMPOINTER TRUE
LogMessage("SYSTEMPOINTER set on TRUE")

SETSHOEBOX "Data.sbx", ""
LogMessage("SHOEBOX set with parameters \"Data.sbx\" and \"\"")

SETTRANSPARENCY RGB(255,0,128)
LogMessage("Transparency set with RGB(255,0,128)")

LIMITFPS 60
LogMessage("FPS limited at 60")

LOADBMP "background.bmp"
LogMessage("\"background.bmp\" loaded")

LOADFONT "Cambria12x14.png", 0
LogMessage("Font \"Cambria12x14.png\" loaded")

SETFONT 0
LogMessage("Font set on 0")

LOCAL game AS TGame

GETFONTSIZE game.fontW, game.fontH
LogMessage("Font size got")

GETSCREENSIZE game.screenW, game.screenH
LogMessage("Screen size got")

game.initAll()

WHILE game.gameOver% = FALSE
game.updateGame()
game.renderGame()
SHOWSCREEN
WEND

// ------------------------------------------------------------- //
// ---  LOGMESSAGE  ---
// ------------------------------------------------------------- //
FUNCTION LogMessage: message$
OPENFILE(0, "log.txt", -1)
WRITELINE 0, message$
CLOSEFILE 0
ENDFUNCTION // LOGMESSAGE


So, I passed a simple application to my friend, like this:

Code (glbasic) Select

CLEARSCREEN RGB(0,0,0)
PRINT "This is a test", 0, 0
SHOWSCREEN
KEYWAIT // or MOUSEWAIT


Well, a black window with the "This is a test" string is showed, after that the application hangs itself and my friend is forced to restart the PC.
Title: Re: Poker Game
Post by: shadok85 on 2011-Apr-04
So, no ideas, no help? O_O
Title: Re: Poker Game
Post by: Kitty Hello on 2011-Apr-04
No. What OS is this?
It's really strange. Update the drivers for the gfx card, maybe? But it sounds really weird. You have SHOIWSCREEN in the loop, right?
Title: Re: Poker Game
Post by: shadok85 on 2011-Apr-04
He runs Vista Home Premium Edition 32bit , with Service Pack 2 and, yes, the last call in the main loop is SHOWSCREEN, of course. I posted the infos in the previous posts.
Perhaps he should update the gfx drivers... Well, I will let you know about progresses.
Title: Re: Poker Game
Post by: shadok85 on 2011-Apr-14
Ok, so my friend updated the gfx drivers. He told me the game started and he played at it, but it is very slow and when he close the game window, it takes minutes because it hangs itself, after that the window go away. The log.txt that I instructed to write is not saved.