Skip to content

Second LTS Cycle Preview

Latest
Compare
Choose a tag to compare
@Mtax-Development Mtax-Development released this 05 May 15:01
· 0 commits to master since this release

Important

This is a preview release for Release 2, published for testing and upgrade preparation purposes. As the development process is ongoing, it might contain errors, undergo design changes and contain experimental changes. This release will be removed some time after its final version is released. Listed below are subsidiary testing versions, published as they are developed in the SecondLTSCycle branch. Change notes for each will refer to previous subsequent version and will note the version of GameMaker they are intended for. These changes will not be reflected on Wiki for now. A discussion for this preview release will be ongoing until its completion.

As Long-Term Stable branch of GameMaker was announced to release in a two-year cycle, this preview is being made in preparation to the approaching end of its first cycle. September 2024 marks the second year since the first Long-Term Stable release, but the actual release date for the second major Long-Term Stable release is not exactly clear. Until that, this preview will be perodically updated for use with monthly versions of GameMaker and to make new changes available for testing.

Achieving compatibility with newer releases of GameMaker required performing project-wide changes, following changes to design inside the GameMaker engine, particularly new handling of data types. Included changes should reduce the amount of overhaul necessary in case of another such change. It should be noted that in the process, majority of calls to check types of constructors were changed from using the instanceof() function to use the new is_instanceof() function. The difference between them is that the first is compared to string, but the second takes an argument with index of the constructor to compare, written literally with its name without quotation marks. As that is not treated as a string, it is faster to evaluate, but it means the code of each GML-OOP constructor now expects other constructors to be included in the project for each constructor index to be valid, otherwise calls of is_instanceof() can result in a crash. This is important while attempting to include only specific constructors in the project and not the entirety of GML-OOP.

Cross-platform compatibility and optimization are the themes of this upcoming version and will be gradually improved, tested and expanded along subsequent version releases:

  • As long as Desktop and Mobile export targets remain free to use as per GameMaker licensing, GML-OOP releases will be tested on Ubuntu and Android export targets in addition to current Windows target. The same is currently considered for macOS, but it comes with significant difficulties imposed by its closed development ecosystem.
  • A major step for optimization is the introduction of the new VertexBuffer constructor, with its subsidiary VertexBuffer.PrimitiveRenderData constructor and related VertexFormat constructor. They enable significant reduction of rendering times for static graphics, which can then be manipulated by Shaders. Most important of existing constructors which render graphics now support them through their new toVertexBuffer() method, designed to allow for a mostly seamless change to the use of this method of rendering. The contents of a Vertex Buffers returned by toVertexBuffer() methods are formatted for use with either no active Shader or one with the same format as the default passthrough Shader automatically included by GameMaker upon creation of Shader assets. Information about systems these constructors are based on is present on GameMaker Manual here and here. Streamlined details about their use will be added to the Wiki at a later date.

Every constructor now has a static constructor property, which contains numerical index GameMaker assigned that constructor during that runtime. This is a long-time considered feature, ultimately postponed to promote the use of safe-to-execute instanceof() checks. But as its usefulness rised with time, it was finally included. Constructors can have their constructor property read to recognize their type and this is the fastest way to do so, as it done by evaluating a number that is already known and does not need to obtained through a function call. However, it can be only used while being absolutely sure that what is being evaluated is a GML-OOP constructor or any other object with a constructor property, as reading a property that does not exist will cause a runtime error, unlike calls of instanceof().

A new Callback constructor is included in this release. It is a new handler storing a single or multiple methods and argument or sets of such, passed to said methods during execution. This is the same solution as one used in the Event system, as having a constructor to easily pass methods and arguments for later execution is useful in various contexts. The Event system will be overhauled to utilize the Callback constructor in further previews, which will require a rename of the callback property it used to ID once that transition is implemented.


Note

Text in parentheses refers to changes to previous preview versions and will not be included in final release notes.

Release 2 Preview 1
Intended for monthly GameMaker Runtime version 2024.2.0.132 released on February 29th 2024.

