Author Topic: Grammer 3-Concepts, ideas, requests  (Read 67148 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 3-Concepts, ideas, requests
« Reply #30 on: February 20, 2013, 06:56:38 am »
With Grammer currently you kind of can. With the organisation of Grammer 3, you will be able to use variables that are named, but when the program is precompiled, it will convert variable names to two byte addresses. (It will still keep track of the names, though). I am still trying to figure out a good way to handle string concatenation and external variables.

Offline ghest1138

  • LV2 Member (Next: 40)
  • **
  • Posts: 27
  • Rating: +0/-0
  • HueHueHue
    • View Profile
Re: Grammer 3-Concepts, ideas, requests
« Reply #31 on: February 24, 2013, 06:07:40 pm »
I think you should give Grammer a different syntax(keep backwards compatibility, though) Some of it is just so confusing(Y before X?! WTF!?) Another idea is to add "header files" like in higher level languages so that you can have whole bunches of routines for complex stuff already set out for you(like collision checking, for example). Some of these might be dumb because i'm kind of a noob at grammer :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Grammer 3-Concepts, ideas, requests
« Reply #32 on: February 25, 2013, 12:33:38 am »
Y before X is because in TI-BASIC many commands are that way too. Grammer was made specifically to get TI-83+ BASIC coders used really fast to it.

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 3-Concepts, ideas, requests
« Reply #33 on: February 25, 2013, 05:40:26 am »
Y before X is because in TI-BASIC many commands are that way too. Grammer was made specifically to get TI-83+ BASIC coders used really fast to it.
Yes, precisely, like with the Pixel commands and Text( in TI-BASIC.
And I am not sure I understand header files, but does this sound useful:

I have planned for Grammer 3 to keep the last 16 tokens for an extended command set. In TI-BASIC, there are a handful of two-byte tokens which is basically what this is. The difference, though, is that you can load different command sets into your program. For example, if a command set is made for 3D rendering, called 3DRender, you might do something like:
Code: [Select]
Ext0 3DRender
I haven't quite gotten down how I want to incorporate this code-wise. I will want to let the user install command sets as either appvars or apps, but I will have to have some format to tell Grammer what arguments each command can take x.x Grammer also has some pretty high-level variable structures like n-dimensional arrays, actual string support, sprites, bit-maps, integer math and there are still a few more types that I am working on like Floating-Point and fixed-point math. The editor is just a real pain, still x.x The format that I currently have, though, makes it easy to jump to sections of code and edit things like sprites in-line :)

Offline ghest1138

  • LV2 Member (Next: 40)
  • **
  • Posts: 27
  • Rating: +0/-0
  • HueHueHue
    • View Profile
Re: Grammer 3-Concepts, ideas, requests
« Reply #34 on: February 25, 2013, 10:47:05 am »
Oh... I guess I've been doing BASIC coords wrong the whole time >.< But a header file is pretty much just like an inc file in asm, or a .h file in C and C++, they define lots of routines and constants and whatnot that you can use with nothing but a simple #include or import statement. Floating point math might be helpful, but it also might muddle the number system up a bit. Maybe you could have a special "float" datatype, like in C and C++. The editor sounds really cool, though, I hate having to jump around between DCS7 edit mode and Grammer app :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 3-Concepts, ideas, requests
« Reply #35 on: February 25, 2013, 12:36:42 pm »
Oh, yes, that might be useful (the header thing). As well, floating point numbers are a different type from integers. Integers also have signed/unsigned, and 8,16,32, and arbitrary sizes.

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Grammer 3-Concepts, ideas, requests
« Reply #36 on: February 25, 2013, 02:37:25 pm »
What about adding fixed-point math?
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Grammer 3-Concepts, ideas, requests
« Reply #37 on: February 25, 2013, 02:39:00 pm »
ben_g: Look up 3 posts. ;)

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Grammer 3-Concepts, ideas, requests
« Reply #38 on: February 25, 2013, 02:40:37 pm »
Oops. I only quickly read trough the previous posts. I must have missed it.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Grammer 3-Concepts, ideas, requests
« Reply #39 on: February 25, 2013, 04:11:44 pm »
Extensions for 3D and stuff would be nice, although I wonder what would be the format. Would they be appvars? Because some people might confuse them with the game program files if they're also programs and delete them if they decide to delete the game. :P

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Grammer 3-Concepts, ideas, requests
« Reply #40 on: February 25, 2013, 04:29:25 pm »
I think that appvars are the best file type for extensions. And about the format, I can't think of another one than the format used in Axe's axioms. It's so practical.

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 3-Concepts, ideas, requests
« Reply #41 on: February 25, 2013, 04:31:27 pm »
Yeah, that is what I am worried about. Basically, for the extensions, the appvar/app/program would need to contain all of the code for handling certain commands. I am pretty sure that I have gotten a good format for calling the extended commands, the difficulty is in compiling the programs that use extended commands. Actually, this is the same problem for built in commands, too XD. I could manually create a Grammer 3 program at the moment, but having a compiler would be much less tedious. Basically, for something like the Rect() command, this:
Code: [Select]
Rect(X,Y,8,8,2)
Needs to be converted to:
Code: [Select]
20        ;20h = Rectangle command
10 0000 ;10h says it is a 1-byte integer, 0000 is the compiled offset into the integer table
1F        ;ends the argument. Think of this like a comma.
10 0100  ;another 1-byte integer
1F
08
1F
08
1F
02
1E      ;end the command. Basically an ending parentheses
So I know what it is supposed to compile to, it is just that I need to work up the motivation to create the compiler x.x I actually started writing the compiler a few months ago in Grammer 2 code after I added in the new Input command with syntax highlighting.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Grammer 3-Concepts, ideas, requests
« Reply #42 on: February 25, 2013, 04:40:19 pm »
I think that a 2-bytes command ID should be better, since with extensions and all the number of commands can easily go more than 255 (how do you say that correctly English ? :/)

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 3-Concepts, ideas, requests
« Reply #43 on: February 25, 2013, 04:44:56 pm »
yes, I am sure it will and that is what the extended commands are (multi-byte tokens, basically). So for example:
Code: [Select]
F800     ;Command 0 of one of the extended token sets
I was also trying to figure out a good way of allowing the extended sets to have extended tokens just in case, but I don't think I will need to do that (will we really need 3-byte tokens? :P)

Offline ghest1138

  • LV2 Member (Next: 40)
  • **
  • Posts: 27
  • Rating: +0/-0
  • HueHueHue
    • View Profile
Re: Grammer 3-Concepts, ideas, requests
« Reply #44 on: February 25, 2013, 04:52:55 pm »
Just out of curiosity, what's the newest version of Grammer available for download? (I have 2.01.05.12) Also, I found a bug for that version: when you are in the screen where you choose the program, if you press [ON], after you say quit to the error, the homescreen is filled with some junk. Probably not an important bug, but I thought you might want to know regardless.