LunaLua Offical Thread - SMBX Usermod Framework

This is the place for discussion and support for LunaLua and related modifications and libraries.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?

Shall I steam some LunaLua live development?

Yes
194
92%
No
17
8%
 
Total votes: 211
User avatar
DarkWolf658
Pokey
Pokey
Posts: 239
Joined: Wed Jun 24, 2015 11:43 am
Current Project: Super Mario World: The Next Adventure
Location: The Internet and IRC

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby DarkWolf658 » Sat Mar 26, 2016 12:39 pm

DarkWolf658 wrote:Well, im back on this thread again...

For some reason lunalua likes to show me every single god damn frame even when disable frame skip isnt checked. Is there a way to fix this? (right now lua runs slower than normal smbx)

Lua version: 7.2.2 (Luna Loader)
Windows: 7
RAM: 1.25 gigs (about half is used normally)
Open gl: No support
Direct X: No support
DarkWolf658 wrote:
Kevsoft wrote:Did you get a message bpx about missing features of opengl? Because if you say than your computer doesn't support opengl, you should have got a message box and the rendering system should automatically go back to the original renderer.
The box shows up every time I start lua and tells me that its using the normal renderer, but the game in general runs slower, but ive noticed that it doesnt skip frames, or at least doesnt skip as many as normal. Also on some levels or episodes, the lag I get causes said level or episode to be become unplayable. ive also noticed that checking disable sound and manually removing any music makes it run slightly faster. (But still not normal speed)

EDIT: i just checked and whenever i use lunalua, my cpu bar goes up to the max. Maybe thats the problem?
Im still waiting...
Yay! I have had smbx for 2 years! :)
Follow the Blue Link Road
My Mario Kart Drivers License
Spoiler: show
Image
Friend me on Wiimmfi
Stuff I support:
Spoiler: show
Image
Image
Quotes and Stuff from the Ancient IRC
Spoiler: show
* Joey (~Joey@StarNet/staff/Joey) has joined
<Joey> uh...
<Joey> okay
* Joey (~Joey@StarNet/staff/Joey) has left (bye)

<Flame> 15 minutes could save you 15% or more on meme insurance

User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Sat Mar 26, 2016 1:48 pm

DarkWolf658 wrote:
Im still waiting...
For the performance issue I can investigate if you run this tool: http://www.codersnotes.com/sleepy/
And let VerySleepy run for a minute when you have massiv laggs. I might can do performance optimzations for the non-gl renderer.

Send me a screenshot of the results.

User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Fri Apr 01, 2016 8:12 am

Hey guys!

I have exciting news about the next version of LunaDLL. You can read about it here: http://wohlsoft.ru/

User avatar
underFlo
Young Rydia
Young Rydia
Posts: 4501
Joined: Mon Jul 14, 2014 10:44 am
Flair: sup im lesbiab
Current Project: actually nothing i lied to you
Location: Germany
Chat Username: underFlo
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby underFlo » Fri Apr 01, 2016 8:17 am

Kevsoft wrote:Hey guys!

I have exciting news about the next version of LunaDLL. You can read about it here: http://wohlsoft.ru/
finally we have a real programming language
im a girl yo

User avatar
Hoeloe
Ninji
Ninji
Posts: 809
Joined: Sat Oct 03, 2015 6:18 pm
Current Project: A2XT Episode 2

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Hoeloe » Fri Apr 01, 2016 8:22 am

Kevsoft wrote:Hey guys!

I have exciting news about the next version of LunaDLL. You can read about it here: http://wohlsoft.ru/
Hmm I don't know about this. I think Whitespace would be a better choice.

lotus006
Mega Mole
Mega Mole
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Fri Apr 01, 2016 8:24 am

Kevsoft wrote:Hey guys!

I have exciting news about the next version of LunaDLL. You can read about it here: http://wohlsoft.ru/
MMm it is real ? because I dont understand it at all !! LOL
Spoiler: show
April Fool !!??
MMmm, Why not Love2D Mari0 use this for the language combined with lua

User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Fri Apr 01, 2016 8:39 am

Hoeloe wrote: Hmm I don't know about this. I think Whitespace would be a better choice.
Would be a good alternative indeed, although LOLCODE is a bit more flexible.

