Skip to content

Releases: Mtax-Development/GML-OOP

Second LTS Cycle Preview

05 May 15:01
Compare
Choose a tag to compare

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.Primiti...

Read more

Release 1

05 May 08:55
cede94d
Compare
Choose a tag to compare

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.
| All forEach() 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 the reportError() and reportConstructorError() methods into a new report() method.
| ErrorReport: Moved part of functionality into new subsidiary constructor, ErrorReport.ReportData.
| ErrorReport: Overhauled static properties responsible for configuration.
| Vector2/Vector4/Scale: Changed set() method name to setAll() and added a new set() method in its place.
| Circle: Introduced default construction values used if each is not specified. Can now be constructed without radius, 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 nested Map constructors.
| Sprite.generateAlphaMap(): Overhauled the method to return a separate sprite and support non-constructor sprite argument.
| StringParser.replace(): Made the substitute 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 the returnAsParser argument into parse_part argument, which accepts the StringParser 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...

Read more

Version Gold

05 May 15:55
66a04e4
Compare
Choose a tag to compare

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(): Added Angle 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 as 1 if it did not exceed 0.5. Such numbers will be now treated as 1.

Release Candidate 4

05 Mar 08:20
Compare
Choose a tag to compare
Release Candidate 4 Pre-release
Pre-release

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 of undefined as the first argument from constructing into the "Default value" construction type into the new "Empty" construction type.
| Scale.set(): Added Vector2 and Scale argument type support.
| Vector2/Vector4: Added Scale argument type support to the set(), 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 the getMinimum() and getMaximum() methods.
| Vector4: Merged getAngle1to2() and getAngle2to1() methods into a new getAngle() method and made it return the Angle constructor instead of a real number.

Additions:
+ SurfaceRenderer constructor.
+ Vector2: getAngle(), getDistance() methods.
+ Vector4: getClosest() method.
+ ArrayParser: getFirst(), getLast(), isEmpty() methods.

Fixes:
- SpriteRenderer: Fixed a Vector4 type location property not being duplicated on constructor copy.
- SpriteRenderer.isFunctional(): Added missing location and color property data types to the validation.
- SpriteRenderer.toString(): Added missing part, origin and target properties to the full output.

Instructions for conversion from the previous version:
Angle: Adjust the code so that construction using undefined is replaced either by no argument, the default value of 0 or another real number.
Vector4.getAngle1to2(): Change the used method to getAngle() and refer to the value property of the returned result instead.
Vector4.getAngle2to1(): Change the used method to getAngle() with true as the first argument and refer to the value property of the returned result instead.

Release Candidate 3

05 Feb 17:55
Compare
Choose a tag to compare
Release Candidate 3 Pre-release
Pre-release

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 the callback property, with argument 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 the callback property.
| Event system: Changed the event property copying code in "Construction copy" construction type to be generically copy each property of the event 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 the part argument of the "From Surface" construction type, using which will cause the entire Surface area to be used to create the Sprite.
| Sprite: Merged the renderSize(), renderPart() and renderGeneral() methods into the render() method and added the support for the origin and target arguments.
| Surface: Merged the renderSize(), renderPart() method into the render() method and added support for the origin argument.
| SpriteRenderer: Added support for the part, origin and target arguments.
| General code and documentation changes.

Additions:
+ Vector2/Vector4: getSign() method.
+ Vector4: sort() method.
+ Sprite: setOrigin() method.

Fixes:
- Font: Fixed event 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 the Sprite.render() method instead.
Surface.renderSize()/Surface.renderPart(): Adjust the code and argument usage to use the Surface.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 the location argument values being lower than the first or the values of the scale argument being negative, adjust the location using the Vector4.sort() method or the values of the scale argument, so the rendered graphic is not mirrored.

Release Candidate 2

