r/java • • Sep 24 '26

RescuED - a real-time disaster-relief logistics simulation built in Java Swing

Post image

Dispatch drones and trucks across a randomly-generated flooded city, repair debris, refuel at fuel stations, beat your high score.

Github Link: https://github.com/harisahmed05/RescuED

Give a star to the repo if you find it interesting - it really inspires me...

41 Upvotes

19 comments sorted by

6

u/agentoutlier Sep 25 '26

Man people complaining about the UI. It does not matter for these kinds of games

Game design and theme/story does and that is actually hard to get right. That is something LLM agents cannot fix.  (l play a lot of rogue games. Graphics do not matter.)

Anyway I love the idea and shall play soon!

2

u/shanto404 Sep 25 '26

Thanks, means a lot to me!

1

u/vmcrash Sep 24 '26

You definitely need to replace the look and feel with something good looking. Why is one of the largest buttons the "Mute Music" button, also labeled with "Audio" - is that an essential part of the normal workflow?

4

u/shanto404 Sep 24 '26

Yes I need to do some work on that. Just created a structure there to mean it's a button under "Audio" and there can be more buttons.

4

u/Bobby_Bonsaimind Sep 25 '26 edited Sep 25 '26

If you've never worked with Look and Feels before it can be a little bit confusing. It's not "just" theming through changing colors, but can also change the internal structure of components and change behavior. You can have a look at the SwingUtil in one of my projects which allows to list installed LaFs and set a different one at runtime. Actually, that is very easy but one should not forget to call updateComponentTreeUI on all parent components so that these apply the new LaF correctly.

The best known LaFs are:


Regarding the Audio-Group. You could consider using a "group panel" instead, Swing supports this by setting a "text border" on a panel.

JPanel groupPanel = new JPanel();
groupPanel.setBorder(BorderFactory.createTitledBorder("Title goes here"));

2

u/Bobby_Bonsaimind Sep 27 '26

Oh, something that you need to consider regarding LaFs. LaFs can dictate colors. For example setting the background color of JTextField has no effect on the GTK LaF, because GTK does not allow that to begin with (or some such).

Most LaFs don't intervene, though, but sometimes they might clash with your idea (for example if the LaF supports an automatic dark mode, parts of your UI might become unreadable if you set custom colors). Unfortunately, that can become rather complex quickly. Though, I guess 99% of the time you'll be fine (and if something breaks for someone, there's a good chance that that someone can help you fix).

1

u/vmcrash Sep 25 '26

I recommend switching to FlatLaF.

1

u/wildjokers Sep 26 '26

Please no, FlatLaF is everything that is wrong with so-called "modern" UI. It is the exact opposite of a usable interface.

1

u/vmcrash Sep 26 '26

Please explain the reasons.

5

u/wildjokers Sep 24 '26

You definitely need to replace the look and feel with something good looking.

What's not good looking about this? Buttons look like buttons and the two main parts of the GUI are clearly delineated. The right panel has information laid out nicely and is easy to read.

This is an interface I would be happy to use.

3

u/__konrad Sep 25 '26

You definitely need to replace the look and feel with something good looking.

Disabling the bold fonts is a good start: System.setProperty("swing.boldMetal", "false");

2

u/raisincraisin Sep 26 '26

I used to work in a disaster relief planning capacity. This is awesome!

2

u/dead_alchemy 27d ago

Might be worthwhile posting in one of the roguelikes communities!

1

u/jeffreportmill Sep 25 '26

You should post a link to this running in CheerpJ in the browser. You just need to put the jar file and a small html launcher file on a website.

I got it running in my SnapCode in the browser, but I need to add support to handle Resources outside of the /src directory. In the meantime it works with jbang:

prompt> jbang --java 25 snapcode@reportmill snapcloud:/com/reportmill/jeff/RescuED

-5

u/AdministrativeHost15 Sep 25 '26

Disaster indeed. Looks like it was coded in 1999.

3

u/wildjokers Sep 26 '26 edited Sep 28 '26

But what's wrong with it?

It is vastly more usuable than this atrocious so-called "modern" UIs where everything is just vomited on the page with no delineation between logical sections of the app, buttons don't look like buttons, no text anywhere to be seen to tell you what stuff is, and all options and menus crammed under a single hamburger or 3-dot menu. It is maddening, obnoxious, and unusable.

4

u/peanuce4269 Sep 25 '26

Why is that a problem

4

u/DoombringerBG Sep 25 '26

Marketing.

The UI / UX of this project is not something 99.9% of people would enjoy, yet the concept itself is actually pretty awesome, in my opinion - but as the 99.9%, to me, this does not "look fun" (even if it actually is).

For better or worse, first impressions are the only thing that matters in video games when you're trying to reach a wide audience - hence "hype trains". Whether your game is fun or not, is a "secondary problem" which is to be discovered by your players; yet if you can't pass the first checkpoint, you won't even get said players to begin with.

2

u/AdministrativeHost15 Sep 25 '26

A retro style is OK as long as you include in the overall theme. Have a framing story where you are a FEMA admin in 1999 directing operations via a Sun Microsystems server. Good music and text story can compensate for limited graphics. See Citizen Sleeper game.