Releases: XyronLabs/Luna
Releases · XyronLabs/Luna
Events! Joystick support!
New features
Event system
- The
input
function 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
keys
andmousekeys
tables do not hold a state, they are used to check againstevent.key
orevent.button
- Global variables
mouseX
andmouseY
have been removed, useevent.x
andevent.y
on a mouse moved event
Frame time
- The
render
function 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
-v
or--version
to check your Luna version - You can use
-a
or--arguments
to pass arguments to your Lua program - You can use
-f
or--file
to 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_color
andoutline_thickness
properties, you can set them with the methodssetOutlineColor
andsetOutlineThickness
- Added
noLoop
function. 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 usingluna
in a terminal
Other features
- You can now add your own extensions to Luna in the
res/lua/extensions
folder 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
customShape
class 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
width
andheight
to 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=en
tolang=es
in the Luna configuration file.
Improvements
- Better error messages when a file is not found,
setup
orrender
functions are not found, or there are errors in them
HSV color! New properties! New functions!
New features
- The objects
circle
andrectangle
are nowellipseShape
andrectangleShape
- Circles are now ellipses, you can change their x_size and y_size, on ellipseShape you can use
xradius
andyradius
properties. - 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
volume
property 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
loop
property 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/lua
folder 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
-v
and--version
parameter to see what version of Luna you are using - Added
stop
function to sound objects
Improvements
- Textbox objects now have their own cache.
- Removed sound functions and implemented them in
addObject
andeditObject
functions. - 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
setColor
method
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
color
andtexture
in your constructor