-
-
Notifications
You must be signed in to change notification settings - Fork 0
Preface
Mtax edited this page May 25, 2021
·
5 revisions
This page describes points of notice a potential user should consider before attempting to create a project using GML-OOP.
This project is generally not recommended for use by beginners. While it provides a grouped overview of the possibilities of GML features in each constructor and can ease the introduction to by basing it on concepts of object-oriented programming, it needs to be noted that this is an unofficial layer put over the native code that is bound by no warranty. It is advised for the user to have the experience with the elements used in the creation of this project and therefore posses the ability to correct potential disruptions on their own.
A notable drawback responsible for hindering the accessibility of this project is the lack of its ability to provide tooltips with argument descriptions for constructor methods the way GameMaker Studio 2 does for its native functions, as there is no support for such action in the official IDE. Details for each method, including its arguments, are provided in the constructor code itself, as well as on this wiki. The project code attempts to ease this inconvenience by attempting to have consistent naming and argument ordering for similar methods across different constructors.
The core of the design of this project is to provide an additional layer of code overlaying the native GameMaker Language code that is executed during the runtime. This guarantees any code written using it to take at least marginally more time to execute in comparison to an equivalent code designed solely towards optimization. The actual difference in the execution speed in projects of a big scope have not been measured yet and it should be a point of notice while attempting to create highly performant code.
Attempting to use this project to its full extent will change the way the code is written. This elevates the learning curve of the codebase of a project created using it and therefore can increase difficulty of understanding and communication for the programmers unfamiliar with this project or the ones created with it.
GML-OOP was designed for the Desktop targets and was developed and tested only on Windows 10. Furthermore, this project was designed specifically for 2D applications. While it does not exclude it from being from being viable in use for projects of other types, no guarantee for stability nor other warnings are given.
Contents
Constructors
Container
Angle
Management
● isFunctional()Getters
● equals()
● difference()Conversion
● toString()Color2
Management
● isFunctional()Conversion
● toString()
● toArray()Color3
Management
● isFunctional()Conversion
● toString()
● toArray()Color4
Management
● isFunctional()Conversion
● toString()
● toArray()
● split()DateTime
Management
● isFunctional()Getters
● compareDateTime()
● compareDate()
● compareTime()
● spanOfYears()
● spanOfMonths()
● spanOfWeeks()
● spanOfDays()
● spanOfHours()
● spanOfMinutes()
● spanOfSeconds()
● getDate()
● getTime()
● getDaysInYear()
● getDaysInMonth()
● getWeekOfYear()
● getDayOfYear()
● getHourOfYear()
● getMinuteOfYear()
● getSecondOfYear()
● getWeekday()
● isToday()
● isLeapYear()Setters
● modify()
● modifyYears()
● modifyMonths()
● modifyWeeks()
● modifyDays()
● modifyHours()
● modifyMinutes()
● modifySeconds()
● setCurrent()
● setDateTime()Conversion
● toString()
● toStringDate()
● toStringTime()
● toArray()
● toArrayDate()
● toArrayTime()Range
Management
● isFunctional()Getters
● clampTo()
● interpolate()
● percent()
● randomReal()
● randomInt()
● getMiddle()
● isBetween()
● isBoundary()Conversion
● toString()
● toArray()RangedValue
Management
● isFunctional()Getters
● equals()
● percent()
● isBoundary()
● isMinimum()
● isMaximum()Setters
● modify()
● modifyWrap()
● modifyBounce()
● interpolate()
● set()
● setMinimum()
● setMaximum()
● setOriginal()
● setMiddle()Conversion
● toString()Scale
Management
● isFunctional()Getters
● contains()
● equals()
● getMinimum()
● getMaximum()Conversion
● toString()
● toArray()TextAlign
Management
● isFunctional()Setters
● mirror()
● mirrorX()
● mirrorY()
● setXLeft()
● setXCenter()
● setXRight()
● setYTop()
● setYMiddle()
● setYBottom()Execution
● setActive()Conversion
● toString()
● toArray()Vector2
Management
● isFunctional()Getters
● contains()
● equals()
● sum()
● difference()
● product()
● quotient()
● dotProduct()
● getAngle()
● getDistance()
● getMinimum()
● getMaximum()
● getMagnitude()
● getNormalized()
● getSign()Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● clampTo()
● flip()
● mirror()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()Conversion
● toString()
● toArray()Vector4
Management
● isFunctional()Getters
● contains()
● equals()
● sum()
● difference()
● product()
● quotient()
● dotProduct()
● interpolate()
● percent()
● getAngle()
● getDistance()
● getClosest()
● getMinimum()
● getMaximum()
● getMiddle()
● getMagnitude()
● getNormalized()
● getSign()
● isBetween()Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● clampTo()
● grow()
● shrink()
● flip()
● mirror()
● mirrorX()
● mirrorY()
● sort()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()Conversion
● toString()
● toArray()
● split()
● combine()
Data Structure
Grid
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● containsRegion()
● containsDisk()
● count()
● getValue()
● getCellNumber()
● getRow()
● getColumn()
● getMinimum()
● getMinimumDisk()
● getMaximum()
● getMaximumDisk()
● getMean()
● getMeanDisk()
● getSum()
● getSumDisk()
● getValueLocation()
● getValueLocationDisk()Setters
● setSize()Execution
● forEach()
● set()
● setRegion()
● setDisk()
● setRegionCopied()
● add()
● addRegion()
● addDisk()
● addRegionCopied()
● multiply()
● multiplyRegion()
● multiplyDisk()
● multiplyRegionCopied()
● mirrorX()
● mirrorY()
● transpose()
● sort()
● shuffle()Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()List
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● count()
● getValue()
● getFirst()
● getLast()
● getFirstPosition()
● getPositions()
● getSize()
● isEmpty()Execution
● forEach()
● add()
● set()
● replace()
● removePosition()
● removeValue()
● insert()
● sort()
● shuffle()Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()Map
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● count()
● getValue()
● getAllValues()
● getAllKeys()
● getFirst()
● getLast()
● getPrevious()
● getNext()
● keyExists()
● valueIsBoundList()
● valueIsBoundMap()
● getSize()
● isEmpty()Execution
● forEach()
● add()
● addBoundList()
● addBoundMap()
● set()
● replace()
● remove()Conversion
● toString()
● toArray()
● fromArray()
● toStruct()
● fromStruct()
● toEncodedString()
● fromEncodedString()
● secureToFile()
● secureFromFile()
● secureFromBuffer()PriorityQueue
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● count()
● getFirst()
● getLast()
● getPriority()
● getSize()
● isEmpty()Execution
● forEach()
● add()
● setPriority()
● remove()
● removeFirst()
● removeLast()Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()Queue
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()Stack
Management
● isFunctional()
● destroy()
● clear()
● copy()Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Debug
ErrorReport
Management
● isFunctional()Execution
● report()Conversion
● toString()
ErrorReport.ReportData
Management
● isFunctional()Getters
● equals()
● formatLocation()
● formatDetail()
● formatCallstack()
● formatTime()Conversion
● toString()
Handler
ArrayParser
Management
● isFunctional()
● setParser()
● create()
● clear()
● copy()
● merge()Getters
● contains()
● containsAll()
● containsCondition()
● equals()
● getValue()
● getUniqueValues()
● getSharedValues()
● getFirst()
● getLast()
● getFirstPosition()
● getLastPosition()
● getPositions()
● getPositionsCondition()
● getReduction()
● getColumn()
● getSize()
● isEmpty()Setters
● setSize()Execution
● forEach()
● add()
● set()
● insert()
● removePosition()
● removeValue()
● sort()Conversion
● toString()SpriteRenderer
Management
● isFunctional()Execution
● render()Conversion
● toString()
● toArray()StringParser
Management
● isFunctional()
● setParser()Getters
● contains()
● containsAll()
● startsWith()
● endsWith()
● charEquals()
● charIsWhitespace()
● split()
● getFirst()
● getLast()
● getBetween()
● getByte()
● getByteLength()
● getChar()
● getOrd()
● getPart()
● getSubstringCount()
● getLetters()
● getDigits()
● getLettersAndDigits()
● getSubstringPosition()
● getSize()
● getPixelSize()Setters
● remove()
● formatNumber()
● insert()
● duplicate()
● replace()
● reverse()
● trim()
● setByte()
● setLowercase()
● setUppercase()Execution
● forEach()
● displayOutput()
● displayMessageBox()Conversion
● toString()
● toNumber()
● toArray()
● fromArray()SurfaceRenderer
Management
● isFunctional()Execution
● render()Conversion
● toString()TextRenderer
Management
● isFunctional()Getters
● getBoundaryOffset()Execution
● render()Conversion
● toString()
Resource
Buffer
Management
● isFunctional()
● destroy()
● copy()Getters
● getSeekPosition()
● getType()
● getAlignment()
● getPointer()
● getSize()Setters
● setSeekPosition()Execution
● write()
● fill()
● read()
● compress()
● decompress()
● getValue()Conversion
● toString()
● toHashMD5()
● toHashSHA1()
● toHashCRC32()
● toEncodedString()
● fromEncodedString()
● secureFromMap()
● fromSurface()
● toFile()
● fromFile()
● fromFilePart()Font
Management
● isFunctional()
● destroy()Getters
● getTexture()
● getTexel()
● getUV()
● isActive()Execution
● setActive()Conversion
● toString()Layer
Management
● isFunctional()
● destroy()Getters
● hasInstance()
● getElements()Setters
● setLocation()
● setSpeed()
● setVisible()
● setDepth()
● setShader()
● setFunctionDrawBegin()
● setFunctionDrawEnd()Execution
● createBackground()
● createInstance()
● createTilemap()
● createSprite()
● createParticleSystem()
● destroyInstance()
● setInstancePause()Conversion
● toString()
Layer.SpriteElement
Management
● isFunctional()
● changeParent()
● destroy()Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()Conversion
● toString()Layer.BackgroundElement
Management
● isFunctional()
● changeParent()
● destroy()Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()
● setStretch()
● setTiled()
● setVisible()Conversion
● toString()Layer.TilemapElement
Management
● isFunctional()
● destroy()
● clear()
● changeParent()Getters
● getFrame()
● getMask()
● getTileInCell()
● getTileAtPoint()
● getCellAtPoint()Setters
● setMask()
● setTileset()
● setSize()Execution
● render()
● setTileInCell()
● setTileAtPoint()Conversion
● toString()
Layer.TilemapElement.TileData
Management
● isFunctional()
● clear()Getters
● getTilesetIndex()
● isEmpty()
● isMirroredX()
● isMirroredY()
● isRotated()Setters
● setTilesetIndex()
● setMirrorX()
● setMirrorY()
● setRotate()Execution
● render()Conversion
● toString()Layer.ParticleSystem
Management
● isFunctional()
● destroy()
● clear()
● changeParent()Getters
● getParticleCount()Setters
● setLocation()
● setDrawOrder()
● setAutomaticUpdate()
● setAutomaticRender()Execution
● createEmitter()
● render()
● update()Conversion
● toString()
Layer.ParticleSystem.ParticleEmitter
Management
● isFunctional()
● destroy()
● clear()Setters
● setRegion()
● setStreamEnabled()
● setStreamCount()Conversion
● toString()ParticleType
Management
● isFunctional()
● destroy()
● clear()Setters
● setShape()
● setSprite()
● setScale()
● setSize()
● setSpeed()
● setDirection()
● setAngle()
● setGravity()
● setLife()
● setColor()
● setColorMix()
● setColorRGB()
● setColorHSV()
● setBlend()
● setAlpha()
● setStep()
● setDeath()Execution
● create()
● createShape()Conversion
● toString()Room
Management
● isFunctional()
● copy()Getters
● isActive()Setters
● setSize()
● setPersistent()Execution
● createInstance()
● setActive()Conversion
● toString()
Room.AddedInstance
Management
● isFunctional()Conversion
● toString()Shader
Management
● isFunctional()Getters
● getSampler()
● isActive()Setters
● setUniformFloat()
● setUniformInt()
● setUniformMatrix()
● updateUniforms()Execution
● setActive()Conversion
● toString()Sprite
Management
● isFunctional()
● destroy()
● replace()
● merge()Getters
● getNineslice()
● getTexture()
● getTexel()
● getUV()Setters
● setNineslice()
● setOrigin()
● setSpeed()
● setCollisionMask()Execution
● render()
● renderTiled()
● renderPerspective()
● load()
● generateAlphaMap()Conversion
● toString()
● toFile()Surface
Management
● isFunctional()
● create()
● destroy()
● clear()
● copy()Getters
● getPixel()
● getTexture()
● getTexel()
● isActive()Setters
● setSize()Execution
● render()
● renderTiled()
● setActive()Conversion
● toString()
● toFile()
● fromBuffer()
Shape
Arrow
Management
● isFunctional()Execution
● render()Conversion
● toString()Circle
Management
● isFunctional()Getters
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()Execution
● render()Conversion
● toString()Ellipse
Management
● isFunctional()Getters
● collision()Execution
● render()Conversion
● toString()Line
Management
● isFunctional()Getters
● collision()Execution
● render()
● __createPixelSprite()Conversion
● toString()Point
Management
● isFunctional()Getters
● collision()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()Execution
● render()
● __createPixelSprite()Conversion
● toString()Rectangle
Management
● isFunctional()Getters
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()Execution
● render()
● __createPixelSprite()Conversion
● toString()RoundRectangle
Management
● isFunctional()Getters
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()Execution
● render()Conversion
● toString()Triangle
Management
● isFunctional()Getters
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()Execution
● render()Conversion
● toString()