Author Topic: Grammer  (Read 98220 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #60 on: October 01, 2011, 02:08:05 pm »
Sorry for the double post, but Yeong had a few great ideas! The first that I will talk about is accessing OS vars. We can now access the OS vars (A through Theta) in Grammer. We can read the values and write to them by prefixing their names with the imaginary i [2nd][.] then the letter. For example:
Code: [Select]
3→iA
iB→C
That stores 3 to OS var A and then stores OS var B to Grammer var C. So now we can interact better with BASIC programs (especially since Grammer code can be used inside BASIC programs).

So that is pretty neat, yes? So now for the second part of the update: Using multiple conditionals. Before, if you wanted to test, say, if C=5 or Enter is being pressed, you needed to have part of the conditional outside of an if statement:
Code: [Select]
getKey=9
If +C=5
...
This was a pain if you needed to preserve Ans! So now we can do something like this, by adding in a space or a colon between conditions:
Code: [Select]
If getKey=9 +C=5
...
The " +" is like using an OR operation on the two conditions, by the way. Similarly, " *" is like using AND. Also, this is not limited to only two conditions or just If statements. This can be used for While and Repeat loops, too :)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #61 on: October 01, 2011, 02:16:13 pm »
Any token changes?
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #62 on: October 01, 2011, 02:18:08 pm »
What do you mean by token changes?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #63 on: October 01, 2011, 02:18:56 pm »
I was just curious if you changed any commands' token. (e.g. Line' -> Line'' )
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #64 on: October 01, 2011, 02:20:42 pm »
Ah, okay. Well, not yet. I just want to warn that the Line(' command isn't totally complete, though XD

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Grammer
« Reply #65 on: October 01, 2011, 04:39:06 pm »
Could you do filled shapes?
Thick lines?
Text outputted one letter at a time? (typewriter style)
Particle effects?
Greyscale?
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #66 on: October 01, 2011, 05:19:23 pm »
Could you do filled shapes?
Grammer currently does this with rectangles (10 fill methods)
I plan to do this with circles, eventually, too.
Other polygons might be a tad more difficult :/
Thick lines?
Once I actually add in a line drawing routine, I can probably do this :) My main issue is that I try to do things optimally for speed. For example, with rectangles, there is a method to draw the outline of a rectangle and clear the inside. It doesn't draw two rectangles to do this because that could really slow down the routine. Instead, it is its own, completely different drawing method :)
Text outputted one letter at a time? (typewriter style)
This can be done and might be pretty neat :) My question is, should this be a mode or should a special symbol be used in the Text( command to tell it to type that way?
Particle effects?
* Xeda112358 is cunfooz?
Greyscale?
I don't plan to add in built in grayscale, but you can simulate it, still :)

Thanks for the suggestions!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #67 on: October 01, 2011, 09:13:51 pm »
Quote
This can be done and might be pretty neat Smiley My question is, should this be a mode or should a special symbol be used in the Text( command to tell it to type that way?
Maybe Text(r ?
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #68 on: October 01, 2011, 09:42:16 pm »
Okay, I added that in, but I am not sure if this will be permanent... should it be? Here is a screenie as well as the Grammer version with the update...

EDIT: Also, I added a way to change the text display speed of this mode. Use Fix Text( followed by a number (smaller number=faster display)

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Grammer
« Reply #69 on: October 01, 2011, 11:20:24 pm »
Wow! That is really fucking awesome! You made that really fast, and it could add a nice effect to some games.
How about /Text(  ? (divided text)

Particle effects, like when there is a blood explosion and the drops fly everywhere, or snow or rain falling down in little pixels. Or fireworks.
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #70 on: October 02, 2011, 09:21:37 am »
That wasn't too difficult, that is why it was fast XD However, particle effects might be D:

Also, I added the /Text( as another option and I found an issue :( If you tried using Typewriter Textas well as displaying a number or displaying text at the last cursor position, it would not work. So, I fixed that :)
Now Text( has four operators O.O

And I would also like to point out that the only "tricky" part to this was making tokens display one character at a time. Luckily, I use my own text display routine, so it wasn't impossible XD

So now I have a question: What modes should I add? For example, Text Inverse is one I can add. I plan to change modes using Fix, so for example, Fix 1 is text inverse, Fix 0 turns it off. Does anybody else have mode ideas?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #71 on: October 02, 2011, 11:11:29 am »
Vertical Text mode?
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #72 on: October 02, 2011, 11:13:29 am »
How would that work? If it is what I think, I might have to work on a routine for that... :D

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #73 on: October 02, 2011, 11:15:52 am »
like:
H
e
l
l
o
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #74 on: October 02, 2011, 11:17:01 am »
I think I can manage that... This will give something to do for a while :D