Releases: XyronLabs/Luna
Releases · XyronLabs/Luna
Events! Joystick support!
New features
Event system
- The
inputfunction gets called every time an event is received, and is passed as an argument: Check out the Events wiki page to learn about the events avaliable in Luna - Now the
keysandmousekeystables do not hold a state, they are used to check againstevent.keyorevent.button - Global variables
mouseXandmouseYhave been removed, useevent.xandevent.yon a mouse moved event
Frame time
- The
renderfunction now receives an argument, the time elapsed since the last frame, this is useful to make smooth animations
Functions
setMouseVisible(boolean)lets you hide or show the cursor
Improvements
- The input function is called when there is an event, not once every frame
Major bugfixes with shape objects
Fixes
- Fixed object instances not saving some of their properties
- Fixed multiple instances of an object having the same identifier
- Fixed missing libraries in some macOS versions
Improvements
- Luna VSC extension now fetches the latest version from its own file to prevent it from trying to download a version that isn't released at that moment
- Using SSE2 in Windows
Vectors, particles and more!
New features
Functions
- Added function
fullscreen()as a shortcut forsize(0,0,"") - Added function
setLogLevel(logLevel)
Extensions
- Added vector extension
- Added particles extension
- Added simplemap extension
Command line arguments
- You can use
-vor--versionto check your Luna version - You can use
-aor--argumentsto pass arguments to your Lua program - You can use
-for--fileto select the file you want Luna to run
Improvements
- Removed unique pointers except for sf::RenderWindow
Fixes
- Luna crashes if mouse is out of bounds and mouseX or mouseY are used
Outlines! noLoop! Full VS Code support!
New features
- Added
outline_colorandoutline_thicknessproperties, you can set them with the methodssetOutlineColorandsetOutlineThickness - Added
noLoopfunction. This function lets you stop the sketch without closing it
Visual Studio Code
- You can now create Luna projects in Windows, Linux and MacOS with the Luna VS Code extension
Bugs
- On MacOS you have to reload VS Code after creating a project in order to run it
Origin & Rotation! Custom window icons!
New features
- Added new properties:
origin,rotation - You can now put a custom window icon using the
icon(iconPath)function - Standalone version of the program, used by Visual Studio Code
Extensions! Custom Shapes! VS Code integration and much more!
New features
Visual Studio Code integration
- There is now a VS Code extension avaliable for Luna, which provides code snippets, commands and keybindings for easy testing of your game!
- You can download it here or searching for Luna inside VS Code extensions.
Windows installer
- You can download
luna-0.7-12_setup.exe, install Luna and run it from anywhere usinglunain a terminal
Other features
- You can now add your own extensions to Luna in the
res/lua/extensionsfolder and load them withrequire. Example of usage: If you have an extension like this:./res/lua/extensions/myExtension/init.lua, you load it usingrequire 'myExtension' - Added custom shapes: You can make a custom shape using the
customShapeclass like this:customShape:new{ points = { {x1, y1}, {x2, y2}, {x3, y3} } } - Added read-only luna table for luna variables. Example:
luna.version - Default window if no app is loaded
Improvements
- Windows build now has a logo
Fixes
- Textbox doesn't save custom properties
Fullscreen mode! Multiple languages! Configurations!
New features
- You can enable fullscreen mode setting
widthandheightto 0 in the size function:size(0, 0, "My Luna game") - Configuration file!
- Support for multiple languages, English and Spanish right now. You can change it setting
lang=entolang=esin the Luna configuration file.
Improvements
- Better error messages when a file is not found,
setuporrenderfunctions are not found, or there are errors in them
HSV color! New properties! New functions!
New features
- The objects
circleandrectangleare nowellipseShapeandrectangleShape - Circles are now ellipses, you can change their x_size and y_size, on ellipseShape you can use
xradiusandyradiusproperties. - Added HSV color support! You can use these functions:
hsva(hue, saturation, value, alpha)hsv(hue, saturation, value)hue(hue)
- Added
frameRate(fps_limit)function, set it to 0 if you want unlimited fps - Added
exit()function to exit the program from anywhere in your code - Added
volumeproperty to sound objects, you can set it in the constructor or with the
methodsetVolume( volume ), the parameter must be a number between 0 and 100 - Added
loopproperty to sound objects, you can set it in the constructor or with the
methodsetLoop(wantToLoop)
Improvements
- Simplified Sketch class for less function calls
- Organised code for better mantainability
Fixes
- Can't change color of lines
Big update! Modules, mouse clicks, logging!
New features
- Module system: You can add your own extension modules by putting them in the
res/luafolder and loading them inmodules.lua - Mouse clicks: You can check if a mouse button is pressed the same way you are used to do with keyboard keys. Look at the avaliable mouse buttons here
- Added
-vand--versionparameter to see what version of Luna you are using - Added
stopfunction to sound objects
Improvements
- Textbox objects now have their own cache.
- Removed sound functions and implemented them in
addObjectandeditObjectfunctions. - Major refractor of the code for easier reading
Fixes
- Text now has a 'color' property, you can set it in your constructor or using the
setColormethod
Collision detection and more properties on object construction
-
Added to circle these functions:
dist(other_circle)andcollide(other_circle) -
Added to rectangle this functions:
collide(other_rectangle) -
You can add
colorandtexturein your constructor