02-14-2023, 03:47 PM
Easy solution for preserving your source, and for making your EXE smaller -- compress your text data with _DEFLATE. Turn it into hex code instead of 256-bit extended ASCII. Embed that hex code into your BAS file.
Sure, somebody could reverse engineer the process (hex to ascii, _INFLATE to raw text), but from my experience, the coders who are good enough to do that aren't the ones who usually want/need the source for a walkthrough. It protects the source from mildly curious eyes, and for most text adventures, that's the best you can ever hope for anyway. After all, a run though any hex editor can fairly easily find and return all your embedded text from your EXE. If someone *really* wants the contents, they're going to get them anyway.
Sure, somebody could reverse engineer the process (hex to ascii, _INFLATE to raw text), but from my experience, the coders who are good enough to do that aren't the ones who usually want/need the source for a walkthrough. It protects the source from mildly curious eyes, and for most text adventures, that's the best you can ever hope for anyway. After all, a run though any hex editor can fairly easily find and return all your embedded text from your EXE. If someone *really* wants the contents, they're going to get them anyway.