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

Java 

Nought ++ | JavaFX Game

(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.
I'm going to get download this as soon as I get home! It looks awesome Haze, good job.
Update:

[Image: 58b389f4d3b18bd376ff86457f5fd0ed.png]

:/

Lol this is sick man, great work. Looks like a lot of time and effort went into this bad boy.
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!
(Jun 29, 2015 02:45 PM)Kroos Wrote:  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!

The problem with the image was that for some odd reason, it doesn't load with the rest of the menu bar. I have no idea why it behaved like that and I just left it.

As for the AI mechanisms, I really wanted to make it smarter but there was a simple problem. I initially designed the first prototype of this application to allow the user to even use a custom grid size, therefore this meant that I had to code my application to be dynamic. Hence why the code I use to check the grid is dynamic and works regardless of the grid size. This works fine, but when checking a grid in a parallel motion, for example, 4x4, it was VERY VERY tricky to write code that was able to dynamically check it in this direction.

Spoiler (Click to View)

I found it a pain to get that to work , I got half of it to work, but by that time I realised that it took code that was just difficult to read and maintain and thus I scrapped it and resorted to checking it in a cheap way for a 4x4 grid.

Spoiler (Click to View)

I really wanted it to work but it pissed me off so much so I resorted to entering the coordinates manually which I didn't want to do. the code to the version I didn't use is still in the code,
https://github.com/PlusHaze/NoughtPlusPl...Logic.java

Go all the way to the bottom to see what I tried to implement.

So, if I were to make the AI smarter then it meant that I'd have to write a FUCK ton of code that works in all situations, also for the AI to be smarter it would produce an n factorial (n!) type solution. Because it would need to have tried every single possible solution. For a 3x3 grid it's (3 x 3) =9, 9 factorial is 362880. That's the many possibilities of moves that could be made. If a 3x3 is that much, I just thought fuck it, that's overkill for a simple game that no one will probably play.

Anyway thanks for taking interest in my thread. I appreciate it :D.... If you have any ideas on how I could improve this other that the Menu bar thing then I'd appreciate it.

(Jun 29, 2015 12:42 PM)clark.dll Wrote:  I'm going to get download this as soon as I get home! It looks awesome Haze, good job.
Update:

Lol this is sick man, great work. Looks like a lot of time and effort went into this bad boy.

Thanks Clarky :D I appreciate it fam
Looks very nice, makes me want to learn JavaFX as it seems to allow a lot more functionality then swing. Good job OP.
(Jun 30, 2015 03:43 AM)JershDervis Wrote:  Looks very nice, makes me want to learn JavaFX as it seems to allow a lot more functionality then swing. Good job OP.

Thanks, you should definitely learn JavaFX :D

- I've got more to release too.
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.
(Jun 30, 2015 11:57 PM)Sparta. Wrote:  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.

I recorded the video at 4am in the morning, so that should explain that (look at the timestamp on the bottom right) ;). But yeah I did kinda intentionally let it win one round in the 4x4 grid setting. The thing with 4x4 grid is that is easier for either players to win if they connect 3, but when I changed the setting to connecting 4 then it was impossible for either players to win and thus a boring game aha
But 9/10 the computer genuienly beat me

I did add a high score, and I initially made this multiplayer but it wasn't too good so I left it out..

Thanks tho :D
Sexy game looking nice :)
I suck at it though
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.
(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.
(Jul 3, 2015 06:53 PM)CoolMaster123 Wrote:  Sexy game looking nice :)
I suck at it though

Ahah thank mate.

(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.

Thanks man :) and yeah you should look into JavaFX.
Nice game! :)
Consider implementing a magic square approach for the AI. It would make for a fun challenge.
(Jul 29, 2015 04:31 PM)Jopper Wrote:  Nice game! :)
Consider implementing a magic square approach for the AI. It would make for a fun challenge.

Not quiet sure what you mean by a magic square. Mind explaining? :)
Looks really cool! I might try out JavaFX myself aswell as it reminds me a lot of WPF (.NET). The usage is so simple but yet very effective.
[Image: D12KBT6.png]


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 301 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