Ubuntu Linux Magic: Use Relative Links In Your Text-Adventure Game Written In HTML

Okay, I am experimenting on writing text-adventure games in html, an easy way to program my text-based game by linking these pages together. I decided to use the “../examplefolder” method to jump out of these directories as I write my text-based game what I am currently working on. If you were making your text-based game in Ubuntu, and you linked your index.html file to prevent a directory from being displayed, a strategic way to prevent cheaters from cheating, this is key to make your text-based game too difficult to cheat, and make it easier for you to duplicate copies of your text-based games for your website.

The Relative Links Trick

If you were making a text-based game in html, and you wanted to publish it to the web, and reduce the burden of using URLs to jump out of directories, here’s how to use this trick:

As you use”../” or “../../” to jump out of a directory; you can easily jump between folders as you link up your text-based game. This is useful for making offline games, or offline-enabled games that rely on web technologies to make your game work offline.

As you write your game with this method of linking your files. You reduce the following issues:

  • Reduce mistyped domain names or URLs.
  • Reduce effort when developing your text-based game.
  • Reduce the burden of making 2 versions of your game,–useful for making offline apps.

With this format of linking your files and folders; you can really use this method for jumping between levels what you are linking to. No need to type full URLs of your website, just write and assemble your html text-based game, and you can edit your game like usual. However; you can still link your external CSS file via a dedicated subdomain as a way to style your files.

Conclusion

This is useful technique to link your pages for your text-based game, and you can easily upload your folder with your text-based game to your server. That can also help with keeping your links short, and easy to edit later on,–if you were currently making your game from scratch.

Leave a Reply

Your email address will not be published. Required fields are marked *

− 7 = 2