Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

Nought ++ | JavaFX Game

Looks great, well done.

If you're up for a little bit of fun, you could actually program the game board into a custom JavaFX component and this will allow you to import it into scene builder and use it everywhere (you'd just need to write the methods for computer playing and picking stuff etc.). I use custom components on most projects since they allow me to prototype and generate similar things again and again. This suggestion does not imply that I'd class a game panel as a standard components of any sort but it's a fun thing to use as an example to learn custom components (I used a search engine result panel as mine when learning - yawn).

I hope this inspires more people like Reval to pick up JavaFX as a standard around here since it'd make some fantastic HF-ish desktop tools.
Nice job +Haze! The lack of final variables disturbs me...Just kidding, it's a good program.
(Jun 29, 2015 10:21 AM)+Haze Wrote:  When do I declare it as final? Isit only when I don't intend to change it? Why declare something as final when its scope is only in a method?

Exactly. There's a good question on StackOverflow that says the same thing.
That modifier makes your code more expressive of how it's supposed to function, in my opinion.
When I started aggressively/liberally using final to describe all members and classes that I shouldn't extend, it looked a little strange...After getting used to it, it just makes sense and solidifies (almost literally) what your program does and will do in the future.
For example, some libs have made their implementations final because there's no purpose of extending them or implementing more. (I personally don't always like that, but you can always bytecode inject if you really need to extend a final class).

quick edit: Most people don't make their method parameters final, and that's usually okay.
(Jun 29, 2015 07:56 AM)Reval Wrote:  Does it work fine on Eclipse Luna now? I tried to setup everything some time ago and I had no success.

Easy peasy:
http://www.eclipse.org/efxclipse/install...r-the-lazy

I've always used Eclipse for JavaFX. Just install that, make sure you've got JDK 8 and then boom, New Project -> JavaFX Project -> boom.
This looks pretty good, Haze. Watching the video that AI could do with being a little bit smarter, there are chances where it can win but does something different. As well as the menu: the picture loads to fast and looks out of place, it should roll in with the side bar. Other than that, good job!
Cool stuff. Never used JavaFX (I prefer making my own effects for GUI and UI for games and other projects) but it looks great regardless.

I saw you purposely lose in the demo video though. You should add a multiplayer mode and high scores as a side project.
Sexy game looking nice :)
I suck at it though
(Jul 4, 2015 11:34 AM)Zbogus Wrote:  I really like the design. I am used to using swing which makes it look like my programs are automatically shit. Definitely going to look into JavaFX.

Not necessarily. Try out setting the UIManager's look and feel to the system's default or download webLaf and use that to style your programs.
Very nice.

Now it is time to make pinball ;p!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by OBAMASELFFeb 8, 2019 03:13 AM 2 204 Feb 8, 2019 03:13 AM
Last Post: OBAMASELF
[Java] by TennoFeb 3, 2019 04:49 AM 4 304 Feb 3, 2019 04:49 AM
Last Post: Tenno
[Java] by Consulting DetectiveAug 29, 2018 04:54 PM 4 264 Aug 29, 2018 04:54 PM
Last Post: +Haze