05 Jan 21:35
Compare
Choose a tag to compare
Release Candidate 2 Pre-release
Pre-release

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:
| Renamed SpriteDraw and TextDraw constructors to SpriteRenderer and TextRenderer respectively.
| Sprite/Surface: Merged the Vector2 arguments for location and size of the renderSize() method into one Vector4 argument for location.
| Angle.set(): Added Angle argument type support.
| Shape constructors: Made the render() 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 the render() 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 and TextRenderer respectively.
Sprite.renderSize(): Replace the two first Vector2 arguments with one Vector4 argument, with its x1 and y1 values being set to the values of the first location argument and x2 and y2 values being set to the values of the second size argument.
Surface.renderSize() If the second Vector2 argument for location was used: Replace the two first Vector2 arguments with one Vector4 argument, with its x1 and y1 values being set to the values of the first location argument and x2 and y2 values being set to the values of the second size argument.

Release Candidate 1

05 Dec 07:27
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release

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 the render() and subsidiary methods for the duration of the call only.
| TextDraw: Added the location property and made it an optional argument in the render() 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 the destroyInstance() 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 with undefined.
| SpriteDraw: Added error checking to the render() function and removed it from the toString() 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 for location and the first argument for sprite of the render() method OR remove the location argument from the render() method and add it as the new third construction argument.

Beta Version 5

05 Oct 16:27
Compare
Choose a tag to compare
Beta Version 5 Pre-release
Pre-release

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:
| All forEach() 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 the ID property of the constructor now return {self} instead.
| Surface: Moved the onCreate property to event.afterCreation.callback.
| Vector4.interpolate(): Added a number argument type support.
| Vector4.split(): Moved to the "Conversion" category.
| List.getFirstIndex(): Renamed to getFirstPosition().
| List.getAllIndexes(): Renamed to getPositions().
| List: Reversed the argument order of the set(), 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 to setActive().
| Surface.isTarget(): Renamed to isActive().
| 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 the sumX(), sumY(), differenceX(), differenceY(), productX(), productY(), quotientX(), quotientY(), mirrorX(), mirrorY() methods.
- Vector4: Removed the sumX(), 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 the Vector2 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 and forEach() calls to return {undefined} by default, as they return {self} now.
ArrayParser/StringParser: Adjust the code which relied on methods returning the ID property of the constructor directly from the method call to read the ID property of the method call instead.
Surface: Adjust the code which operated the onCreate method to refer to it through the event.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 the set(), replace() and insert() 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 the ID 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 the ID 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

05 Sep 18:55
Compare
Choose a tag to compare
Beta Version 4 Pre-release
Pre-release

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 the fromFile() method into a construction type.
| Surface: Now enforces the minimum size of one pixel at creation.
| Vector4.interpolate(): Changed the arguments to a single Vector2.
| Vector2: Separated code related to the support of Scale as an argument in place of Vector2. Scale used instead of a Vector2 will still work in most of cases as their properties are the same and Vector2 can still be constructed from a Scale, but Scale is no longer listed as a supported argument for methods of a Vector2.
| 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: The sum(), sumX(), sumY(), difference(), differenceX(), differenceY(), product(), productX(), productY(), quotient(), quotientX(), quotientY() methods now support more argument types, {real} and {Vector2} for both Vector2 and Vector4, as well as {Vector4} for Vector4 only.
| Vector2/Vector4: The sum(), difference(), product() methods no longer check if the specified argument is self 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 a Vector2 instead of x and y separately.
Font: Adjust the code which relied on string parsing of the type property and the result of toString() call to expect a string containing "sprite (UTF-8)" instead of "sprite (utf-8)".
Vector2/Vector4: Adjust the code which specified self as the argument of the sum(), difference() and product() methods to no longer provide any argument.

Beta Version 3

05 Aug 17:55
Compare
Choose a tag to compare
Beta Version 3 Pre-release
Pre-release

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 version 2.3.3.570 allowing the declaration of default values for optional arguments, applied when the argument is either not specified or specified as undefined: Named optional arguments that had a constant default value are now declared upon the declaration of its respective named argument in the function 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 of draw_line(), draw_point() and draw_rectangle() functions. The way of usage remains unchanged.
| Line: Added Color4 constructor support for the color 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.