This is the place for discussion and support for LunaLua and related modifications and libraries.
Moderator: Userbase Moderators
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?
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Jun 11, 2016 11:34 am
With a bit of help, I created a system using savestate.lua by Rednaxela. This script will create a savestate when the C key is pressed and load the most recent one when D is pressed. The savestate will hold level data regarding NPCs, layers, the player including momentum, and more. However, this code is by no means perfect, nor close to it, and has a few setbacks: (1) At this time, savestate.lua will not save timed events, including moving layers, or the state of any Lua script, including variables. Rednaxela has made it clear to me though that it isn't yet complete, so at some point it may be able to support some or all of these things. (2) You have to activate the savestate before you die. I'm currently working on fixing this, but for now, the savestate table will be reset if you die. If you have an ideas on how to fix this, they would be greatly appreciated.
Here's what you'll need
savestate.lua (if you have 2.0 you'll already have it):
Hastebin link (text only; copy into a LUA file entitled "savestate"): http://hastebin.com/xuquzorofo.lua
Download file: https://www.dropbox.com/s/l8hg72hwtrbqg ... e.lua?dl=0
lunaworld.lua or lunadll.lua :
Hastebin link (text only; copy into a LUA file entitled "lunaworld" (full episode) or "lunadll" (one level only)): http://hastebin.com/sudabedasa.lua
Download file: https://www.dropbox.com/s/bsryn05jqw02f ... d.lua?dl=0
OR
Download all files as .zip: https://www.dropbox.com/s/vzb4oofmrm0na ... f.zip?dl=0
Last edited by PixelPest on Tue Jun 14, 2016 10:54 pm, edited 2 times in total.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sun Jun 12, 2016 9:05 am
Update
- Optimized loading times. Data class is no longer used since I realized it wasn't needed and was just slowing down the game. Saving/loading times are now only about 0.5 seconds to 1 second and will freeze the game for that time. Datadumper.lua was also removed, although it and the Data class will be re-introduced later when I work out saving savestates into the Data class such that they can be accessed even after the player dies.
|
|
|
|
|
|
|
|
|
-
Artemis008
- Boomerang Bro

- Posts: 1346
- Joined: Mon Jul 06, 2015 4:34 pm
Postby Artemis008 » Mon Jun 13, 2016 2:58 pm
I can see a nice Metroid style episode being made with this, great work!
|
|
|
|
|
|
|
|
|
-
MECHDRAGON777
- Pink Yoshi Egg

- Posts: 6422
- Joined: Fri Dec 20, 2013 6:40 pm
- Flair: Nuclear Queen of Reversion.
-
Contact:
Postby MECHDRAGON777 » Tue Jun 14, 2016 1:35 pm
Artemis008 wrote:I can see a nice Metroid style episode being made with this, great work!
The only issue is with this, you can save state anywhere, yet in Detroit, a death should bring you to last save, and it should not save between levels.
|
|
|
|
|
|
|
|
|
-
Artemis008
- Boomerang Bro

- Posts: 1346
- Joined: Mon Jul 06, 2015 4:34 pm
Postby Artemis008 » Tue Jun 14, 2016 1:38 pm
MECHDRAGON777 wrote:Artemis008 wrote:I can see a nice Metroid style episode being made with this, great work!
The only issue is with this, you can save state anywhere, yet in Metroid, a death should bring you to last save, and it should not save between levels.
Maybe with a little tweaking, but still. You can have it so the save button only functions at certain points in the map.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Tue Jun 14, 2016 1:40 pm
Artemis008 wrote:MECHDRAGON777 wrote:Artemis008 wrote:I can see a nice Metroid style episode being made with this, great work!
The only issue is with this, you can save state anywhere, yet in Metroid, a death should bring you to last save, and it should not save between levels.
Maybe with a little tweaking, but still. You can have it so the save button only functions at certain points in the map.
It would probably be best to use multipoints for that kind of thing
|
|
|
|
|
|
|
|
|
-
HenryRichard
- Reznor

- Posts: 2843
- Joined: Mon Dec 23, 2013 12:09 pm
- Flair: Is this where I type my password?
-
Contact:
Postby HenryRichard » Tue Jun 14, 2016 10:18 pm
MECHDRAGON777 wrote:Artemis008 wrote:I can see a nice Metroid style episode being made with this, great work!
The only issue is with this, you can save state anywhere, yet in Detroit, a death should bring you to last save, and it should not save between levels.
I realize that Detroit was a typo, but I laughed at it anyways. I guess I'm easily entertained.
This seems pretty cool, and it could make kaizo episodes not as terrible! You may be able to convert the data table into some sort of .json file and save that instead of using the data class, though I don't have much experience with that. meaning I have absolutely no idea but it seems like it would work.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Tue Jun 14, 2016 10:53 pm
HenryRichard wrote:
Not as terrible
AS TERRIBLE
TERRIBLE?!
(A little bit offended but anyway)
I tried LunaJSON without avail once and switched to using an Olivetti Engineering masterpiece called DataDumper.lua which essentially turns anything (even metatables and functions) into strings. I tried storing it in the Data class but that didn't work so well. Haven't done much on this since I've posted it but plan to get going on fixing the DataDumper.lua and Data class stuff to make saving between deaths possible. However, what I had done with this created extensive level loading times (up to 30 seconds) and about 15-20 seconds to save a savestate converted to a string into the Data class and about 5 seconds to reload it in which the game freezes and goes into non-respondent mode for those periods of time
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Sep 10, 2016 8:25 am
Sapphire Bullet Bill wrote:Can you make widescreen support?
No
|
|
|
|
|
|
|
|
|
-
Tobi555
- Swooper

- Posts: 60
- Joined: Tue Feb 23, 2016 2:13 pm
Postby Tobi555 » Wed Sep 21, 2016 7:33 am
This sounds awesome! I hope 2.0 eventually uses save states it would be great if smbx could have smw save states C:
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 1 guest
|