Author |
Message |
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 03:21:29 pm Post subject: |
|
|
Well guys, as I said in my plee for forgiveness, I need help coming up with a way to do this in a way that is fast and doesnt consume all the RAM. So here is my problem, any help you can give me would be appreciated...
Everything in the Editor was going great until I encountered the Saving of seperate Frames inside levels. Now basically how the editor works is, it creates 6 temp lists from the 6 permanent level mother lists. Using list 2's data, the 6 temp lists are filled with what ever data is needed for that specific frame only. That way when a user is done, the frame will be isolated into its own lists, seperate from the actual saved permanent lists (confusing?) Now this is what I cannot figure out: How can I save the temp lists into the mother lists? Now since a level has 9 frames, I cannot just overwrite a level list because it would obviously obsolve the other data. So I must treat like a high score system kind of...
For example lets say that I am editing frame 4, and I want to save it. I need to insert it into the list where it belongs, after frame 3 and before frame 5. So by using L2's data I need to goto the beginning of frame 4, and cut off the list at that place (which is easy) I then augment the temp list to the chopped list, then I apply the rest of the list excluding frame 4s data to create the saved list...
So the real problem is...how do I insert the temp list, when I have no way of isolating the back end of the list by itself? Meaning that there is so way code wise to retrieve the following cells after frame 4 is inserted. I just have no idea how to do it without using some 6 for loops to do the job for me. I can easily chop the list and augment it, but I cannot figure out how to get the end of it back on excluding frame 4.
That is pretty much all I need to figure out before I am done this project... I hope it wasnt too confusing...Any ideas? |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 05 Apr 2005 04:27:18 pm Post subject: |
|
|
save L2 to L0
remove frames 4-9 from L2
augment frame 4 to L2
remove frames 1-4 from L0
augment L0 to L2
?
Last edited by Guest on 05 Apr 2005 04:27:45 pm; edited 1 time in total |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 05:11:16 pm Post subject: |
|
|
Quote: remove frames 1-4 from L0
And how exactly would I do that? Think about it... |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 05 Apr 2005 05:17:00 pm Post subject: |
|
|
How do you remove frames 4-9 right now? (source code) |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 05:18:24 pm Post subject: |
|
|
I just do a simple dim() command to change dimesion of list, what I am asking is, how exacty code wise can I easily remove the first 4 frames off the beginnign of a list? Or better yet how can I remove a chunk of a list while keeping whats after it in any situation..
Last edited by Guest on 05 Apr 2005 05:19:47 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 06:15:34 pm Post subject: |
|
|
An obvious approach, by me, would be to use [font="courier new"]seq( to run through the parts of the list that you want to keep.
Working with a different setup, in which each repeated number belongs to its own frame:
[font="courier new"]seq(int(X),X,4/3,11,1/3→L1
[font="courier new"]{1,1,1,2,2,2,…,10,10,10}
Let's say I want to replace the fifth frame with a template [font="courier new"]L2 consisting of three 11's...
[font="courier new"]seq(11,X,1,3→L2
[font="courier new"]{11,11,11}
[font="courier new"]augment(seq(L1(X),X,1,12),augment(L2,seq(L1(X),X,16,dim(L1→L1
[font="courier new"]{1,1,1,2,2,2,3,3,3,4,4,4,11,11,11,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10}
Perhaps the keystone argument here was nesting the [font="courier new"]augment( commands in order to preserve each section of the list as was needed. ...That's pretty much it... Am I not understanding this correctly?
[EDIT]
If each frame contains a set of numbers having a different length, then I couldn't imagine separating the frames without tagging an identifier at the beginning of each one ([font="times"]π, for example). I hope this isn't the case.
Last edited by Guest on 05 Apr 2005 06:50:28 pm; edited 1 time in total |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 05 Apr 2005 06:55:21 pm Post subject: |
|
|
Kind of like how one can add two sub()'s to replace a part of a string. |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog
Joined: 06 Oct 2004 Posts: 2335
|
Posted: 05 Apr 2005 07:24:50 pm Post subject: |
|
|
But the problem is that each list is of different length (as Supergoose noticed in the edit)
Hmm, this sounds dumb, but... could you do something with sorting two lists?
Trying to get rid of the zeroes at the start:
...............................L1.....................L2 //L2 is temp, generated by seq(
.........................{0,0,1,4,2,3}..{1,2,3,4,5,6}
SortD(L1,L2.......{4,3,2,1,0,0}..{4,6,5,3,2,1}
4->dim(<both>.{4,3,2,1}........{4,6,5,6} //4 = dim - # to remove
SortA(L2,L1.......{1,4,2,3}........{3,4,5,6}
The only other thing to do would be to make all the ones you want to get rid of zeroes (or some number less than the rest of the list, if there are negatives)
I think.... This gave me a headache until I made the two columns and kept track of the lists.
Grr, can't use tab... Sorry for the periods, but it made for better alignment.
Last edited by Guest on 05 Apr 2005 07:28:59 pm; edited 1 time in total |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 07:25:53 pm Post subject: |
|
|
Quote: If each frame contains a set of numbers having a different length, then I couldn't imagine separating the frames without tagging an identifier at the beginning of each one (π, for example). I hope this isn't the case. sad.gif
I understand what your saying, I apologize for not offering more specific information tho, here is some real examples of the lists:
L1 (A level list containing Coords for 9 Frames...VERY big. Every 8 digit number represents 4 coords)
{1*551955,28492862,52495254,20542049,21485148,32493249,36493649,40494049,44624449,
53555955,60566062,64626456,65559455,/1, 2*553555,36563662,40624056,41556355,64566462,
32553242,33417141,72427257,48554839,52555239,48485248,76627649,77489448,/2, 3*483948,
40494062,32483225,28482825,28413241,28343234,28275227,36283628,40284028,44284428
,
48284828,52215233,53207120,72217226,79345334,73277927,80288033,60346062,72347262
,
74627062,58626262,84348834,80628056,81559455,/3, 4*553555,36563662,16521625,20532026,
24532426,28522825,16482848,16412841,16342834,14273027,41277527,40284033,41345934
,
60356062,76287647,75486948,68496862,85489448,84498462,/4, 5*481148,12491262,16413641,
24412462,28412862,45415141,44424462,52425254,53557155,72567262,94558155,80568062
,
/5, 6*552355,24562462,8550842,8411641,16421655,32623256,33554355,44564462,40554035,365
53635,
36484048,40413641,32412041,28422842,24422442,8410814,12411214,8341234,8271227,21
209420,
20212026,21275927,8201220,60286040,61419441,/6, 7*410741,202320,8420862,24212440,25413141,
32423262,48624856,49557955,80568062,72427255,73419441,72486448,/7, 8*412341,24422455,32345234,
9553155,8560862,32563262,12481648,36353635,40354035,52355247,44354462,53486748,6
8476842,
69417541,76427654,77559455,88609460,93599258,93619262,/8, 9*557555,76567659,77609460,36553632,
40554032,36484048,36414041,21344034,28352835,32353235,24352435/9}
L2 The reference list for all the lists...
{0,13,26,50,69,81,106,118,137,148,0,2,4,5,7,10,12,15,17,17,0,0,0,1,1,1,1,2,2,3,0
,1,2,4,6,8,10,11,13,
13,0,0,2,4,6,8,11,14,16,16,0,50,50,43,50,43,50,8,36,50}
The bold Marks inside the L1 Cells are the beginning and end of Each frame, which I know by looking at the first 10 cells in L2 (understand?)
Now as you see, L2 controls the For() loop in the program to seperate each frame (it is the only way to know otherwise). So really the answer to all the lists lies in L2. Any division of the List must go through this first.
Now I am not very skilled in Seq() but to my understanding (you may have just helped me alot) I could use it to just filter through the list until it reached the value in the L2 list correct? To tell you the truth I have never touched seq() in my BASIC life haha <----guess im not an expert . What would that look like exactly (cannot find TI Book)
Hope that all makes sense ....
Last edited by Guest on 05 Apr 2005 07:26:37 pm; edited 1 time in total |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog
Joined: 06 Oct 2004 Posts: 2335
|
Posted: 05 Apr 2005 07:36:24 pm Post subject: |
|
|
Hmm, with L2 seq( may indeed work better.
A is the position in L2
augment(seq(L1(X),X,1,L2(A+1)),augment(L3,seq(L1(X),X,L2(A+1)+1,dim(L1→L1
This probably needs a little tweaking, but I think you get the idea. |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 07:38:22 pm Post subject: |
|
|
Hmm, if all goes well I think we may have decimated this problem, Ill do some coding tonight and get back to ya... :D
EDIT:
fuck! I dont think sequence is valid with complex lists...wtf am I talking about...I dont even need them...sorry for editing a post I didnt even think of umm yeah! haha
Last edited by Guest on 05 Apr 2005 07:42:27 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 07:50:27 pm Post subject: |
|
|
TI-83 Plus Graphing Calculator Guidebook § 11-12:
[font="times"]seq( (sequence) returns a list in which each element is the result of the
evaluation of expression with regard to variable for the values ranging from
begin to end at steps of increment. variable need not be defined in
memory. increment can be negative; the default value for increment is 1.
seq( is not valid within expression. Complex lists are not valid.
seq(expression,variable,begin,end[,increment])
Last edited by Guest on 05 Apr 2005 08:42:26 pm; edited 1 time in total |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog
Joined: 06 Oct 2004 Posts: 2335
|
Posted: 05 Apr 2005 07:59:50 pm Post subject: |
|
|
Just thought of something: seq( might be slow for a long list. For the first part (before the stuff you add), you can use dim( to cut off the rest of L1 (after saving it somewhere else) instead of seq(
I tried a simple program with the line of code in my last post, and it seemed to work. I'm not sure if I interpreted L2 correctly though. |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 08:02:37 pm Post subject: |
|
|
Run one sequence using the [font="courier new"]real( part,
run another sequence using the [font="courier new"]imag( part,
then concatenate the two in the form of [font="courier new"]L1+L2i.
Quote: I dont even need them...
Oh. :lol:
[ EDIT (Read Across) ]
[font="courier new"]____For______________tables,
____using____________monospace,
____gainsboro,_______and
____underscore_______works
____like_____________magic!
_____________________
Last edited by Guest on 05 Apr 2005 08:22:59 pm; edited 1 time in total |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 08:10:40 pm Post subject: |
|
|
Nice guys, Thanks for your help, I got my calc right next to me and ready. I will bust it out as fast as possible for you guys
I will let you know how it goes
I will have to perform the seq() command for all of the 6 lists, which may take some time, but it is definetely smaller and could be compatable with a ncie saving progress bar
Last edited by Guest on 05 Apr 2005 08:15:01 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 08:44:54 pm Post subject: |
|
|
I would take careful notice of alexrudd's method. I think he's got it.
[EDIT]
Just to clarify, it's very much like "pointing"
relative to the initial position in each frame
given the integer found on [font="courier new"]L2.
That reference list, which I wasn't aware of until you posted it, was the saving grace that kept this thing together.
Last edited by Guest on 05 Apr 2005 08:55:58 pm; edited 1 time in total |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog
Joined: 06 Oct 2004 Posts: 2335
|
Posted: 05 Apr 2005 08:55:59 pm Post subject: |
|
|
Supergoose wrote: I would take careful notice of alexrudd's method. I think he's got it.
[EDIT]
Just to clarify, it's very much like "pointing" relative to the initial position in each frame given the integer found within [font="courier new"] L2. That reference list, which I wasn't aware of until you posted it, was the saving grace that kept this thing together.
Yay! Isn't it nice to do stuff right?
Which method did you mean, my original method or my modification of yours?
EDIT: a, this post is active. In the time it took me to read Supergoose's post and click REPLY, it was edited already. This is almost chatroom speed...
Last edited by Guest on 05 Apr 2005 08:57:11 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 08:57:44 pm Post subject: |
|
|
[font="courier new"]augment(seq(L1(X),X,1,L2(A+1)),augment(L3,seq(L1(X),X,L2(A+1)+1,dim(L1→L1
Indeed, only minor tweaking is required to get this up and running in Contra 83! |
|
Back to top |
|
|
Bryan Thomas Outer Limit Software
Advanced Member
Joined: 20 May 2003 Posts: 298
|
Posted: 05 Apr 2005 09:03:15 pm Post subject: |
|
|
Yeah Working on it now guys, almost done to tell you the results... a right its active :D
Getting an ERROR : INCREMENT...
Cant quite figure out why, here is the line
Seq(L1(Z),Z,L2(X+2),dim(L1)
????
I even do this...
Seq(L1(Z),Z,L2(X+2),dim(L1),Z+1
????
NVM figured out why ahahha a this is active!!
Last edited by Guest on 05 Apr 2005 09:09:54 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Apr 2005 09:14:40 pm Post subject: |
|
|
Since no increment is set (leaving the default increment as 1), the only other possibility is such that [font="courier new"]L2(X+2) > dim(L1).
The break-down:
[font="courier new"]seq(a,b,c,d,e)
[font="courier new"]a : Equation containing the variable
[font="courier new"]b : The variable itself
[font="courier new"]c : Initial position
[font="courier new"]d : Target position
[font="courier new"]e : Increment (optional)
Quote: NVM figured out why ahahha damn this is active!!
GRAH!!!
Last edited by Guest on 05 Apr 2005 09:15:25 pm; edited 1 time in total |
|
Back to top |
|
|
|