TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-19-2013
Currently not playable. Written in LUA so it can be played on iOS, any computer with LUA installed, or in minecraft (computercraft mod). Based on Shadow of Israphel. Hardly near done. The lines with "--Add stuff here!" are notes to me. Also in LUA to troll haters.
Code: print("Loading...")
sHP = 100
nHP = 100
fort = 0
supply = 0
food = 0
hunger = 0
function pagebreak()
print("--------------------------------------")
end
function enter()
enter = io.read()
end
function death()
if name == "Kenny" then
print("C0N5013: OH MY GOD! THEY KILLED KENNY!")
end
print("Game over.")
end
function debug()
if name == "Debug" then
print("Permission granted")
debug.debug()
else
print("Access denied!")
end
end
math.randomseed( os.time() )
print("Welcome to Shadow of Israphel!")
print("Developed by Malcolm Forde")
print("Inspired by Simon & Lewis")
pagebreak()
print("Press 'enter' to begin")
enter()
print("C0N5013: What is your name?")
name = io.read()
print("C0N5013: Hello, "..name.."! What is your gender (boy/girl)?")
repeat
sex = io.read()
if sex == "girl" then
print("C0N5013: Okay, Miss!")
elseif sex == "boy" then
print("C0N5013: Yes, Sir!")
else
print("Invalid gender.")
end
until sex == "girl" or sex == "boy"
if sex == "girl" then
title1 = "Miss"
title2 = "ma'am"
else
title1 = "Sir"
title2 = "sir"
end
print("C0N5013: Thank you for the input. Now let the game begin!")
pagebreak()
print("Type 'pause' at any time to pause.")
pagebreak()
print("??: Hey! Want to build a epic house together!?")
print(name..": Who are you?")
print("??: Oh yeah. My name is Simon.")
nongame()
print("Simon: Now do you want to build this base or not, "..title2.."?")
print("(y/n)")
repeat
option = io.read()
if option == "y" then
print(name..": Sure!")
pagebreak()
print("1 hour later...")
pagebreak()
fort = fort + 1
print(name..": All done.")
print("Simon: Great! Well its been a long day. Lets get some sleep.")
print("*"..name.." goes to his room*")
print(name..": G'night!")
print("Simon: G'night.")
print("Fortification increased to level "..fort)
elseif option == "n" then
print(name..": Not right now, sorry.")
print("Simon: Oh, okay, lets collect some wood anyways.")
pagebreak()
print("1 hour later")
pagebreak()
supply = 15
print(name..": I'm tired. Lets get some sleep.")
print("Simon: Yeah, we should.")
print("C0N5013: Sorry for invading the story, but, sleeping on the ground? Really?")
print("Supplies increased to 15")
else
print("Invalid option.")
end
until option == "y" or option == "n"
pagebreak()
print("Day 2")
pagebreak()
print("Simon: Goooooood mornin'!")
print(name..": Isn't it too early?")
print("Simon: No! We need to get something for breakfast!")
print(name..": Do we have to?")
print("Simon: Your choice.")
print("(y/n)")
option = 0
repeat
option = io.read()
if option == "y" then
print("Simon: Oh! Oh! Oh! I see a pig over there.")
print(name..": Yay!")
print("How do you wish to deal with the pig?")
print("bring home : punch to death")
option = 0
repeat
option = io.read()
if option == "bring home" then
print(name..": Here piggy, nothing to be afraid of.")
print("Simon: Yes, nothing will go wrong, I promise.")
print("The pig refuses and runs away, faster then you tired folk could.")
print(name..": DAMNIT! THERE GOES OUR FOOD!")
print("Simon: I guess we should just make a shack to shelter in tonight.")
print(name..": And a fire, too.")
if supply >= 15 then
supply = supply - 5
print("Fire created! Supply level: "..supply)
supply = supply - 10
fort = fort + 1
print("Shelter created! Shelter level: "..fort.." Supply level: "..supply)
else
print("Not enough supply to create anything")
print("Simon: Urg...")
end
elseif option == "punch to death" then
--Add stuff here!
else
print("Invalid option.")
end
until option == "bring home" or option == "punch to death"
elseif option == "n" then
--Add stuff here!
else
print("Invalid option")
end
until option == "y" or option == "n"
RE: TEXT ADVENTURE I AM MAKING - Guy1234567890 - 06-19-2013
Lol i can't wait to read it :p
RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-19-2013
Oh snap. Wrong subforum.
RE: TEXT ADVENTURE I AM MAKING - Guy1234567890 - 06-19-2013
Shall i move it to programming?
RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-19-2013
Yesh pwease
RE: TEXT ADVENTURE I AM MAKING - Guy1234567890 - 06-19-2013
kk :3
RE: TEXT ADVENTURE I AM MAKING - fl3tching101 - 06-20-2013
Alright, so, really cool idea, love the idea. *Pause for LUA hating* Lua sucks by the way, and anything more than a simple "Hello world" app shouldn't be written in it *Continue with praise for the idea* It's a really good programming exercise. I'm all the time finding fun things to do with programming, and text adventure games would be a fun way to go, though I would have problems staying with it as they can get really tedious. Way more fun to play the final product than to code them. I wish GUI programming was easier, so far I haven't really found any language which makes an actual gaming environment programming even close to easy and fun. The closest I've found is Pygame, which is actually pretty fun, but Python is of course only meant as a scripting language and thus makes me feel limited. *Pause to prove C++ is the absolute best language ever* In C++ you can literally program in ASSEMBLY, it's called inline assembly, it's friggen AWESOME. C++ allows high level programming which is super easy and efficient, then next line you can be programming in practically MACHINE CODE. C++ RULES!! ;P *End of post, because there is nothing better to end with than the epicness of C++*
RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-20-2013
I am going to learn C++ next :3
I want to do a 2D RPG thing in C/C++ soon, but openGL or SDL confuses me too much.
RE: TEXT ADVENTURE I AM MAKING - fl3tching101 - 06-20-2013
Yea, I looked at some OpenGL stuff, bit confuzling. You really should learn C++ though, amazing stuff.
RE: TEXT ADVENTURE I AM MAKING - VirtualPineapple - 06-20-2013
Ogl is beautiful :3
|