Pages: 1
Posted on 10-22-12, 03:44 am
Fuzzy
Full mod

Karma: 1183
Posts: 554/785
Since: 06-28-11
I thought it would be an awesome feature to make it so NSMBe can copy and paste entire levels. This would make it easier for people to post levels when they have a problem and be overall easier for people to share levels.

The levels would be copied as text, probably base 64 encoded unless there is a better way. It would start with "NSMBeClip" just like everything but it would contain the entire level. It could even be implemented in the board to recognize this text and hide it with some sort of marker that identifies it as a copyable level.

The reason I'm posting this instead of just implementing it is so I can get some feedback. So please let me know if you think this would be useful or not
Posted on 10-22-12, 03:47 am
Birdo


Karma: 3304
Posts: 856/2021
Since: 06-28-11
This would be really awesome if you can make it. We will just need to specify the tileset and BG used for the level and then copy it in the editor.
This would prevent to upload a single level on the uploader (kinda making the uploader section of levels and hacks for just hacks only)
_________________________

Posted on 10-22-12, 03:51 am
Fuzzy
Full mod

Karma: 1183
Posts: 555/785
Since: 06-28-11
Actually it would contain which tileset and BG was used. This would be literally the same as an .nml file except in the form of text. So it would specify tileset, BG, sprite set, ect. but not contain any custom tilesets or anything saved outside of the level.
Posted on 10-22-12, 09:15 am
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9979
Posts: 2737/4456
Since: 06-08-11
Yeah, the easiest way would be adding two buttons in the level list: "Export to clipboard" and "Import from clipboard". They would basically stick together the two level data files like .NML's, and base64-encodes it. It'd be very easy to implement.

Maybe we should put another prefix like "NSMBeLevel" so that the editor doesn't confuse it with normal clips. And the import button should have a confirmation message so you don't click it accidentally.
Posted on 10-23-12, 06:09 am
Fuzzy
Full mod

Karma: 1183
Posts: 559/785
Since: 06-28-11
OK, I implemented this feature and committed it to the repo, but it's not included in a build yet. The reason being that the levels are pretty big when copied. However, these levels contain lots of repeated data and would make great candidates for compression. I dunno if it's worth it, but I figured I'd just throw the idea out there.
Posted on 10-23-12, 09:24 am
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9979
Posts: 2742/4456
Since: 06-08-11
Maybe use the LZ compression? I'm not sure if that'll work, that compression is better for graphics.
Maybe C# has some compression functions like gzip or something
Posted on 10-23-12, 07:18 pm
Fuzzy
Full mod

Karma: 1183
Posts: 560/785
Since: 06-28-11
Alright, C# does have a built in gZip compression class, but I tested it with a bunch of levels (small and large) and LZ77 was always smaller. So I used that and now clipboard data is much smaller than before. This feature is now included in b350
Pages: 1