#Java Swing Card Game on Events - asking for code review

10 messages · Page 1 of 1 (latest)

turbid schooner
#

hi guys, i'm creating my own Roguelike Deckbuilder (like slay the spire) game prototype in Java Swing and trying for the first time Event Driven Architecture. Can someone give me code review for my chosen architecture and overall system design? I'm afraid i made too big of a mess with dependencies and so on.

I'm not sure if i should extend usage of EventBus to gui client so he can react to events instead of checking server entities status.

Also i'm not sure if all game operations should be events or some of theme. And i made main Game object global EventHandler but maybe i should make other objects as handlers for things concerning them?

Quick note about rules of the game.

Player leads team of 2 creatures that have their own decks of 4 cards. They play 2 cards automaticly every turn. The same for enemy team.

There are 2 possible cards. Block 1 and attack 2. Block gives team protection of 1 and attack deals 2 dmg to random enemy if not blocked.

Now game plays itself until one team looses.

Things to do next is to give player options to upgrade creatures decks and make more cards with new interactions.

code: https://github.com/dixu11/roguelike-deckbuilder-proto
ps: swing is temporary i will migreate client to LibGDX if i feel ready
ps2: YOU SHOULD CHANGE WINDOW LOCATION IN DISPLAY CLASS BEFOR STARTING GAME.
it's becose i set location far far right on 2'nd screen

GitHub

In this game player lead team of creatures that have their own decks and play cards 2 at a time. Player can steal cards from enemy team to give them to creaturs in his team to help them win. - GitH...

indigo berryBOT
#

⌛ This post has been reserved for your question.

Hey @turbid schooner! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

turbid schooner
#

is this post visible?

frail haven
bleak igloo
#

Yep

indigo berryBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

turbid schooner
#

how to "re-open" post?

indigo berryBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

turbid schooner
#

still actual 😉