2206
Grammer / Re: GrayTile Editor
« on: February 29, 2012, 10:51:19 am »
That is okay, this is more because Yeong asked me to release this I wonder what yeong plans to use this for o.o
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 2206
Grammer / Re: GrayTile Editor« on: February 29, 2012, 10:51:19 am »
That is okay, this is more because Yeong asked me to release this I wonder what yeong plans to use this for o.o
2207
Grammer / GrayTile Editor« on: February 29, 2012, 10:30:49 am »
For those wanting a grayscale tile editor for their grayscale tilemaps, this is what I made for Samocal. It creates the appvar TILES of the right size for 32 gray tiles. The first 4 bytes contain info, so if you want to use this for a tilemap, you will need an offset of 4 bytes into the var. For example:
4+Get("UTILES→T T will now point to the tile data The sprites are 8x8 and the controls are:
Also displayed are the masks (graymask and black mask). If you want to, you can definitely use this to make masked sprite data as well. Anywhere that is gray will show the background, white appears as white, black appears as black. 2208
TI Z80 / Re: GrayDraw (Grammer)« on: February 29, 2012, 10:11:42 am »
So, update time Now that Grammer actually uses grayscale as default, I made a much nicer version that uses grayscale properly Also, I figured out why the checker pattern wasn't looking fast enough... I had Wabbit's color up to 2 shades. On a real calc, it shows it as perfectly gray with no flicker. It gets about 86FPS at 15MHz.
The new version features 3 shades-- black, white, and gray. You now draw with a resizable cursor and it runs at 6MHz. Controls:
I am wondering if I should add a save file or not so that people can load and save their pictures... Naturally, it would require 1536 bytes per image, though I could even make it so that it uses OS pictures, too. I have resized them before, so I know it is doable. I think I could even get it so that the OS would read it normally, but you could use it as a grayscale pic for Grammer. To be clear, this is actually good grayscale, not the flickery stuff I did before 2209
Miscellaneous / Re: Happy Leap Year!« on: February 29, 2012, 09:28:48 am »
Leap years happen every 4 years except every 100 years which is also except every 400 years o.O (so 2000 was a leap year, but 2100, 2200, 2300 won't be)
2210
Grammer / Re: Conway's Game of Life« on: February 29, 2012, 07:33:22 am »
Pretty much, my program works like this to get other forms:
There Surviving, Rebirthing, and Dying conditions based on the number of live pixels. Since there are at most 8 pixels, I can use 9 bits (for zero as well). If surviving is S, rebirth is R, and dying is Q: S=4 (000000100b) R=8 (000001000b) Q is computed by using not(R or S So if there are 3 pixels around, I do 2^3 to get 8 as a mask. "8 and R" returns nonzero, so I know it gets reborn. That, by the way, is CGOL The main problem is that I haven't released the Grammer version with e^( which computes 2^n, but here is the code: Code: [Select] If Q and e^(H ;H is number of pixels around the cell EDIT: Back from class, I didn't see your edit So, for the sieve, you can pixel test a number to quickly figure out if it is prime It only works up to 6143, though Also, for a few other memory saving techniques, you can try using If !pxl-Test(A,B instead of If 0=pxl-Test(A,B 2211
Grammer / Re: Grammer Feature Requests« on: February 28, 2012, 10:09:26 pm »
Yeah, it was kind of sneaked in once when I made a bunch of updates I made an edit to the readme, but I don't think I ever let anybody know .__.
2212
TI Z80 / Re: The Reign of Legends 3 Port [Grammer]« on: February 28, 2012, 09:17:25 pm »
Good luck! I wish I could work out better animations
2213
Grammer / Re: Conway's Game of Life« on: February 28, 2012, 09:15:51 pm »
Awesome! I was really really tempted to just add CGOL as a Fill( command, but I wanted the fun of coding it in Grammer. I felt like I would be ripping you off if I just added a command, but I really like the idea of UnD. Would you be okay with me really adding the command? I would make it just a general 2D cellular automata like my program used (which has a rule for CGOL).
Anyways, for the prime sieve, I made it in both Grammer and TI-BASIC using a similar idea. The main difference was that Grammer automatically splits up the remainder and whole value and uses a 64*96 screen. So in Grammer, I figured it had 96*64=6144 pixels to work with. So the highest prime you would need to factor out would be 73 (square root of 6144 is 78, the next lowest prime is 73). So the code: Code: [Select] Fill(0 This will result in black pixels representing primes (except for 0 and 1 which stay black, though they are neither prime nor composite). Of course, there is the command >Frac that can be used to test if a 16-bit number is prime or not, but that also takes out the fun of a sieve
2214
Grammer / Re: Grammer Feature Requests« on: February 28, 2012, 08:42:24 pm »
To display an ascii char, you do something like:
:Text(0,0,'43 To display a token using the hex value, you can do something complicated like this: :pi8478→A[(2B00 :Text(0,0,A 2215
TI Z80 / Re: Block Eater 2« on: February 28, 2012, 05:18:10 pm »
.24 is the version with grayscale support and whatnot
2216
Grammer / Re: Grammer Feature Requests« on: February 28, 2012, 12:25:55 pm »
After working on this topic (and still failing), I have added a few useful functions. First, e^(n now performs 2^n (and the token hook changes this accordingly). This is a function that will likely remain as I have wished it was included for a while. The next thing I added was probably even more important and useful for many projects-- pixel testing boxes. This is especially useful for collision detection and I plan to add more versions at some point. The method I have added pixel-tests the border of the given rectangular region and returns the number of set pixels. (I plan to add methods for pixel-testing filled regions, as well)
It uses a modifier of pxl-Test( and similar arguments to Line(, so here is an example to check the perimeter of a pixel at (Y,X): Code: [Select] pxl-Test('X-1,Y-1,3,3,0 ;0 is the type (test the perimeter) A value from 0 to 8 will be returned I am putting this in Feature Requests because I was wondering what folks thought and if they had similar suggestions before I release it. Also, I still have to work on it a bit more. It works for my purposes, but it still needs to handle screen boundaries better.
2217
Grammer / Re: Conway's Game of Life« on: February 27, 2012, 08:12:10 pm »
Yeah, it isn't exactly the best example of speed for Grammer, but I am trying to figure out what is being so slow. I can plot 1000 random pixels in about a second, but testing should be even faster. For 32*32, that is only 1024 pixels. I am going to check again because I was expecting to get maybe 6 FPS, originally, not a dismal .25 FPS.
EDIT: Okay, I took out the code making it wrap around and took off about 25 % of the time it took. I am testing with 64x64 which is much slower. It is now 11 seconds for one frame, so 32x32 should take less than 3 seconds. Not great, but I sped it up. EDIT2: I added a new pixel test option to Grammer to test a rectangular border. This should be very helpful for collision detection in games and my gravity engine as well, but also manages 1 frame in 1.5 seconds. I am still trying to get it faster. At 64x64, it takes about 6 seconds to generate a frame. 2218
Grammer / Re: Conway's Game of Life« on: February 27, 2012, 07:32:51 am »
Oh, wow, that would be really cool! I do not think Grammer will be able to do the whole screen quickly (I have made prime sieves using the whole screen and it could only get about .5FPS). However, a 32x32 portion of the screen or something sounds like it would be pretty quick! As for getting the cursor to run as well, that won't be difficult at all, fortunately
So, to display the cursor and not effect the screen: Code: [Select] <<begin loop>> So pretty much your idea. That is indeed the fastest way, but you only need to use DispGraph once per cycle. Good luck! EDIT: Also, for more ideas, you can store the graph screen to another buffer to compute each frame. For example: (This is now a way to do CGOL, but it is slow ) Code: [Select] .0:Return EDIT2: I have been periodically editing this between chores/classes. The current version gets only about .25 frame per second Changing 31→G to 15→G for a 16x16 region can do 1 FPS EDIT3: Because of this program, I have added a new command to compute 2^n (I used the token e^(). With it, I made a customisable version (so not just Conway's Game of Life). I also have wanted for a very long time to add a command to pixel test the border of a region, so this shall give me the excuse 2219
TI Z80 / Re: Block Eater 2« on: February 26, 2012, 09:21:02 pm »
O.o I made sure and it worked well for me. I even downloaded from all the links I provided .___. Might I ask the calc model you are using?
2220
Miscellaneous / Re: Australia - Leadership Challenge« on: February 26, 2012, 09:12:33 pm »
I am curious, what choice do you think was best?
|
|