Author Topic: Game Book - Problem  (Read 672 times)

0 Members and 1 Guest are viewing this topic.

Offline Fabrizio Radica

  • Supporter
  • CPC664
  • *
  • Posts: 135
  • Country: it
  • Amiga and CPC6128 User
    • Retroacademy
  • Liked: 128
  • Likes Given: 122
Game Book - Problem
« on: 00:00, 25 June 19 »
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!
Amstrad CPC6128 <3
http://www.facebook.com/groups/retroacademy/
Retroacademy.it - retrocomputing, retrogame anni &#039;70, &#039;80, &#039;90
Retroacademy.it - retrocomputing, retrogame anni '70, '80, '90

Offline asertus

  • CPC664
  • ***
  • Posts: 119
  • Country: es
  • Liked: 86
  • Likes Given: 316
Re: Game Book - Problem
« Reply #1 on: 09:40, 25 June 19 »
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.


Offline Fabrizio Radica

  • Supporter
  • CPC664
  • *
  • Posts: 135
  • Country: it
  • Amiga and CPC6128 User
    • Retroacademy
  • Liked: 128
  • Likes Given: 122
Re: Game Book - Problem
« Reply #2 on: 10:27, 25 June 19 »
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..
Code: [Select]
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 :)
« Last Edit: 11:45, 25 June 19 by Fabrizio Radica »
Amstrad CPC6128 <3
http://www.facebook.com/groups/retroacademy/
Retroacademy.it - retrocomputing, retrogame anni &#039;70, &#039;80, &#039;90
Retroacademy.it - retrocomputing, retrogame anni '70, '80, '90

Offline asertus

  • CPC664
  • ***
  • Posts: 119
  • Country: es
  • Liked: 86
  • Likes Given: 316
Re: Game Book - Problem
« Reply #3 on: 11: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.

Offline Fabrizio Radica

  • Supporter
  • CPC664
  • *
  • Posts: 135
  • Country: it
  • Amiga and CPC6128 User
    • Retroacademy
  • Liked: 128
  • Likes Given: 122
Re: Game Book - Problem
« Reply #4 on: 11:30, 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.

Amstrad CPC6128 <3
http://www.facebook.com/groups/retroacademy/
Retroacademy.it - retrocomputing, retrogame anni &#039;70, &#039;80, &#039;90
Retroacademy.it - retrocomputing, retrogame anni '70, '80, '90

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 387
  • Country: es
    • CPCGamesCD
  • Liked: 222
  • Likes Given: 471
Re: Game Book - Problem
« Reply #5 on: 11:44, 25 June 19 »
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.