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 Your Projects 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. Project Ideas/Start New Projects => Your Projects
Author Message
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 18 Dec 2005 08:27:41 pm    Post subject:

It was only replacing the entire sub( line in display3 with DarkerLine's code, but here it is anyway:


Code:
":üStr1
For(A,1,8
For(B,1,4
sub("    X  XX X XXXX   ",inString("0124936DA5B7FEC8",sub(Str2,4A+B-4,1)),4
Output(A,4B-3,Ans
Str1+AnsüStr1
End
End
sub(Str1,2,128üStr1


And I figured I might as well redo the map editor anyway:


Code:
ClrHome
1üA
1üB
{8,16üdim([A]
Fill(0,[A]
Disp "*
While 1
Repeat K
getKeyüK
End
Output(A,B,sub(" X",[A](A,B)+1,1
A+(K=34)(A<8)-(K=25)(A>1)üA
B+(K=26)(B<16)-(K=24)(B>1)üB
Output(A,B,"*
If K=21 or K=105
Then
not([A](A,B)ü[A](A,B
Output(A,B,sub(" X",[A](A,B)+1,1
End
If K=22
Then
ClrHome
Disp "Converting...
":üStr1
For(A,1,8
For(B,1,16
If [A](A,B)
Then
Str1+"1üStr1
Else
Str1+"0üStr1
End
End
End
Disp "Compressing...
sub(Str1,2,128üStr1
":üStr2
For(A,1,125,4
Str2+sub("0124936DA5B7FEC8",inString("0000100110101111000",sub(Str1,A,4)),1üStr2
End
sub(Str2,2,32üStr2
DelVar [A]
DelVar Str1
Stop
End
End


86 bytes smaller for the map editor, and 51 bytes smaller for display. :biggrin: So far every program has been interchangeable, so you can use MAP or MAP2 and then display it with any of the DISPLAYs.

These most recent two are the smallest.

By the way, I'm certainly willing to explain how both of these work in case you're interested.

Spyderbyte


Last edited by Guest on 18 Dec 2005 08:28:54 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 18 Dec 2005 08:48:06 pm    Post subject:

Shouldn't that have X and space in it instead of 0 and 1?
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 18 Dec 2005 09:01:58 pm    Post subject:

Nope, cause the original Str1 is made up of 0s and 1s. I just happened to choose that at the time, and figured I'd leave it the same. Doesn't matter either way, cause Str1 gets deleted at the end.

Spyderbyte
Back to top
Radical Pi


Advanced Member


Joined: 23 Nov 2005
Posts: 455

Posted: 19 Dec 2005 05:33:11 pm    Post subject:

The 1's and 0's look more...programmy-ish :confused:

So with eleven levels, each 10 screens wide and 30 screens long, this should be one of the biggest mazes in calc history.
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 19 Dec 2005 05:46:20 pm    Post subject:

So these aren't randomly generated mazes? Aww... that'd be cool, it'd be like to sudoku game but better.
Back to top
Radical Pi


Advanced Member


Joined: 23 Nov 2005
Posts: 455

Posted: 19 Dec 2005 06:29:35 pm    Post subject:

Of all the randomly generated mazes I've seen (all the ones at ticalc that said their sizes), they didn't get bigger than 100*100.
In a nonrandom maze the sizes are endless...until all the memory is used, which I planned to do.
Back to top
Kuro


Advanced Newbie


Joined: 19 Oct 2005
Posts: 50

Posted: 24 Dec 2005 02:56:20 pm    Post subject:

Radical Pi wrote:
I don't know anything about compression techniques. I would feel more safe about it if you did this, Spyderbyte. I wasn't going to release a map editor for this anyway.

And Kuro: I didn't have the attention span to wait for prgmMAPDISP to finish. Would this save mazes to a Pic or string? Remember this is homescreen aimed.
[post="64714"]<{POST_SNAPBACK}>[/post]

It saves to a string.
I made another compressor program, converting directly from graphscreen (used for map editing) into a string (using hexadecimal chars, instead of 1s and 0s).
Back to top
Radical Pi


Advanced Member


Joined: 23 Nov 2005
Posts: 455

Posted: 24 Dec 2005 08:12:33 pm    Post subject:

I'm going to prefer Spyderbyte's routine, for its simplicity and speed.
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
    » Goto page Previous  1, 2, 3, 4
» View previous topic :: View next topic  
Page 4 of 4 » All times are UTC - 5 Hours

 

Advertisement