Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (515)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
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?

Thanks.
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

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

and a Game class which will be the main loop. However, I am not sure how to implement betting

Table.bet(player.bet(10)); 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

however,

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?

Thanks.
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:

Card
Hand
Deck
Player(Abstract) extended by Human, Computer
Table

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() game.bet()?

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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (30 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (39 views)
2014-10-26 19:37:11

Luminem (21 views)
2014-10-26 10:17:50

Luminem (25 views)
2014-10-26 10:14:04

theagentd (31 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (57 views)
2014-10-16 15:22:06

Norakomi (46 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!