2.0 Release #39
SoloByte
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Originally this release was planned to be the 1.2 release. I just wanted to add / overhaul a few things and make a release but it grew into something much bigger. I realised a 2.0 release makes much more sense, escpecially because of the breaking changes that this update comes with.
Release Video
Transform2D Overhaul
Screen Texture 2.0
Stretch Mode, the texture will always be the same size as the screenPixelation Mode, the texture will always be the same aspect ratio as the screen but scaled down by a certain factor (0 - 1 range)Fixed Mode, the texture will always stay at the same (specified) size and will be centered on the screen and upscaled to the closest dimension of the screen with black bars on the other dimension if necessary.Nearest Fixed Mode, the texture will always be the same aspect ratio as the screen (no black bars) but will stay as close as possible to the fixed dimension.Anchor Mode, a anchor position and stretch value can be specified to position the screen texture anywhere on the screen. This can be useful for splitscreen or minimaps.Custom Mode, the user can control the size of texture, the mouse scaling and how the texture is drawn to the screen.ShaderSupportTypeenum was also added to specify if the screen texture should support no shaders, a single shaders, or any amount of shaders.DrawGamepass. The game mouse position will be scaled by the camera if one is used.OnDrawGame&OnDrawGameUIOnDrawGameis called before shaders are applied and the camera affects what area of the game world is drawnOnDrawGameUiis called after shaders are applied and the camera has no effect on it. This is useful for ui elements because it will always be on top.BackgroundColorcan be specified for that. In some cases clearing should only happen in certain intervals or not at all and to allow that a function can be set in the screen texture to control that.Random Number Generator
ShapeRandomclass removed.ShapeRandomwas a static class that used a staticRandomNumberGeneratorfield and wrapped every single function. Maintaining this is tedious because any change in theRandomNumberGeneratorclass that changes functions or function declaration results in duplicate work in theShapeRandomclass.RandomNumberGeneratorclass renamed toRngRngclass now has a static Instance field that can be used likeShapeRandomImprovements
ScreenTexture TextureFilterproperty added. (GameTexture/ScreenShaderBuffer now use Bilinear filtering by default)WindowSizeinWindowSettingsnow defaults to 960x540.SizeLerp*functions added.ColorPaletteclass added. A color palette holdsPaletteColors.ColorSchemescan be applied to color palettes to change the rgba colors of all contained palette colors.PaletteColorclassClone()functions added.WindowDisplayStatesand aRestoreWindow()function.GameWindow&Gameclasses now have staticCurrentInstance* fields for easy static access to everything. There can only be oneGame&GameWindowclass anyway and theGameWindowconstructor is internal, so it should be reasonably safe to use.GameWindowclassMouseOnScreensystem should work better now. This system tells you if the mouse cursor is on the screen of the window or not. Additionally, it takes care of showing/hiding the cursor when the mouse leaves the window or the window loses focus or the window is minimized.Fixes
GameWindow now callsInitWindow()withWindowSettings.WindowMinSize(ifInitWindow()is called with 0,0 then auto iconify is disabled!)New
LineDrawingInfoStruct implementedDrawGappedOutline*for all shapes implementedDrawLinesScaled*for all shapes implementedPolarCoordinatesstruct implementedControlNodeSliderUI element implementedFramebufferTransparentmember added toWindowSettingsbecause this flag needs to be set beforeInitWindow()as well.WindowConfigFlagsstruct added inGameWindowclass. (for detecting flag changes)InputEventHandlerimplemented. Listeners can subscribe to the handler to receive input event callbacks. The propagation of the event can be stopped. The listeners are sorted by priority. (Lower priority is handled first, more important)DrawCursorGame,DrawCursorGameUi,DrawCursorUivirtual functions added to Game class. ReplacesICursorsystem.FixedFrameratebigger than 0. The fixed update loop has a fixed delta value independent of the current frame rate and delta time of the application and will callFixedUpdate()to consume the delta time produced by the application. A fixed update loop can be very helpful for physics and collision because the delta time is predictable. If the fixed update loop is enabledHandleInput()will be called every frame beforeFixedUpdate()andInterpolateFixedUpdate()will be called at the end of the frame with the fraction of application delta time left.WindowSettings``Topmost&FullscreenAutoRestorefields added.FullscreenAutoRestoresautomatically exits fullscreen when window loses focus and restores fullscreen when window gains focus again.GameWindowclassSetWindowTopmost(bool topmost)function added.There is now aFullscreen(int width, int height)and aBorderlessFullscreen()mode.ScreenTexturecustom mode. The stars are drawn once to each screen texture (there are 5 parallax layers in the example right now) and based on the current camera position a certain rectangle of each screen texture is drawn to the screen.AnchorPointstruct added. Is used for alignment or ui/rect anchor.Deprecated/ Removed
DrawDotted*functions for all shapes removed (replaced by gapped outline)ICursorsystem removedIColorPaletteinterface removed (replaced by newColorPaletteclass)PrevDisplayStateInfostruct removed.Full Changelog: v0.1.2...v2.0.0
Beta Was this translation helpful? Give feedback.
All reactions