Forums - Open Redstone Engineers
TEXT ADVENTURE I AM MAKING - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html)
+--- Forum: Programming (https://forum.openredstone.org/forum-8.html)
+--- Thread: TEXT ADVENTURE I AM MAKING (/thread-409.html)



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 Angry *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


RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-20-2013

(06-20-2013, 03:32 AM)fl3tching101 Wrote: Yea, I looked at some OpenGL stuff, bit confuzling. You really should learn C++ though, amazing stuff.

I already know C, it shouldn't be that hard. I just need a good guide to the features of C++


RE: TEXT ADVENTURE I AM MAKING - xdot - 06-20-2013

http://www.learncpp.com/

As for OGL, try to avoid SDL. You can use GLFW w/ GLEW.

http://www.arcsynthesis.org/gltut/
http://www.opengl-tutorial.org/
http://ogldev.atspace.co.uk/index.html

(Modern OGL)


RE: TEXT ADVENTURE I AM MAKING - Thor23 - 06-21-2013

I've been able to find most anything concerning C++ between these 2 sites:

http://en.cppreference.com/w/cpp
http://www.cprogramming.com/tutorial.html#c++tutorial


RE: TEXT ADVENTURE I AM MAKING - Chibill - 06-21-2013

Thank you for posting this I was trying to remember the name of what this is base off. And cool May be some one could make this on a redstone computer


RE: TEXT ADVENTURE I AM MAKING - Nickster258 - 06-21-2013

Could we not use caps in posts? :
(06-15-2013, 03:34 PM)Malcolmforde Wrote: Pwease not use capitals on everyword, its annoying :3



RE: TEXT ADVENTURE I AM MAKING - mad1231999 - 06-22-2013

(06-20-2013, 04:09 AM)Malcolmforde Wrote:
(06-20-2013, 03:32 AM)fl3tching101 Wrote: Yea, I looked at some OpenGL stuff, bit confuzling. You really should learn C++ though, amazing stuff.

I already know C, it shouldn't be that hard. I just need a good guide to the features of C++

I seriously doubt that you know C well enough to do anything that resembles an RPG game.


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 06-27-2013

I LOVE IT!
i can't wait till it's finished when it is i'll play it in computercraft.
=D



RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 06-27-2013

For computercraft I am going to have to do a rewrite because peripherals.

(06-22-2013, 09:26 AM)mad1231999 Wrote:
(06-20-2013, 04:09 AM)Malcolmforde Wrote:
(06-20-2013, 03:32 AM)fl3tching101 Wrote: Yea, I looked at some OpenGL stuff, bit confuzling. You really should learn C++ though, amazing stuff.

I already know C, it shouldn't be that hard. I just need a good guide to the features of C++

I seriously doubt that you know C well enough to do anything that resembles an RPG game.

**** you Mad. You always doubt EVERYTHING.


RE: TEXT ADVENTURE I AM MAKING - mad1231999 - 06-28-2013

(06-27-2013, 09:24 PM)Malcolmforde Wrote: **** you Mad. You always doubt EVERYTHING.

It's my nature.


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 06-30-2013

(06-28-2013, 06:42 PM)mad1231999 Wrote:
(06-27-2013, 09:24 PM)Malcolmforde Wrote: **** you Mad. You always doubt EVERYTHING.

It's my nature.

It's your nature.


RE: TEXT ADVENTURE I AM MAKING - redstonewarrior - 07-01-2013

(06-30-2013, 06:53 PM)qwerasd205 Wrote:
(06-28-2013, 06:42 PM)mad1231999 Wrote:
(06-27-2013, 09:24 PM)Malcolmforde Wrote: **** you Mad. You always doubt EVERYTHING.

It's my nature.

It's your nature.

It's his nature.


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 07-01-2013

(07-01-2013, 05:00 PM)redstonewarrior Wrote:
(06-30-2013, 06:53 PM)qwerasd205 Wrote:
(06-28-2013, 06:42 PM)mad1231999 Wrote: It's my nature.
--[First person]--

It's your nature.
--[Second person]--

It's his nature.
--[Third person]--

This is a perfect example of 1st 2nd and 3rd person points of veiw =D


RE: TEXT ADVENTURE I AM MAKING - Malcolmforde - 07-01-2013

Totally


RE: TEXT ADVENTURE I AM MAKING - redstonewarrior - 07-01-2013

(07-01-2013, 05:23 PM)qwerasd205 Wrote:
(07-01-2013, 05:00 PM)redstonewarrior Wrote:
(06-30-2013, 06:53 PM)qwerasd205 Wrote:
(06-28-2013, 06:42 PM)mad1231999 Wrote: It's my nature.
--[First person]--

It's your nature.
--[Second person]--

It's his nature.
--[Third person]--
This is a perfect example of 1st 2nd and 3rd person points of veiw =D

You caught me :3


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 07-01-2013

(07-01-2013, 08:12 PM)redstonewarrior Wrote:
(07-01-2013, 05:23 PM)qwerasd205 Wrote:
(07-01-2013, 05:00 PM)redstonewarrior Wrote:
(06-30-2013, 06:53 PM)qwerasd205 Wrote:
(06-28-2013, 06:42 PM)mad1231999 Wrote: It's my nature.
--[First person]--

It's your nature.
--[Second person]--

It's his nature.
--[Third person]--
This is a perfect example of 1st 2nd and 3rd person points of veiw =D

You caught me :3

* qwerasd205 <3 Red

Three windows open all Youtube one music one not in use and one watching BDubs


#Multitasker


RE: TEXT ADVENTURE I AM MAKING - Xeomorpher - 07-02-2013

(07-01-2013, 08:30 PM)qwerasd205 Wrote:
(07-01-2013, 08:12 PM)redstonewarrior Wrote:
(07-01-2013, 05:23 PM)qwerasd205 Wrote:
(07-01-2013, 05:00 PM)redstonewarrior Wrote:
(06-30-2013, 06:53 PM)qwerasd205 Wrote: It's your nature.
--[Second person]--

It's his nature.
--[Third person]--
This is a perfect example of 1st 2nd and 3rd person points of veiw =D

You caught me :3

* qwerasd205 <3 Red
Hissssss only xeo <3red


RE: TEXT ADVENTURE I AM MAKING - VirtualPineapple - 07-02-2013

Love whore


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 07-02-2013

...
Nice profile picture Malc
#Subject change


RE: TEXT ADVENTURE I AM MAKING - VirtualPineapple - 07-03-2013

Stahp with the hashtags >: (


RE: TEXT ADVENTURE I AM MAKING - qwerasd205 - 07-03-2013

#Hashtag