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.
Messages - Xeda112358
Pages: 1 ... 187 188 [189] 190 191 ... 317
2821
« on: November 18, 2011, 08:29:04 pm »
Cool There are a few differences with syntax (especially math), but learning Axe should help you to understand the more advanced functions in Grammer (such as memory editing and access and whatnot)
2822
« 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 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 Still, 45 circles per second
2823
« on: November 17, 2011, 11:43:20 pm »
Cooool
2824
« on: November 17, 2011, 10:29:15 pm »
No! "I have to finish Grammer 2 in time..." And then he said I didn't need to, it would just be graded as is
2825
« on: November 17, 2011, 10:25:17 pm »
Yes, you can Most of us still haven't finished our projects Except yeong >.> *cough*
2826
« on: November 17, 2011, 05:45:21 pm »
I was requested earlier to make a new example program and was then suggested to make a sprite editor. So here we are *Indents are here solely for viewability
.0:Return ;The header "USprite→A ;Stores the string location to A (used for optimisation since the string is used several times) Get(A ;Gets the location of the appvar named Sprite If =0 ;Zero is returned if the var does not exist Then ClrDraw ;Clears the draw buffer (graph screen) and resets text coordinates Text(º"How many sprites? ;º means draw to the last text coordintate DispGraph ;Displays the draw buffer expr(Input →N ;Allows the user to input a string and expr( turns it to a number Text(6,0,"Width? ; DispGraph ; expr(Input →W ; Text(12,0,"Height? ; DispGraph ; expr(Input →H ; Send(4+N*W*H,A→Z ;Creates the appvar :) int(Z,W ;Stores the Width to the first byte of the var int(Z+1,H ;Stores the Height to the second byte of the var iPart(Z+2,N ;Stores the Number of sprites (stores it as a 2-byte word) End Unarchive A Get(A→Z ; IS>(Z→W ;reads the byte at Z, then increme,nts Z IS>(Z→H {Z→N Z+2→Z ClrDraw 0→X →Y →B ;X will be X pixel Coord, Y=Ypixel coord, B=sprite number π87EC→θ ;This is the location of the clipboard (256 bytes) Line(0,0,1+H,1+W*8,3 ;Draws the boundaries for the sprite Repeat A=55 ;55 is the [mode] key Z+B*W*H→V ;Used multiple times, so why not store it to a var? Pt-On(0,V,0,0,W,H ;Draws the sprite Repeat A=55 +getKey(10 +getKey(11 pxl-Test(Y,X→C 9→D Repeat A D+1 If >9 ;Checks if the previous result is >9. This is the timer for blinking Pxl-Change(Y,X 0 ;Changes the pixel state at Y,X and then returns 0 in Ans →D getKey→A End Pxl-Off(Y,X C If getKey(56 ;56=Delete 0 If getKey(9 ;9=Enter 1 If getKey(54 ;54=2nd !C If Ans Pxl-On(Y,X If A=15 Line(0,0,H,W*8,0 ;Draws a white rectangle to erase the sprite data Y+H+getKey(1 -getKey(4 /H θ'→Y ;θ' is the remainder from the division. This lets the cursor loop :) X+getKey(3 -getKey(2 +W*8 /W*8 θ'→X End Pt-On(4,Z+B*W*H,0,0,W,H ;Swaps the sprite data from on screen to the sprite set (saves the changes) B+N+getKey(10 -getKey(11 /N θ'→B End Stop
That is working code (without the clipboard). The program here allows you to create a sprite set if appvar Sprite does not exist, it prompts for the number of sprites to include as well as their size. There is clipboard functionality as well as a kind of "Undo" for mistakes. Have fun? Oh, also, I was also told to make it work with the map editor, so that should happen soon But I have to go to work now... Oh, and for those who plan to use the sprite sets, the offset into the appvar data is 4 to get to the sprite data (the first 4 bytes tell the number of sprites and size).
2827
« on: November 17, 2011, 02:35:15 pm »
Hmm, I wish it could be made in Grammer code, too, but Grammer has no way, currently, to delete or append data
2828
« on: November 17, 2011, 01:36:41 pm »
Actually, Qwerty.55 said he was on IRC... not sure how far he will get, but that seems like it will be cool
2829
« on: November 17, 2011, 01:23:39 pm »
Oh my, this look like it could be fun Will the tilemap command in Grammer be useful then?!
2830
« on: November 17, 2011, 12:38:00 pm »
I don't like the idea of importing programs because program variables generally store, well, program code, and you can import them with the prgm command. As for strings, I think that makes sense, but unfortunately strings in the TI-OS are token strings, while Axe and ASM strings are character strings, which are different except for the uppercase letters, digits, and theta.
Code can easily be created to turn an OS string into a character string. I do that in a few of my projects and I am wondering if Quigibo already has code in Axe to do that (can appvars with lowercase names be created?)... EDIT:... or accessed?
2831
« on: November 17, 2011, 12:31:08 pm »
I believe there is a Feature Wishlist thread ... And to be relevant to the topic, I have not found any *actual* optimisations just from the quick look I made. There might be more, but y'all have done an amazing job so far!
2832
« on: November 17, 2011, 10:40:25 am »
n2n–1
n2 n–1 *cough* ? I wonder if a program should be made to draw hypercubes?
2833
« on: November 16, 2011, 11:40:54 pm »
When dealing with hypercubes, a cube is not necessarily 3 dimensional. Here are a few examples: a 0 dimensional cube is a single point a 1 dimensional cube is a line segment a 2 dimensional cube is a square a 3 dimensional cube is a cube as we know it Now let us look at the number of vertices here: 0 dimensions has 1 1 dimensions has 2 2 dimensions has 4 3 dimensions has 8 notice a pattern? There is more of a pattern, though. I will give you a hint: Pascals triangle EDIT: Also, the number of edges from each vertex is equal to the dimension number
2834
« on: November 16, 2011, 09:13:41 pm »
I was at a math conference when it finally clicked for me what a hyper cube was. Once I figured it out, I came up with a way to draw them and I was applying graph theory to it
2835
« on: November 16, 2011, 08:11:51 am »
agreed ^_^
Pages: 1 ... 187 188 [189] 190 191 ... 317
|