Recent Forum Posts

Looking for something?

Don't see a match? Post to the community

From categories:
page 1123...next »

I'm not familiar with the N-Spire, but try one of the 68k operators. I hear that they are similar…

Hope this helps!

Hi,
does anyone know if there is a way to put values from a program into an existing list/spreadsheet?
I've tried but couldn't get it to work.
Here's what I've got so far.

Define rando(s,b,t)
Func
Local random
Local i
i:=1
For i,1,t
random:=randInt(s,b)
random -> ex
EndFor
EndFunc

My approach would be to think of 3 dimensions as a set of 3 planes (xy,yz,zx) to add 3 tangible surfaces. Each plane will judge its real position in space in terms of two dimensional formulas. From this position (x,y,z coords), the size as appears on the screen based on the viewing position. I would think of an objects as a set of points and then (in/de)crease the number of them by a fractal algorithm to create an entire object.

I have no experience with 3d, but that is my best approach. Try looking on cemetech for ideas.

Idea? by prgmTroubleprgmTrouble, 02 Dec 2016 04:27
Cyktoplasm (guest) 02 Dec 2016 03:57
in discussion Forum 101 / Wiki Page Discussions » Community 3D Engine

Hey, I am going to waste as little of your time as possible. I just got a ti-84 + c silver edition 6 weeks ago and learned about coding it ~ 3 to 4 weeks ago. I only recently learned what apps were, though have made ports of simple games like flappy bird and am close with Tetris. I do understand the mathematics of this, as I do code PC games and work with other languages. I am new to this Ti-basic and Asm and BBC basic as well, but I hope to quickly learn. The reason I am posting this here is because of a challenge. I am going to make a fully working replica of Skyrim ported to Ti-basic. To do this I need a 3d engine. The game design and storage is my problem, so I will not ask anyone else for that.

What i really want to know is how far are you to being done with a 3d prism rendering&calculation program with xyz coords, length, depth, and height, and xyz rotation. Also how fast is it if it does exist, and if it is on Basic.

I don't know enough about this community to know if this is impossible, or already done. Thanks from Cyktoplasm

by Cyktoplasm (guest), 02 Dec 2016 03:57

Unfortunately, you cannot to my knowledge. To avoid this, use an archive/unarchive command to prevent this from happening.

I think

Archive [name]

should work with pictures, backgrounds, and images.

Hello! I have no idea if this is possible, but is there any way to restore a stored pic that I accidentally deleted? I spent several hours working on a drawing of an eye and I cleared the ram without thinking. I know on some computers data is not cleared, just marked to be overwritten, and can therefore be retrieved, but I dont know how to do this. Also, is there a way to archive pictures so that I can avoid this in the future?
Thanks!

restoring deleted pictures by Ethan (guest), 01 Dec 2016 01:43
prgmTroubleprgmTrouble 01 Dec 2016 01:13
in discussion Projects & Contests / Optimize Me » SIMON

To fix this, I would do something like:

0→X
...
If A:Then
Things...
1→X
End
If X=1:Goto B
by prgmTroubleprgmTrouble, 01 Dec 2016 01:13
TrenlyTrenly 30 Nov 2016 17:22
in discussion Projects & Contests / Optimize Me » SIMON

A memory leak only ends when the program ends. Here is kind of what happens:

The program starts, a new stack is created.
//Running the program
The program encounters an If, For, While, Else, or Repeat
The program adds a partition to the stack
//Runs whats in the Loop
The loop is exited before an end is reached!!
//Running the program
The program ends, and clears the stack.

The reason this is important is that an "End" removes the partition to the stack. Without an "End", this partition remains on the stack and is never cleared. The program will still run normally, but it will gradually build up partitions on the stack without removing them. Each partition takes up a little bit of memory, so eventually your program will get slower and slower until the program throws ERROR: MEMORY meaning that the calculator has run out of RAM. When the program ends, the stack is automatically cleared, so memory leaks rarely cause lasting problems but they are still good to avoid.

Read more: http://tibasicdev.wikidot.com/memory-leaks


live the life because the life is good —vivir la vida, porque la vida es buena
Vie la vie que la vie est bonne quod est bonum vitae in vita
lebe das Leben, weil das Leben ist gut —vivere la vita, perché la vita è buona

