This isn't a very glamorous update, but it is an essential one. FastJ has been equipped with several useful mathematical methods in order to ease the amount of work that programmers would need to do to create simple games.
...In other words, FastJ's pretty tough to use without these 😅
That being said, these updates constitute a satisfactory base that can be further built upon.
Sonarcloud Code Coverage#
You may have noticed a shiny new badge on the README! FastJ now makes use of Sonarcloud for code coverage, code smells, and other various helpful code analyses.
Code Style Consistency#
I had some extra time while working on this game engine, so I meticulously worked to improve the documentation style and code style. With this update, the code for the library is (hopefully) much more consistent and readable.
New Additions#
Maths.java#
- Added
Maths#lerpfor basic linear interpolation (by @YeffyCodeGit)
Point.java#
- Added
java.awt.Dimensionconversion/equality checking - Added integer/float
magnitudemethods - Added
square magnitude,dot product,cross product,normalizemethods - Added static/object-based, integer/floating-point
angle,signed angle, androtatemethods
Pointf.java#
- Added
magnitudemethods - Added
square magnitude,dot product,cross productmethods - Added static/object-based
normalize,angle,signed angle, androtatemethods
Display.java#
- Moved all
GraphicsEnvironment-related static methods toDisplayUtil.java
FastJEngine.java#
- Added
FastJEngine#runAfterUpdate(action)method to run actions after the next completedLogicManager#update.
Bug Fixes#
- Fixed issue where some
Executorswere not stopped upon exiting the engine, preventing applications from being able to close.
Internal Changes#
Display.java#
- Broke fullscreen methods into reusable chunks for better readability/use
InputManager.java#
- Replaced use of specific methods for input (keyboard, mouse) events with general methods and mappings of specific actions.
- See details in #14
- Lowered floating-point accuracy requirement (
Maths#FloatPrecision) to 4 digits
Breaking Changes#
- Changed all methods using UI elements referring to
GUIObjectto useUIElement. - Changed all
enums to use PascalCase instead of CONSTANT_CASE.
Other#
- Removed public modifiers on unit tests/unit test classes
- Added a second (WIP) example program -- a simple bullet hell game
