After the pong game, today I had a good time creating another small JavaFX game. This time, a little more playable game.
I think JavaFX is the best plataform to create games nowadays. No external dependency is required to create a playable and rich game. To the game which code you can see below, I spent about 3 hours and I could continue adding features to it, but I just wanted to do something else.
But why JavaFX is so great about creating games?
- Hardware acceleration for rendering of graphics comes by default;
- It is available on Oracle Java JDK and also with OpenJFX project (no additional dependencies);
- It has a canvas that is equivalent to the HTML 5 canvas;
- It can play sound, video and has Java networking by default and a lot of Java platform benefits
- You can port JavaFX to a mobile using Gluon / JavaFX Ports (in fact, I did this already and I still have the stacker game running on my mobile);
- It has 3d capabilities;
- You can port the game to the web using jpro.
You can find the AircraftWar game source code in my github and to run it just use:
javac AircraftWar.java
then
java AircraftWar
Nenhum comentário:
Postar um comentário