Author Topic: Grammer  (Read 98127 times)

0 Members and 1 Guest are viewing this topic.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #240 on: October 20, 2011, 08:51:38 am »
O.o
so how do I write program data into appvar?
is it just like
Send(number,"UAPPVAR->A
Get("EPROGRAM->A
?
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 #241 on: October 20, 2011, 08:55:58 am »
You do it the same way you write data to a program :) All I did was make the program in the program editor and then I used Calcsys to change it to an appvar. But if you want an example, here is how to make an appvar that has two screen buffers:
Code: [Select]
Send(768*2,"UBUF→H
+768→I
Now H points to one buffer and G points to the other :) And from there, you can use some Fill( commands to copy the graph screen to a buffer and then you won't need to mess up the graph screen!

O>O I just realised I can add the commands DelVar, Archive , and Unarchive O.O

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #242 on: October 20, 2011, 08:56:51 am »
O.O
awesome!
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 #243 on: October 20, 2011, 12:52:11 pm »
I was in a programming zone for a little while, so here are a bunch of nice updates:
-Pause If will pause for as long as the statement is true. For example, to Pause for as long as a key is being pressed:
Code: [Select]
Pause If getKey
-!Pause If will pause for as long as the statement is false. So to pause until a key is pressed:
Code: [Select]
!Pause If getKey
-getKey( is used to check if a key is pressed. For example, if Enter is pressed, getKey(9 will return 1.
-Tokens like Pic3 and Str1 will now return a pointer to the respective OS variable.
-Pause will create a delay in hundredths of seconds. For example, Pause 66 will delay for about .66 seconds.
-The sprite routines should now be clipped in the down direction (I will work on more clipping later)

I am not sure if I left anything out, but have fun!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Grammer
« Reply #244 on: October 20, 2011, 12:54:14 pm »
Cool! I have the first download! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #245 on: October 20, 2011, 01:01:20 pm »
yay updates XD
int(rand+rand,rand  >:D
« Last Edit: October 20, 2011, 01:12:27 pm by yeongJIN_COOL »
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 #246 on: October 20, 2011, 02:03:50 pm »
Sorry folks, I hope nobody used the Pt-On( command! I left in some debugging code that will cause it to freeze in an infinite loop. I just uploaded the correct version. Here is the link: http://www.omnimaga.org/index.php?action=dlattach;topic=9067.0;attach=9954

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #247 on: October 20, 2011, 04:09:21 pm »
also, moving sprites out of the right side of the screen clips(?) it but it's 1 pxl down. can you fix that as well?
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 #248 on: October 20, 2011, 04:16:50 pm »
That might be more difficult to do with how I currently have the sprite routine coded. I think I will fix this eventually, but it might be a while, sorry :/

On another note, I am working on converting Grammer to an APP, but it isn't working properly. I am going to be doing a lot of debugging XD I am pretty sure I have all the SMC removed at this point, but some commands still don't work properly.
Also, with the current setup, the program name must be in Ans and then running the App will execute the program. Once I have all the bugs worked out, I will add a menu to select the programs and whatnot from :)

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer
« Reply #249 on: October 20, 2011, 05:43:10 pm »
Three four questions:

I want to add screenshots of this program I made. How could I go about doing that?

What exactly are appvars and how do I use them?

I've been playing around with the particles function in Grammer, and just wanted to know if there was anything else I could do with it, like using the particle physics to make a Line Rider / Free Rider kind of game (acceleration/deceleration).

How can I generate a random number, like randInt( in BASIC?
« Last Edit: October 20, 2011, 05:45:46 pm by awalden0808 »
I'll apologize tomorrow for a bad mood today.

Spoiler For Spoiler:
My Qualifications:

I did a thing once.
I am known for my ability to focus intently on things that distract me from my actual work.
To me, the letter a stands for absolute. B stands for bemusement. C stands for circumlocution, and D stands for decoupage.
If I were president, I would give everyone Xboxes, computers, and national healthcare.
I am also known for my ability to write more than I actually need to write. Unless of course it is necessary that I write a lot. Then I write a little bit.

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 #250 on: October 20, 2011, 06:22:50 pm »
I want to add screenshots of this program I made. How could I go about doing that?
For that one, you will want to download WabbitEmu, put your calculator ROM on it, then you go from there. Otherwise, for now, I could try to get you a screeny (by the way, I saw that and liked it :D I even commented a page or so back about it)

What exactly are appvars and how do I use them?
Appvars are variables that can hold any kind of data in them and were originally intended for ASM programs and Apps. In Grammer, you can create an appvar of a given size and use it to store information. Currently, there is no way to resize an appvar, though. So if you want to create an appvar of 64 bytes called Data, you will want to use the Send( command:
Code: [Select]
Send(64,"UData→H
The "U" says it is an appvar (use E for a program, F for a protected program). by doing →H, the location of the data is stored to H for later use :)
I've been playing around with the particles function in Grammer, and just wanted to know if there was anything else I could do with it, like using the particle physics to make a Line Rider / Free Rider kind of game (acceleration/deceleration).
I haven't added in functionality like that, but from looking at your other program, I would suggest trying something like this:
Test the pixel underneath the front of the sled and the spot ahead of it. Also have a variable holding the acceleration.  If the pixel ahead is higher, decrease acceleration by 1. If it is lower, increase the acceleration. Also check the pixel 2 pixels below the front of the sled. If that is also on, you are on an accelerating track, so automatically increase speed by 2.

Also note that once velocity becomes negative, the "front" of the sled and "back" of the sled can be reversed.
How can I generate a random number, like randInt( in BASIC?
In Grammer, you can use rand to generate a random number from 0 to 65535. However, I can add in the randInt( function if that makes life easier :)

In other news, Grammer has been successfully put into App form ! Right now I am working on the menu to select a program to run. Once that is finished, I will release Grammer 2.0!

So I have a question: I am using Brass, so how do I change the name it assigns my app?

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer
« Reply #251 on: October 20, 2011, 08:09:28 pm »
Attached is a level I made today. I'm not done with it yet... I was thinking of making it difficult to return to the start if you fall, so you would have to jump on a bunch more platforms just to get to the start again.

Also, I plan to scale down the playing field by one pixel so there's enough space to mark the x and y coordinates of the goal around the image (the program will start by testing for a turned on pixel in that area, and will store the coordinates into some variables). Implementing the goal into the actual level (with three around it, or something like that) would be too limiting on the level designing. I'll include the original version in the update as well so if the smaller playing window is too restricting the designer can use the original version (shouldn't be, but why not have the option?).

Or I could try converting the DRAW program to Grammer so I can access the 0 coordinates, which are outside the built-in Draw function's range... Which do you prefer?
I'll apologize tomorrow for a bad mood today.

Spoiler For Spoiler:
My Qualifications:

I did a thing once.
I am known for my ability to focus intently on things that distract me from my actual work.
To me, the letter a stands for absolute. B stands for bemusement. C stands for circumlocution, and D stands for decoupage.
If I were president, I would give everyone Xboxes, computers, and national healthcare.
I am also known for my ability to write more than I actually need to write. Unless of course it is necessary that I write a lot. Then I write a little bit.

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 #252 on: October 20, 2011, 08:18:28 pm »
Hmm, I'm not sure, but I think it would be cool to have a drawing program in Grammer code. I have been meaning to make one for a while, but I never got around to it XD

EDIT: Also, I am planning for the release of the Grammer App :) It should be coming later tonight :)

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer
« Reply #253 on: October 20, 2011, 08:22:31 pm »
That can be tomorrow's project! :D Also, curious as to how the Grammer app will work...
I'll apologize tomorrow for a bad mood today.

Spoiler For Spoiler:
My Qualifications:

I did a thing once.
I am known for my ability to focus intently on things that distract me from my actual work.
To me, the letter a stands for absolute. B stands for bemusement. C stands for circumlocution, and D stands for decoupage.
If I were president, I would give everyone Xboxes, computers, and national healthcare.
I am also known for my ability to write more than I actually need to write. Unless of course it is necessary that I write a lot. Then I write a little bit.

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 #254 on: October 20, 2011, 09:36:26 pm »
For those who want the Grammer App, here you go! :)
http://ourl.ca/13558