K03 Free game code templates (2024)

K03 Free game code templates (2024)
Description: many different games
Purpose: for game creators to learn or copy and paste

To copy the code

  1. Go to code link.
  2. Click raw button at right hand side.
  3. Ctrl+A (Select all), Ctrl+C (Copy).

To paste the code

  1. Startup your quest gamebook/textadventure, on the right side of the big play button, you can see a code view button </>
  2. Copy my code to replace the code in the text box, click code view button again.
  3. Viola, it is done, press play button to test out the game and modify the code to your preference.

All the games that I have published.
https://textadventures.co.uk/user/view/ww0gaaqih0ano-9dlqahtq/daeun

K03a Matrix double (2019)
Type: Gamebook
Description: It is tiring to write pages one by one, this template offers an alternative way of coding instead.
Purpose: This code helps to avoids a programming issue where the game stops if it is sent back to the same or nearby page.
Error: Game crashes because of youtube links, either delete them from code or replace them with a different and allowed youtube link.
Code: https://gist.github.com/foxrain4/06c0fe5547399c56f266dd4f60c07087

K03b Simcity Events (2019)
Type: Gamebook
Description: A simcity game where you build buildings and earn money.
Purpose: This game attempts to teach you the difference between variables and attributes.
Code: https://gist.github.com/foxrain4/2021de6bef3ead01823ffd4a42ad32ab

K03c Fishvale (2019)
Type: Textadventure
Description: A relaxing game where you just do fishing.
Purpose: This game attempts to teach you timers.
Code: https://gist.github.com/foxrain4/073f6909351ad4b169112c2f4dea94ee

K03d Survival Detective (2020)
Type: Textadventure
Description: Similar to an escape room.
Purpose: This game teaches rather than letting players achieve a generic certain goal like hero kills enemy boss, why not make it a creative problem like player needs to escape from room with 12 different possible ways to do that.
Code: https://gist.github.com/foxrain4/7ed785deba4e096d942b98611ec915cb

K03e Sword Warrior Adventure (2020)
Type: Textadventure
Description: A fighting rpg game.
Purpose: This game is obsessed with object verbs, there should be probably be an easier way to do this, but otherwise, verbs can literally do anything from selling and buying from a merchant to fighting an enemy boss.
Code: https://gist.github.com/foxrain4/026023cf376e30c4b7610083849abb12

K03f Matrix Double Remake (2020)
Type: Gamebook
Description: Similar to K03a Matrix double (2019)
Purpose: But this remake is able to remember the player’s preference, you can also code subliminal version of this into your game and your player might freak out why does the game knows about his preferences, weaknesses and goals.
Error: Game crashes because of youtube links, either delete them from code or replace them with a different and allowed youtube link.
Code: https://gist.github.com/foxrain4/7a17a1b6a6ca01f10769a68e26c7b370

K03g Corona Virus Buisness Collapse (2020)
Type: Textadventure
Description: A harvest moon alike game where you grow crops and sell.
Purpose: This attempts to teach how to generate a crop from a soil field or player’s action. This method of generating objects turns out to be frequently used in later games and so it is important to learn.
Code: https://gist.github.com/foxrain4/34330e418381dbc39144313aaa00e497

K03h Fishvale Remake (2020)
Type: Textadventure
Description: Wow, as an abandoned game, this game is very huge in terms of both coding and travelling map. So, I do not really know what is going on and then I refer back to online notes and everything makes sense now; read the Purpose.
Purpose: This attempts to teach you how to how to run a script across many rooms, but yeah, I won’t blame if you cannot understand the huge code, I do not understand it either.
Code: https://gist.github.com/foxrain4/c1f609f820d38e40d35ed03587234e55

K03i Infinite Maze (2021)
Type: Textadventure
Description: No, there is no exit, it is an infinite maze! Proudly brought to you by mrangel.
Purpose: mrangel’s explanation at https://textadventures.co.uk/forum/quest/topic/igcf62bri0ovenfu0aapwg/how-to-create-infinite-maze
Code: https://gist.github.com/foxrain4/171dfa464868b6381e13ca0281d0ff2f

