EngineLoader, UI/UX, The looks better, goes faster update!
Pre-releaseThis is a pretty substantial update compared to the previous few.
-- Main Menu --
The interface has been pretty well overhauled in a good way! The Main Menu now contains Categories for sorting games and programs better. It also contains some visual navigation buttons which can be used by mouse. To navigate the categories with the keyboard press Q to go left and W to go right.
When exiting running games and programs the Main Menu "remembers" where you were, so you don't have to navigate back to the game or program you were trying to test.
-- Global Pause --
Now, when Escape is pressed during a game/program Leikr will display a pause menu with the option to return to the Main Menu, or cancel to stay in the game/program. This pause action will actually pause the running program, and not run it in the background. New API methods for onPause and onResume can help users create interesting actions for what happens in that time.
-- New Utility Programs --
A Color Tester utility and Sprite Viewer utility were added for testing some of the new API methods. The Color Tester utility simply displays a box given the RGB values which can be adjusted with arrows on the screen.
The Sprite Viewer tool allows users to view spritesheets given the name of a program. This uses a new method called loadSpriteSheet()
which is experimental. Users can also select a start and fin sprite ID and press Space to play an animation from the start to fin. Q speeds up the animation and W slows it down. To select a start ID press S and type the ID number and press enter. For fin press F and do the same. To select a new program press E and type in the name as it appears in the Programs directory.
-- EngineLoader --
The EngineLoader has been beefed up with some new methods creating an API for dynamically loading and reloading code at runtime. The new compile, eval, loadLib, and newInstance methods can be used in some pretty cool ways to create access for plugins or mods. Now users can create whole libraries that can be loaded into other programs without rewriting them over and over again. Just drop in the library to the game or program's directory and loadLib! These libraries can even be compiled to classes, making the load time super fast compared to loading form source. eval can be used to evaluate code passed in as a String. This has so many cool ways to be used, so I am very excited to see what I can do, and what others come up with!
-- Game/Program Reloading --
Running games and programs can now be reloaded/restarted by either pressing CTRL+R or simply F5. This will close the current game and reload it from the settings in the properties file. This makes debugging and development much quicker and easier since users no longer have to exit to the main menu and reload from there. If the game or program errors a system screen with the error is displayed. This screen cannot be reloaded, as at this point the game or program has already been unloaded and cleaned up, and the user must return to the Main Menu to try rerunning the game or program after fixing the error.
-- Controller Input --
The controller input support has been overhauled on many pages to be much easier to use, and to use in general. Documentation to follow. SNES controller recommended.
-- Font --
As part of the new user interface and design, a new font has been selected. The previous custom font I designed did not look too great (Thank you community for bringing this to my attention). I have selected a new font, zx evolution. It looks great and "chonky" and really gives Leikr the aesthetic I try to target.
-- Cursor --
Some new design choices have been made regarding the Cursor. Now, the system cursor is not displayed in Leikr, and instead users are responsible for creating their own cursors in their programs. To do this, I either draw a shape or a sprite at the mouseX() and mouseY() coordinates.
-- Collision Detection --
A simple AABB collision detection method has been added to the core API. Along with a point method that is most useful for checking a single point inside a rectangle shape given x,y,w,h (so determining if a mouse click is within a box)
-- Misc. --
Various internal improvements have been made to help improve the speed and stability of the program as a whole. Feedback is definitely appreciated and helps to improve Leikr at a greater speed. Thanks to the community for all the support and comments!