Page 1 of 1

Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Sun Jul 17, 2016 11:23 pm
by Bonnies
I was wondering, since having LunaLUA installed increases the block limit from 16,384 to 20,000, if LunaLUA can extend this limit even more! :D

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Mon Jul 18, 2016 5:13 am
by loop
I highly doubt that. The game can't really handle any larger limits.

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Mon Jul 18, 2016 6:18 am
by Hoeloe
Bonnies wrote:having LunaLUA installed increases the block limit from 16,384 to 20,000
Jayce 777 wrote:The game can't really handle any larger limits.
So, neither of these things are strictly true.

Firstly, LunaLua extends the warp limit, but not the block limit. The editor debugger has always mis-reported the number of available objects of every type.

Secondly, increasing things limitlessly is not possible. However, increasing them by such a margin that they will be effectively limitless (as in, you'd never be able to hit the limit) is doable, but not through Lua code - it would have to be done in the LunaLua core.

Thirdly, this is a planned feature in future versions of LunaLua, as far as I'm aware.

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 4:42 am
by MECHDRAGON777
Hoeloe wrote:
Bonnies wrote:having LunaLUA installed increases the block limit from 16,384 to 20,000
Jayce 777 wrote:The game can't really handle any larger limits.
So, neither of these things are strictly true.

Firstly, LunaLua extends the warp limit, but not the block limit. The editor debugger has always mis-reported the number of available objects of every type.

Secondly, increasing things limitlessly is not possible. However, increasing them by such a margin that they will be effectively limitless (as in, you'd never be able to hit the limit) is doable, but not through Lua code - it would have to be done in the LunaLua core.

Thirdly, this is a planned feature in future versions of LunaLua, as far as I'm aware.

Considering I hit a block count of over 40.000 in a single level before, I hope that statement is true. Also, is there a way to (in the future) use sections 22+?

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 5:39 am
by Hoeloe
MECHDRAGON777 wrote: Considering I hit a block count of over 40.000 in a single level before, I hope that statement is true. Also, is there a way to (in the future) use sections 22+?
When I say "effectively limitless", it's fairly likely the limit could be something like 2,147,483,647, eventually.

As for sections, I wouldn't hold your breath at getting those added.

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 6:34 am
by MECHDRAGON777
Hoeloe wrote:
MECHDRAGON777 wrote: Considering I hit a block count of over 40.000 in a single level before, I hope that statement is true. Also, is there a way to (in the future) use sections 22+?
When I say "effectively limitless", it's fairly likely the limit could be something like 2,147,483,647, eventually.

As for sections, I wouldn't hold your breath at getting those added.
Okay, so Metroid like areas would require a fancy way to work. Thanks for the heads up. I may be using that many blocks in a level In the future. (Metroid areas can be huge)

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 7:50 am
by PixelPest
One way you can personally increase the number of blocks that appear in the level is to remove all of the ones the player does not ever come in contact with (except those on moving layers) and then load the images of those blocks into a lunadll.lua file and use Graphics.drawImageToSceneWP() after loading them. This'll free up a lot more space. The other thing you can always do (although this won't be accepted for CCs and stuff), is to just use two or more level files and use warp to level to go in between them (no LunaLua required). I'm not sure if objects in hidden layers still have their contents counted, but if not, another thing you could do is just hide all of the blocks, NPCs, etc. from the sections you aren't in. Furthermore, you could pretty much use this to increase the number of sections as well. (Multiple warps from different areas to the same section, but depending on where you're coming from, a different layer is shown.)

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 7:55 am
by Emral
PixelPest wrote:One way you can personally increase the number of blocks that appear in the level is to remove all of the ones the player does not ever come in contact with (except those on moving layers) and then load the images of those blocks into a lunadll.lua file and use Graphics.drawImageToSceneWP() after loading them.
I swear if people's levels start lagging because of heavily unoptimized code and become a whole lot longer I'll blame you.
A much more reliable way is to just resize your blocks or use sizeables for fill tiles.
PixelPest wrote:The other thing you can always do (although this won't be accepted for CCs and stuff), is to just use two or more level files and use warp to level to go in between them (no LunaLua required).
Resets midpoints, only really works with "Restart Last Level on Death" selected.
PixelPest wrote: I'm not sure if objects in hidden layers still have their contents counted
The contents of a block are spawned when the block is hit.
However, blocks on hidden layers do count towards the block limit.

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 8:00 am
by PixelPest
Enjl wrote:
PixelPest wrote:One way you can personally increase the number of blocks that appear in the level is to remove all of the ones the player does not ever come in contact with (except those on moving layers) and then load the images of those blocks into a lunadll.lua file and use Graphics.drawImageToSceneWP() after loading them.
I swear if people's levels start lagging because of heavily unoptimized code and become a whole lot longer I'll blame you.
A much more reliable way is to just resize your blocks or use sizeables for fill tiles.
That's what I usually do. Forgot to mention that, which is the better way than drawing your level via LunaLua

Re: Is it possible that LunaLUA can be used to put unlimited things in a level?

Posted: Thu Jul 21, 2016 8:38 am
by Hoeloe
MECHDRAGON777 wrote:I may be using that many blocks in a level In the future. (Metroid areas can be huge)
I highly doubt you'll manage to hit 2 billion blocks. That's a 44000x44000 square.