Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 01: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 21: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 18: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 22: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 22: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 19: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 20: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 19: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 19: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]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (77 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (119 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (126 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.145 seconds with 21 queries.