K03j Lost Arts Fighter (2021)
Type: Gamebook
Description: A street fighter style fighting game.
Purpose: This shows that perhaps descriptions of attacks is more imaginative and visually better than the old style rpg atk and hp that I always use.
Code: https://gist.github.com/foxrain4/9ac111db61af686857489ff79781761f

K03k Life Finances (2021)
Type: Textadventure
Description: I thought this is just to teach you how to write +-x% in code, but it helps you to reflect on your monthly spending habits as well.
Purpose: This teaches that when you get an input, it is a string, convert it to integer or double instead.
get input {
Breakfast.price = ToDouble(result)
msg (""+Breakfast.price)}
Code: https://gist.github.com/foxrain4/8d51fb2dd5f9d1cf4faa3682f9a65232

K03l asdfghjkl;' (2021)
Type: Textadventure
Description: This is quite a traumatic game, rather than focusing on gameplay, it plays with the players’ emotions instead. It does have secrets, probably something to do with butterfly effect object, but I was not able to fully unlock it, so perhaps, next time, I should make easier secrets, if I am not able to unlock the secrets, how are the players supposed to do so?
Purpose: This teaches an innovative way to talk with npc, although it is very unnatural, it helps to reduce the huge amount of verbs which can clutter the game coding heavily and blinds the game creator on where to update the game.
Code: https://gist.github.com/foxrain4/caf62b0a7cbc9edc4b4c6627e89cce75

K03m Into the dark (2023)
Type: Gamebook
Description: A journey trip through pictures. This remembers all your players’ actions.
Purpose: You can gather all of the players’ actions to create an attribute and decide his rpg level or good/evil/chaos/law/neutral or remaining food rations or his love relationship percentage with an npc.
Error: The pictures are not shown, obviously that is because you only copied my coding and not pictures, feel free to add in your pictures instead.
Code: https://gist.github.com/foxrain4/21c9c246795d277450eb86fb0fcd4b7d

K03n Dragon of atlantis (2023)
Type: Gamebook
Description: My first game that actually have a story.
Purpose: Page organizer is made by mrangel https://textadventures.co.uk/forum/samples/topic/qlq41v0lkky5hlf_rnk5sw/silly-way-to-do-page-numbers-quest-gamebook
Code: https://gist.github.com/foxrain4/b83b65815304bf901bb64637f30b7c7d

K03o robin hood shrunken adventure (2024)
Type: Gamebook
Description: What if you can display shrunk/unshrunk status of player even in gamebook?
Purpose: Similarly to shrunk display, there are other display like day/night and rpg character summoned.
Code: https://gist.github.com/foxrain4/68ebead3e7733e81fbb5d336759bff3d

K03p cat god adventure (2024)
Type: Textadventure
Description: A rpg combat game if you do not want to learn turn scripts.
Purpose: This game is obsessed with different types of loots.
Code: https://gist.github.com/foxrain4/e7415014f2d6654a58b30188345b3cf3

K03q evil valley (2024)
Type: Textadventure
Description: A rpg combat game if you want to learn turn scripts, but please continue reading it, I have made it so simple, it is 1 room only, so maybe give it a chance?
Purpose: Incidentally, the speech format in turn scripts is very natural comparable to asdfghjkl;' (2021) which is unnatural but does not need turn scripts.
Code: https://gist.github.com/foxrain4/ddeb7e31b5877271f190623800b77ecf

K03r big forest (2024)
Type: Textadventure
Description: An open world game like minecraft. The map is automatically done for you, which saves a lot of time from creating rooms. This is comparable to Infinite Maze (2021), however Infinite Maze is more natural as it have rooms that cannot be entered feeling like walls/obstacles, making the game exploration more unique but as said before, mrangel’s coding is insanely hard, which means if you ever want to modify or upgrade it, it is not possible unless you ask mrangel which is just stressful.
Purpose: This is so far the least coding required to build the biggest world, another game to top that would be making a space game, where a player can journey to different planets, and the game remembers all the sceneries, npcs and planet description; This might need referral to mrangel’s code at infinite maze where he adds attribute x and y to every single object that has been spawned, unfortunately the issue of travelling to different planets requires the game creator to hide allobjects() from previous planet which is not something I understand how to use yet.
Code: https://gist.github.com/foxrain4/544b5931349a65e5ee35d0b7fb5c8362


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums