I now know that I should separate my program into smaller sub programs, but I don't really know how. I am new to making games. This is my first major game to make. Before, I just made programs for physics class where you input information and it solves it in the formula automatically.

Basically, every city in the game has a pokemon center in it.
Let me pull up an example from my game that uses the poke center, and maybe you can help me make it into a 2nd program or a better way to call the pokemon center because currently, it feels very inefficient. Also, I am working on converting all of the Disp "1st line" Disp "2nd line" to Disp "1st line","2nd line":

Menu code for a Vermillion City

Code:
:Menu("Vermillion City","Pokemon Center",13,"Gym",43,"Diglett Cave",48,"Saffron City",45,"View Map",98,"View Poke",91,"More...",47)


Pokemon Center Code:

Code:

:Lbl 13
:ClrHome
:Disp "Welcome to the"
:Disp "Pokemon Center!"
:Disp "We heal your"
:Disp "Pokemon for you."
:Pause
:∟POKE(9)→∟POKE(8)
:ClrHome
:Disp "Thank you for"
:Disp "waiting.  Your"
:Disp "Pokemon is"
:Disp "fully healed."
:Disp "Please come back"
:Disp "if your Pokemon"
:Disp "is hurt."
:Pause
:ClrHome
:If ∟POKE(1)=2
:Goto 5
:If ∟POKE(1)=3
:Goto 12
:If ∟POKE(1)=4
:Goto 15
:If ∟POKE(1)=5
:Goto 24
:If ∟POKE(1)=6
:Goto 28
:If ∟POKE(1)=7
:Goto 37
:If ∟POKE(1)=8
:Goto 42


Here are some variable identifications:

∟POKE(1): Current Location. The numbers are cities.
∟POKE(9): Maximum Health
∟POKE(eight): Current Health
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement