LunaLua Offical Thread

Description: Archive discussion
============================
Original description:
Official subforum for LunaLua - an extension framework for SMBX Engine Version 1.3 (which a core of SMBX 2.0). Share your creations that require the use of LunaLUA. You may also share info/tutorials on how to use LunaLUA.

Shall I stream some LunaLua live development?

Yes
15
tb1024, h2643, hacheipe399, Wohlstand, cramps-man, Lotus006, wes, Saronin, Super Mario Player, 9th_core, MomsResetti, S.Koopa0, 5438ASPGE71
100%
No
2
Toshiie, 6824
13%
 
Total voters: 15
Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #121by Kevsoft » 22 Mar 2015, 18:28

I updated the download link, it should be now easier to access LunaLua.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #122by Kevsoft » 29 Mar 2015, 12:14

See the main post about the poll.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

tb1024 M
Marquis
Marquis
tb1024 M
Marquis
Marquis
Age: 22
Reputation: 34
Posts: 170
Joined: 31 Jul 2014
Location: Brazil, America, World

Post #123by tb1024 » 2 Apr 2015, 13:52

Did you mean "stream"?

Well, if you meaned it, then I'd like to watch you showing your programming skills.
Do you want fries with that?
Image
Mal posso esperar para a versão final da engine de Wolhstand!
English Translation
I can't wait for Wohlstand's Engine final version :D

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #124by Kevsoft » 2 Apr 2015, 15:30

Yes, I mean stream, probably twitch.tv.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Veudekato M
Viscount
Viscount
Avatar
Veudekato M
Viscount
Viscount
Reputation: 79
Posts: 369
Joined: 19 Feb 2014
Location: Russia

Post #125by Veudekato » 6 Apr 2015, 12:56

About poll.I think no, becouse watchers like when 'video maker' show his voice. Its means that you should disscus that you making, it may hard for you,as for all. Just my opinion
My channel (PlatGEnWohl news and tutorials , smbx tests):
http://www.youtube.com/channel/UC6h-42umT14iR1wa3VkOs3Q

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #126by Kevsoft » 6 Jun 2015, 20:45

Okay, so LunaLua v0.7 is finally out.
Coming with a whole bunch of changes:

Spoiler
* First of all a huge thank to Rednaxela for the OpenGL renderer! This should improve the overall speed of SMBX.
* Added Layer functions :show :hide :toggle
* Added new Event onInputUpdate + player control fields (in player class)
* Added new Event onLevelExit
* Added new Warp class
* Added new BGO class
* A lot of functions has been moved to namespaces. This doesn't mean that the old functions don't work anymore. It just recommended to use the new ones, as they have been improved.
* Some minior performance improvement and bug fixes in SMBX.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Sambo M
Count
Count
Avatar
Sambo M
Count
Count
Age: 26
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #127by Sambo » 17 Jun 2015, 2:47

There's no transparent color parameter with the new loadImage function. How do you make a transparent color? It doesn't work with real image transparency.
Image
Current Project:
Image

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #128by Kevsoft » 18 Jun 2015, 9:13

PNG with alpha channel should work. Be sure to use Graphics.loadImage and Graphics.placeSprite and be sure to use the latest LunaLua version (v0.7).

If it still not working, then please give me the graphics file you're using.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Sambo M
Count
Count
Avatar
Sambo M
Count
Count
Age: 26
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #129by Sambo » 18 Jun 2015, 21:14

What is luaImageResource? Is it the name of the loaded image?

Also, is a way to remove placed sprites added, because this broke my old system involving adding variables to slot numbers to move images.
Image
Current Project:
Image

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #130by Kevsoft » 18 Jun 2015, 22:02

Currently not, but something I will add for the next release

LuaImageResource in a custom object, which just holder the resource id. It is a better system, to get the id via LunaLua instead of creating an own one.

EDIT: You might want to mess around with the "time" parameter.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #131by Kevsoft » 24 Jun 2015, 20:57

A hotfix has been released (LunaLua v0.7.0.1) with following changes:
Spoiler
* .get methods, especially NPC.get will no longer crash when used with the -1 filter.
* Added better CPU management! SMBX will no longer "burn" the CPU.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #132by Kevsoft » 26 Jul 2015, 10:46

LunaLua v0.7.0.3 has been released with following changes:

Spoiler
* Some small bugfixes
* New APIs: leveltimer.lua and smb3goalcard.lua
* New event: onMessageBox(eventObj, msg)
* New functions: unplaceSprites (to remove placed sprites)

In addition check this new neat API/extension out: https://www.youtube.com/watch?v=f9hBABxCvKg
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

sken130 M
Citizen
Citizen
sken130 M
Citizen
Citizen
Reputation: 1
Posts: 5
Joined: 18 Aug 2015
Location: Hong Kong

