News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Fabrizio Radica

Game Book - Problem

Started by Fabrizio Radica, 22:00, 24 June 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fabrizio Radica

Hi :)
A friend of mine have make a Game Book (from scratch) and i whould like to convert it in a interactive game.
I've made sequencial file like this:

1,"big text with more than 255 chars etc etc. Write 85 for Combat the Dragon or 13 for Escape from castel"
2,"another text... etc etc"
[...]
76, "One man and his droid write 2 or 3"
85,"Now you are in a room with the dragon etc etc... write 8 for combat o 12 for troll the dragon :)"

the problems are here. the entire file is really big: 136kb.
Can i read only a part of it, like 1, 75 or 85 in example?

...I have 350 chapters

Thanks,
Ciao!

asertus

There are techniques in order to compress the content, and to uncompress when it must be displayed.


A good initial approach may be a conversational adventure, even developed in Basic, like Euclides XXI, maybe  @MiguelSky can give you some hints.


Fabrizio Radica

#2
I've made this simple code where i load texts in to ram.
Works fine, but every files can't be <1kb.. thats required compression..

10 cls:mode 0:border 26:ink 0,26:ink 1,0
12 load"wolf.scr":CALL &C7D0

16 cls:mode 2
18 memory &3fff:p=&4000:file$="1":memory p
20 gosub 1000
30 gosub 2000
40 goto 20

99 'Load text to memory
1000 load file$+".txt",p:i=p:cls
1100 while peek(i)>0
1200 i=i+1:print(chr$(peek(i-1)));
1350 wend
1400 return

2000 print "----": input "Segli la destinazione: ",file$
2100 cls:print "Loading...":for c=p to i:poke c,0:next
2200 return




Anther approch, can be to read texts froms specific disk address,  then copy in to ram.
But i don't know how.
Thanks :)

asertus

Actually, 2 weeks ago AUAmstrad started a course on creating Conversational Adventures in plain Basic, in Spanish tough, but google translates fine:


https://auamstrad.es/comunidad/topic/capitulo-1-primeros-pasos-creando-el-motor/


Of course, if your content is too big, you need compression or multi charge, per chapter or similar.

Fabrizio Radica

Quote from: asertus on 09:20, 25 June 19
Actually, 2 weeks ago AUAmstrad started a course on creating Conversational Adventures in plain Basic, in Spanish tough, but google translates fine:


https://auamstrad.es/comunidad/topic/capitulo-1-primeros-pasos-creando-el-motor/


Of course, if your content is too big, you need compression or multi charge, per chapter or similar.
Hi :)Now i've implemented a multi charge.. but i need to compress single text, because big.


MiguelSky

In my opinion, you should use a text cruncher (if any exists for CPC). They work in a different and more efficient way than usual data crunchers. DAAD parser suite (and I think also PAW, not sure now) includes one. They have to be specific for the language you use as they work finding similar strings along the text.


Anyway, you could do some testing with a general purpose one like exomizer, it is easy to use.

Powered by SMFPacks Menu Editor Mod