Releases: Mtax-Development/GML-OOP
Second LTS Cycle Preview
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 periodically 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 was considered for macOS and iOS, but closed development ecosystem of these operating systems ultimately prevented it from manifesting.
- A major step for optimization is the introduction of the new
VertexBuffer
constructor, with its subsidiaryVertexBuffer.PrimitiveRenderData
constructor and relatedVertexFormat
constructor. They enable significant reduction of rendering times for static graphics, which can then be manipulated by Shaders. Most important of existing constructors rendering graphics now support them through their newtoVertexBuffer()
method, designed to allow for a mostly seamless change to the use of this method of rendering. The contents of a Vertex Buffers returned bytoVertexBuffer()
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.
Long-time considered changes to construction of every constructor were introduced:
- They now have a static
constructor
property, containing numerical index GameMaker assigned that constructor for that runtime.
This change was ultimately postponed to promote the use of safe-to-executeinstanceof()
checks, but as its usefulness increased with time, it is finally included. Constructors can have theirconstructor
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 aconstructor
property, as reading a property that does not exist will cause a runtime error, unlike calls ofinstanceof()
. - They no longer have the
argument_original
property saved at the time of construction.
This feature was included, as arguments have to be saved to an array upon construction to execute them through theconstruct()
method, so that method can have access to the entirety of the constructor at the time of construction. However, it did not prove itself to be very useful over time and instead increased the amount of data saved in constructors. Cases, where original value was actually used, such as thevalue_original
property ofRangedValue
constructor, were already resolved with an additional property and this has not changed.
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 has been overhauled to utilize the Callback
constructor, requiring renaming of the callback
property it used to ID
.
Supporting Vertex Buffers means that enables possibility of rendering three-dimensional graphics, and so GML-OOP now supports constructors oriented around working with three-dimensional space and projections: the Camera
resource, Vector3
and EulerAngle
containers, as well as Plane
and Cube
shapes. However, it should be noted that GML-OOP still remains designed for applications with two-dimensional graphics and three-dimensional support is intended to be basic and used mainly within two-dimensional projection, since correctly displaying three-dimensional graphics without perspective in orthographic view produces same visual result as they would with any other two-dimensional graphic drawn in the same way. While intending to render three-dimensional with GML-OOP constructors, the following should be noted:
As a third axis, the Z axis, was added to be operated with above constructors, a decision had to be made what this axis represents. Calculations within GameMaker itself use reversed Z axis, which can be described that adding to a Z location of an object will visually move it away from a camera rotated towards negative Z, and subtracting from the Z location of the object will move it closer to it. Since other axes are not reversed, the code of GML-OOP was designed to instead use non-reversed Z axis, which means, in that situation, subtracting from Z location is the way to move the object away from the camera, since it already is pointing towards a negative Z, and vice versa, adding to it will move it towards it. This means that any previously existing code operating the Z axis will have to reverse the mathematical sign of operations related to that axis.
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 around February 29th 2024.
Changes from Release 1:
Changes to existing content:
| Updated validity checks to comply with in-engine updates and replaced their reiterations withisFunctional()
method calls.
| Replaced all simpleinstanceof()
calls to useis_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 theSprite
render to render to attempt mimicking positioning ofdraw_point()
.
|Vector2
: Simplified value type checks for otherVector2
.
|TextAlign.setActive()
: Minor consistency change to the error text.Additions:
+VertexBuffer
,VertexBuffer.PrimitiveRenderData
andVertexFormat
constructors.
+Point
/Line
/Triangle
/Rectangle
/SpriteRenderer
:toVertexBuffer()
method.
+TextRenderer
:getPixelSize()
method.
+TextAlign
:getMultiplier()
method.Fixes:
-PriorityQueue
/Queue
/Stack
/Surface
: Moved temporary data structure destruction intry
statements tofinally
statements to prevent memory leaks in case of errors being caught.
-Surface.setSize()
: Made...
Release 1
In between now and the time of the inception of this project, GameMaker set on a path of rapid change. These changes start to deter from what this project was designed for. At the time, that used to mean the latest version of GameMaker for a life-time Desktop license user. GameMaker, as an application, now refers to several branches of a similar application with different experiences, be it offered for a subscription user, lifetime license user, free user, a Long-Term Stable user and so on. For a project such as this, one of these experiences has to be chosen as a priority and others will inevitably lose something as a result, as each version provides increasingly differing set of features. The release of Long-Term Stable version of GameMaker, based on the September 2022 version of GameMaker presents new opportunities for the identity of GML-OOP. This version of GML-OOP and the ones released in close future after it will primarily target the Long-Term Stable version of GameMaker, which remains accessible and officially supported for the period of two years since its release on October 31 2022, for both subscription and lifetime license users. Further updates to GML-OOP will attempt to implement forward compatibility to functions implemented in later versions of GameMaker to features that realistically can be supported by implementing them as constructor methods. Several examples of this were added in this version. These implementations are currently version-agnostic and can be used on any version of Long-Term Stable. The decision of the direction for GML-OOP will then be taken after that time, as the future situation becomes more clear.
That does not necessarily mean that using this version of GML-OOP on the newest version of GameMaker will limit the user to a lesser experience. This release introduces a feature providing the user with precise control over what constructors can do. It comes in form of a static prototype
property, containing a struct from which constructors will have properties added or methods replaced and added to them. This means that features not originally supported by GML-OOP can be added to it from each project that uses it. Properties of the ErrorReport
constructor can also be configured during the runtime that way. Detailed information about this system are available here.
The error-handling system went through a major rework. In majority of cases, checks for errors in methods are not done preemptively anymore, but handled through the try
/catch
/finally
keywords, added to every method that is expected to have any possibility of crashing the application. In such case, the produced error message will be based on the error message of the catch
exception. This should result in non-trivial difference in performance, with less performance loss from error-checking system if no errors are caught, although catching an error is now much slower on performance. Previous system was even in both cases, but detected less errors and always took more resources in cases of complicated error checking. This new system promotes performance in cases where everything works as intended, at cost of performance in edge cases of errors. Methods where both systems are in place still exist if the likelihood of issues arising is much higher, particularly in methods related to rendering graphics, which are the reason for this system to begin with. Please note that this system is not designed to avoid errors caused by using variable_struct_remove()
on default constructor properties. Lastly, the ErrorReport
constructor received an overhaul. Reporting errors with it has been standardized into a single report()
method, rather than several methods for various kinds of errors. Static configuration variables have been changed and work with new default values. They intend on avoiding reporting the same error in a row and set a limit on number of reports created to remove the possibility of memory leaks in edge cases of continuous error reports being made.
This release makes changes to the documentation format to make use of the new IntelliSense system built into GameMaker, Feather. Unfortunately, as of this release, that system has a strong tendency of enforcing its rules and providing incorrect information, so the design process of this change was focused on gaining the most benefit from it by losing the least possible amount of quality that the current documentation format already had. The documentation is now less standard to be able to use interface tool-tips, but if the situation improves, these changes will be reverted to bring them back to standards expected by the documentation based around JSDoc this project used to abide. The tool-tip support has been introduced for convenience, but please prioritize the GML-OOP documentation in its source when accuracy of the information matters.
A new Wiki has be released and now contains over 700 pages. It will be automatically updated for the latest release, thanks to a Documentation Generator created specifically for GML-OOP. That information is then supplemented with additional information not present in code documentation, more of which will appear over time. Complex and non-standard methods are to be prioritized with addition of explanations and code examples.
Changes from Version Gold:
Changes to existing content:
| All constructors: Overhauled the error detection system to focus on catching errors, rather than detecting them preemptively in most cases, as well as to handle and report more errors.
| All constructors: Reintroduced consistent file end whitespace.
| All shape constructors: No longer using rounded location values for rendering.
| AllforEach()
methods: Made the methods provide data from an immutable copy of the data, allowing for modifying the iterated data structure without unexpected behavior.
| Event system: Added support for single-level array argument groups.
|ErrorReport
: Merged thereportError()
andreportConstructorError()
methods into a newreport()
method.
|ErrorReport
: Moved part of functionality into new subsidiary constructor,ErrorReport.ReportData
.
|ErrorReport
: Overhauled static properties responsible for configuration.
|Vector2
/Vector4
/Scale
: Changedset()
method name tosetAll()
and added a newset()
method in its place.
|Circle
: Introduced default construction values used if each is not specified. Can now be constructed withoutradius
, which will default its value into 0. Drawing such shape will work, but will not produce visible results.
|Surface
: Made the Surface be automatically cleared on creation.
|Buffer.read()
: Standardized numeric value returns to real number type.
|Layer.createInstance()
: Added instance variable struct support.
|Map.getValue()
: Added support for key lookup in nestedMap
constructors.
|Sprite.generateAlphaMap()
: Overhauled the method to return a separate sprite and support non-constructor sprite argument.
|StringParser.replace()
: Made thesubstitute
argument optional.
|StringParser.charIsWhitespace()
: Included invisible characters without the whitespace property, as they are now treated as whitespace by the engine.
|StringParser.trim()
: Added argument support for skipping trimming of either end of the string.
|StringParser.split()
: Changed thereturnAsParser
argument intoparse_part
argument, which accepts theStringParser
constructor to work as it did previously or a function for parsing each split string before returning it.
|StringParser.fromArray()
: Added argument support for adding a connector string in between of strings.
|ArrayParser
: Changed the construction to allow constructing from non-array values, which then will be placed in an array.
|ArrayParser.copy()
: Added argument support for backwards copying. Added argument support for function conditions deciding if a particular entry should be copied or if copying should stop.
|ArrayParser.setSize()
: Added argument support for specifying the default value if the array is enlarged and made{undefined}
the default value if unspecified.Documentation changes:
+ Added Feather directives at the top of constructor code to have it to ignore suggestions for GML-OOP code.
| Changed number of comment-tagging slash marks to control whether Feather displays it.
| Swap...
Version Gold
With this version, the project becomes treated as stable and enters new development cycle focused on maintaining it, rather than active development. New features will continue being added in further versions, although their releases will be less regular, urging for less often alternations of the code based on this project. Further releases will simply be titled as a numbered "Release", starting from 1.
There are few changes in this version, focusing mainly on fixes to ensure the stability of the baseline of the project, although minor additions are also present.
Changes from Release Candidate 4:
Changes to existing content:
|Angle.modify()
: AddedAngle
argument type support.
| Minor general code and documentation changes and fixes.Additions:
+TextAlign
: "From array" construction type.
+Surface
: "Wrapper" construction type.Fixes:
-DateTime
: Fixed "From one array" construction checking for argument count instead of array length.
-Vector2.getSign()
/Vector4.getSign()
: Made boolean sign independent of boolean logic.
-ArrayParser.removePosition()
: Fixed the boundary calculation to prevent it from allowing out of bounds array operations.
-SurfaceRenderer
: Fixed Surface constructor not being copied on constructor copy.Instructions for conversion from the previous version:
•Vector2.getSign()
/Vector4.getSign()
: Ensure the corrected way in which this method works is compatible with the desired results when boolean sign is to be returned. Previously, it was dependent on boolean logic, meaning the sign of a positive number would not be treated as1
if it did not exceed0.5
. Such numbers will be now treated as1
.
Release Candidate 4
This version introduces the SurfaceRenderer
constructor and contains some final general fixes and additions for the current development cycle. Unless glaring issues will be found in this version, it should be the final one in the Release Candidate
development cycle before the first stable release of Version Gold
.
The SurfaceRenderer
constructor has the same use as the SpriteRenderer
constructor, adjusted for use with the Surface
constructor, the functionalities of which are unchanged. Unlike Sprites, Surfaces are volatile and therefore require more setup, for which the event system can prove useful.
Changes from Release Candidate 3:
Changes to existing content:
|Angle
: Changed the construction ofundefined
as the first argument from constructing into the "Default value" construction type into the new "Empty" construction type.
|Scale.set()
: AddedVector2
andScale
argument type support.
|Vector2
/Vector4
: AddedScale
argument type support to theset()
,setFloor()
,setRound()
,setCeil()
methods.
|Vector4.getMiddle()
: Changed the calculation method to a mean number.
|Vector4
: Added functionality of returning separate value for each value pair to thegetMinimum()
andgetMaximum()
methods.
|Vector4:
MergedgetAngle1to2()
andgetAngle2to1()
methods into a newgetAngle()
method and made it return theAngle
constructor instead of a real number.Additions:
+SurfaceRenderer
constructor.
+Vector2
:getAngle()
,getDistance()
methods.
+Vector4
:getClosest()
method.
+ArrayParser
:getFirst()
,getLast()
,isEmpty()
methods.Fixes:
-SpriteRenderer
: Fixed aVector4
typelocation
property not being duplicated on constructor copy.
-SpriteRenderer.isFunctional()
: Added missinglocation
andcolor
property data types to the validation.
-SpriteRenderer.toString()
: Added missingpart
,origin
andtarget
properties to the full output.Instructions for conversion from the previous version:
•Angle
: Adjust the code so that construction usingundefined
is replaced either by no argument, the default value of0
or another real number.
•Vector4.getAngle1to2()
: Change the used method togetAngle()
and refer to thevalue
property of the returned result instead.
•Vector4.getAngle2to1()
: Change the used method togetAngle()
withtrue
as the first argument and refer to thevalue
property of the returned result instead.
Release Candidate 3
The changes in this version focus on reducing the complexity of Sprite
/Surface
rendering and supplementing their feature set, as well as introducing new functionality to the Event system.
The renderSize()
, renderPart()
and renderGeneral()
methods have been merged into the render()
method, now having all of their features. It can now stretch or render a part of the graphic, while still being able to use rotation, origin point and Color4
blending, depending on the specified arguments. Furthermore, the target
argument allowing for selection of the target Surface
of the Surface.render()
method was also carried over to the Sprite.render()
method. This allows both of these constructors to render in the same way, aside from the frame
argument in case of Sprite
. The SpriteRenderer
constructor was updated to support these changes.
The Event system now can execute multiple methods specified in an array, in order as they are in that array. One argument can be provided for all of these methods or they can be provided in an array, with each its position being provided to each respective method.
The changes to the Event system and SpriteRenderer
should work with existing code for previous versions featuring it, but it is recommended to take extra care while conversing to the new usage scheme of the render()
methods of Sprite
and Surface
constructors, as not only the renderSize()
, renderPart()
and renderGeneral()
methods were removed, but also the Surface.render()
method features a new argument order.
Changes from Release Candidate 2:
Changes to existing content:
| Event system: Added support for specifying multiple functions in an array in thecallback
property, withargument
property being provided to all of them or if it is an array, each its value being provided to the function at the respective position of the array in thecallback
property.
| Event system: Changed the event property copying code in "Construction copy" construction type to be generically copy each property of theevent
struct.
|Vector2
/Vector4
: Made the first construction argument being{undefined}
no longer prevent construction of subsequent values.
|Sprite
: Added support for the{all}
keyword for thepart
argument of the "From Surface" construction type, using which will cause the entireSurface
area to be used to create theSprite
.
|Sprite
: Merged therenderSize()
,renderPart()
andrenderGeneral()
methods into therender()
method and added the support for theorigin
andtarget
arguments.
|Surface
: Merged therenderSize()
,renderPart()
method into therender()
method and added support for theorigin
argument.
|SpriteRenderer
: Added support for thepart
,origin
andtarget
arguments.
| General code and documentation changes.Additions:
+Vector2
/Vector4
:getSign()
method.
+Vector4
:sort()
method.
+Sprite
:setOrigin()
method.Fixes:
-Font
: Fixedevent
struct properties not being duplicated in "Constructor copy" construction type.Instructions for conversion from the previous version:
•Sprite.renderSize()
/Sprite.renderPart()
/Sprite.renderGeneral()
: Adjust the code and argument usage to use theSprite.render()
method instead.
•Surface.renderSize()
/Surface.renderPart()
: Adjust the code and argument usage to use theSurface.render()
method instead.
•Sprite.renderSize()
/Sprite.renderPart()
/Sprite.renderGeneral()
/Surface.renderSize()
/
Surface.renderPart()
: If the rendering relied on that these method not supporting the graphic being mirrored due to values of second set of thelocation
argument values being lower than the first or the values of thescale
argument being negative, adjust thelocation
using theVector4.sort()
method or the values of thescale
argument, so the rendered graphic is not mirrored.
Release Candidate 2
The changes in this version introduce several basic functionalities to often used constructors.
Multiple additions aim to make working with Shaders easier. Every constructor with the getTexture()
method received the getTexel()
method. Vector constructors have new methods allowing for setting all their values to integer ones, which is useful in ensuring Shaders operate properly when used with their values.
It should be noted that the constructors SpriteDraw
and TextDraw
had their name changed to the SpriteRenderer
and TextRenderer
respectively, although their functionality has not been changed.
Changes from Release Candidate 1:
Changes to existing content:
| RenamedSpriteDraw
andTextDraw
constructors toSpriteRenderer
andTextRenderer
respectively.
|Sprite
/Surface
: Merged theVector2
arguments forlocation
andsize
of therenderSize()
method into oneVector4
argument forlocation
.
|Angle.set()
: AddedAngle
argument type support.
| Shape constructors: Made therender()
method use rounded location values for consistency with other types of rendering.Additions:
+Vector4
: "From Scale or Vector2" construction type.
+Vector2
/Vector4
:dotProduct()
,setFloor()
,setRound()
,setCeil()
methods.
+Vector4
:setCursor()
method.
+ArrayParser
:removeValue()
method.
+Font
/Sprite
/Surface
:getTexel()
method.
+ErrorReport
:reportError()
method.Fixes:
-Ellipse
/Rectangle
: Added missing temporary argument assignments in therender()
method.
- General minor code and documentation fixes.Instructions for conversion from the previous version:
•SpriteDraw
/TextDraw
: Change all references to use their new constructor names:SpriteRenderer
andTextRenderer
respectively.
•Sprite.renderSize()
: Replace the two firstVector2
arguments with oneVector4
argument, with itsx1
andy1
values being set to the values of the firstlocation
argument andx2
andy2
values being set to the values of the secondsize
argument.
•Surface.renderSize()
If the secondVector2
argument forlocation
was used: Replace the two firstVector2
arguments with oneVector4
argument, with itsx1
andy1
values being set to the values of the firstlocation
argument andx2
andy2
values being set to the values of the secondsize
argument.
Release Candidate 1
With this version, the project enters the Release Candidate phase of development. It begins to approach the stage in which it can be treated as production ready. Further improvements will continue to be released regularly. The development will continue in this cycle until the Gold Version is reached.
The changes in this version focus on usability. Several parts of constructors used in rendering were redesigned to make them more flexible. Improvements to vector calculations are also present.
Constructors which store full basic drawing info (that being TextDraw
, SpriteDraw
and shape constructors) have gotten optional arguments to their render()
and subsidiary methods. They now allow for replacing specific pieces of the render information with temporary ones only for that call. This change might appear confusing at first, as storing that data is the purpose of these constructors. However, often it is useful to reinterpret or replace one or more pieces of that data while leaving other intact for a single call. This is a very powerful feature and is optional to use. However, to include it, the construction arguments and render()
method of the TextDraw
constructor received a change to include the location
value for consistency sake.
Changes from Beta Version 5:
Changes to existing content:
|SpriteDraw
/TextDraw
/Arrow
/Circle
/Ellipse
/Line
/Point
/Rectangle
/RoundRectangle
/Triangle
: Added the functionality of replacing the properties through the argument of therender()
and subsidiary methods for the duration of the call only.
|TextDraw
: Added thelocation
property and made it an optional argument in therender()
method instead of mandatory one.
|Layer.createInstance()
: Made the argument for location optional, defaulting to the x and y values of 0.
|Layer.destroyInstances()
: Replaced with thedestroyInstance()
method, which requires a target instance or object to be specific. The keyword{all}
can be also specified as an argument, in which case, it will work like previously, destroying all instances of objects on that Layer.
|Vector2.equals()
: Added{real}
argument support.
|Vector4.equals()
: Added{real}
and{Vector2}
argument support.
|Vector2.set()
: Added{Vector2}
argument support.
|Vector4.set()
: Added{Vector2}
and{Vector4}
argument support.
|SpriteDraw
: Added support for skipping construction arguments withundefined
.
|SpriteDraw
: Added error checking to therender()
function and removed it from thetoString()
function.
|Surface.setSize()
: Introduced the minimal size of one pixel instead of creating an Error Report.Additions:
+Scale
/Vector2
/Vector4
:grow()
,shrink()
methods.Fixes:
-List.contains()
: Fixed an issue causing the List values being compared only to the arguments that were the same position as the value in the List, resulting in inaccurate results.
-TextDraw.getBoundaryOffset()
: The value returned is now calculated based on the size of the string with the{Font}
of the constructor applied instead of the currently active one.
- General minor code and documentation fixes.Instructions for conversion from the previous version:
•Layer.destroyInstances()
: Adjust the code to refer to it through its new name,destroyInstance()
and specify{all}
as the only argument.
•TextDraw():
Adjust the code to either skip the new third construction argument forlocation
and the first argument forsprite
of therender()
method OR remove thelocation
argument from therender()
method and add it as the new third construction argument.
Beta Version 5
The changes in this version overhaul and redesign several parts of the code base, introducing better functionality and user experience.
Every method that returned nothing will now default into returning {self}
, a reference to the constructor executing the method. This allows for reliable method chaining. Detailed information about it has been added to the Examples Wiki page.
Constructors which render graphics have a new Event system included. The event
struct is declared upon construction and can be directly modified to call methods on specific timing with previously specified arguments. Detailed information about has been added to the Overview Wiki page. Please note that the configurable onCreate
method property of the Surface
constructor has been replaced by the event system.
This version sees the discontinuation and removal of currently existing Vector2
and Vector4
methods subsidiary to other methods, such as sumX()
and sumY()
being subsidiary to sum()
. The reason for this change is that this format multiplies the development and testing time each time a change or addition of new method is to be made, as well as the whitespace used. Despite that, an example call of Vector4.differenceX(5)[0]
is equivalent of calling Vector4.difference(5).x1
.
Changes from Beta Version 4:
Changes to the existing content:
| AllforEach()
methods: Will now return the results returned by the function in an array.
| All methods which returned nothing: Will now return{self}
, allowing for method chaining.
|ArrayParser
/StringParser
: All methods which returned theID
property of the constructor now return{self}
instead.
|Surface
: Moved theonCreate
property toevent.afterCreation.callback
.
|Vector4.interpolate()
: Added a number argument type support.
|Vector4.split()
: Moved to the "Conversion" category.
|List.getFirstIndex()
: Renamed togetFirstPosition()
.
|List.getAllIndexes()
: Renamed togetPositions()
.
|List
: Reversed the argument order of theset()
,replace()
,insert()
methods.
|Shader.setActive()
: Removed the functionality to toggle between the two target states in order to require them being explicitly defined.
|Layer.TilemapElement.setTileInCell()
/Layer.TilemapElement.setTileAtPoint()
: Moved to the "Execution" category.
|Layer.ParticleSystem.update()
: Added an optional argument that specifies the number of steps through which the update will be performed.
|Surface.setTarget()
: Renamed tosetActive()
.
|Surface.isTarget()
: Renamed toisActive()
.
|Circle
/Point
/Rectangle
/RoundRectangle
/Triangle
: Added support for the GUI layer cursor location to cursor getter methods.Additions:
+ Data Structures:count()
method.
+Color4
:split()
method.
+Vector2
/Vector4
:getMagnitude()
,getNormalized()
,clampTo()
methods.
+Vector4
:mirror()
,mirrorX()
,mirrorY()
methods.
+Scale
:contains()
,equals()
methods.
+Shader
:updateUniforms()
method.Fixes and removals:
-Vector2
: Removed thesumX()
,sumY()
,differenceX()
,differenceY()
,productX()
,productY()
,quotientX()
,quotientY()
,mirrorX()
,mirrorY()
methods.
-Vector4
: Removed thesumX()
,sumY()
,differenceX()
,differenceY()
,productX()
,productY()
,quotientX()
,quotientY()
,interpolateX()
,interpolateY()
,getMiddleX()
,getMiddleY()
methods.
-Buffer.toFile()
: Fixed the asynchronous ID not being returned if the method is specified to be ran asynchronously.
-ArrayParser.clear()
: Made the array be resized to the size of 0 if the array exist instead of replacing it with an empty array, so the array will be properly cleared in all variables that are a reference to it.
-Vector4.split()
: Now constructs theVector2
it is supposed to return.
-Shader
: Structs properties are now copied instead of referenced on constructor copy.
- General minor code and documentation fixes.Instructions for conversion from the previous version:
• Adjust all code which relied on methods that returned nothing andforEach()
calls to return{undefined}
by default, as they return{self}
now.
•ArrayParser
/StringParser
: Adjust the code which relied on methods returning theID
property of the constructor directly from the method call to read theID
property of the method call instead.
•Surface
: Adjust the code which operated theonCreate
method to refer to it through theevent.afterCreation.callback
method instead.
•List.getFirstIndex()
: Adjust the code to refer to it through its new name,getFirstPosition()
.
•List.getAllIndexes()
: Adjust the code to refer to it through its new name,getPositions()
.
•List
: Reverse the argument order in calls of theset()
,replace()
andinsert()
methods.
•Shader.setActive()
: Adjust the calls without argument to specify the target state in an argument.
•Surface.setTarget()
: Adjust the code to refer to it through its new name:setActive()
.
•Surface.isTarget()
: Adjust the code to refer to it through its new name:isActive()
.
•Vector2
/Vector4
: Adjust the code to replace method calls of removed methods that were subsidiary X and Y versions of other methods to refer to the properties of the returned constructor of the method that they were subsidiary to.
•ArrayParser.clear()
: Ensure that the code related to assigning theID
property of the constructor to a variable before the call of this method works as intended and adjust it if not. All direct references to the cleared array of the constructor will be not cleared if referred to by any variable, instead of only theID
property of the constructor being replaced by a new empty array.
•Shader
: Ensure that the code related to struct properties of the constructor being operated after it is copied works as intended and adjust it if not. The struct properties are now copied to a separate new struct instead of them being an reference to the struct of the constructor they were copied from.
Beta Version 4
The changes in this version focus on redesigning parts of the code relating to drawing setup, as well as vector calculation in order to bring more consistency and intuitiveness to their use. In effect, several features changed the way they are used. Therefore, it is recommended to take extra caution while upgrading existing code to this version.
Changes from Beta Version 3:
Changes to the existing content:
|Sprite
: Changed thefromFile()
method into a construction type.
|Surface
: Now enforces the minimum size of one pixel at creation.
|Vector4.interpolate()
: Changed the arguments to a singleVector2
.
|Vector2
: Separated code related to the support ofScale
as an argument in place of Vector2.Scale
used instead of aVector2
will still work in most of cases as their properties are the same andVector2
can still be constructed from aScale
, butScale
is no longer listed as a supported argument for methods of aVector2
.
|Font
: Changes to how construction types are referred to in code and documentation. The constructor type previously referred to as "file" in code and "Resource" in documentation is now referred to only as "file". The constructor type previously referred to as "sprite (utf-8)" in code and documentation is now referred to as "sprite (UTF-8)".
|Vector2
/Vector4
: Thesum()
,sumX()
,sumY()
,difference()
,differenceX()
,differenceY()
,product()
,productX()
,productY()
,quotient()
,quotientX()
,quotientY()
methods now support more argument types,{real}
and{Vector2}
for bothVector2
andVector4
, as well as{Vector4}
forVector4
only.
|Vector2
/Vector4
: Thesum()
,difference()
,product()
methods no longer check if the specified argument isself
to treat the execution as if no argument was provided.Additions:
+Sprite
: "From Surface" constructor.
+RangedValue.isMinimum()
,RangedValue.isMaximum()
methods.
+StringParser.contains()
method.
+Vector4.split()
method.
+Vector2.contains()
,Vector4.contains()
methods.Fixes:
- General minor code and documentation fixes.Instructions for conversion from the previous version:
•Sprite.fromFile()
: Adjust the code so it uses the "File" construction type instead of this method.
•Vector4.interpolate()
: Adjust the code to specify the arguments as aVector2
instead ofx
andy
separately.
•Font
: Adjust the code which relied on string parsing of thetype
property and the result oftoString()
call to expect a string containing "sprite (UTF-8)" instead of "sprite (utf-8)".
•Vector2
/Vector4
: Adjust the code which specifiedself
as the argument of thesum()
,difference()
andproduct()
methods to no longer provide any argument.
Beta Version 3
The changes in this version focus on several constructors that render graphics, replacing the built-in rendering functionality with a more reliable alternative, as well as providing additions and fixes. Updates following feature additions to GML are also present.
Changes from Beta Version 2:
Changes to the existing content:
| Changes following the addition to GameMaker Language in the version2.3.3.570
allowing the declaration of default values for optional arguments, applied when the argument is either not specified or specified asundefined
: Named optional arguments that had a constant default value are now declared upon the declaration of its respective named argument in thefunction
statement. Their functionality should not change due to that.
|Line.render()
/Point.render()
/Rectangle.render()
: Changed the method of drawing from form drawing to sprite drawing. A sprite of a single pixel is generated from a temporary surface and assigned to a static variable the first time the method is called during the runtime for each constructor type. That sprite is then appropriately stretched and altered to render the shape. This should provide consistent visual results across all devices, which should be otherwise unchanged aside from removing visual glitches that would appear through the use ofdraw_line()
,draw_point()
anddraw_rectangle()
functions. The way of usage remains unchanged.
|Line
: AddedColor4
constructor support for thecolor
property.Additions:
+TextDraw.getBoundaryOffset()
method.Fixes:
-Layer.TilemapElement.setTileAtPoint()
: Reversed the order of the arguments, as an optional argument was listed before a required one.
- General minor code and documentation fixes.Instructions for conversion from the previous version:
•Layer.TilemapElement.setTileAtPoint()
: Adjust the code referring to the method to use the new argument order.