Is Lua script sandbox-ed?

Post #133by sken130 » 18 Aug 2015, 7:36

I may be asking a stupid question, but I don't see any security topics anywhere else.

May I know whether LunaLUA (the one we can download from http://wohlsoft.ru/LunaLua/) executes Lua scripts in a sandboxed environment? And does it use the whitelist or blacklist mechanism to restrict the function calls?

If not, any user can write arbitrary virus codes easily that can damage things outside the game, such as removing random files outside the game directory.

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 31
Reputation: 507
Posts: 1825
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #134by Wohlstand » 18 Aug 2015, 9:49

sken130, LunaLUA has disabled OS.* and other functions except clock by security reasons. So, lua scripts are limited with internal LunaLUA api and there are can't be used as malware.
Image

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #135by Kevsoft » 18 Aug 2015, 21:14

LunaLua v0.7.1 is out with following changes:

Spoiler
* Some various fixes for the opengl renderer.
* Added screenshot handling with the print-screen button.
* Working loops (intro sequence + main loop)

* Some new functions:
** Added various functions in the Misc-Namespace
** Added various functions in the Graphics-Namespace
** Added Audio.MusicTitle and Audio.MusicTitleTag to get the music title (saved as IDv3 metadata) of the current music file (works well with mp3 and ogg)

* New custom libraries:
** fade.lua - Easy and fast library for creating fade effects and color overlays
** sprite.lua - A library for creating custom animated sprites with movement abilities.
** vectR.lua - A vector library (used for colliders.lua)
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #136by Kevsoft » 19 Sep 2015, 19:29

LunaLua v0.7.1.1 is out with following changes:

Spoiler
* Added comparing operator for some LunaLua classes.
* Added PlayerSettings-Class
* Added PNG support for custom level items (i.e. npc-1.png)
* Fixed screenshot-function (With changes: PNG-Format and filename is now date + time)
* Added experimental gif recorder using FreeImage library. Can be toggled with F11. Don't record for too long or it may crash due to memory overflow (too much frames to encode)
* Added Graphics.isOpenGLEnabled() for checking if the new renderer is active.
* Replacing WIC-functions with FreeImage
* Added Level class for overworld

Unfortunatly the zip packer system broke, so here is a direct-link to the new update: https://dl.dropboxusercontent.com/u/45743579/Lunadll%20with%20lua%200.7.1.1%20BETA.zip
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Lotus006
Nice citizen
Nice citizen
Lotus006
Nice citizen
Nice citizen
Reputation: 1
Posts: 15
Joined: 6 Oct 2015

Post #137by Lotus006 » 9 Oct 2015, 18:47

Hi, I just know this project since a few months ago and I love lunalua now :)

I started a little menu and i think it look great and about the menu is a cheats menu to get easier more stuff, I dont know if i will make more for now but there is a little preview I made if any comment or idea is welcome

PS. : its a very wip

anyone know how to make not moving a player ?
because I already use
player.runKeyPressing
player.downKeyPressing
for activating the menu but I'll think if its possible to add to a string like the cheat code of smbx not sure how too

I hope u like it :D

Image

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #138by Kevsoft » 9 Oct 2015, 23:35

Hey there!

So this looks pretty neat what you crafted here :). If you want to deactivate the player input then you have use onInputUpdate() and set player.runKeyPressing (or other key values) to false.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Lotus006
Nice citizen
Nice citizen
Lotus006
Nice citizen
Nice citizen
Reputation: 1
Posts: 15
Joined: 6 Oct 2015

Post #139by Lotus006 » 10 Oct 2015, 8:48

Kevsoft wrote:Hey there!

So this looks pretty neat what you crafted here :). If you want to deactivate the player input then you have use onInputUpdate() and set player.runKeyPressing (or other key values) to false.

Thanks for the feedback :D

I already tried but it disable also the navigation on my menu because It use the same command for moving the player.
is there a way in a future update to emulate a pause menu like the normal one ?

or maybe adding in Lua the function if Key_W pressed then or any key detected ?

( for now what i'm using for not make the player not going to far when the menu is on is ) :
player.speedX = 0
player.speedY = 0
but mario will move but very slow...

Kevsoft M
Topic author, Angry developer
Angry developer
Avatar
Kevsoft M
Topic author, Angry developer
Angry developer
Age: 25
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #140by Kevsoft » 10 Oct 2015, 12:09

Well you can do that:

Code: Select all

function onInputUpdate()

    -- you code to handle keys --
 
    player.upKeyPressing = false
    -- ... --
end


So first you want to handle the keys and at the end you want to set them to false (At least I did it for my API once)
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬


Return to “LunaLua - Extension Framework”

Who is online (over the past 5 minutes)

Users browsing this forum: 3 guests