Skip to content

FastJ 1.4.0 - The "Apparently Math Exists" Update

Compare
Choose a tag to compare
@lucasstarsz lucasstarsz released this 20 May 19:30
· 839 commits to main since this release

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.

Other News

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#lerp for basic linear interpolation (by @YeffyCodeGit)

Point.java

  • Added java.awt.Dimension conversion/equality checking
  • Added integer/float magnitude methods
  • Added square magnitude, dot product, cross product, normalize methods
  • Added static/object-based, integer/floating-point angle, signed angle, and rotate methods

Pointf.java

  • Added magnitude methods
  • Added square magnitude, dot product, cross product methods
  • Added static/object-based normalize, angle, signed angle, and rotate methods

Display.java

  • Moved all GraphicsEnvironment-related static methods to DisplayUtil.java

FastJEngine.java

  • Added FastJEngine#runAfterUpdate(action) method to run actions after the next completed LogicManager#update.

Bug Fixes

  • Fixed issue where some Executors were 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 GUIObject to use UIElement.
  • 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