News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_EgoTrip

[CPCtelera] File Handling / Game Saving

Started by EgoTrip, 16:21, 01 May 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EgoTrip

I want a way to save a game progress in CPCtelera. As firmware is disabled, I cannot do any file handling. Will non-firmware file handling routines be included in a future version of CPCtelera?

Another option is to compress the save data, which is output as a string that can be typed back in. How would I go about doing that from within a CPCtelera game? Can exomizer even compress on the CPC, or only decompress? One issue I can see is that there are only 32-127 inputable characters on the CPC and exomizer will use 0-255 when compressing. How would I get around that, other than having some sort of console-style high score input? Or would that be my only option?

The third option would be a simple password system, but that would lose any other data like scores.

Arnaud

#1
Quote from: EgoTrip on 16:21, 01 May 16
I want a way to save a game progress in CPCtelera. As firmware is disabled, I cannot do any file handling. Will non-firmware file handling routines be included in a future version of CPCtelera?
It's planned in the next release and i'm really waiting for this  :D
File read and save without firmware · Issue #20 · lronaldo/cpctelera · GitHub

Quote from: EgoTrip on 16:21, 01 May 16
Can exomizer even compress on the CPC, or only decompress?
You can only decompress in CPC, but a compression is planned also in CPCtelera 1.5
Compression · Issue #23 · lronaldo/cpctelera · GitHub

The next release of CPCTelera will have really interesting feature.

EgoTrip

Guess its just the password option for now then. Thanks.

Arnaud

How long is the structure you want to save ?


ronaldo

@EgoTrip: as @Arnaud has already said, file handling routines are planned for next release. In fact, they are now being tested by @AugustoRuiz, who has already implemented some of them for discs, and we are also working on some others for cassette. It will take time to have this kind of routines standarized, tested, documented and ready to be used, but we also think that they are really important and useful for developers. At the present momment, there is no defined API for file handling, so I cannot tell you how should you proceed to save/restore things to cassette or disc.

Other provisional solution you may use is to reenable firmware for file handling then disabling it again. However, you should take care of in-RAM firmware variables for file handling, preserving them in some way.

As far as I'm aware, there is no Z80 exomizer compressor. I thought of it some time ago, and I would want to implement one, but that will take longer. It's not probable to have a Z80 exomizer compressor for next release. For the other part, I don't get what the issue is with exomizer and inputable characters. I don't see any problem with that, as compressed data does not have to be stored as plain text, but binary form. However, if that might be an hipothetical problem, that would be solved converting to Base64 format.

SRS

There are some z80 compressors/decompressors available, like : Realtime RLE for the Z80 :)

Powered by SMFPacks Menu Editor Mod