ASGE  3.2.0
Simple Game Framework in GL
Changelog

v3.2.0

Released 23/02/2022

Enhancements

Minor

Major

  • Add debug texture support [8fdd8c2]

    To help with debugging of sprites without an attached texture, this change automatically allocates a transparent debug texture to all newly constructed sprites. This prevents the renderer from crashing when a texture has not been attached to a sprite. It can also be used for rendering simple blocks of colours i.e. backdrops.

    The texture is transparent and pink by default and scaled with the currently attached viewport.

  • Better GamePad support [6198eb6]

    Updated the GamePad retrieval function to use GLFW's specific functions that allow buttons to be mapped correctly. As part of these changes the user is now able to load updated bindings using the input system and as a quality of life addition, a new version of getGamePad has been added that will return the first attached controller on the system.

  • MSDF Rendering [041436d], [45c952a], [e5076bd], [853ceed], [9c8259c]

    Experimental support for SDF rendering based on the msdfgen library. Currently, when fonts are loaded an atlas texture is still generated, but instead of using the freetype library msdfgen is used to load the glyphs and generate MSDF's for them. At the moment the textures are able to load and are working, but there are still a number of areas for improvement. These include:

    1. Establishing a good distance factor
    2. Optimising the painfully slow generation
    3. Support for different char sets


    Upcoming versions of ASGE will aim to include caching and improved multi-threaded support for generating them. This will help remove the dependency on OpenMP.

  • Remove static GameSettings [9fd9b2b], [a85ff8f]

    This is a fairly big change to the code-base due to the way game settings were being accessed throughout the engine. Instead, the data will be stored within objects where they are most relevant. This has led to most of them to be moved in to the Renderer, however, some have been placed in to the Game itself.

    GameSettings were never really intended to be used like they were. Instead they're were designed to be a simple struct that a launcher could generate via a UI and then pass on to the constructor of the game. This brings it more in line with this original idea.

  • Render States [2651804]

    These new render states keep track of changes to the viewport or the camera view. Now instead of flushing every time one of these changes a snapshot is taken. This snapshot is then associated with each quad that needs to be drawn via its batch number. Then when rendering the quad batch, the correct snapshot can be used or applied as needed.

    This allows for users to change these settings when rendering and know that the state the renderer was in when the render request was made will still be correct when the batches are rendered.

    More work needs to be done to better optimise these changes, especially in the sort method for the batch renderer as the aim would be to reduce the number of switches and batches required to draw the user requested scenes.

  • Rewrite of viewport and resolution scaling [963cfd3]

    A particularly large re-write of the scaling and viewport code has taken place. A new Resolution data structure has been added. Its job is to store all the relevant resolution data such as window, desktop and game dimensions.

    As part of this refactor/re-write and to help support correct window scaling the idea or concept of a design resolution has been included. This design resolution is known as the base resolution and can be thought of as the size of the game world. It is independent from pixel space.

    Now when running the game in different resolutions the base resolution can be used to ensure scaling maintains the correct ratios, leaving objects to remain in their correct proportions and to be aligned correctly on this screen. Well, technically this depends on the new resolution policy that's also been added. If you prefer it is possible to "fit" the viewports to the window, but this will lead to scaling issues.

    It's recommended to review the new Resolution class for more info and guidance on the available policies.The hope is that these changes now allow for flexible resizing of the game window, without the developer having to invest too much time and thought in to. Want it to scale and maintain its aspect ratio? Just set the policy to "maintain" and be done with it.

  • Texture attachment flags [59293f1]

    These new flags are designed to control how a texture is attached to a sprite. Currently, when attaching a new texture to a sprite, it will automatically reset the width/height and UV coordinates set on the existing sprite. However, it may be desirable to have more granular control over this process. These new attach flags are an attempt to allow this to happen. They can be set to retain the sprites properties or to allow them to be reset depending on the developers preferences.

  • Tile support [5996de3]

    Add support for Tiles to the engine. Tiles are semantically different to sprites and thus are easier to convey using their own data structure. Unlike a sprite, they do not store any information regarding their positioning. When rendering tiles, the {X,Y} coordinates will need to be provided as tiles can be "rendered" within a larger context such as a map. The map will known each tile's {X,Y} and render them accordingly.

Bug Fixes

Misc

  • Remove deprecated render functions [1c17247]
  • Fix issue with CMake include directives [f065a39]
  • Freetype2 VER-2-11-1
  • GLAD v0.1.36
  • STB to latest


v3.1.1

Released 18/11/2021

Enhancements

  • Monolithic builds now disable shared by default [81a7ce9]
  • Enable C++20 support for Engine builds [6177e74]
  • Remove dependency that was added in error [fed6275]


v3.1.0

Released 17/11/2021

Enhancements

  • 2nd fix for bounds calculation on fonts [81a7ce9]
  • Enable mipmaps for font atlases [5d5adb]
  • Add new function for calculation max deviation in the Y axis for font rendering boundsY


v3.0.0

Released 16/11/2021

