• Stars
    star
    151
  • Rank 240,327 (Top 5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Just a simple tiny space game written in JavaFX

SpaceFX


A simple tiny space game written in JavaFX.

The "dev" branch contains new developments that might come to the game later on. The "simpleversion" branch is like the name says more simple and should also run on embedded devices etc. The "master" branch now contains some more fun things like enemies attacking in waves, a level boss that needs more hits to kill, enemies that drop bombs and an enemy boss that also fires rockets.

If you want to see/play it in a browser you can check it out at the jpro demo page

Donations are welcome at Paypal

Desktop and Mobile

Desktop

iOS

Android

Web

Youtube video

I've recorded a little video that shows the game in action.

Requirements for building a native package

If you would like to build a native package you should have at least JDK 13 installed on your machine. Make sure you run on Java13 and do a gradle clean build jar on the command line and execute the build app script e.g. bash build_app.sh. If everything worked ok you will find the native app in the folder /build/installer. To build a native package you will need the early access release of the jpackage tool. Please find more info here.

master branch

This branch is using gradle for the build and it needs JDK 17 with OpenJFX 17.0.0.1. On my machines I use Zulu for the JDK 17 installation and OpenJFX for the JavaFX installation. You should be able to fork the branch and open the build.gradle file in your favourite IDE as a project to run it from the code. To compile it you need to make sure you are on JDK13 and OpenJFX is installed, then execute the following on the command line.

OS X:

cd /PATH/TO/SpaceFX

./gradlew clean build

bash ./build_app.sh

Windows:

cd \PATH\TO\SpaceFX

.\gradlew.bat clean build

.\build_app.bat

Linux:

cd /PATH/TO/SpaceFX

./gradlew clean build

bash ./build_app_linux.sh

After that you will find the runnable jar file in

/PATH/TO/SpaceFX/build/libs

and the bundle created by the jpackage tool from JDK17 in

/PATH/TO/SpaceFX/build/installer

mobile branch

This branch uses maven for the build and it needs at least JDK 11. In principle you simply have to follow the instructions over at github from Gluon to make it run on iOS and Android. If you have the setup your system as mentioned on the github page with the Gluon examples you can build/deploy SpaceFX to your device as follows. To build/run it on iOS you need to run it on a Mac and to build/run it on Android you need to run it on Linux. First of all make sure you are on JDK11 and that you have installed all things described on github.

iOS: Make sure your iPhone is registered as a developer device at apple and is plugged into your Mac.

export JAVA_HOME=$GRAALVM_HOME

cd /PATH/TO/SpaceFX

mvn clean -Pios client:build

mvn -Pios client:run

The iOS spacefx.app file can be found at

/PATH/TO/SpaceFX/target/client/arm64-ios/

OSX:

export JAVA_HOME=$GRAALVM_HOME

cd /PATH/TO/SpaceFX

mvn clean client:build

The OSX spacefx binary can be found at

/PATH/TO/SpaceFX/target/client/x86_64-darwin

Android: Make sure your Android phone is a developer phone and is plugged into your Linux machine.

export JAVA_HOME=$GRAALVM_HOME

cd /PATH/TO/SpaceFX

mvn clean -Pandroid client:build

mvn -Pandroid client:run

The Android spacefx.apk file can be found at

/PATH/TO/SpaceFX/target/client/aarch64-android/gvm/apk/bin

Linux:

export JAVA_HOME=$GRAALVM_HOME

cd /PATH/TO/SpaceFX

mvn clean client:build

The Linux binary can be found at

/PATH/TO/SpaceFX/target/x86_64-linux

Keep in mind that at the moment there is no support for sound when using the GraalVM/Substrate combo.

###Attention: Because we use different build tools for the master and mobile branch at the moment it can lead to problems in your favourite IDE when switching branches. To avoid those problems just keep the following steps in mind:

When switching from the master to the mobile branch you should follow these simple steps:

  • remove the project from your IDE
  • close your IDE
  • switch branch from master to mobile
  • remove files/folders like .gradle, .idea, /build and /logs
  • start your IDE
  • open the pom.xml file as a project

When switching from mobile to the master branch you should follow these simple steps:

  • remove the project from your IDE
  • close your IDE
  • switch branch from mobile to master
  • start your IDE
  • open the build.gradle file as a project

Run SpaceFX in the browser using jpro

To run SpaceFX in the browser you will need to set the used JDK to 11 in the build.gradle file. In the future you will also be able to use JDK 13 etc. More info on how to run a JavaFX application in the browser can be found here jpro.

To make SpaceFX run in your browser you need to be on the master branch and execute the following steps: Open the build.gradle file in an editor and comment out the line:

//mainClassName = "$moduleName/eu.hansolo.spacefx.SpaceFX"

Now enable the line:

mainClassName = "eu.hansolo.spacefx.SpaceFX"

On the command line execute:

cd /PATH/TO/SpaceFX

./gradlew jproRun

Open a browser and go to localhost:8080

More Repositories

1

tilesfx

A JavaFX library containing tiles that can be used for dashboards.
Java
1,278
star
2

medusa

A JavaFX library for Gauges
Java
654
star
3

charts

A JavaFX library that contains different kind of charts
Java
528
star
4

JDKMon

A little tool written in JavaFX that monitors your installed JDK's and inform you about updates
Java
258
star
5

SteelSeries-Canvas

The HTML5 Canvas port of the SteelSeries component library. Mainly contains gauges.
JavaScript
116
star
6

Enzo

A repo that contains custom controls for JavaFX 8 (Current version is hosted on bitbucket)
Java
82
star
7

SteelSeries-Swing

Swing port of the SteelSeries gauges
Java
63
star
8

tilesfxdemo

A little JavaFX demo app that shows how to use TilesFX in combination with Medusa and Ikonli
Java
52
star
9

worldfx

A JavaFX control that represents an interactive world map
Java
39
star
10

converter

A Java based unit converter
Java
35
star
11

regulators

Two JavaFX controls that might be handy e.g. for home automation UI's
Java
28
star
12

JavaFXCustomControls

A project that shows the different ways on how to create custom controls in JavaFX
Java
28
star
13

fxmodules

A little template project to
Java
27
star
14

jarkanoid

A little JavaFX Arkanoid clone
Java
26
star
15

smoothcharts

A JavaFX line/area chart that can be smoothed and has mouse interaction
Java
26
star
16

JFX8CustomControls

Contains examples and templates for JavaFX 8 custom controls
Java
23
star
17

medusademo

Some demos for the Medusa JavaFX gauges library
Java
23
star
18

neumorphic

A library of JavaFX controls that use a neumorphic design
Java
22
star
19

countries

A JavaFX library that contains different controls to visualize country based data
Java
20
star
20

monitor

A little JavaFX control that can be used to visualize either stored or live data
Java
20
star
21

properties

JavaFX like properties
Java
20
star
22

glucostatusfx

Glucose status monitor for Nightscout implemented in JavaFX
Java
19
star
23

applefx

A collection of Apple UI controls implemented in JavaFX.
Java
18
star
24

iosfx

A JavaFX collection of iOS controls to use it in combination with Gluon
Java
17
star
25

Colors

A little project that contains different color definitions (e.g. Flat UI Colors, Material Design Colors etc).
Java
17
star
26

crac4

Another demo for the CRaC project
Java
15
star
27

odometer

A JavaFX library containing an odometer and two spinner controls
Java
15
star
28

gradientpicker

A JavaFX control to create color gradients.
Java
14
star
29

timecontrol

A little JavaFX TimeControl that was inspired by Apple's sleep timer in iOS 10
Java
14
star
30

missiontimerx

A JavaFX control that looks similar to the SpaceX mission timer
Java
13
star
31

digital5

A ConnectIQ Watch Face for the Garmin fenix5x watch
12
star
32

TouchSlider

A JavaFX touch slider control that is based on the Canvas node but is also styleable via CSS
Java
12
star
33

dotmatrix

A little dot matrix JavaFX control
Java
12
star
34

digital

Simple Digital Watch Face for Garmin Forerunner 235
11
star
35

sankeyplot

A JavaFX implementation of a sankey plot
Java
11
star
36

numberpad

A simple JavaFX number pad
Java
11
star
37

observablematrix

An array based matrix that is observable implemented in Java
Java
10
star
38

dateranger

DateRanger is a JavaFX control to select dates and ranges
Java
10
star
39

SVGPathConverter

A little tool that converts SVG paths to JavaFX paths
Java
10
star
40

ioscheckbox

A JavaFX version of the current checkbox in iOS
Java
10
star
41

svgnode

A JavaFX Canvas based node that can be used to visualize multiple SVG paths with their fill and stroke
Java
10
star
42

jdkbutler

JDK Butler is a little Java tool that helps you finding/downloading a JDK/JRE
Java
10
star
43

coxcombchart

A JavaFX implementation of a coxcomb like chart
Java
10
star
44

FxgTools

A toolset to parse/interpret/convert Adobe fxg files
Groovy
9
star
45

dataviewer

A JavaFX control that can show images with chart overlays
Java
9
star
46

expandabletextarea

An expandable TextArea JavaFX control with the ability to limit the no of characters
Java
9
star
47

formattedtextfield

A custom JavaFX TextField that allows custom formatting
Java
9
star
48

FxHeatMap

A (poor mans) heat map implemented in JavaFX
Java
9
star
49

timer

A JavaFX version of the timer control that is used on iPhone and in iTunes
Java
8
star
50

SunburstChart

A JavaFX sunburst chart component
Java
8
star
51

submitbutton

A little fun submit button in JavaFX
Java
8
star
52

tetris

A JavaFX clone of the classic Tetris game
Java
8
star
53

toolboxfx

A collection of ui related helper classes and tools
Java
8
star
54

touchjoystick

A JavaFX touch joystick control that was inspired by the UI of SpaceX Crew Dragon
Java
8
star
55

jdp

JDP is a Java datepicker using Swing
Java
7
star
56

anglepicker

A little JavaFX control to pick an angle between 0-360 degrees
Java
7
star
57

funindicator

A little JavaFX fun indicator that has an interesting animation
Java
7
star
58

colorchooser

A JavaFX control to define colors for fill and stroke.
Java
7
star
59

CircularProgressIndicator

A Material Design Circular Progress Indicator (indeterminated) implemented in JavaFX
Java
7
star
60

MoodFX

A little project that makes use of JavaFX on mobile, desktop and embedded to control an ESP8266 Huzzah Feather based mood light.
Java
7
star
61

worldheatmap

A combination of my JavaFX WorldMap with my HeatMap
Java
6
star
62

funmenu

A little JavaFX based menu component
Java
6
star
63

SpaceFXPi

A more scalable version of SpaceFX without sound to be able to run on the Raspberry Pi
Java
6
star
64

SpaceFXMobile

A version of SpaceFX that can run on mobile devices using Gluon Technology
Java
6
star
65

cardnav

A little JavaFX based card navigation demo
Java
6
star
66

particlesfx

Some JavaFX code to show how one can do particles in different ways in JavaFX
Java
6
star
67

circularplot

A JavaFX implementation of a circular plot
Java
6
star
68

FoVFX

A little JavaFX tool to visualize the field of view incl. depth of focus for different lenses and sensor formats
Java
5
star
69

funselector

A fun selection control written in JavaFX
Java
5
star
70

spaceinvadersfx

SpaceInvaders written in JavaFX
Java
5
star
71

anchorselector

A little JavaFX control to select an anchor for positioning
Java
5
star
72

horizon

A JavaFX implementation of a horizon chart
Java
5
star
73

javafxdemo

A little demo program that shows the controls in the Enzo controls library
Java
5
star
74

MedusaJS

A JavaScript library for Gauges. The main focus of this project is to provide Gauges that can be configured in multiple ways.
JavaScript
5
star
75

toolbox

A collection of useful classes and tools
Java
5
star
76

discocli

Disco CLI is a command line interface for the foojay.io Disco API
Java
5
star
77

hol1634

Code examples for the JavaOne 2016 hands on lab 1634 "Customize your JavaFX Controls"
Java
4
star
78

tiles

A Swift iOS port of the JavaFX TilesFX library
Swift
4
star
79

jdktools

JDKTools is a library that contains tools related to system info and versioning
Java
4
star
80

tilesfxweather

TilesFX Weather is an addon to the TilesFX library related to showing weather data
Java
4
star
81

FitnessGauge

An AppleWatch like FitnessGauge in JavaFX
Java
4
star
82

evt

A custom java event implementation with priorities
Java
4
star
83

matriximage

A little JavaFX demo that visualizes pixelated images with my DotMatrix control
Java
3
star
84

dialplate

A JavaFX dialplate control (like on old analog telephones)
Java
3
star
85

cache

A simple map based cache with timeout and limit
3
star
86

nestedbarchart

A JavaFX based nested bar chart
Java
3
star
87

SpaceJS

A port of the SpaceFX game to JavaScript
JavaScript
3
star
88

tilesfxstockdemo

A little demo for the new TilesFX StockTileSkin...
Java
3
star
89

crac6

Another CRaC demo
Java
3
star
90

weatherfx

A JavaFX based WeatherPanel which perfectly fits for the Raspberry Pi with the 800x480 screen
Java
3
star
91

FxgFXParser

A inplace parser that parses converts Adobe FXG files and returns a map of JavaFX Groups. Each layer of the FXG file is placed in it's own group.
Groovy
3
star
92

ColorSelector

A radial color selector
Java
2
star
93

SimpleSectionGauge

Another JavaFX based gauge that might be useful for dashboards etc.
Java
2
star
94

Gluco-Tracker

A little Swift app to visualize glucose data from a nightscout server
2
star
95

rollinggradient

A JavaFX rolling gradient
Java
2
star
96

pathgradient

A JavaFX based path gradient
Java
2
star
97

OneClassGauge

A simple gauge that works on JDK7+JavaFX 2 for ARM (BeagleBoard)
Java
2
star
98

geomfx

A little geometry library for JavaFX that is based on code from Apache Harmony
Java
2
star
99

dashboardgauge

A JavaFX dashboard gauge that looks similar to the Oracle ADF gauges
Java
2
star
100

bpmgauge

A little gauge that can be used to visualize heart rates
Java
2
star