Jump to content
IGNORED

Help needed optimizing and debugging text adventures!


Recommended Posts

Hi!  I am working on a text adventure for the C64 using cc65 and, if I succeed, plan to port it to other platforms, including the Atari.  Somebody over at the applefritter.com forum told me to check the output code from cc65, and I found a few inefficiencies.  While converting them to assembler, I got the text adventure to work but not my text adventure skeleton codes.  One symptom is that they display garbage when displaying room descriptions.  I use my printtok() function which displays token-compressed strings.  Replacing it with prints() from my *SimpleIO libraries works.  i added code to print both the address of the string passed to the function and the one received by the function, and the numbers don't match.  They are AdvSkelVic65 and AdvSkel65 and are at c65 additions - Manage /game at SourceForge.net.  BTW, the former has an Atari cartridge version, and the latter has an AtariXL version, but I don't remember if it also has a regular Atari 400/800 version.

 

I am also looking to optimize my own text adventure.  I attached some example code in the hopes that somebody here can give me some ideas to optimize it.

Example TextAdv Code #001.txt

Link to comment
Share on other sites

The docs. you gave state that one should avoid printf().  I have a very efficient replacement called *SimpleIO.  *SimpleIO provides functions that print certain things on a screen in such a way that very little overhead is required.  It is at c65 additions - Manage /ui at SourceForge.net.  AtaDisk65 provides an API to the Atari8 OS and is much more efficient than the standard file operations.  It is in the same location.  Try them out!

Link to comment
Share on other sites

On 12/26/2022 at 4:36 PM, Harry Potter said:

Hi!  I am working on a text adventure for the C64 using cc65 and, if I succeed, plan to port it to other platforms, including the Atari.  Somebody over at the applefritter.com forum told me to check the output code from cc65, and I found a few inefficiencies.  While converting them to assembler, I got the text adventure to work but not my text adventure skeleton codes.  One symptom is that they display garbage when displaying room descriptions.  I use my printtok() function which displays token-compressed strings.  Replacing it with prints() from my *SimpleIO libraries works.  i added code to print both the address of the string passed to the function and the one received by the function, and the numbers don't match.  They are AdvSkelVic65 and AdvSkel65 and are at c65 additions - Manage /game at SourceForge.net.  BTW, the former has an Atari cartridge version, and the latter has an AtariXL version, but I don't remember if it also has a regular Atari 400/800 version.

 

I am also looking to optimize my own text adventure.  I attached some example code in the hopes that somebody here can give me some ideas to optimize it.

Example TextAdv Code #001.txt 3.54 kB · 10 downloads

Here's a trick:

If (for some reason) you want extra color, you can get more (In antic 2, 3, F) by overlaying player/missile gfx. Since you can fill the screen with this kind of graphics at 4x wide, you can get extra color.

 

 

Edit: it seems you are coding in basic/don’t care about obscure tricks. Ignore this post.

Edited by Ecernosoft
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...