P.I. Cole - noir detective game

Anything QL Software or Programming Related.
User avatar
Andrew
Gold Card
Posts: 268
Joined: Tue Jul 17, 2018 9:10 pm

P.I. Cole - noir detective game

Postby Andrew » Sun Nov 03, 2019 4:08 pm

P.I. Cole - noir detective game - in development
Graphics are ready. It was a pain in the back to create some (passable) artwork on PC that still looks good on he QL because the difference in pixel sizes.
Well it's ready now - some screens are ok, some might have been better
Now working on the texts and dialogues :)
Attachments
1.jpg
office.jpg
Informant1.jpg
Street.jpg


User avatar
Andrew
Gold Card
Posts: 268
Joined: Tue Jul 17, 2018 9:10 pm

Re: P.I. Cole - noir detective game

Postby Andrew » Sun Nov 03, 2019 4:09 pm

Some more screens
Attachments
InsideClub.jpg
Informant2.jpg
bar2.jpg
Cops.jpg


User avatar
robheaton
Site Admin
Posts: 291
Joined: Fri Nov 19, 2010 5:50 pm
Location: Ormskirk, UK

Re: P.I. Cole - noir detective game

Postby robheaton » Sun Nov 03, 2019 4:29 pm

Excellent work!!

Really looking forward to playing this!!
How much of the game is complete?


Current Retro Hardware :-
ZX80 Clone, ZX81 + Chroma + ZXPand + Zeddynet, Just Speccy 128, Speccy 48K, Spectrum 128 +2, BB Sinclair QL + Trump Card Clone, Aurora + Super GC + QubIDE.
BBC Model B 32k + Datacenter + Z80 Tube, BBC Master 512, BBC Master 128k + Datacenter & 6502 Tube.
Amiga 1200, Commodore 64 x3, Commodore 128, C64 Ultimate, VIC 20, Sega Megadrive, Mega CD & 32X.
User avatar
Andrew
Gold Card
Posts: 268
Joined: Tue Jul 17, 2018 9:10 pm

Re: P.I. Cole - noir detective game

Postby Andrew » Sun Nov 03, 2019 4:47 pm

robheaton wrote:Excellent work!!

Really looking forward to playing this!!
How much of the game is complete?

Thank you Rob!
The graphic screens are ready and this was the hard part for me.
The scenario is ready - now I am working on the dialogues
The data structures are ready and the coding will not take long.
The only issue is my extremely limited time to dedicate to this project.

Are there any fast functions that I could use to compress/decompress the screens ?
I tried several ways to compress/decompress, but all are too slow for a QL without at least a Gold Card, and I would want the game to run on QL+Trump Card or a QL+vdriveQL (compiled Superbasic)


User avatar
Sparrowhawk
Trump Card
Posts: 247
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: P.I. Cole - noir detective game

Postby Sparrowhawk » Sun Nov 03, 2019 5:00 pm

Looks amazing Andrew - loving the artwork.

This and the Q68 Magnetic Scrolls remakes. Good times!


a.k.a. Jean-Yves !
User avatar
tofro
QL Wafer Drive
Posts: 1668
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: P.I. Cole - noir detective game

Postby tofro » Sun Nov 03, 2019 5:44 pm

Andrew wrote:I tried several ways to compress/decompress, but all are too slow for a QL without at least a Gold Card, and I would want the game to run on QL+Trump Card or a QL+vdriveQL (compiled Superbasic)


Impressive! And, apparently, a juicy plot.

Those b&w pictures should benefit greatly from RLE compression. Simple and small. Something along the lines of

Code: Select all

void encode(void) {
  char c, n, new_c;
  if (get(&c) == 0) return;
  put(c);
  n = 1;
  new_c;
  while (get(&new_c) != 0) {
    if (new_c == c) {
      if (n == UINT8_MAX) { put(n); n = 1; put(c); }
      else { n++; }
    } else {
      put(n); put(new_c);
      c = new_c; n = 1;
    }
  }
  put(n);
}

void decode(void) {
  char c, n, i;
  while (get(&c) != 0) {
    get(&n);
    for (i = 0; i < n; i++) put(c);
  }
}


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
vanpeebles
Commissario Pebbli
Posts: 2154
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: P.I. Cole - noir detective game

Postby vanpeebles » Sun Nov 03, 2019 6:06 pm

Awesome work! :)


User avatar
Andrew
Gold Card
Posts: 268
Joined: Tue Jul 17, 2018 9:10 pm

Re: P.I. Cole - noir detective game

Postby Andrew » Sun Nov 03, 2019 6:08 pm

tofro wrote:
Andrew wrote:I tried several ways to compress/decompress, but all are too slow for a QL without at least a Gold Card, and I would want the game to run on QL+Trump Card or a QL+vdriveQL (compiled Superbasic)


Impressive! And, apparently, a juicy plot.

Those b&w pictures should benefit greatly from RLE compression. Simple and small. Something along the lines of

Code: Select all

...

Thank you tofro!
I tried the RLE encoding/decoding but it is still too slow in compiled SBasic
On an unexpanded QL I got the following results:
Lbytes data to memory buffer <1 sec
Decode buffer and write decoded data into another memory buffer = 17-20 seconds, depending on the screen
Move_Mem from buffer to screen < 1 sec

It is far to slow for my practical purposes. I need to decode in less than 3 seconds, and do it in Sbasic (I have not used C language since 1997)
Images are 360 x 151 pixels

Code: Select all

100 WINDOW#1,512,256,0,0: PAPER#1,0: CLS#1
110 ConfigDrv$='Dos2_Picole_'
120 FileName$='street'&'_SCC': REMark the compressed file in format - BytesCount, Color
130 mem1=FLEN(\ConfigDrv$&FileName$)
140 mem=ALCHP(mem1): REMark Reserve memory for compressed image
150 all=ALCHP(13590) : REMark Reserve memory for uncompressed image 360 x 151 pixels
155 crt=all
160 LBYTES ConfigDrv$&FileName$, mem :  REMark Load compressed image to buffer
170 FOR i=0 TO mem1-1 STEP 2 :  REMark Decompress image and write it to uncompressed buffer
180   cnt=PEEK (mem+i)
190   cod=PEEK (mem+i+1)
200   FILLMEM_B crt, cnt, cod
210   crt=crt+cnt
220 END FOR i
230 Loadscr:  :  REMark Move decompressed image to screen
240 RECHP mem
250 RECHP all
360  DEFine PROCedure Loadscr
390  FOR i=0 TO 150
400    MOVE_MEM all+i*90, 131072+(13+i)*128+32, 90
410    NEXT i
420  END FOR i
440  END DEFine LoadScr
Last edited by Andrew on Mon Nov 04, 2019 12:00 am, edited 2 times in total.


RWAP
RWAP Master
Posts: 2646
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: P.I. Cole - noir detective game

Postby RWAP » Sun Nov 03, 2019 6:40 pm

Looking great - I love more adventures :)

QREST (part of ACT was probably the fastest display method I have seen for compression) - but there are two ways around this -

a) Why do you need to compress the screens? Is it to fit it on a floppy disk - or is the game going to run from HD disk or SD / CF card?
b) Can you decompress the screens in the background - ie show the text input and allow text input, and show the menu on the left immediately and then just load the graphics in the appropriate frame?


User avatar
tofro
QL Wafer Drive
Posts: 1668
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: P.I. Cole - noir detective game

Postby tofro » Sun Nov 03, 2019 7:11 pm

You can't get any faster than RLE - It is by far the fastest (and simplest) compression method. If compiled S*Basic is too slow, you'll need to revert to a faster language.

However,
If your picture is really only black and white, you can easily squeeze them into half the space by only storing the green (that is, every other) bytes - the red ones are exact copies of them - and then copying to the red byte positions to give white. You'd need machine code for this, however. Maybe the DIY toolkit's "W" edition can help here, it has machine code functions to do that.

Tobias
Last edited by tofro on Sun Nov 03, 2019 7:27 pm, edited 1 time in total.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO

Who is online

Users browsing this forum: No registered users and 5 guests