dykstrom / mazela-man Goto Github PK
View Code? Open in Web Editor NEWAn FXGL tutorial. Build a simple game.
Home Page: https://dykstrom.github.io/mazela-man-web
License: Apache License 2.0
An FXGL tutorial. Build a simple game.
Home Page: https://dykstrom.github.io/mazela-man-web
License: Apache License 2.0
Opening an issue here, although it concerns the actual tutorial on the web ( https://dykstrom.github.io/mazela-man-web/09_enable_main_menu/ ) ,
not the code in this repo. Sorry, I did not find/see a suitable place else. Thanks for this tut - a great resource!
In Chapter 9 it says:
private void initLevel() {
FXGL.spawn("Background", new SpawnData(0, 0).put("width", WIDTH).put("height", HEIGHT));
FXGL.setLevelFromMapOrGameOver();
// Store the number of pills on this level
FXGL.set("pills", FXGL.getGameWorld().getEntitiesByType(EntityType.PILL).size());
}
private void setLevelFromMapOrGameOver() {
try {
setLevelFromMap("level" + FXGL.geti("level") + ".tmx");
} catch (IllegalArgumentException e) {
gameOver(true);
}
}
I guess it should be like so (note the "FXGL."):
private void initLevel() {
FXGL.spawn("Background", new SpawnData(0, 0).put("width", WIDTH).put("height", HEIGHT));
setLevelFromMapOrGameOver();
// Store the number of pills on this level
FXGL.set("pills", FXGL.getGameWorld().getEntitiesByType(EntityType.PILL).size());
}
private void setLevelFromMapOrGameOver() {
try {
FXGL.setLevelFromMap("level" + FXGL.geti("level") + ".tmx");
} catch (IllegalArgumentException e) {
gameOver(true);
}
}
Hello @dykstrom, you really did an amazing job here! Would you consider turning this into a free hosted website with GitHub Actions and Pages? By using https://gohugo.io/ this can be done very easy and it is also still readable as readme-files here in the repository.
You can check a similar approach on https://pi4j.com/ and https://github.com/Pi4J/pi4j.github.io/tree/main/content
I can give you a hand to make the transition to a site.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.