intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Dec 14, 2018 6:24 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Mon Dec 18, 2017 1:30 pm 
Offline
User avatar

Joined: Thu Jul 19, 2012 2:37 pm
Posts: 90
Location: Germany
Hi all,

Last year, in a fit of madness, I wrote a (very rudimentary) IF authoring system for the CBM64:

https://dodoif.wordpress.com/ Dodo was written in BASIC*), and an author would have to extend the framework with his own DATA sections and BASIC code to create a complete scenario.

Now I lately came across the cc65 "C" cross compiler (http://cc65.github.io/cc65/) which also can target the CBM64, and provides a reasonably capable API.

So, I was wondering, would there be any interest out there if I used a concept similar to Dodo with cc65: Provide an authoring framework where the user would have to provide his customized code in "C" for special actions etc.? It would target primarily the CBM64, but the resulting code should run on most other platforms as well.

I know that "C" is far from being the best-suited language for the job, but I think the advantage of this approach over systems like Inform or TADS, which invent their own languages for the authoring, would be that any author wouldn't have to learn a completely new language, but could employ an already established system which he may know, and/or for which he would find loads of information and tutorials on the web. Plus, it would run on retro-machines like the CBM64.

What's your take on it? Would there conceivably be any interest? (I know that the overlap between IF authoring and retro computers is small enough...)

Cheers,

syzygy


*) Commodore BASIC V2.0 being notoriously fickle and difficult to handle

_________________
Dodo -- A BASIC interactive fiction authoring system for the C64:
http://dodoif.wordpress.com


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 2:12 pm 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 249
Hi! This is cool.

It's nearly xmas, which means it's time for me to once again "waste" time on building things for retro computers.

I've been targeting z80 to ACTUALLY RUN on retro machines and not (just) emulators. I assume this is the same gig here with the c64. For the z80, i did a lot of compiler evaluation and found sdcc to be the best (by a long way). However, it does not support the 6502, so that's where your c65 comes in. but...

I would say, you should give it a bit of a test first. The problems i had with compiling C to 8 bit computers was making sure that you could do stuff like;

unsigned char i;
for (i = 0; i < x; ++i) ...

And it would use BYTES and not 16 bit ints. I did similar tests to passing parameters to functions etc. On the 6502, the question is; does c65 make good use of zero page, because otherwise it's code will be pants. That's something really important to check. Elsewise, your c64 will be like a C8, after the FAT code has filled it. :-)

turning to your project,

If cc65 code is good, i would _totally_ recommend cross compiling from C rather than BASIC. It was an experiment of mine for the z80 to see if this worked better than basic or some other intermediate form. compiled C wins hands down, and it rocks speed-wise.

one of my projects: https://github.com/voidware/trek14

It's not IF, but i was vaguely thinking of compiling the Scott interpreter for the Trs80, since it's about 1 page of c code and would work a treat. then recompile those Scott Adams adventurers - or change them :-)

So, then you could err revive dodo and even consider a C128 edition.

:-)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 2:20 pm 
Offline

Joined: Sun Apr 18, 2010 3:58 pm
Posts: 833
I'd guess the general interest in a C-based IF system would be pretty low.

From time to time, IF enthusiasts come to the table with alternate IF authoring systems in which authors can develop IF in a "real" programming language, typically one of the top 20 languages on the TIOBE index or at least a language that ranks highly on StackOverflow's "most loved languages" list. https://insights.stackoverflow.com/surv ... and-wanted

But none of the most popular IF systems require authors to use a "real" programming language. Instead, since most IF authors see themselves as writers first and coders second (if at all), all of the most popular systems use a domain-specific language for IF, ideally one that makes it easy to write extensions in another "real" programming language (typically JavaScript).

For comparison, Undum https://github.com/idmillington/undum has had a hard time getting off the ground because it requires authors to develop in JS. Raconteur is a little more popular because it builds on Undum, adding a DSL in CoffeeScript. https://github.com/sequitur/raconteur

According to the StackOverflow survey, C is a language more dreaded than loved. Many people who can develop working programs in higher-level languages like JS or Python fail to accomplish anything at all in C. I would not expect a C-based IF system to be a big hit.

Having said that, if this scratches an itch for you, it could succeed anyway, if you're prepared to do a lot of work on it.

Overall, the language that an IF system uses is arguably the least important factor in making it popular. The most important factor is to implement an entire complete "admirable" game. Most people decide to use an IF system because they see a game that they admire, and they say, "I want to make a game just like that! Whatever system the author used to make it, I'll use that system, too!" Admirers don't seem to directly care about any of the details of the system, except that if it's too hard for them to learn the system and finish a game, that's a major factor in achieving true popularity.