Enhancements

  • Fix for long-standing input bug [053d425]
  • Fix issue with bounds calculation for fonts [ab418f7]

Misc


v2.2.0

Released 15/11/2021

Enhancements

Bug Fixes

  • Swap correct UV coordinates when x-axis flipped [9f92a9c]

Misc


v2.1.0

Released 07/11/2021

Enhancements

  • Introduction of Unity style time steps [3aa4fd4]

Bug Fixes

  • Add y spacing in font atlas to prevent sampling issues when scaling


v2.0.2

Released 01/11/2021

Enhancements

  • Scale the game resolution on init, instead of assuming framebuffer dimensions

Misc

  • Disable altera warnings for clang-tidy

Bug Fixes

  • Using a custom shader no longer causes an issue when reset to nullptr
  • Flip flags now apply correctly to sprites when using custom source rectangles


v2.0.1

Released 31/10/2021

Enhancements

  • Expose read-only camera positional property
  • Disable deprecated OpenGL support, fixes mac-build
  • Target 10.15 to allow use of C++17 std::filesystem

Misc

  • Minor formatting changes
  • Upgrade to a non-broken Freetype2 repository
  • Working MacOS build


v2.0.0

Released 18/10/2021


v2.0.0.alpha.4

Released 14/05/2021

Enhancements

  • Allow UV wrapping mode to be changed for individual textures
  • Expose read-only camera positional property

Misc

  • The default UV wrapping mode is now CLAMP instead of REPEAT
  • Renamed EXCLUSIVE_FULLSCREEEN typo to EXCLUSIVE_FULLSCREEN

Bug Fixes

  • Using a custom shader no longer causes an issue when reset to nullptr
  • Flip flags now apply correctly to sprites when using custom source rectangles


v2.0.0.alpha.3

Released 10/05/2021

Enhancements

  • Expose screen resolution info to end user
  • Resize and reposition viewports when entering fullscreen modes

Bug Fixes

  • Camera zoom now works correctly, thanks @olihewi
  • NVIDIA rendering under Linux no longer causes artefacts


v2.0.0.alpha.2

Released 23/04/2021

Enhancements

  • Added CameraView data structure
  • Added time-step conversion functions
  • Render function now passes GameTime
  • Render to texture support implemented
  • Support for custom viewports
  • Use int16_t consistently for z-ordering

Misc

  • Bumped supporting libraries
  • Fixed MSVC build issues
  • Moved to GLAD from GLEW for GL loader
  • Renamed headers to .hpp
  • Updates are now fixed-steps and renders variable

Bug Fixes

  • Alpha channel now works when rendering text
  • Fixed camera view issues
  • Many small issues resolved due to porting of library to Python
  • Sprites will now fallback to the default shader if the text version is currently attached
  • Time-steps and frame pacing improvements
  • Z-ordering now works correctly


v2.0.0.alpha.1

Released 29/02/2020

Enhancements

  • Text now proxy's the width and height calls to the underlying font
  • float ASGE::Text::getWidth()
  • float ASGE::Text::getHeight()
  • Removed slow ASGE::DebugPrinter{}
  • Added a thread-safe generic logging namespace
    See also
    Logging This new namespace provides a generic logging factory where custom loggers can be added. It comes with a std::cout and basic file logger. By default it uses std::cout for logging.
  • Added pre-processor definitions that allow different logging levels
  • Added Gamepad button mappings to make it easier to locate buttons/axis.
  • Updated ASGE predefined colours to utilise Colour structs.
  • ASGE::Colour can now construct from three floats instead of just arrays.
  • String width and height for a given font
    See also
    pxWide and pxHeight
  • Delta time in seconds can now be retrieved via GameTime
  • Added ability to set the mouse cursor's position
  • ASGE::Text class now replaces standard text rendering
  • Added helper constants for mapping sprite source rectangles
  • FPS limits can now be applied to enable finer control of rendering
  • Support for basic MSAA and AF options

Misc

  • Remove unused GamePad Event
  • Texture2D dimensions are now floats
  • Game setup parameters have been moved to a struct called GameSettings
  • The current game settings can be accessed via a static data member on ASGE::Game
  • GameTime is no longer passed to the render function, simulations should be done using the update function

Rendering

  • Complete rewrite of rendering system for modern OGL systems
  • Shaders now utilise a RenderQuad data structure which is uploaded in batches
  • Persistant mapping of SSBO objects enabled, allowing manual DMA transfer signalling
  • Support for Triple buffer SSBO
  • Pixelbuffer support
  • Textures with out of bounds UV coordinates now repeat instead of clamp
  • Implemented proper move support for Quads resulting in large speed gains for sorting

Bug Fixes

  • ASGE::Text now sets the Y position instead of the z-order when calling setPositionY
  • Various Code Analysis fixes
  • Moved Point2D to ASGE namespace
  • Flip flags now work correctly
  • Fixed issue with sprite sheets and deferred rendering


v0.3.2

Released 20/02/2019

