Author Topic: Grammer Q&A  (Read 55893 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #75 on: March 13, 2012, 05:36:52 pm »
Okay, I am trying to think of what could be wrong D:
As for grayscale, here is what you can try:

Store pi9872 to a pointer-- this is where a 768-byte buffer is located. I'll call the pointer G, for Gray.
Now do this: Disp oG to set the gray buffer.

Now when you draw, you draw the gray stuff to buffer G and black to the normal buffer. To make white, you need to erase on both buffers.

You also need to be constantly updating with DispGraph for it to appear gray. To draw to the gray buffer, most drawing instructions will let you use an extra argument to point to the buffer. For example, to draw a rectangle to the gray buffer:

Lined(0,0,8,8,1,G

I hope that helps!

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #76 on: March 14, 2012, 07:01:29 am »
I'll rewrite the code and see if the problem persists...
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
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #77 on: March 14, 2012, 07:53:16 am »
Also, I am not sure if DCS7 and Grammer play poorly together. (You won't be able to run a Grammer program from DCs7, anyways, though)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #78 on: March 14, 2012, 06:06:50 pm »
yes. when you run dcs7, you'll have to run grammer app again in order to run grammer apps.
Sig wipe!

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #79 on: March 15, 2012, 06:58:33 am »
I'm aware of that. I might have lost the program because I was being really careless in my exiting of Doors. I don't like to wait, so I press the clear button about a thousand times before Doors closes. :P

But the problem might have been with the temporary programs. I'll try rewriting the code and adding a Delvar function for both temporary programs at the end, or even changing the names to something better.
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 awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #80 on: March 25, 2012, 07:59:58 am »
I'm gonna get back into working on this. First I want to make a title screen so it looks all purty, and make a feature that generates an empty level tilemap and the tile set along with it, if they do not exist. That'll be a New Game, and Load Game will only appear if the two variables exist.

Just need to know how I could generate the two files in game. I guess assume I'll have the tile set at Lbl "TILESET, and I just want a tilemap variable with all tiles being the first tile. And in case I didn't say tile enough:
Code: [Select]
:While "Tile"="Tile"
:Disp "Tile
:End

I'll also eventually have an options screen where you can change the size of the generated levels, and eventually choose to have randomized or flat levels! :O
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
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #81 on: March 25, 2012, 08:44:58 am »
Well, if you already have the tileset, why copy it twice? You could also store it in an appvar and package it with your program :)As for detecting if there is a save file, here is what I do, normally:
Code: [Select]
"USave→A          ;Name of the var. Save to a pointer because it'll be used a lot
Unarchive A       ;Unarchive the var. (A points to the name)
If !Get(A         ;Finds the var. Returns 0 if it doesn't exist.
Then
Send(4098,A       ;creates the var
iPart(Ans,16448   ;writes the first two bytes as 40h,40h which is the size of the map
End
Get(A→Z           ;Z points to the var


As for generating random maps, how do you want to generate it? You could do some crazy cool stuff using math to make regions of similar tiles (so you could have ponds, rock areas, and others).

Also, there is an Axe coder now doing something like this, too XD

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #82 on: March 26, 2012, 08:38:31 am »
Question: For tempprogs will I have to keep copying the appvar to them before I read them, or do they stay there while the program is running?
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
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #83 on: March 26, 2012, 09:36:52 am »
They remain while the program is running :) Once the program stops and control is handed back over to the OS, they get deleted.

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #84 on: March 26, 2012, 10:10:17 am »
Good!

Finished the title screen. I'll show this off wherever I can because I'm super proud of it. ;D

The code for drawing it is a monster, though. So many lines! :O
« Last Edit: March 26, 2012, 10:11:29 am 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
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #85 on: March 26, 2012, 10:58:57 am »
Haha, nice! :D If it is too big/slow, you could store the pic to an appvar and recall it that way. There isn't a recallpic function, but you can do something like this:
Code: [Select]
//Store Pic on screen to Appvar
Fill(8,Send(768,"UMain
If appvarMain is in RAM or does not exist, that will store the buffer to it. If appvarMain exists, but is in flash, it won't work.
To recall it, you will need to use solve(1:
Code: [Select]
Get("UMain
solve(1,Ans,37696,768   ;37696 is the graph buffer. If you are using another buffer, replace this.

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #86 on: March 29, 2012, 08:09:30 am »
Alright, new idea. It might play out, it might not. I think instead of using appvars I want to use programs. This would make outside editing a lot easier. Maybe even allow for a BASIC level editor. Also, I want to be able to see what the program is doing in terms of data editing, so I can understand it. Otherwise, it's just happening and I can't see it happen, I just have to trust that it's working. I think I'll start with the programs for now, and unless you think appvars are faster I'll keep on using them.

(Started playing around with Send( and Get( with programs, and when I make a program with 768 bytes, and look at it in the PRGM menu, the menu is kind of messed up. I scroll up to see the bottom of the page, and the first programs' names overlap the last ones... Otherwise it's working fine. Question marks all the way through, so must be stored as token data!)
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 stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Grammer Q&A
« Reply #87 on: March 29, 2012, 12:35:52 pm »
Ok, I probably am to lazy to search it, but what's the best Grammer tutorial?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #88 on: March 29, 2012, 02:38:27 pm »
(Started playing around with Send( and Get( with programs, and when I make a program with 768 bytes, and look at it in the PRGM menu, the menu is kind of messed up. I scroll up to see the bottom of the page, and the first programs' names overlap the last ones... Otherwise it's working fine. Question marks all the way through, so must be stored as token data!)
That is weird, do you have a screenie and some code?
Ok, I probably am to lazy to search it, but what's the best Grammer tutorial?
There is one with the download that I wrote, but it isn't really good. That is currently the only Grammer tutorial that I know of :/ I have to rewrite it sometime .___.

Offline awalden0808

  • LV3 Member (Next: 100)
  • ***
  • Posts: 55
  • Rating: +6/-0
  • Cool shades, wears Waldo.
    • View Profile
Re: Grammer Q&A
« Reply #89 on: April 07, 2012, 12:52:01 pm »
That is weird, do you have a screenie and some code?
I tried to recreate it but it doesn't seem to be happening anymore. I'll keep working with it and if the problem comes up again I'll take a GIF of it.

Btw, I should make a game called Zello. It looks REALLY nice in Doors with that font. I don't know what kind of game it would be, but it just looks so good...
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.