JUG Leader, Java Champion, Speaker, Author, ❤️ Java(FX) and coding in general
In Part 1, we introduced a mobile app game, TiltMaze, written completely in JavaFX, which you can download from either the Apple App Store or Google Play and install it on your mobile device or tablet.
In this article, we’ll discuss the technologies we use with JavaFX to build the JVM byte code version as well as native images that target iOS and Android devices.
Game Development is a large field of Computer Science with a lot of underpinning theory behind the concepts and practices used in the industry.
In this short article, we will learn some fundamental basics of these concepts, which will be explored within the context of the FXGL game engine.
However, the concepts themselves are language-agnostic and engine-agnostic.
Please note that the material presented here is deliberately simplified to provide a gentle introduction. Those seeking in-depth coverage are encouraged to pursue further research.
In this three-part series, I’ll show how to use JavaFX for mobile app development: JavaFX looks great and runs on both mobile platforms.
You use the same JavaFX code targeting Google Play and Apple App stores. Performance is excellent and startup time is fast with native images.
You use Java 11+ and the latest JavaFX.
Our game is TiltMaze Labyrinth!
Since Java switched to a 6-month release cycle, JavaFX has done the same, so next version will be number 17.
Keep in mind, although Java and JavaFX are on the same version-number, you can still use Java 11 and combine it with the JavaFX 17 runtime if you want to benefit from its improvements. Up till now, there were no breaking changes in either of the frameworks which force you to use a Java-version higher than 11.
A new Java / JavaFX library has been released. It’s called FXSkins.
FXSkins is a collection of new Skins for existing JavaFX controls. These Skins will add more functionality to the controls used in your applications with almost no need to make changes to your application’s code.
This library is targeted for the most recent Java versions.
Here on Foojay.io, you can find already a long list of articles about Java on the Raspberry Pi.
As you may know, already I’m a big fan of this combination. The Raspberry Pi on one side is a very cheap computer that allows you to experiment with electronic components thanks to the Pi4J library.
And on the other hand, JavaFX is the ideal framework to build user interfaces that can directly control these components, all in one application!
But maybe you don’t have / want to believe me? So let’s ask two experts what they think is the future of #JavaOnRaspberryPi.
1. The restored Multiplayer Service allows easy replications of input, events and entities on a remote machine. For example, by just adding a single line of code (see MultiplayerService API), any key or mouse inputs that occur on one end of the connection can be replicated on the other end.
2. The new FPS camera allows easy control of the player (or their “line of sight”) in the context of a first-person 3D game.
3. There is no longer a transitive dependency on the javafx.swing module. This means FXGL users will not need an extra module in their module graph.
Hello, and welcome back to this series of articles on creating a JavaFX world clock.
In Part 5 below, we will be looking at JavaFX’s WebView API to display an HTML Web page containing a 2D map (Mercator projection).
To render the 2D map I will be using the popular Leaflet JS library. This will enable the World Clock App to let the user explore map locations based on GPS coordinates (latitude & longitude).
- Game Development
In this article, Almas and Frank show you how to start with an idea for a game and bring it to life in a prototype application. We will then modify the application to run on a Raspberry Pi and on a mobile device.
To give some background, some time ago my 10y old son challenged me to create a Snake-like game with emojis. He selected the emoji images and I “only” needed to do the programming bit, the easy part… Luckily Almas asked me if I had a topic for some pair-programming for his YouTube channel, and his question turned into a three-part series. My son is delighted because his idea is now a real game!
This article is for the beginner who wants to get started developing JavaFX applications using IntelliJ IDE.
While this article may seem elementary for some, I believe it can help newcomers to the JavaFX platform avoid some pitfalls and really hit the ground running.
Combined with an inexpensive touch screen, the Raspberry Pi makes for a perfect controller for a machine or game console.
Let’s see how we can use Java and JavaFX to build a test application that also communicates with the pins of the Raspberry Pi to control a LED.