Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 01 Mar 2004 08:38:58 pm    Post subject:

I making a Risk game and the rules I have on every screen have horizontal -10 and also 10 and vertical 10 and -10. Is there away you can store this to something so you can recall it without having to have to put those same four commands on every screen?
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 01 Mar 2004 09:33:56 pm    Post subject:

Use ZStandard. It does all the commands you mentioned. You can also try ZoomSto and ZoomRcl to restore the gamer's original settings.

Last edited by Guest on 01 Mar 2004 09:35:22 pm; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 01 Mar 2004 09:54:35 pm    Post subject:

I think he means dra a horizontal line at -10 and 10, then a vertical at -10 and 10.

As far as I can think right now you can't, but I might be forgetting something obvious.

Spyderbyte
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 01 Mar 2004 11:33:09 pm    Post subject:

I see. So you're using it like a pictureframe effect?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 02 Mar 2004 06:10:48 am    Post subject:

You could use a pic.

ClrDraw
Horizontal -10
Horizontal 10
Vertical -10
Vertical 10
StorePic 1

Now, whenever you want to draw those lines, just use:

RecallPic 1

Enjoy.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 02 Mar 2004 04:15:49 pm    Post subject:

Thats really lame since a picture takes up 744 or around that. I forget.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 02 Mar 2004 04:23:20 pm    Post subject:

Newbie wrote:
Thats really lame since a picture takes up 744 or around that. I forget.

767. And I don't see anything wrong with just drawing those lines each time.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 02 Mar 2004 04:30:22 pm    Post subject:

I just though there could have been a memory saver to shorten the code.
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 02 Mar 2004 05:14:03 pm    Post subject:

Other than making another program to draw the four lines and calling it as a subprogram all the time, nothing I can think of.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 03 Mar 2004 06:02:47 am    Post subject:

Why are people obsessed with using OTHER programs as subroutines when it's just as simple to put the subroutines in the main program?
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 03 Mar 2004 05:40:42 pm    Post subject:

Arcane Wizard wrote:
Why are people obsessed with using OTHER programs as subroutines when it's just as simple to put the subroutines in the main program?

Ordinarilly I'm all for that, but if he needs this frame very many times it starts to get a little silly to use an internal subroutine kludge.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 03 Mar 2004 06:07:02 pm    Post subject:

Why'd that be silly?
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 03 Mar 2004 09:01:57 pm    Post subject:

Newbie wrote:
Is there away you can store this to something so you can recall it without having to have to put those same four commands on every screen?

Put it in another program then when you want to put it in, press 2nd Rcl, prgm, left, then pick the prog and press enter twice.
Back to top
Ray Kremer


Member


Joined: 16 Feb 2004
Posts: 237

Posted: 04 Mar 2004 02:47:22 pm    Post subject:

Arcane Wizard wrote:
Why'd that be silly?

It would start to take more lines of code than it's worth, at least the way I do internal subroutines on a TI-8x calculator. Maybe there's a better method than anything I've been able to come up with.
Back to top
Toksyuryel
Crimson Dragon Software


Elite


Joined: 14 Jun 2003
Posts: 880

Posted: 04 Mar 2004 06:26:28 pm    Post subject:

In BASIC internal subroutines are a bad idea. You should really use external ones.
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 04 Mar 2004 08:01:09 pm    Post subject:

But that makes things messy, you should really just make it in ASM.
Back to top
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 04 Mar 2004 08:09:41 pm    Post subject:

Subroutines aren't bad... I used them when I programmed BASIC, sure they're a little bit slower so if you're trying a game thats processor - intensve and a speed freak, then no I don't reccommend it
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 05 Mar 2004 05:44:01 am    Post subject:

The way I use subroutines it doesn't matter if you put them in another program or in the one that calls them.

And subroutines are great, just don't use them in the middle of game loops.
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement