r/JavaFX • • May 29 '22

I made this! Gilded Sols - JavaFX / FXGL Chess-Based Game

Hi Everyone,

I'm at 26K lines of code in the game i've been making in JavaFX, and I wanted simply to share the UI/graphics that i've made for the game to demonstrate my progress to other people. I hope this stimulates your interest / curiosity! Video is only 3 minutes long.

Thanks for reading!

https://www.youtube.com/watch?v=IRjuBLkDfOs&t=6s

12 Upvotes

6 comments sorted by

1

u/Persism May 30 '22

Looks really cool!

You should also post in /r/GameDevelopment/

If you need something to handle all your data try Persism

1

u/stardoge42 May 30 '22

Hey thanks for the positive feedback, that means a lot! I really appreciate it. I’m going to post it there too. I also just did the very first online to online test match, so Alpha-Alpha as you’d expect, and there were glitches, but the fundamental abilities worked online. Melee attack, ranged attack, magic attack, three abilities per unit including categories such as healing, buffs, AOE, drain strikes, resurrects and more. I’m going to record a concise second video of maybe 5 minutes of match / gameplay to show it off soon. Thanks again!

1

u/hamsterrage1 Jun 01 '22

26K lines of code! Any chance at getting a peek at it?

It looks good. I did find the background water animations a little bit distracting, though. It might be a bit less so if you dropped the opacity down a little bit. Also, they're all cycling through in phase, so it feel like the whole screen is pulsating. If you could randomize them a bit so that some are getting dimmer as others are getting brighter, that would probably take away that feel.

1

u/stardoge42 Jun 01 '22

Hey Hamster, thanks for the feedback on the water. The water is actually randomized GIFS of water made from 4k footage in premiere and so I have an image finder that pulls in one of let’s say 10 or 12 of the water gifs. So there is absolutely repetition, but it was the best way I could figure out to add water to my chess based game, the other idea I had was to use a media view of 4K water under pinning all of the tiles but then it would be hard to see what slot you’ve clicked on. The graphics aren’t perfect but the gameplay has come a long way. Is there any part of the code you’re particularly interested in? The networked event engine is the core of online gameplay and has different combat managers for proposed movements, the networking code of the code is the most complex and I’m making an udemy on networking in Java with sockets, and a lot of the UI stuff is just stacked image views on top of pages with image finders to auto pull let’s say a green digit of 5. Let me know what sort of aspects of code your interested in and I’ll see what I can do!

1

u/hamsterrage1 Jun 01 '22

I'm just always interested to see how people approach these things.

Your title says FXGL which, IIRC, runs off a central loop with action happening every tick. That's great for games based on moving screen objects with physics and collisions, but I'm curious how you use it for something more chess-like.

1

u/stardoge42 Jun 01 '22

I only use a very limited amount of FXGL features, In particular the timer which runs on the FX Rick is very useful for updating graphics / animations without having to use Platform.runLater. It also comes with a sound effect manager / loading system that works pretty well although it doesn’t seem to work well on MacOS, (causes crashes), but for playing sounds it’s far superior to using media player for different sound effects at same time. It also has built in menu support and volume support and also a really nice keybind system (init input) which I used to bind all my main keys (to send the string F1 for example) to a keybind system class which uses switch statements and enums to then do different behavior depending on what game mode / utility mode the game is in. So keybinds, sound effects, built in menus and game timer, that’s pretty much it. 95% of what I’ve done is just pure java FX to the point that I have thought about no longer using FXGL at all, but the nice features it has seem to make it worth it.