Author Topic: Grammer 2-The APP  (Read 162652 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 2-The APP
« Reply #105 on: November 09, 2011, 08:40:39 am »
Ah, okay XD I still wonder how fast it will be >.>
An actual command might be more conducive to making background music via an interrupt (I just wanted to use the word conducive ^-^)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #106 on: November 09, 2011, 08:46:21 am »
I tried that with axe.... BAD result XD
Even axe slowed down like hell XP
the best way is output one note per loop.
Sig wipe!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grammer 2-The APP
« Reply #107 on: November 09, 2011, 02:32:48 pm »
Is grammer also useful for math stuff?


Yeong, Dang you

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 2-The APP
« Reply #108 on: November 09, 2011, 03:06:43 pm »
It depends on the kind of math you are working with. It cannot use large numbers (should I add a command for that?), but it can run algorithms quickly and efficiently. For example, when I was studying Number Theory over the summer, I made algorithms using Grammer to compute such things as nCr, gcd(), lcm(), prime testing and whatnot (I have added some of those as commands). I have also made a gravity simulator in Grammer code, so that works nicely and I have made several arbitrary precision algorithms (like for the four functions), and I have made algorithms for finding the square root (rounded or not), drawing a circle or line, sine and cosine, and all sorts of other goodies. A lot of these algorithms turned into actual commands that I rewrote in assembly :D

So really, it depends on what you need to do XD The math in Grammer is limited, but it typically returns a lot of info. For example, division returns the rounded down value in Ans which is great for a lot of algorithms and it also returns the remainder in theta prime which is often even better in number theory.

If you have any questions on how to do something, you can post in the Grammer Q&A topic :D I would love to help with math stuff if I can XD

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grammer 2-The APP
« Reply #109 on: November 09, 2011, 03:08:06 pm »
Cool.
(200th post :P)

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 2-The APP
« Reply #110 on: November 10, 2011, 08:42:34 pm »
Erm, I accidentally posted the update in the regular Grammer topic, so I am pretty much copying and pasting x.x

Update time!
Okay, with this version, there are some significant updates that will lend to some much needed features and that will help me add new commands.
Bug Fixes:
-Apparently I broke the sprite routines in the last version, but only for the non-hex commands. I fixed it here

Updated Commands:
-Now any variable name inputs aren't limited to named vars. For example, "DStr1" is a valid variable name (to access Str1)
-Fix has another mode for Hexadecimal mode. This makes all numbers get read as hexadecimal.

New Commands:
-Asm(
This lets you use an external, squished ASM program
-IS>(
This will use a pointer var to read variable data. It then increments the pointer var.
-Archive
-Unarchive
-Delvar
-solve(
This is actually going to be a command subset. This has currently 3 commands:
solve(0 is used to copy a var from archive or RAM to a new var
solve(1 is used to copy a piece of RAM to another location (copying forward)
solve(2 is used to copy a piece of RAM to another location (copying backwards)

I don't have any real example programs ready that display the new commands in action, but I can see these new commands as being highly useful. For example, using the IS>( command will make it fairly easy to make a parser. I actually made this because I was working on a drawing program that stored the drawing as shapes and commands as opposed to a bitmap.

I would like to add augment( and sub( to resize variables, too.

I hope this works out well for people! Hopefully I can add new sound and particle effects, sometime
I am also working on the start of an error handler, but I want to make it like a hook. Like, if you do something that will cause an error, it redirects the code to another part of the program for you to handle.

Grammer 2.10.11.11

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #111 on: November 10, 2011, 10:05:34 pm »
woot update!
* TBO_Yeong downloads
Sig wipe!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Grammer 2-The APP
« Reply #112 on: November 11, 2011, 02:53:44 am »
Erm, I accidentally posted the update in the regular Grammer topic, so I am pretty much copying and pasting x.x
Good thing: we can give you twice as much +1s :D
Also, have you checked my signature (new userbar in it) ;D
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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 2-The APP
« Reply #113 on: November 11, 2011, 07:02:08 am »
:D Cool! That was actually yeong's creation but I asked if I could steal it >.>
I just can't wait to see what comes of this update!

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 2-The APP
« Reply #114 on: November 11, 2011, 11:26:30 am »
Downloaded it! (Check out my int(rand+rand,rand userbar! :P:P:P )
« Last Edit: November 11, 2011, 11:26:43 am by Sorunome »

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

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 2-The APP
« Reply #115 on: November 15, 2011, 01:11:10 pm »
Hey folks, here is a new update that has a rather gorgeous looking command! I have finally added in the Pt-Change( command! It currently only does one Tilemap type, but it does it well. I am going to post a new version of my tilemap editor in its topic and I hope the speed knocks your socks off. Anyway, here is the command syntax and download:
Pt-Change(0,MapLoc,TileLoc,MapWidth,MapX,MapY,TileLogic
0 is the map type (I plan to have other tilemap routines with different syntaxes)
MapLoc is a pointer to the tilemap data. Tilemaps are formed in rows first, then columns
TileLoc points to the 8x8 tile data
MapWidth is the number of tiles wide your map is. The minimum is 12.
MapX is the X offset into the map data to start reading at
MapY is the Y offset into the map data to start reading at
TileLogic is the sprite logic method to use when drawing the tiles. If you want to play with the DataSwap option, back up your sprite data and copy it to a tempvar XD

Also, sprites cannot be in hex form :/ (it would slow things down a tad)
Here is a screeny that shows off some randomly generated maps :D

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #116 on: November 15, 2011, 01:11:30 pm »
* TBO_Yeong grabs it
EDIT: I just realized that the version number got lower O.o
« Last Edit: November 15, 2011, 09:10:28 pm by TBO_Yeong »
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 2-The APP
« Reply #117 on: November 15, 2011, 10:17:48 pm »
The version number goes 2.day.month.year XD

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #118 on: November 16, 2011, 07:19:45 am »
ah. XD
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 2-The APP
« Reply #119 on: November 18, 2011, 07:17:00 pm »
So what I am working on now is some stuff for circles. I have two ideas for pattern input:

Circle(Y,X,R,t,ON,OFF
ON will be the number of pixels to draw on, then OFF is the number of pixels to draw off. For example, you can draw a circle where 2 pixels are on followed by 3 off, then two on, et cetera.

Option two is:
Circle(Y,X,R,t,Pattern
Pattern will either be a byte or word that contains a bit pattern. So 85 which is 01010101 in binary will draw a circle with every other pixel off.

I prefer the second option as it is much faster, easier, and smaller. I am most likely going to go that route, but I need to figure out if the input should be 8-bit or 16-bit...

Here is a mini example...
As a note, this actually makes a grayscale circle, but I made Wabbit have only 2 shades so you could see what was happening XD

EDIT: I should also note that I rewrote the circles drawing routine. I am pretty sure it is smaller now and it is still as fast :)
EDIT2: Nevermind, it is about 1 to 2 circles slower per second with the added code above D: Still, 45 circles per second >:D