Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (790)
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  
  Durak Card Game (PulpCore)  (Read 4356 times)
0 Members and 1 Guest are viewing this topic.
Offline newgame

Junior Newbie





« Posted 2009-08-22 20:39:13 »

Hello everybody,

I'm writing (so it's a WIP) a Card Game Applet using PulpCore as the Game/Graphics Engine. It is an implementation of a popular russian card game, called "Durak" (Idiot). You can learn about the Game mechanics here: http://www.pagat.com/beating/durak.html or http://en.wikipedia.org/wiki/Durak
I could simply sum up that durak is a strategy game where the purpose is to not be last player that still has cards in his hands. There is always a defender which has to cover cards and up to two attackers that attack. The attacker and defender roles rotate after each round. But there is much more to the game than this.

Actually, since it is a personal project for learning purposes, as of now, I'd like to have suggestions from you about my program structure / programming style. Before I polish and finish this project I'd like to ensure that the code is "good" (aspects like reusability, comprehensibility...). Since there is no such subforum, I posted here, which is not bad either since I'm going to finish this project soon anyway and then just post the finished version in this thread.

So here is a link to a "playable" (it is not yet everything implemented) version: http://storytube.kilu.de/durak7/
Without knowing the rules of the game it seems random, so you should have a look at the rules. Controls are double-clicking anywhere for taking the cards or not adding an attacker card. And for putting a card onto the arena: clicking and "throwing a card in the arena" (click, drag fast enough and release).
Here is a link to the netbeans project with sources: http://storytube.kilu.de/Durak_0.8.tar.gz

Basically, I'd just like to have critic about the source code. It can be anything, but especially critic about the "macro-design" (so to say), how well/bad the inter-class-dependencies (i hope you understand what I mean) are designed, and how well/bad the class design and the use of design patterns is. Of course I'm also interested in everything else that you find to critise.

My basic design:
I've used the MVC (more MV) pattern for the whole program structure. First of all I'd like to know if I implemented it reasonable.
I tried to stay true to the paradigm "composition over inheritance". I also created a little bit javadoc which can be found in the package. I'd also like to know ideas about alternative, maybe more efficient ways of structuring a 2D card game in java and maybe suggestions if it would have been easier to implement specific things in other languages (because of other language features).

Ok, I hope someone looks at the source code!

Btw, if someone is good at graphics creation and is interested in contributing to this project: I'd need general advice about designing the playing table (like where the opponents should sit, how big the cards should be), a background graphic, a logo, a label for the player names and a very small defender symbol (like a shield or something)

best regards,
newgame
Offline SimonH
« Reply #1 - Posted 2009-08-23 15:22:16 »

I don't really understand the game but it seems to work fine...!?
For ideas on how to present card games you could take a look at some of the online poker sites (without joining of course!), there's some pretty innovative presentation styles you could 'borrow' from them!

People make games and games make people
Offline newgame

Junior Newbie





« Reply #2 - Posted 2009-08-30 06:47:22 »

I just wanted to update this thread.
Here is a newer version of the game http://storytube.kilu.de/durak10/

Yes, I draw the graphics myself and as you can see it's the work of a master of arts. I didn't find volunteers for drawing (even if I hoped to find someone I did not expect any volunteers) that's why I did it myself Smiley.

I did not add anything new to the game since the last 6 days because there was some "bug" that I just could not solve without changing the whole structure of the program. So I thought that is up until now. Unhoped-for, I had an idea to fix that "bug" quickly (yet ugly) so that I could upload a working version of the game. Note that the performance is rather bad but I did not concentrate on improving it just yet. There are still some small inconsistencies regarding the game play logic, however, overall I'm happy with the game play logic.

I realized that I'd have to redesign the code if I wanted to add the other features which I have in mind. So this is basically the next step to this project. You do not know any boards that deal specifically with game programming techniques / game program design (with java), do you ? I know software design in general is of course applicable to games. Nevertheless I think games are a special case that need specific design approaches.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mr. Gol

Senior Devvie


Medals: 1



« Reply #3 - Posted 2009-08-30 10:24:09 »

I realized that I'd have to redesign the code if I wanted to add the other features which I have in mind. So this is basically the next step to this project. You do not know any boards that deal specifically with game programming techniques / game program design (with java), do you ?

Eh... this one? Smiley

Don't worry too much about having the perfect architecture/design the first time. Try to focus on making a fun game, and then start refactoring the code with the things you learned in that time. Every year when I see my own code from a year before it seems incredibly bad to me, which hopefully means I'm learning more and more Smiley
Offline newgame

Junior Newbie





« Reply #4 - Posted 2009-08-30 13:47:58 »

Eh... this one? Smiley

Don't worry too much about having the perfect architecture/design the first time. Try to focus on making a fun game, and then start refactoring the code with the things you learned in that time. Every year when I see my own code from a year before it seems incredibly bad to me, which hopefully means I'm learning more and more Smiley

I'm blind Smiley! When I saw the "game design" subforum I thought it was mainly about designing a game in general but not its program structure, but I as looked into the subforum I realized it is exactly what I was looking for Smiley. Ok, so I'm going to create a thread with my questions there Smiley unless the other threads do not already answer my questions.

Although I acknowledge your advice, I can't agree with you. I mean I don't have a deadline for my hobby projects Smiley, so I don't have to get them done "somehow" if time is getting short. I can do it right - from the beginning. Plus I want to learn from the projects and it makes fun redesigning the program, seeing how it becomes more comprehensible.
Of course you're right when you say that I may wonder how bad the code looks in a year from now when I am more experienced. But like I said in the first post; ultimately my goal is not the game per se, but the journey to the finished game (oh this sounds cheesy Smiley, but I hope you get what I mean).
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
buddyBro (197 views)
2017-04-05 03:38:00

CopyableCougar4 (627 views)
2017-03-24 15:39:42

theagentd (622 views)
2017-03-24 15:32:08

Rule (671 views)
2017-03-19 12:43:22

Rule (645 views)
2017-03-19 12:42:17

Rule (648 views)
2017-03-19 12:36:21

theagentd (660 views)
2017-03-16 05:07:07

theagentd (595 views)
2017-03-15 22:37:06

theagentd (434 views)
2017-03-15 22:32:18

theagentd (364 views)
2017-03-15 22:31:11
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!