User avatar
FanofSMBX
Bowser
Bowser
Posts: 3833
Joined: Sun Dec 22, 2013 12:01 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby FanofSMBX » Fri Apr 01, 2016 11:35 am

Kevsoft wrote:Hey guys!

I have exciting news about the next version of LunaDLL. You can read about it here: http://wohlsoft.ru/
Finally. Who expects me to learn about all this loop and class garbage to make some marios? Mario Maker: 1 LunaLua: 0

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!


User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2830
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Location: http://www.stardustfields.net/files/cool.gif
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Fri Apr 01, 2016 8:33 pm

I CAN HAZ UPDATE?
Image

I'm on Soundcloud | My graphics pack!

Jesus is my savior.

lotus006
Mega Mole
Mega Mole
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Fri Apr 01, 2016 9:26 pm

OMG I WANT IT SO MUCHZ I FEIND THIS SO KEWL !

Yeah that can make sens to me now ^^ sorry , now I find this very powerfull :P

User avatar
not rockythechao
Pokey
Pokey
Posts: 201
Joined: Sat Dec 12, 2015 1:00 am
Current Project: A2XT2 and a few others
Location: The second-to-last place you'd expect

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby not rockythechao » Wed Apr 13, 2016 10:38 pm

Hey everyone! Creator of cinematX, textblox, paralX and other such infamous ambitious lua libraries here with a bit of a PSA about a problem that's recently come to my attention: selfish message parsing.

Back when cinematX was in its' early stages I decided to try and utilize npcs' message text to allow users to define unique properties for each npc in the editor in an effort to make the library a bit more user-friendly. Though getting the library to a stable release has been somewhat of an uphill battle since v0.7, the message tags still became a key feature of cinematX... and now, as I understand it, the feature seems to be catching on.

If I had the foresight to anticipate this I would've designed and implemented cinematX's message parsing differently, as the format of a cinematX message doesn't take into account other libraries that may want to use the npc message text as well. Any npcs that have cinematX properties in their message text can't have properties for any other library that uses this kind of system, and vice versa. And the more we use such "selfish" message parsing systems, the more libraries we'll have that are fundamentally incompatible with one another.

The folks behind Lunalua, SMBX 2.0 and the PGE are working on phasing out the .lvl format in favor of the more flexible .lvlx format, which would allow more unique data for npcs, but as I understand it there's a lot of work involved in that so it's a long-term goal. In the meantime, we need a standardized method of parsing message text that:
A) Allows for all libraries to store data in the message string without conflicting with one another,
B) Allows users to define both a regular message string and parsed data,
C) Has a clear syntax that makes it easy to differentiate between regular message text and extra data,
D) Is as user-friendly as possible

I'm working on a possible candidate for this, tentatively called npcParse. It parses lua tables from NPC message strings and copies the information to each npc's pnpc data. The library should satisfy criteria A through C, though I'm not so sure about D.

npcParse-standard message strings would be formatted as nested tables, with a "newMsg" key corresponding to the replacement message text and everything else being stored in the pnpc data as-is, like so:

Code: Select all

-- Message string
{newMsg="Hi there.", particles={spawnrate=5, name="robert", waffle=true}, cinematx={key="goopasib2", icon=1, scene="cutscene_TestQuest3"}, customlotus={bullets=999}, rinkas={and so on}}

-- Output
pnpcref.data.particles.spawnrate --> 5
pnpcref.data.particles.name --> "robert"
pnpcref.data.particles.waffle --> true
pnpcref.data.cinematx.key --> "goopasib2"
pnpcref.data.cinematx.icon --> 1
pnpcref.data.cinematx.scene --> "cutscene_TestQuest3"
pnpcref.data.cinematx.scene --> "cutscene_TestQuest3"
pnpcref.data.customlotus.bullets --> 999
If the library doesn't detect the initial "{", it treats the text like a regular message, and if newMsg isn't specified the npc will behave as if it has no message. But again, I don't know how readable this syntax is for most folks, so it may not be the best candidate.

But whether it be npcParse or some other system, the sooner we have a standard, the better. If too many libraries start using selfish parsing and then end up having to switch to standardized parsing for compatibility with other libraries, that will break levels that use those libraries.

