Skip to content

Releases: XyronLabs/Luna

Events! Joystick support!

12 Jun 12:40
Compare
Choose a tag to compare
Pre-release

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 and mousekeys tables do not hold a state, they are used to check against event.key or event.button
  • Global variables mouseX and mouseY have been removed, use event.x and event.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

16 Apr 14:21
Compare
Choose a tag to compare
Pre-release

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!

19 Jan 15:50
Compare
Choose a tag to compare
Pre-release

New features

Functions

  • Added function fullscreen() as a shortcut for size(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!

26 Sep 15:23
Compare
Choose a tag to compare
Pre-release

New features

  • Added outline_color and outline_thickness properties, you can set them with the methods setOutlineColor and setOutlineThickness
  • Added noLoop function. This function lets you stop the sketch without closing it

Visual Studio Code

Bugs

  • On MacOS you have to reload VS Code after creating a project in order to run it

Origin & Rotation! Custom window icons!

14 Sep 15:17
Compare
Choose a tag to compare
Pre-release

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!

02 Sep 16:18
Compare
Choose a tag to compare

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 using luna in a terminal

Other features

  • You can now add your own extensions to Luna in the res/lua/extensions folder and load them with require. Example of usage: If you have an extension like this: ./res/lua/extensions/myExtension/init.lua, you load it using require '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!

19 Aug 12:42
Compare
Choose a tag to compare

New features

  • You can enable fullscreen mode setting width and height 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 to lang=es in the Luna configuration file.

Improvements

  • Better error messages when a file is not found, setup or render functions are not found, or there are errors in them

HSV color! New properties! New functions!

15 Aug 17:45
Compare
Choose a tag to compare

New features

  • The objects circle and rectangle are now ellipseShape and rectangleShape
  • Circles are now ellipses, you can change their x_size and y_size, on ellipseShape you can use xradius and yradius 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
    method setVolume( 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
    method setLoop(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!

13 Aug 10:35
Compare
Choose a tag to compare

New features

  • Module system: You can add your own extension modules by putting them in the res/lua folder and loading them in modules.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 and editObject 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

11 Aug 14:23
Compare
Choose a tag to compare
  • Added to circle these functions: dist(other_circle) and collide(other_circle)

  • Added to rectangle this functions: collide(other_rectangle)

  • You can add color and texture in your constructor