Enhancements

  • GameTime field names have been simplified to delta and elapsed
  • ASGE::Game now stores time related delta in eopch data member
  • Support for in-engine splash screens

Bug Fixes

  • Fixed build warning
  • Added debug message when performing monolithic builds


v0.3.1

Released 08/01/2019

Enhancements

  • Updated PhysFS to latest version 3.01

Bug Fixes

  • Fixes issue with PhysFS and latest version of Crapindows 10 and its API changes


v0.3.0

Released 12/12/2018

Enhancements

  • Implemented a custom generic value type based on std::any.
  • Added a new shader namespace.
  • Added user support for custom pixel shaders.
  • Implemented a simple shader cache to store user added shaders.
  • Uniforms are accessed through the use of _UniformB.
  • Bumped OGL to 4.1.
  • See ASGE::Shader and ASGE::SHADER_LIB for more details.

Bug Fixes

  • Fixed some compilation errors in specific configurations.


v0.2.4

Released 12/11/2018

Enhancements

  • Added ability to change the directory for writing.
  • It is now possible to create subdirectories inside the root of the write dir.
  • Basic types now supported by the template append function for IOBuffers.
  • String specialisation has been added to support appending when using IOBuffers.
  • Added string for game name to ASGE::Game. Used for default file storage and window titles.
  • Default write directory in windows is APPDATA%\ASGE\game_name%
  • Support to mount additional user directories.
  • Support to enumerate a directory.
  • Support to delete a file.
  • See ASGE::FILEIO for more details.

Bug Fixes

  • Buffer size was not being increased when data was appended


v0.2.3

Released 12/11/2018

Enhancements

  • Added utility struct to represent a point in 2D space: Point2D
  • Added utility struct to represent the 4 bounds of a rectangle i.e a sprite: SpriteBounds
  • New function to retrieve local bounds of a sprite
  • New function to retrieve global bounds of a sprite


v0.2.2

Released 16/10/2018

Hotfix

  • Reworked FileIO to remove dependency on PhysFS headers


v0.2.1

Released 10/10/2018

Enhancements

  • Support monolithic builds that integrate static into single shared library
  • Engine now also searches game.dat for resources

Bug Fixes

  • Fixed build issues for Linux


v0.2.0

Released 14/09/2018

Enhancements

  • Added PhysFS and PhysFS++
  • New File class to allow easy management of data
  • New DebugPrinter (a thread safe console output class)
  • Moved demo code to use FileIO
  • Dependencies have been reworked for builds
  • Added butler
  • Added 7zip for windows
  • Renamed default resources folder to data

Bug Fixes

  • Fixed #29: Flip flags for sprites were not initialised correctly.
  • Some minor code tidy (static analysis)
  • Fixed build issue with missing include


v0.1.6

Released 28/06/2018

Enhancements

  • Moved build system to CMake
  • Build support for Linux/OSX/Windows added
  • Removed VS projects and solutions
  • Upgraded external libraries


v0.1.5a

Released 03/04/2018

Hotfix

  • Ensure mouse co-ordinates are correctly gathered when sending the click event


v0.1.5

Released 14/03/2018

Enhancements

Bug Fixes

  • Mouse co-ordinates will now always be unprojected back into orthogonal space
  • Fixed issue with subpixel positions causing texel offsets by rounding up vertex positions


v0.1.4

Released 07/03/2018

Bug Fixes

  • Fixed an issue with the wrong UV mapping when using source rectangles for rendering sprites


v0.1.3

Released 15/02/2018

Enhancements

  • Added the ability to hide the mouse cursor
  • Added the ability to lock the mouse cursor to the window


v0.1.2

Released 18/12/2017

Bug Fixes

  • Resolved issue with string destruction after storing the texture in the cache


v0.1.1

Released 14/09/2018

Enhancements

Sprites

  • Sprites now use appropriate getters and setters
  • Sprites can now be flipped in the x or y axis.
  • Sprites can now use a source rectangle to make use of sprite sheets
  • Sprites now support for opacity using the alpha channel

Render modes

  • Batching modes for texture, front to back and back to front mode added
  • Borderless window support added
  • Deferred rendering support added
  • Fullscreen support added
  • Implemented a new sprite batch class that manages rendering of both text and sprites
  • Rendering the FPS also shows some additional debug info
  • Replaced dynamic text buffers with a larger static buffer
  • Replaced sprite shader with an instancing version

Documentation

  • Doxygen comments have been added to all public facing API classes and functions.

Misc

  • Added a new demo browser to the game engine
  • Huge performance increases when rendering large numbers of sprites
  • Huge performance increases when rendering large amounts of text
  • Ordering renders by their texture and colour hugely benefits the sprite batch system

Bug Fixes

  • Fixed issue when applying a scale to rotated sprites
  • Fixed issue where it was not possible to obtain the sprite's dimensions
  • Fixed issue where the texture cache would not empty when the game exits but the textures would be unloaded from GPU
  • Fixed issue where FPS counter could be rendered behind other sprites

Upgrades

  • Updated GLEW to 2.1.0