Changes from Release 1:

Changes to existing content:
| Updated validity checks to comply with in-engine updates and replaced their reiterations with isFunctional() method calls.
| Replaced all simple instanceof() calls to use is_instanceof() instead.
| ParticleType: Made constructor properties be updated instead of replaced when setting new values when they already exist as constructors.
| Point.render(): Mirrored the scale of the the Sprite render to render to attempt mimicking positioning of draw_point().
| Vector2: Simplified value type checks for other Vector2.
| TextAlign.setActive(): Minor consistency change to the error text.

Additions:
+ VertexBuffer, VertexBuffer.PrimitiveRenderData and VertexFormat constructors.
+ Point/Line/Triangle/Rectangle/SpriteRenderer: toVertexBuffer() method.
+ TextRenderer: getPixelSize() method.
+ TextAlign: getMultiplier() method.

Fixes:
- PriorityQueue/Queue/Stack/Surface: Moved temporary data structure destruction in try statements to finally statements to prevent memory leaks in case of errors being caught.
- Surface.setSize(): Made size property be updated in a consistent way for both cases of the Surface already existing and being recreated with the target size.

Instructions for conversion from the previous version:
• Include missing GML-OOP constructors into the project if a code would execute an is_instanceof() call by a method to check for a constructor with no recognized function index.
Point.render(): Confirm if rendering produces an unexpected offset by one pixel and adjust its location by that amount if necessary.


Release 2 Preview 2
Intended for monthly GameMaker Runtime version 2024.6.2.162 released on July ‎15th ‎2024.

Changes from Preview 2:

Changes to existing content:
| Overhauled equals() methods to support more data types.
| TextRenderer: Overhauled the constructor to support Scale and Angle.
| TextRenderer: Added Font point size calculation support to render() and getPixelSize() methods.
| TextRenderer: Prevented stringifying the value on construction.
| Surface: General minor consistency changes to ErrorReport detail descriptions.
| ParticleType: Made the number argument of setStep() and setDeath() methods optional, with 1 as the default value.
| ParticleType: Changed setter method descriptions to note whether they affect already existing particles.
| Point/Line/Triangle/Rectangle: Added property replacement argument support to the toVertexBuffer() method.
| VertexBuffer.PrimitiveRenderData: Added simplified Event support. (NOTE: This system is planned to be changed in the next Preview.)

Additions:
+ Static constructor property in every constructor.
+ Callback constructor.
+ TextRenderer/SurfaceRenderer: toVertexBuffer() method.
+ StringParser: capitalize(), toFile(), fromFile(), fromJSON() methods.
+ Vector4: isDegenerate() method.
+ Vector2/Vector4: exceeds() and subceeds() methods.
+ Range: sum(), difference(), product(), quotient() methods.
+ VertexBuffer.PrimitiveRenderData: (isFunctional() and toString() methods.)

Fixes:
- Font: Fixed wrong variable being used during constructor copy of a Font based on a Sprite.
- ErrorReport.report(): Fixed first report not being included in duplicate report check.
- ErrorReport.ReportData.equals(): Fixed the detail struct not being properly checked, causing multiple duplicate reports to be created when ErrorReport was configured to ignore duplicate reports.
- SpriteRenderer.toVertexBuffer(): (Fixed incorrect axis usage in location calculation.)
- Grid/Map: (Added missing isFunctional() calls to methods that should use them, but have not been updated yet.)
- Rectangle.toVertexBuffer(): (Fixed incorrect primitive type constant being used for outline.)
- VertexBuffer.PrimitiveRenderData: (Fixed optional construction arguments not supporting undefined.)

Instructions for conversion from the previous version:
TextRenderer: Change every construction that used color or alpha argument to provide undefined as two arguments before them to supply newly added scale and angle construction arguments.
TextRenderer: Change instances where code constructed with a non-string value and relied on it being stringifiied to manually stringify value specified as argument for that construction.