Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / console-text-based games on: 2007-11-27 00:12:48
I am working on a text-based poker game.

I managed to get a working game so far.

Card, Deck, Player etc and Game classes

Basically, inside Game class, I create all objects and simulate the game play.

Now the problem is that all input/output is embeded in the code. This is a problem, as I d like to have a Model independend of view.

Whats the proper way to implement MVC with console based games? or the Game class is considered just a controller, and not part of the Model?

2  Game Development / Game Play & Game Design / Re: Card games on: 2007-11-25 20:55:08

Helpfull, but source code not available to reference when reading Sad
3  Game Development / Game Play & Game Design / Re: Card games on: 2007-11-24 17:06:37
I designed my game, but I came to a point were I don't know how to make the classes work together.

I got

Deck (52 Card)
User (extends Player)
Computer (extends Player)

and a Game class which will be the main loop. However, I am not sure how to implement betting; could mean deduct 10 from the player object and add to the pot instance variable of table.

Is this "proper"? or a bad design?

4  Game Development / Newbie & Debugging Questions / Re: card game - how to find who won? on: 2007-11-22 21:57:12
I am making a random game with basic rules for now, until I have a working set.

But I have problems setting up a betting structure. I think my Table class needs revision. I could really use a card game example in java but I cant find any. Do you have any links?
5  Game Development / Newbie & Debugging Questions / card game - how to find who won? on: 2007-11-22 21:10:37
I am having problem thinking of a way to determine a winner of a hand, or if its a draw.

I have a players vector which holds Player objects.

I use

for(int i=0; i<players.size(); i++) players.get(i).bet() etc to play the game


how I can go through the vector and determine a winner or find out if its a draw? One way is to sort it and get the last element , but if its a draw?

Any ideas, or my players in a vector idea is rubish? I though using a vector because you never know how many players will play and if I used conditional structure it would limit it.
6  Game Development / Game Play & Game Design / Re: Card games on: 2007-11-22 18:13:06
Thanks for the info, the article is oh help.

Also, can someone check out my design and say if it ok? Do I need to make more classes? less? Hand can be an arraylist in player of type Card for example?

I really need a java "card games" tutorial/article please.

I feel I am  lost :/
7  Game Development / Newbie & Debugging Questions / Re: command line on: 2007-11-21 19:10:31
I see, well, my game is cards.

What you suggest I use of input? Is a console game for now.
8  Game Development / Newbie & Debugging Questions / command line on: 2007-11-21 18:46:36
How you implement "commands" in a console based game? I though about some sort of parse(String input) method to take in input and "guess" what the user wishes to do. However, differrent commands are available depending on whch stage of the game you are? How to go round this?

9  Game Development / Game Play & Game Design / Card games on: 2007-11-21 18:05:59
Hello everyone,

I am proficient in Java, but I am new in game development, and I would like some guidance please Smiley

I would like to develop a Java card game, but after identifying the obvious classes:

Player(Abstract) extended by Human, Computer

I am stuck Sad

Do you think Hand should be part of the Player class (Vector for example)?
Do you think Player should be objects inside Table?

Can you recommends any resources with examples so I can understand how to start? I know that I must make objects communicate to simulate the game, but what is the "proper" way or pattern used?

I read that you can use pattern such as MVC or observer observable to have the same game be played from console window, GUI, remote client etc.. I like this idea, but I don't have the experience to implement it Sad

Also, I read about the Facade pattern were you sum up all the objects into a single class so it becomes like a framework. What methods should a proper Facade support in a card game? game.start()

I would like to start coding a simple game with only console input/output and then worry about graphics etc, and use good design practises so I dont need to keep stating from scratch all the time if I add/remove to it.

Thanks for your time, and any help is very appreciated Smiley
Pages: [1]
EgonOlsen (78 views)
2018-06-10 19:43:48

EgonOlsen (58 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (260 views)
2018-05-13 18:23:11

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!