Now, what if you don't want to use a standardized parsing system? Well, it's your library, you have the right to code it however you want. Just keep in mind that you'd be preventing users from combining your library with others' and you'd be perpetuating a bad programming practice for other potential lua devs. And maybe that's not so big an issue for smaller, more specialized projects, but it's probably not something we should use in official SMBX 2.0 code or other higher-profile libraries. As it is, I'll be switching cinematX over to the new system as soon as it's been established. This will break every cinematX level that uses npc message tags, but I don't see much of a way around that.

This has been rockythechao with the Super-Serious Alarmist Evening News Time Report Thingy. My deepest apologies for essentially starting the SMBX equivalent of Y2K, and I sincerely hope these concerns of mine end up being overblown.

EDIT: Another possible option is that we could have a system that's similar to npcParse but instead of keeping all the library properties in the message text they could be stored as JSON in an external file, and the message text would just have a reference key and replacement message:

Code: Select all

-- Message text in the editor
{id="boss", newMsg="Hi there."}

-- [level folder]/npcdata.json
{
  "boss": {
    "particles":  {
      "name": "robert"
    }
    "cinematX":  {
      "icon": 1
    }
    "customlotus": {
      "bullets": 999
    }
  }
}
Some people just cannot avoid the ads on MediaFire, even with both common sense and popup blockers. It's always a good idea to provide an alternate download link with an ad-free file host such as Dropbox or Google Drive.

I do music, graphics, lua, birthdays, bachelor parties, bar mitzvahs, long walks on the beach, driving through the scenic countryside with my fabulous mutlicolored mustache flowing in the wind, living life on the edge and not playing by the rules, awkwardly standing in the corner of the room with my GBC during important company meetings, all my own stunts and baking cookies with criminally-high quantities of butter
Spoiler: show
Spinda wrote:gdi rocky
Waddle Derp wrote:rocky what the fuck
rockythechao wrote:gfdi me
Bread wrote:rocky
what did you do
ROCKY
Enjl wrote:you're walking a rocky road
Quantix wrote:jesus christ rocky
rockythechao wrote:the sin is indeed mine

lotus006
Mega Mole
Mega Mole
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Fri Apr 15, 2016 1:57 am

@ Kevsoft

I need to ask you if is possible to make SpriteOverride (class) with level priority like Graphics.drawImageWP ?
I have alot of idea if it can be possible sometime :D

Or the sprites of the player with level priority should be easier :D

thanks

User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Fri Apr 15, 2016 2:12 am

lotus006 wrote: I need to ask you if is possible to make SpriteOverride (class) with level priority like Graphics.drawImageWP ?
SpriteOverride only represents the bridge between custom images and the images bound to items/npcs/...
You can grab the image of an NPC with:

Code: Select all

local npcImg = Graphics.sprites.npc[1].img
With this code you grab the image of NPC-id 1. This image-object can be used for Graphics.drawImageWP.

lotus006
Mega Mole
Mega Mole
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Fri Apr 15, 2016 2:17 am

Kevsoft wrote:
lotus006 wrote: I need to ask you if is possible to make SpriteOverride (class) with level priority like Graphics.drawImageWP ?
SpriteOverride only represents the bridge between custom images and the images bound to items/npcs/...
You can grab the image of an NPC with:

Code: Select all

local npcImg = Graphics.sprites.npc[1].img
With this code you grab the image of NPC-id 1. This image-object can be used for Graphics.drawImageWP.
oh ok, sorry I did a mistake, I mean more if we can override any NPC-id 1 to level priority only without using drawImageWP then. like make passing an npc behind other sprite.

User avatar
Quantumenace
Pokey
Pokey
Posts: 235
Joined: Mon Dec 28, 2015 2:17 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Quantumenace » Fri May 27, 2016 7:33 pm

Particles.lua 1.2.5 still has a critical bug on lines 140 and 193:

Code: Select all

local mag = self.falloff(1-d)*self.strength;
Trying to use a particle force field with a falloff crashes Lua because it interprets that as trying to call self.falloff as a function. Even if you add a * there, the math doesn't make sense.

If the falloff is the fraction of the full strength that the field has at its edge, shouldn't it be:

Code: Select all