If you build an IF system that helps you to develop an admirable game for the Commodore 64, and you demo it on real C64 hardware (and maybe a few other legacy platforms) at expos, and then also make your game available on other more, ah, accessible platforms, you might be able to parlay your C64 compatibility into some attention in the press, which could develop into a real movement over time.

But if you're asking: "if I just build a C-based IF system, will lots of great IF authors get excited about it and build great games in it?" I think history shows that the answer is no.

_________________
At Choice of Games, we sell long-form choice-based interactive fiction games. We're looking for writers, paid in advance.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 2:35 pm 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 249
Hey, what about ChoiceScript for the C64? or the TRS-80. Would you donate some games?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 3:41 pm 
Offline

Joined: Sun Apr 18, 2010 3:58 pm
Posts: 833
I'm not personally super excited by it, not least because I have no access to legacy C64 or TRS-80 hardware, but if someone demo'd me a working prototype ChoiceScript interpreter (cross-compiler?), I could probably talk to one of my partners about making Choice of the Dragon available.

I assume that for any ChoiceScript game of non-trivial size, someone would have to add UI like, "please insert floppy disk number 4 side 2" or whatever. I have no interest in doing that myself!

_________________
At Choice of Games, we sell long-form choice-based interactive fiction games. We're looking for writers, paid in advance.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 3:46 pm 
Offline

Joined: Sun Apr 18, 2010 3:58 pm
Posts: 833
BTW, I note that Rust is at the very top of the "most loved" languages list, and I understand that it has excellent cross-compilation facilities.

I'm sure that a Rust-based IF tutorial would rank highly on Hacker News, at least, and if you or someone else figured out how to use Rust to target 6502 processors, that would be a starting point for implementing Rust games for a bunch of beloved old devices.

_________________
At Choice of Games, we sell long-form choice-based interactive fiction games. We're looking for writers, paid in advance.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 3:55 pm 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 249
You're right about that. I think a CS interpreter could fit in a 64K machine, but then there's the ~300k word story.

The idea would be that each scene would have to fit on a floppy disk and the disk swapping would be at a scene granularity. The scene files would be the original CS pre-processed to have some kind of index. CS variables would have to fit in memory.

it'd be a crazy project :-)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 18, 2017 7:35 pm 
Offline

Joined: Wed Feb 15, 2012 7:00 pm
Posts: 391
More than a few times I've fallen down the trap of thinking "well, there's no modern technology going on under the hood of a ChoiceScript game that a vintage machine wouldn't be able to hack, is there?" but of course yes, they do contain rather a lot of text. But compression of in-game text is a lost art that was perfected by eg. Level 9, so surely resurrecting its peak efficiency could get us closer to the pipe dream of a COG game on period hardware.

(Who am I kidding, just get them hosted on QuantumLink and have the C64 owners play the games online through that service!)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Dec 19, 2017 4:39 am 
Offline
User avatar

Joined: Thu Jul 19, 2012 2:37 pm
Posts: 90
Location: Germany
Thanks everybody for your comments and thoughts, it's much appreciated.

Just to clarify two points:

* cc65 already exists and AFAICT is a venerable "C"-compiler with good pedigree. It can produce executables for a lot of 6502-based platforms, among them the CBM range of machines.
* The idea wasn't so much to run the executables on real hardware (I wouldn't have access to any), but using an emulator like VICE. (A few tests I ran with the cc65 and VICE showed that that team works quite nicely.)

Writing a ChoiceScript interpreter for a machine like the C64 sounds like a challenging task. I presume it would be feasible when one drops some of the CS features, but as others have noted, the limited amount of RAM in general would require disk swapping. I've checked out the COG website, is there a formal definition/documentation of CS anywhere? I'm curious.

Cheers,

syzygy

_________________
Dodo -- A BASIC interactive fiction authoring system for the C64:
http://dodoif.wordpress.com


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Dec 19, 2017 7:21 am 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 249
Back to dodo, I've lost track of the objective. is it;

(1) to write IF in dodo BASIC for 64.
(2) to convert dodo BASIC into "C" and make a new C-based dodo IF system for modern machines.
(3) to convert dodo BASIC into "C" and cross compile a new C dodo IF system for 64.
(4) to extend dodo BASIC to call out into "C", write IF in C and run under modified C64 emulator, although it wouldn't actually work on a real C64.
(5) to find a C64 BASIC interpreter in C and thus run BASIC dodo IF games on other machines.
(6) dodo is dead but inspires a "dodo2" new BASIC IF system.
(7) dodo is dead but inspires a "dodo2" new "C" IF system.
(8) make a dodo-based, or otherwise IF system for C64.
(9) make a dodo-based, or otherwise IF system for C64 and other retro platforms
(10) make a dodo-based, or otherwise IF system for modern platforms.
(11) something else.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group