views:

259

answers:

2

My friends and I at uni love playing Shithead into the wee hours. But soon we graduate and will leave town, so probably won't get together for a game for a while.

I want to develop a Java app we can use to play Shithead and our other favorites over a network.

An app like this already exists, but is ugly, buggy and does not support our house rules. The source is available, but is such a mess that I would really rather start from scratch than try to refactor it!

Building my game using some standard playing card api or framework, if such a thing exists, would be better than starting from scratch. The answer to a similar SO question was to use the JPC-API, which allegedly provides basic playing card services and rendering. But this Sourceforge project currently makes available no files or source code!

Is there an alternative, or somewhere else to find this framework?

Soon I will need help with the following as well:

  • Lobby services (finding other players)
  • Gaming network protocol (to communicate moves between players)
  • Gaming theory (to write the computer opponent)
  • Winning condition detection
  • Game UI development
+1  A: 

I recommend you to use Red-Dwarf for the server and Jnag for the client-server communication.

Jnag as some samples that you can use to get started. Additionally, the author of Jnag (me) is always happy to help people use Red-Dwarf and Jnag.

http://kenai.com/projects/jnag

Vincent
Thanks. This looks good! Sorry it took so long to get back to you. This project has been postponed for a while. But when I get back to it, I'll try using Jnag as the engine!
isme
A: 

I think that you will learn a lot more by building the core of the game yourself, and using existing frameworks for general services.

There are enough options for client/server communication, from game-specific lobbies and protocols to writing it yourself with things like JMS.

For the game logic, this is what makes your game unique, so figure out winning conditions and all that.

For your opponent AI, you need to supply an evaluation function, but you can probably use existing AI frameworks to pick moves given that function.

For the GUI, there are enough icons around, you can probably code a rudimentary GUI fairly easily.

Uri