local mag = (1-d*(1-self.falloff))*self.strength;
Is there a newer version than 1.2.5?
Also:
Kevsoft wrote: You can grab the image of an NPC with:

Code: Select all

local npcImg = Graphics.sprites.npc[1].img
With this code you grab the image of NPC-id 1. This image-object can be used for Graphics.drawImageWP.
Trying to use that variable as an image in Graphics.drawImageToSceneWP causes a "no matching overload" error. Would updating Lua help?

User avatar
Hoeloe
Ninji
Ninji
Posts: 809
Joined: Sat Oct 03, 2015 6:18 pm
Current Project: A2XT Episode 2

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Hoeloe » Sat May 28, 2016 5:37 am

Quantumenace wrote: Trying to use a particle force field with a falloff crashes Lua because it interprets that as trying to call self.falloff as a function. Even if you add a * there, the math doesn't make sense.
Uhhh... self.falloff IS a function. That's the point. It's the falloff function for the field. Of course it's not going to work if you put a number there.

Take a look at the documentation:
falloff
Grad/function:optional

The falloff function of the field. 1 maps to the centre of the field, 0 maps to the edge of the field. Defaults to squared falloff.
It's designed to allow you to determine how your field falls off, giving you a lot of control over the behaviour of the field.

User avatar
Quantumenace
Pokey
Pokey
Posts: 235
Joined: Mon Dec 28, 2015 2:17 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Quantumenace » Sat May 28, 2016 2:37 pm

Ugh... sorry. I wasn't used to being able to put functions in tables. Thanks.

Edit: the "split" function in particles.lua writes to the global variable "i" instead of a local one. Is that intended? I had inconsistent bugs with other things because I accidentally was reading from that, and if it was nil the problem would have been obvious right away.

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 6560
Joined: Mon Jan 20, 2014 12:58 pm
Flair: -chan ^^

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Enjl » Thu Jun 02, 2016 3:14 pm

so we got a new official mascot of lunalua
Image
which leads me to believe we need a new logo?!?!?!?!?
Image

(rip copyright)
ImageImageImageImage
ImageImageImageImageImageImage
Muh favourite quotes:
Spoiler: show
TheKingOfBoos: enji I'm only scared of you cuz you're always right, and that's creepy
SnoruntPyro: if you don't like kirby you have no life
ToonQuill: do you have any hentai girl sfx
Pichu: "And Jesus said unto his apostles, 'ew so much clash 0/10'."
MNIE52: ohoho master king sitting in his golden chair! Dude, you think you're president? i will not leave, if i want - i'll leave.
MNIE52: i will not kill you, why you so rude. are you have nothing to do, boy?
Sanct: oh my god i made the perfect amount of stairs i am jesus christ.
Spoiler: show
Image

User avatar
PixelPest
Edward
Edward
Posts: 6778
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby PixelPest » Fri Jun 03, 2016 7:11 am

Enjl wrote:so we got a new official mascot of lunalua
Image
which leads me to believe we need a new logo?!?!?!?!?
Image

(rip copyright)
Yes. Yes. Yes

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1618
Joined: Tue Feb 11, 2014 4:44 pm
Current Project: Moondust (PGE Project)
Location: Moscow, Russia
Chat Username: Wohlstand
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Wohlstand » Fri Jun 03, 2016 7:42 am

PixelPest wrote:
Enjl wrote:so we got a new official mascot of lunalua
Image
which leads me to believe we need a new logo?!?!?!?!?
Image

(rip copyright)
Yes. Yes. Yes
Nice dragon (or who is this creature?), but SVG vector graphics required (Inkscape program suggested) (current logo in SVG is here)

From my side I suggesting wolf, bat or other creature which compatible with night and moon.
Anyway, we would have a collect some sort of logos from different people and let's vote for best variant?
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!
LunaLua
LunaLUA - is a LUA scripting add-on for a LunaDLL

My Media:
My MIDI-music
Pure HQ Music Pack for SMBX
Pure HQ Sound Pack for SMBX
SMBX OPL Sound pack (Created with Yamaha OPL chip and MIDI files)
SMBX38A is here
SMBX-38A download, help and support HERE (SMBX-38A (a.k.a. 1.4.x) - is Chinese unofficial continuation of SMBX)

I'm support:
Image
Image
Image


Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests