Author Topic: prgmHEROGAME  (Read 8989 times)

0 Members and 1 Guest are viewing this topic.

Offline skuller972

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 335
  • Rating: +11/-4
  • BEAST MODE
    • View Profile
prgmHEROGAME
« on: March 15, 2009, 03:11:57 pm »
I am creating a basic RPG called herogame. It will use a "crossroads feature" which, after doing something in a general label, will goto lblCR and will redirect you to the town or place you were before you did this. It also uses LHERO and LSTAT, telling the place the hero is at and equipment and his stats. Any advice on parts of the game will be graciously accepted.
Then again, maybe not...
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/bc7bf8e12353f09e.png" alt="NerdTests.com says I'm a Cool Non-Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and talk to others on the nerd forum!">
</a>

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #1 on: March 15, 2009, 03:18:30 pm »
Sounds interesting but you shouldn't use gotos your going to run into a memory error very quickly.
That's what she said!!!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: prgmHEROGAME
« Reply #2 on: March 15, 2009, 03:47:51 pm »
Nice, and welcome here :). As Noah said I would recommend against Gotos/Lbl, unless you use a Goto outside a While/Repeat/For/If-End loop, to prevent memory leaks. A lot of my old games for the TI-83+ from back in 2001-2004 did and for some of the games, especially the oldest ones, when you play for about 30 minutes-1 hour in a row, when saving your game or shopping for items you end up with a ERR:MEMORY. Outside such loop there's no problem, though, altough if your game is very huge it might take a while to load when a Lbl is at the complete bottom of the game.

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #3 on: March 15, 2009, 03:48:47 pm »
Yeah it's just better to not use them at all.
That's what she said!!!

cjgone

  • Guest
Re: prgmHEROGAME
« Reply #4 on: March 15, 2009, 04:17:47 pm »
Avoid gotos at all cost, save yourself!

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #5 on: March 15, 2009, 04:20:07 pm »
That's what she said!!!

Offline skuller972

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 335
  • Rating: +11/-4
  • BEAST MODE
    • View Profile
Re: prgmHEROGAME
« Reply #6 on: March 15, 2009, 05:14:58 pm »
haha funny comic
what do you suggest in place of gotos and lbls that would work and have a crossroadish feature but no memory problems?
Then again, maybe not...
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/bc7bf8e12353f09e.png" alt="NerdTests.com says I'm a Cool Non-Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and talk to others on the nerd forum!">
</a>

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #7 on: March 15, 2009, 05:16:57 pm »
Might I suggest sub-programs.
http://tibasicdev.wikidot.com/subprograms
Also look at the wiki as a whole it's a great resource.
That's what she said!!!

Offline skuller972

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 335
  • Rating: +11/-4
  • BEAST MODE
    • View Profile
Re: prgmHEROGAME
« Reply #8 on: March 15, 2009, 05:21:31 pm »
oh, i could make a program for things like maps and info and stats screens, and then it would pop back in the same spot, and the map would set the variables for the town and i could put in prgmMAP:prgmCROSROAD to send to the town's program
Then again, maybe not...
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/bc7bf8e12353f09e.png" alt="NerdTests.com says I'm a Cool Non-Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and talk to others on the nerd forum!">
</a>

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #9 on: March 15, 2009, 05:22:39 pm »
Yeah that's usually the better to do it.
That's what she said!!!

Offline skuller972

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 335
  • Rating: +11/-4
  • BEAST MODE
    • View Profile
Re: prgmHEROGAME
« Reply #10 on: March 15, 2009, 05:24:07 pm »
but wouldn't that stack programs and lead to a memory error too?
Then again, maybe not...
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/bc7bf8e12353f09e.png" alt="NerdTests.com says I'm a Cool Non-Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and talk to others on the nerd forum!">
</a>

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #11 on: March 15, 2009, 05:25:23 pm »
Nope when a sub-program exits it fixes all the open ends and things like that.
That's what she said!!!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: prgmHEROGAME
« Reply #12 on: March 15, 2009, 05:39:52 pm »
True. The only way it can still cause leaks is if you run a sub program inside itself, a mistake I did in many of my old games. This is common when a Game Over occurs and we are lazy and decide to just run the main prgm again to go immediately to the title screen. Game also runs slower and slower with the time

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: prgmHEROGAME
« Reply #13 on: March 15, 2009, 05:40:48 pm »
Yeah with that one you can cheat and tell them to hit enter.
That's what she said!!!

Offline skuller972

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 335
  • Rating: +11/-4
  • BEAST MODE
    • View Profile
Re: prgmHEROGAME
« Reply #14 on: March 15, 2009, 05:42:39 pm »
yeah i had played one like that before
it was a game where you took a turn and then went to the server program and then it calculated the turn and then you went to the game and so on
i was afraid of a memory leak so i edited it (basic) but noticed no changes' probably because there were only like 3 turns a game
Then again, maybe not...
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/bc7bf8e12353f09e.png" alt="NerdTests.com says I'm a Cool Non-Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and talk to others on the nerd forum!">
</a>