Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kawa

Pages: [1] 2 3
2
Removed every single script resource and .sc file from a fresh project and made a blank script 0. Here's what I put in:
Code: [Select]
(script# 0)
(public
WeirdThing 0
)

(instance WeirdThing
(method (play)
(Display {Hello, world!} 100 10 0 102 15)
(Animate)
(Wait 100)
)
)

Aaaand yeah, it compiles. 108 bytes, and when you run it it prints "Hello, world!" at effectively 10x10 (because lol invisible status line), waits a bit so you can tell it's there, and self-terminates.

Here's what SV made of those 108 bytes:
Code: [Select]
export000_0 = WeirdThing

WeirdThing::play:
pushi $6 ; loop
lofss string_0048 ; "Hello, world!"
pushi $64 ; 100, 'd', allTrue
pushi $a ; 10, nsLeft
push0
pushi $66 ; 102, 'f', isEmpty
pushi $f ; 15, lsBottom
callk Display, $c
push0
callk Animate, $0
push1
pushi $64 ; 100, 'd', allTrue
callk Wait, $2
ret

; export000_0
instance WeirdThing of Object
{
play()
}

string_0048 = "Hello, world!"
string_0056 = "WeirdThing"


But what if... what if I were to buy fast food and disguise it as my own cooking try compiling it in SC instead? Let's see. First, I'll adjust the definition a little bit:
Code: [Select]
(instance WeirdThing of RootObj
(properties name "WeirdThing") ;if left out, the instance is nameless and that's cheating a bit
(methods play)
And then because SC insists on having a system.sh despite my script not using it, I'll whip up a minimal one:
Code: [Select]
(global
)
(extern
Animate $ffff 11
Display $ffff 27
Wait $ffff 69
)

End result is almost the same basic bytecode:
Code: [Select]
export000_0 = WeirdThing

WeirdThing::play:
pushi $6 ; loop
lofsa string_0055 ; "Hello, world!"
push ;<-- this was a lofss in Companion.
pushi $64 ; 100, 'd', allTrue
pushi $a ; 10, nsLeft
push0
pushi $66 ; 102, 'f', isEmpty
pushi $f ; 15, lsBottom
callk Display, $c
push0
callk Animate, $0
push1
pushi $64 ; 100, 'd', allTrue
callk Wait, $2
ret

; export000_0
instance WeirdThing of Object
{
play()
}

;interesting how this is in the opposite order...
string_004a = "WeirdThing"
string_0055 = "Hello, world!"

I learned nothing today.

3
SCI Community How To's & Tutorials / Quake Flicker
« on: October 14, 2023, 04:25:09 PM »
You know how all these games based on the original Quake have the same lighting presets? How from Quake up to Half-Life Alyx the same "fluorescent flickering" pattern?



As it happens, that one's a perfectly binary pattern that, instead of a string of letters, can be stored as integers. So I figured I might implement it in SCI.

https://helmet.kafuka.org/sci/QuakeFlicker.sc

Available as a Code that, once init'd, returns the next state in doit at your own pace, or as a Cycler that you can attach to a View, in which case it'll flicker between cel 0 and 1.

4
I'm wondering, since that's what got me to find that other weird thing yesterday, what are some actual engine bugs in SCI that might be worth looking into?

  • SCI0 can't draw custom windows the way SCI1 can - Not actually a bug, just a missing feature.
  • Window ports cut off Views - even if they're regular SysWindows. That's yesterday's weird thing. Known to happen even in KQ4-88.
  • SCI11 Messages: hex numbers in escapes are misread - introduced in .069, the list goes 01234567890ABCDEF. Already fixed in SCI11+.
  • SCI11 1.001.100 has a broken pathfinder - not in FPFP (.095) or LSL6 (.113), but ultimately already fixed in SCI11+, which is based on .100.
  • SCI11 1.001.100 can't show color 255 in views or backgrounds - might be introduced in .094, which added color remapping but used incorrect logic. Already fixed in SCI11+.

And... that's all I know of from the top of my head. All the rest I can find is script stuff. Anyone else?

5
The Games and other Sierra Adventure stuff / A quick observation on SCI0
« on: September 05, 2023, 06:05:20 AM »
Quote
There are no real SCI0 translations. This is because this interpreter does not cover special characters like accent grave, accent egu, umlaut, etc. The SCI0 games that are translated are converted to the hybrid SCI01.
-- ScummVM Wiki, Sierra Game Versions

I'd like to note that this is a blatant falsehood. Attached is a screenshot of King's Quest 4 (1988, green buttons and all, int ver 0.000.274, int md5 245f2f35947434b7022b4e23b10cb3f9) clearly showing special characters without complaint. I did this by simply changing the text resource, then importing my Win-1252 version of font.004, daftly bypassing SCI Companion's insistence that the wiki is correct (it doesn't let you go over 127 for old versions).

If nobody talks me out of it, I'll lift the 127 character limit shortly I guess.

6
SCI Development Tools / SCI11+ now has working pathfinding
« on: April 14, 2023, 10:23:10 AM »
That one thing where having multiple obstacles in a line from start to end and it'd ignore the first few obstacles? That one thing that's one of the primary contributors to my depression?

It's finally over.

*looks pointedly at Eric Oakford*

7
Third time's the charm, this one actually has some semblance of timing.

Wham! Mriw khrismas, you absolute leg ends.

8
SCI Development Tools / The "Hold" feature
« on: December 03, 2020, 10:28:00 AM »
By now we're all acquainted with how loop points work in SCI sound resources, but there's one other feature that I think deserves a closer looking at, being held.

According to the original scripts...
Quote
This method only applies to sounds that were set up to be
held by the musician. Holding a sound that was not meant to
be held will simply act as an infinite loop on the sound.
Musicians can set a hold point in the song, where the programmer
may hold at if needed (for syncing with slow machines). When
held the sound will infinitely loop on the same segment set up
by the musician until it is released by the programmer. The
'where' argument specifies which hold point to loop at, since
there can be multiple points in one song. holding at a second
or third point will automatically release the previous one.

Two examples from Leisure Suit Larry 1 are the blender in the "messed up again" scene (sound 190, provided for the readers' sake), and "dancing with Fawn" (611). The blender scene script holds at 10, as informed by the sound makefile, and the dancing cutscene holds at 10 and 20.

Looking at the blender noise in SCI Companion, I spy with my little eye a "control 82: 10" in the event list for track 16, and both 10 and 20 in the dance music. Now, isn't that interesting?

9
The Games and other Sierra Adventure stuff / Christmas Card again
« on: December 16, 2018, 10:39:33 AM »
Remember three years ago?

Yeah, I did it again. Because why not? Merry Christmas again.


Yes Phil, this is in Sierra script.

10
SCI Development Tools / I just wrote a thing.
« on: October 05, 2018, 04:24:16 PM »
I wrote a thing that converts script (just the string pools, really), messages, and text resources from codepage 437 to 1252 so it looks right in SCI Companion and edits nicer. Just export all resources of those types, run the thing, and drop in one of my fonts. I might add a thing where it also takes SC files. Also, I should probably add heap support.

Code: [Select]
Input:  "Fr Informationen ber Space Quest 5 drcke bitte auf diesen Knopf."
Output: "Für Informationen über Space Quest 5 drücke bitte auf diesen Knopf."

Input:  "Es w„re ja alles gar nicht so schlimm - vom harten Aufprall einmal abgesehen.  Geh' n„chstesmal nicht so nah an den Rand."
Output: "Es wäre ja alles gar nicht so schlimm - vom harten Aufprall einmal abgesehen.  Geh' nächstesmal nicht so nah an den Rand."

Yes, there are hidden characters in there where the ü should be.

11
The Games and other Sierra Adventure stuff / A bit of SCIence
« on: September 23, 2018, 04:33:50 PM »
With no apologies to CTxCB for the title.

My mission: to feed SSCI, ScummVM, SV, and SCI Companion strange font resources.

First, I generated a font resource based on Fixedsys Excelsior containing 1024 characters, because all three header fields in a font resource are 16-bit values. All four programs can load the result (attached), though SCI Companion's all "what matter of bassoonery is this" and clamps it to 256. SV just blindly tries to draw all 1024 characters and runs out of screen space, and the interpreters are happily unable to actually use any character >255.

Next up is the lowChar value. Across 500+ font files I've checked, all of them have a lowChar of zero. This is not the index of the first character in the font proper! None of the four actually care about this value, except for one spot in SSCI: the character being drawn must be >= lowChar and < highChar. As such, if you were to set it to 0x61 'a', SSCI will stop drawing any capitals, digits, and most symbols in that font.

If highChar is effectively numChar, that explains why SSCI does care about that. Remember that time I made AGI draw extended ASCII characters and it went off the rails? Giving a translation of let's say KQ5 the font(s) from the US version, the extended ASCII characters are simply skipped. But if you take a 128-character font and change its highChar to 256 (or 226, more popular number), SSCI will happily mistake the first 100-something characters' data for offsets to the high moby's characters, follow them, and draw... it depends, I suppose. I expected more dramatic results than this but when I tried it I got a few dots where the high characters would go. ScummVM catches an access violation and pops the debugger, SV crashes like a normal Windows application, and SCI Companion resets the font to 128 8x8 blanks.



If you write down your results, it's science. If you don't, you're just fucking around.

12
Looks just like the real thing, only better.



Made from scratch, runs in DOS. Mostly idempotent with Sierra's installer in all respects that matter, but nicer and smaller.

Smaller: The original, with the required HLP and TXT files, is 100 KB. This baby weighs in at 26 with every single string built in. Even unpacked at 49.5 KB it still has Sierra's beat. The original, when unpacked, is 167 KB for just the EXE.
Faster: No dots, no fuss. We mostly only scan for the most likely features and don't look up every single DRV file -- we only confirm which of those we know are there.
Clearer: When you only show 13 items at most and have 18 music hardware choices, Sierra's installer gives no indication that the list scrolls. As you can see above, we do.
Scripted: In the same sense as the original -- if there's an INSTALL.SCR file and you run from diskette or CD-ROM, "save configuration" becomes "begin installation" and the batch-like script is executed. Only two commands are unimplemented; IF ERRORLEVEL and TESTDIR.
But wait! If you run from diskette or CD-ROM and there's no script file, it'll fall back to a built-in generic install script that just copies what works for most games! If, that is, there is a SPACE setting in RESOURCE.CFG. (copies *.drv, resource.*, interp.*, install.exe, sierra.exe, and writes a new resource.cfg)
Full source: Because why not?

Tested positive on King's Quest VI CD and The Dating Pool.

? Binary | Sauce ?

13
Quote
<Kawa> https://logopending.tumblr.com/post/163366276108/codename-ouchman
<Screwtape> Kawa: So what you're saying is, Sierra should retroactively hire you.
<Kawa> no lol
<Covarr_Work> he's saying telltale should ditch their shitty crashy engine, switch to SCI, and hire him in the present.
<Kawa> SCI64?

It was at this point my thoughts ran away, thinking back to the Monkey Island remakes.

High-resolution widescreen graphics with alpha channels on views and background layers seems like an obvious feature, probably by leveraging PNG somehow. Rotating views, as per Phil's custom SCI0 terp, to go along with the existing zoom feature from SCI11, but with proper blending. Scrolling areas, as per the later games. Vorbis/FLAC background music, possibly on separate channels for volume control trickery...

And all that still with the lispy scripting language we know and love, and the same basic resource file style, extended where needed. I'd play it. I'd use it...

...as long as it's not Unity, because I'd rather like to play for more a minute or two at a time.

But yeah, wouldn't that be a cool hypothetical thing to have?

Inevitable mockup screenshot:

(click for bigger)

14
SCI Development Tools / Custom-building your own SSCI
« on: April 12, 2017, 05:48:34 PM »
I just managed to compile my own copy of sierra.exe. It doesn't actually run anything yet, but at least I got the right compiler! Lemme just rename it so it can coexist with the one that came with the archive...


Yeah okay, I'll accept that.

Edit: got a new development environment set up in a DOSbox. Two minor changes to startasm.s and info.c later, I have an SCI.EXE (debug) that manages to run the template game, albeit without the ability to initialize my sound hardware, and a SIERRA.EXE that actively refuses because it's not been stamped.

15
Everything-Else / This is what happens when I get bored.
« on: September 21, 2016, 04:39:50 PM »
I not only make mockups... but I implement them!

There used to be an image here, but it's gone.

Pages: [1] 2 3

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.033 seconds with 18 queries.