by TrenlyTrenly, 30 Nov 2016 17:22
prgmTroubleprgmTrouble 30 Nov 2016 01:13
in discussion Projects & Contests / Optimize Me » SIMON

When a → symbol occurs, the previous operation ends. This means that ) is not needed immediately before the → to have the same effect.

Instead of: Operation(Argument)→Storage
Use: Operation(Argument→Storage

Instead of: Operation(Argument) + Value→Storage
Use: Value + Operation(Argument→Storage
NOT: Operation(Argument + Value→Storage

Hope this helps!

by prgmTroubleprgmTrouble, 30 Nov 2016 01:13

I'm not in chemical engineering, so I have no idea what you are looking for.

How I would approach a new program is to first completely understand how data is used and stored in each operation. From there, try creating an outline detailing the order of events.

When the outline is completed, make sure it is in chronological order and uses the most basic expressions possible. From this outline, search for commands on this website that match with an operation.

You may not get very far, depending on the complexity, but the community can help out with common and advanced techniques if you are stuck.

Good Luck!

Please provide a situation for a better solution.

What I think you are saying is that you have several variables/strings/other that you want to fill with data.
I recommend using a list, where you can recall an individual numeric values. These values may correspond to data in another list and trigger an if command to recall strings or other data types.

Oh fancy. Didn't realize that if K means if K=\=0. Makes sense now that I think about it though.but still no way to make it quite a bit smaller and keep the action that occurs. Darn. Because that's a really important part to me. Like glock killing batman's mom really makes the game more enjoyable rather than Glock beats batman. Anyways, thanks a bunch for the tips and tricks, and if you are up for it, my pong program needs some optimizing too.

by TheCubistTheCubist, 27 Nov 2016 03:27
TheCubistTheCubist 27 Nov 2016 03:20
in discussion Projects & Contests / Optimize Me » SIMON

Will the memory leak fix itself once you lose again? And that's not a huge deal in my opinion. I like the not( thing you did there, pretty good. But couldn't you just say if K=\=L1(B)+10 and save 3 bytes? Or am I missing something? Didn't even know you could add another augment to the randInt, that's pretty helpful. However, I would like to keep the different numbers being in different corners, it is more like the actual simon game. Also, was it obvious that you use Y=, window, zoom, and trace as your numbers? Contemplating adding a few bytes to make it 1,2,3,4. Also I was gonna delete the LSIMON at the end of it, but using L1 is a lot easier since i don't need a special list. Thanks a bunch, and If you figure out a way to fix the memory loop, plz let me know.

by TheCubistTheCubist, 27 Nov 2016 03:20
Re: SIMON
TrenlyTrenly 26 Nov 2016 07:17
in discussion Projects & Contests / Optimize Me » SIMON

I shaved off a few bytes. BUT! You have a memory leak, which will slow the program over time.

Rather than using a For loop to generate the random list, I just used the additional argument on the RandInt command. I also changed the list to L1 since its random each time, players cant see it when playing, and then we don't encounter errors with an archived or unknown list.

I changed:

LSIMON(B)+10->A
If K=\=A

to

If not(K=10+(L1(B
I changed:

LSIMON(B)→A
If A=1
Output(2,4,A
If A=2
Output(2,12,A
If A=3
Output(6,4,A
If A=4
Output(6,12,A

to

Output 4,8,L₁(B

Final Code:
ClrHome
{0→L₁
50→dim(L₁
Output(1,4,"SIMON SAYS
Output(3,4,"F1=1, F2=2
Output(5,4,"F3=3, F4=4
Output(8,2,"By: TheCubist
Pause
Lbl 3
ClrHome
Menu("SIMON","PLAY",1,"Quit",A
Lbl 1
RandInt(1,4,50→L₁
For(Z,1,50
For(B,1,Z
Output 4,8,L₁(B
For(J,1,200
End:ClrHome
For(J,1,50
End
End
For(B,1,Z
Repeat sum(K={11,12,13,14
getKey→K
End
If not(K=10+(L₁(B
Then
ClrHome 
Disp "YOUR SCORE:
Output(3,2,Z
Pause
Goto 3                    //Here is the memory leak, jumping out of an if-then
End
End
For(J,1,50
End:End
ClrHome
Disp "YOU WIN!
Pause
Goto 3
Lbl A

live the life because the life is good —vivir la vida, porque la vida es buena
Vie la vie que la vie est bonne quod est bonum vitae in vita
lebe das Leben, weil das Leben ist gut —vivere la vita, perché la vita è buona

Re: SIMON by TrenlyTrenly, 26 Nov 2016 07:17

There is a way to make the program about 900 bytes, and it only checks 9 cases.

"Rck"→Str1   //Set up the strings. Since we use them twice later, this saves space and time
"Ppr→Str2
"Scs→Str3
"Lzd→Str4
"Spk→Str5
"Spm→Str6
"Btm→Str7
"Wiz→Str8
"Glk→Str9

While (1)  //initiate the main loop

Output(1,1,"Player 1:
Repeat sum(K={92,93,94,82,83,84,72,73,74,45}):Getkey→K:End   //Get the player 1's choice
If K=45:Return
Output(1,7,"Player 2:
Repeat sum(J={92,93,94,82,83,84,72,73,74,45}):Getkey→J:End   //Get the player 2's choice
If J=45:Return

ClrHome    //Clear the screen

If K=92:Output(2,1,"Str1     //Display Player 1's choice
If K=93:Output(2,1,"Str2
If K=94:Output(2,1,"Str3
If K=82:Output(2,1,"Str4
If K=83:Output(2,1,"Str5
If K=84:Output(2,1,"Str6
If K=72:Output(2,1,"Str7
If K=73:Output(2,1,"Str8
If K=74:Output(2,1,"Str9

If J=92:Output(2,14,"Str1     //Display Player 2's Choice
If J=93:Output(2,14,"Str2
If J=94:Output(2,14,"Str3
If J=82:Output(2,14,"Str4
If J=83:Output(2,14,"Str5
If J=84:Output(2,14,"Str6
If J=72:Output(2,14,"Str7
If J=73:Output(2,14,"Str8
If J=74:Output(2,14,"Str9

If K=J:Goto C   //Goto the "Continue" Label

If K=92 and sum(J={93,83,72,74  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=94 and sum(J={92,83,72,74  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=93 and sum(J={94,82,84,73  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=82 and sum(J={92,94,84,73  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=83 and sum(J={93,82,72,74  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=84 and sum(J={92,94,83,72  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=72 and sum(J={93,82,73,74  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=73 and sum(J={92,94,83,84  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

If K=74 and sum(J={93,82,84,73  //Test this possible choice for P1. If P1 wins, Goto Label 1. Otherwise, continue
Goto 1

Lbl 2                          //If and only if P1 doesn't win will this code be executed.
Y+1→Y     //add one to P2 score
Output(2,8,"Win ->  //Show P2 win
Goto C    //Skip the next label

Lbl 1  //This code is executed If and only if P1 wins
X+1→X  //Add one to P1 Score
Output(2,4,"<-  Win //Show P1 Win
//Notice there is no "Goto" here. The code will automatically continue on the next line, which is Lbl C

Lbl C   //This is the continue label. 
Output(8,2,X  //Show the scores
Output(8,15,Y
Repeat sum(I={45,105  //Wait for Clear or Enter
Getkey→I
If I=45:Return  //If Clear, End the program

End   //Close our main loop

What you need to know about this:

1) As soon as player 1 wins, it skips checking the rest of the possibilities. This saves time
2) Lbl 1 and Lbl 2 and Lbl C are in the order they are in for a reason. Don't change it
3) The goto at the end of Lbl 2 is what makes it skip Lbl 1. We don't need it on Lbl 1 since Lbl C will execute automatically
4) This doesn't allow for custom phrases per win condition
5) What if the players get to scores that don't fit on screen?
6) Its only about 900 Bytes compared to your original 3239
7) Automatic scoring!
8) Using Lbl and Goto makes it easy to have multiple scenarios point to the same code

Also, in your post you said you usually use:

If K=/=0

That can be simpified if you are going to use it in other programs:
If K

live the life because the life is good —vivir la vida, porque la vida es buena
Vie la vie que la vie est bonne quod est bonum vitae in vita
lebe das Leben, weil das Leben ist gut —vivere la vita, perché la vita è buona

by TrenlyTrenly, 26 Nov 2016 06:55
SIMON
TheCubistTheCubist 26 Nov 2016 05:45
in discussion Projects & Contests / Optimize Me » SIMON

Let me know if there is anyway to make it take up less space!

ClrHome
{0}->LSIMON
50->dim(LSIMON
Output(1,4,"SIMON SAYS
Output(3,4,"F1=1, F2=2
Output(5,4,"F3=3, F4=4
Output(8,2,"By: TheCubist
Pause
Lbl 3
ClrHome
For(E,1,50
RandInt(1,4)->A
A->LSIMON(E
End
For(Z,1,50
For(B,1,Z
LSIMON(B)->A
If A=1
Output(2,4,A
If A=2
Output(2,12,A
If A=3
Output(6,4,A
If A=4
Output(6,12,A
For(J,1,200
End:ClrHome
For(J,1,50
End:End
For(B,1,Z
Repeat sum(K={11,12,13,14,45
getKey->K
End
If K=45
Goto A
LSIMON(B)+10->A
If K=\=A:Then
ClrHome 
Disp "YOUR SCORE:
Output(3,2,Z
Pause
Goto 3
End:End
For(J,1,50
End:End
ClrHome
Disp "YOU WIN!
Pause
Goto 3
Lbl A
DelVar LSIMON
ClrHome

Currently 395 bytes. How low can we get it?
SIMON by TheCubistTheCubist, 26 Nov 2016 05:45

Oh. That's helpful, thanks a bunch. I usually just say if K=\= 0, but this is a bit more specific. Thanks for the explanation, gonna finish up the source code now :)
EDIT: finished up the source code, hopefully that will help you out. Also realized that I could cut it in half by displaying the arrows based on who wins or loses, then just have the action displayed for both of them. For example,

If K=92 and sum(J={93,83,72,74}  //did I use sum( properly?
Output(1,15,"->
If K=92 and sum(J={94,82,84,73}
Output1,1,"<-
If (K=92 and J=93) or (J=92 and K=93
Output(1,6,"COVERS

this would make it smaller,(no pesky spaces, 36 outputs rather than 72, plus I could make it auto add points to whoever wins…) but I'm thinking since it would have to check 36 things rather than 17, it'll take a lot longer too. Anyway around that?
by TheCubistTheCubist, 25 Nov 2016 22:16

So, when you take a list and check if a value is equal to it, it returns a list of true (1) or false (0). Consider the following code:

Repeat K
Getkey->K
End
K={45,105}

The returned value if Clear was pressed would be {1,0} if Enter was pressed it would be {0,1} if 2nd was pressed it would be {0,0}

The sum( command adds together all the values in a list. If K equals any of the values in our list, the sum will be 1; else it will be 0. In this case, we can use it to repeat a block of code until one of the numbers or clear is pressed. I will break down the code piece by piece:

Repeat   //create a repeat loop
sum(  //Take the sum of the list
K=  //This is the conditional that will create the final list
{72,73,74,82,83,84,92,93,94,45}  //This is the list of keycodes that we want to allow
//Code
End  //End the repeat loop

So putting it all together looks like:
Repeat sum(K={72,73,74,82,83,84,92,93,94,45}
//Code
End

Conversely, you can test to make sure a key ISN'T pressed by adding not( and 0 to the list
Repeat not(sum(K={0,105,45  //This waits until any key is pressed EXCEPT for Enter or Clear
//code
End

live the life because the life is good —vivir la vida, porque la vida es buena
Vie la vie que la vie est bonne quod est bonum vitae in vita
lebe das Leben, weil das Leben ist gut —vivere la vita, perché la vita è buona

by TrenlyTrenly, 25 Nov 2016 07:04

Thanks for the string idea, that's a good help. Could you explain to me how the sum( works in this scenario? I read up on it and i dont see how it would work. And when I get a chance I will put in the rest of My code for ya, don't have enough time right now. Thanks a bunch!

by TheCubistTheCubist, 25 Nov 2016 05:20

I'm a chemical engenieering student and we have a subject wich main propouse is design columns, flash and similars.

We use to use Excel, but i want to go further and try to make a program based on an Excel but without using the Excel part of the TI. Maybe use that only for storage the component data (MW, antoine constants…).

I found an Excel very complete for a distillation multiple (cheguide. com/wp-content/uploads/2016/01/Multi_Component_Disitillation.xlsx) and i want to try because it can be very usefull.

Anyone knows how to? It's my first time doing a program for TI based on an Excel and I don't know where or how to start.

page 1123...next »