Web
Analytics
Log In  

11

Cart [#30960#] | Copy | Code | 2016-10-14 | Link
11

Instrux are included in the main program.

Now that I have a way to compress my game logo, I'll go to work on that Halloween game I promised. :)

P#30959 2016-10-14 18:09 ( Edited 2018-08-07 12:25)

::

Very cool, and very slick demo to go with it. How many tokens does it cost just to decode and display the image? Even with the 3 second delay, this would be perfect for displaying awesome full-color title screens that don't take up any tile or graphics space. I might (re: definitely will) use this in my upcoming project!

P#30961 2016-10-14 18:45 ( Edited 2016-10-14 18:47)

::

You know, I should optimize the code for that very thing. Gimme a sec ...

P#30962 2016-10-14 18:48 ( Edited 2016-10-14 18:48)

::

Also, as I understand it, a really long string doesn't use up any more tokens than a short string would, but string length still contributes to the overall 32kb cartridge limit, correct?

That's got me thinking, since you're reading/writing the data to file. Has anyone experimented with installer cartridges before? Like, your game has multiple installer cartridges that writes a bunch of compressed music, sprites, and tile maps to file, then you run your actual game cartridge that reads in new music/sprites/maps at the start of each level, effectively bypassing the cartridge limits. As long as your game engine and logic fits on one cartridge, you can add unlimited levels just by making more installer cartridges. But there's no way to swap cartridges in the web player, is there? So that idea might only work on the standalone Pico8 player...

P#30963 2016-10-14 18:57 ( Edited 2016-10-14 18:58)

::

Looks like 282 tokens. A few routines had to be included. I did set it so it doesn't disturb the tiles at all now. It converts the compressed string directly to the screen.

Cart [#30964#] | Copy | Code | 2016-10-14 | Link
0

Glad you're liking it, Jamish ! :)

Let's see what else you wrote ...

You know it's funny. I put a "--" to make that string a REM in front to see what happens and very little changes in the way of memory as far as I can see.

282 tokens of 8192 as is.
279 tokens of 8192 with "--" in front.
279 tokens of 8192 with pic removed.
6662 char of 65536 count as is.
6664 char count of 65536 with "--" in front.
1299 char count of 65536 with pic removed.

Looks to me like it cuts into the 65536. As long as you only have one logo screen or something, I think it won't take any more than 5k-7k of the 64k.

Yes, I think that idea of booting multiple carts to load data would only work LOCALLY, not ONLINE.

. . .

Minju, you don't just have to save screen or tile data. You should be able to use these routines to load/save/compress any data from anywhere in PICO.

TO EVERYONE

If you find any bugs or just have some confusion about how to use this, feel free to ask. It's not a game but I suspect a very good tool that could be used to help game production.

P#30965 2016-10-14 19:09 ( Edited 2016-10-14 21:35)

::

Oh, so it's 64k not 32k.

Dang, that's not a bad trade-off. Very much worth it. I'll keep you updated when I get around to using it. Thank you for sharing.

P#30968 2016-10-14 21:48

::

Good deal, Jamish. You know, since PICO has the ability to recover any memory that was changed back to default. You could definitely use multiple sets of 256-tiles w this compressor.

The default set could be used for the logo and in starting the game, a new one for traveling outside a map, like a continent, the 2nd set for traveling inside, like a city or castle, and the 3rd set for dungeons and caves.

Yielding a total of 1024 16-color 8x8 tiles. It's certainly possible to do. :)

Since my compressor looks for matching bytes, I suspect any logo screens that are custom-made, that is, not a conversion of a 24-bit or 256-color picture, but a true image doodled by the gamewriter themselves using the 16-colors for text/borders and other images and designed to fit within the 128x128 pixel screen - I suspect that will compress remarkably well.

P#30969 2016-10-14 22:03 ( Edited 2016-10-14 22:32)

::

dw, I am not a huge enthusiast for the details of compression and other more nitty-gritty aspects of development, but this is just awesome. For me, I can see this being a reasonable way to fit title screen graphics into a game - I remember the game-over screens and title screens in games like DOnkey Kong COuntry adding a huge amount of character to the game.

Bravo!

P#30984 2016-10-15 14:48

::

PaloBG, very glad you like it ! And I hope it is of good use for you !

Me ? I live for algorithms, compression, tables, and those neat little numbers that stick to the roof of your mouth at night while you're trying to sleep. :)

I'm making headway on my own Halloween game. Have a title screen, a story screen, a YOU WIN screen.

I'm also experimenting with transparency effects w pixels. Doesn't seem possible ? It is, and it involves - well, to really let you know - here is a little song I wrote just now for the occasion. drum roll

♫ It's naught but simple education, when it comes to multiplication, division, and hypotenuse, it's all there for us to use ! ♪

♪ Math ! It's math, it's all about the math ! Come celebrate and calculate, our passion for the math ! ♫

https://youtu.be/6fan6ggvh4U?t=91

P#30986 2016-10-15 15:20 ( Edited 2016-10-15 18:57)

::

Nice presentation!

P#30995 2016-10-15 19:47

::

Thanks, MHughson. I'm looking at the data it compresses - think I can do a better job if I work a little harder at it. Once i finish this game, I'll certainly take a crack at it !

P#31000 2016-10-15 21:18

::

Thought I would give this a bump.

I'm seeing some people make logo screens from the decompressed tiles and they might find these routines useful - especially to add a bonus "winning" screen to their game that is 128x128x16 resolution in size and depth.

P#54799 2018-08-07 12:25

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-08-19 15:18 | 0.248s | 1835k | Q:36