Need help with my Poker game...

Hi everybody!

I would like to get some advices from you, because I am having some difficulties with my game that I am currently developing.The problem is that while the cards are drawn on the screen (after the game is being played for a couple of times), the whole screen freezes. This also happens when I choose the cards to hold and when new cards are being redrawn. I use GIF-images which I initialize as usually with

Image pic1;

pic1 = getImage(getDocumentBase(), temp[1]+".gif");

where temp is an Int-array which holds all the cards (number of cards between 0 and 51). I think that what causes this problem may have something with loading of the images to do,perhaps I have to wait for all five images to be loaded first, before drawing them on the screen.

Any help is appriciated, and sorry about my bad english.

Thanx

[867 byte] By [veroslava] at [2007-9-28 5:55:22]
# 1
Are you using double buffering?.
RollWhisTlera at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...
# 2
No,I am not.Is it going to help?
veroslava at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...
# 3

Yes, it is...but im a newbie too and i can be wrong.

Create a temporal image that represents your screen, take the temporal image graphics and draw there your cards, using g.drawImage.

Image Temp = new Image();

Graphics g = Temp.getGraphics();

for all your cards:

g.drawImage(whereever you want);

And then, draw the Temp image into de graphics of your applet or what ever you use.

Sorry my english you too X_D.

RollWhisTlera at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...
# 4
Actually, I don't think double buffering would help.Are you monitering the loading of you images with MediaTracker or ImageObserver?Could you give us some more code?
Viruma at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...
# 5
sorry I don't know.
booann35a at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...
# 6
Next time, before you post, check the date. If it reads sometime nearly 3 years ago, don't reply.
Talchasa at 2007-7-9 17:06:18 > top of Java-index,Other Topics,Java Game Development...