In this third and last part of the series on how to develop a game with p5.js we will implement the actual game logic: eat enemies, get bigger and faster and game over handling. You will find the full code at the end of the article and you can play the game here. New state… Continue reading Develop a game with p5.js (part 3)
Month: January 2020
Records in Java (JEP 359, preview)
Records in Java look very promising to me and a great addition to the language. The ceremony of creating pure data holder classes will be well know to any Java developer. Sometimes we just create a class to transport some data from A to B. Most of the times we don’t even care about object… Continue reading Records in Java (JEP 359, preview)
Develop a game with p5.js (part 2)
Welcome back to the second part on how to develop a game with p5.js. Today we are going to add some interactions to our game. Wouldn’t be a real game if we couldn’t move around something, right? Now that we already have setup most variables that we need and the scene is set, the rest… Continue reading Develop a game with p5.js (part 2)
Develop a game with p5.js (part 1)
p5.js is a great JavaScript library to create little games that run directly in your browser. They even offer an online editor, so you can really just get started. Find out more about p5.js here: https://p5js.org/Or directly access the online editor: https://editor.p5js.org/ In this article I will show you a game we implemented as part… Continue reading Develop a game with p5.js (part 1)
Switch Expressions in Java (JEP 361)
With Java 14 we will get a new feature that simplifies the switch statement. It will provide a new and clearer way to write switch statements and in addition allows us to use switch as an expression yielding a value. New Syntax Forget about break! No fall through anymore – simple and concise. Today you… Continue reading Switch Expressions in Java (JEP 361)
Pattern Matching for instanceof (JEP 305)
Finally with Java 14 we get a (preview) feature I had on my wishlist for a long time. It eliminates the need to first test an object via instanceof operator and then (and I asusme it is the 90% case) cast it to exact that class in order to do something with it. Here is… Continue reading Pattern Matching for instanceof (JEP 305)
Launch Java Programs Without Compilation (JEP 330)
Since Java 11 we can run Java programs directly from the command line without the need to manually compile them first. Frankly speaking I don’t know if this is a feature I will ever use in my daily work as a developer. But it could be useful to learn Java and provides an easy way… Continue reading Launch Java Programs Without Compilation (JEP 330)