Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Name: main.py
- # Purpose: An RPG (Roll playing game) where you wake up in a room and have
- # to figure out text based puzzles to escape.
- # The whole game will be done in a terminal (Shell) and will be
- # completely text and assci code. This will be the main file.
- #
- # Author: William
- #
- # Created: 15/12/2013
- # Copyright: (c) William 2013
- #-------------------------------------------------------------------------------
- import time
- import assci
- import helper
- #if the file is the main file or if it isn't, do something
- def name_main():
- if __name__ == '__main__':
- init()
- #The function that starts/restarts the game
- def init():
- """
- Calls all the functions to start the game/ restart the game
- """
- #Display a cool banner
- assci.ywu_banner(2)
- START_INPUT = input("Press ENTER/RETURN on your keyboard to start the game")
- time.sleep(0.7)
- assci.clear()
- #Game text.
- game_text()
- #The text which is the main story line after the banner which gives the player
- #A sense of what the setting is about
- def game_text():
- """
- Prints out a bit of text 2 lines down and clears the screen every 4 or so
- seconds.
- """
- time.sleep(5)
- print("\n\nYour eyes gradually open")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- print("\n\nAfter waking up, you slowly gather your senses and sit up...")
- time.sleep(4.5)
- assci.clear()
- time.sleep(2)
- print("\n\nYou look around the room, and unexpectidly, you realise your in some sort of a prison cell!")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- print("\n\nIt's a sqaure room made of iron.")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- print("\n\nHow did I get here? -You think to yourself")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- helper.way_out_quest()
- assci.clear()
- time.sleep(2)
- print("\n\nYou see a wooden door with 5 buttons and a handel... " + assci.WOODEN_DOOR)
- time.sleep(6)
- assci.clear()
- time.sleep(2)
- print("\n\nWhat was that? ...you think to your self.")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- print("\n\nWhat was that? ...you think to your self.")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- print("\n\nYou look around the room and walk slowly towards the iron door..")
- time.sleep(4)
- assci.clear()
- time.sleep(2)
- #Call name_main to test whether it's the main file.
- name_main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement