All posts by James K. Pratt

Python Game

Inspired by an ancient computer book I wrote a simple python game. In 1978 David H. Ahl edited BASIC Computer Games: Microcomputer Edition 101 Great Games to play on your home computer. I wrote a simple computer game in python.

#!/usr/bin/python3

import random

cont = True
dist = 0
mummies = 0
trvl = 0
water = 3
thirst = 5
act = 0
trbl = 0 #distance of mummies to you
life = True

print(“You stolen the necklace of Rameses III. Mummies are after you!”)

while cont == True:

print("Distance Traveled : " + str(dist))
print("0 Drink.")
print("1 Medium Pace.")
print("2 Dash.")
print("\n")
act = input("What do you do?")

print("\n\n")

if act == "1":
    print("You march through the desert...")
    dist = dist + 2
    thirst = thirst - 2

elif act == "2":
    print("You dash trough the desert...")
    dist = dist + 3
    thirst = thirst - 3    

elif act == "0":

    if water > 0:
        print("You drink water.")
        water = water - 1
        thirst = thirst + 3
        print("You have..." + str(water))
        print("drinks of water left.")

    if water <= 0:
        print("You've nothing to drink.")

else:
    print ("---Thanks for Playing---")
    cont = False

if int(act) == 1 or int(act) == 2:
    dice = random.randint(1, 6)
    if dice == 1 or dice == 2:
        print("The desert stretches beyond you.")
    elif dice == 3 or dice == 4:
        print("You are running among the sand dunes.")
    elif dice == 5:
        print("Skull of a camel stairs at you as you pass.")
    elif dice == 6:
        print("You found an oasis.")
        print("You fill your cantine water.")
        print("You have..." + str(water))
        print("drinks of water left.")




if thirst <= 1:
    print("\a---YOU NEED TO DRINK BADLY---")

if thirst < 0:
    print("---And the desert is getting to you!!!---")
    print("\a")

if thirst < -5:
    print("You surcome to thirst.")
    life = False
    cont = False


trvl = random.randint(1, 2)
mummies = mummies + trvl

trbl = dist - mummies

if trbl == 3:
    print("You do not hear the MUMMIES.")

if trbl == 2:
    print("You see the MUMMIES in the distance behind you.")

if trbl == 1:
    print("You MUMMIES are yipping at your heels.")


if mummies >= dist:
    print("The MUMMIES capture you.")
    life = False
    cont = False

if dist >= 20 and cont == True:
    print("---YOU MADE IT---")
    print("---YOU'VE FOUND THE EDGE OF THE DESERT---")
    cont = False    

print(“—-GAME OVER—“)

if life == True:
print(“You traveled ” + str(dist))
print(“With ” + str(water) + ” drinks of water remaining.”)

An Introduction to Editing Well

To avoid wasting time when editing, consider the order in which you review your work. First, before you edit, write your story in its entirety. Don’t try to get the first chapters perfect. Many novice writers struggle for perfecting their early chapters. They will spend months some even years perfecting the early portion of a story rather than writing later chapters. They deprive themselves what can be learnt may by moving forward. Push forward or else you’ll be writing in circles.

 

Macro Editing Stages

 

  • Stage One: Read your manuscript from beginning to end. Cut everything that’s not interesting. If you’re not interested your reader won’t be either. Also, cut everything that doesn’t move the plot forward or build characterization. Repeat this stage until you are sure everything that needs cutting is gone.
  • Stage Two: Reread your work and list all major problems the manuscript has from a scale of one, for minor problems, to ten, for the largest issues. Number ten problems will be the most time-consuming issues to fix. These include problems that are integral to the plot, such as a villain not having enough lines to develop their character or motive. Another number ten issue might be plot holes you failed to spot early on. Examples number one issues might include minor continuity issues such as a character that puts on a hat at the end of one chapter but in the next hat it’s gone.
  • Stage three: Work on all your biggest problems from ten on down.
  • Stage Four: Repeat stage two and three, until you have a lean manuscript with no unneeded chapters, or continuity issues.

 

Chapter Editing Stage

 

  • Stage 1: Now edit one chapter at a time. Cut what isn’t needed. As before, cut anything that you think doesn’t add to the story.
  • Stage 2: Reread the chapter to see what it needs and write what you wish to add. This could be details that clarify for the reader a certain plot point, details that make the characters more vivid. Keep rereading until you know that the chapter looks good. That is everything that slows the story down is cut, sentences are clear. This may include editing the order of sentences in the paragraphs among other things. Make sure chapters starts and finishes strong.
  • Stage 3: Now, and only now, edit for grammar. Doing so before can prove a waste of time because sentences will often be reworded or cut out.
  • Stage 4: Once you are done with a chapter move on to the next starting at Chapter Editing Stage One.

 

Sadly effort alone does not make a great writer. Instead, a certain degree of intelligence in managing large project separates those who struggle and those who thrive. Managing your editing process smooths out this large project into smaller steps, saving time and energy.

Pitfall 2

Pitfall 2 cart

 

Pitfall 2 was made for the Atari 2600, which has 128 bits of RAM. The system can only hold two sprites on the screen. Though tricks were used to get around the two sprites issue. So the game is quite a feat.

Pitfall 2 is modern in several ways. The music plays during the game, which was rare for the time. There are also checkpoints. More than a few checkpoints are hidden, so exploration is encouraged. You don’t have lives but you get infinite chances. With the dynamic music, check points and a infinite lives Pitfall 2 is one of the first modern games.

The game play changes quiet a bit. One part you are exploring, another swimming, ducking bats or jumping scorpions and other you are floating up via a red balloon.

The difficulty of the game makes the score meaningful in that you have a hard time getting you score up. Other games of Pitfall 2’s generation make it a goal to earn 1ups. As I mentioned Pitfall 2 gives you infinite chances to win but the game, however, makes an effort to embarrass you! When a creature hits you you floats back to the last red cross you discovered. These crosses are game’s checkpoints. While you float back which the music plays a sadder tune. This can take a minute if you didn’t explore properly and fail to find a closer checkpoint. Not only does the music turn sad but you score is lowering as you return. So, therefore, the longer it takes to go back more time the game has to whittled down your score.

Believe me, this has an affect on you. I’ve been sent back to the same far off checkpoint with a score of zero and felt like a loser. Despite the fact that the game is teasing you, I love Pitfall 2.

I’ve played with zero points. Once there it at least can’t get any lower but I’ve been in hard places were the score remain at zero and gold bars, which raise your score, are hard to find. Eventually, I will give up, promising to fight another day.