Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Is there a blackbox package for drawing cards?  (Read 1191 times)
0 Members and 1 Guest are viewing this topic.
Offline SoulBreaker

Junior Newbie

Java Newbie

« Posted 2004-06-20 23:17:17 »

hi I am a new learner here.

I want to do a mobile phone card game using J2ME. I wonder is there a blackbox package that allow me to draw 52 cards for my mobile card game with drawing myself.

Drawing 52 different cards using coding is real pain.(I dont like to repeat 52 times myself)

I could have spend those time doing other stuff.
Offline Matzon

JGO Knight

Medals: 19
Projects: 1

I'm gonna wring your pants!

« Reply #1 - Posted 2004-06-21 03:36:59 »

a card is just a border, 1 or more symbols and one or more numbers.
it's a simple methods that just receives those arguments and use them to make a lookup in an array or likewise...
hardly something you'd want to use a 3rd party library for.

Offline SoulBreaker

Junior Newbie

Java Newbie

« Reply #2 - Posted 2004-06-26 10:26:57 »

ermm I have no idea what u mean. Tongue Huh

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline shmoove

Junior Devvie


« Reply #3 - Posted 2004-06-26 12:15:32 »

Something like:
void drawCard(Graphics g, int value, int suit)

The function draws the card according to the value and suit variables. There's no need to write 52 functions!


PS: In case it's not clear, that's a function you would need to write yourself, not one that already exists.
Offline SoulBreaker

Junior Newbie

Java Newbie

« Reply #4 - Posted 2004-06-26 23:34:16 »

So that means I have to draw out using pure coding?? Shocked There is no actual package available??  Tongue
Offline shmoove

Junior Devvie


« Reply #5 - Posted 2004-06-27 05:30:16 »

I don't know why you're so surprised. Do you know many languages that have special libraries to draw cards? I haven't heard of any.

And the code wouldn't even be too complicated. A lookup table for the suits picture, a few (I'd wager around 8 or 9) lines of code and you're done.

Offline SoulBreaker

Junior Newbie

Java Newbie

« Reply #6 - Posted 2004-06-27 23:23:05 »

May be I am too new in this field....I am not very good in Java.  Tongue (Last time is using netbeans IDE for drawing interface, I havent touch any interface/graphic G drawing coding at all)
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (20 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (27 views)
2015-07-24 06:06:53

NoxInc (35 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!