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 ... 145 146 [147] 148 149 ... 317
2191
« on: March 01, 2012, 11:23:43 pm »
Better idea: You will have a pointer to the gray layer (you have to define it anyways). The buffer will not change, regardless of the checkerpattern (that is only factored in when actually displaying). So if Z points to the gray buffer, you can do this: pxl-Test(Y,X,Z
The extra argument "Z" makes it read from the buffer at Z instead of the black buffer. Does this help any?
2192
« on: March 01, 2012, 10:18:33 pm »
Kind of, but things like interrupts still need work and are buggy. Still, you can program it to perform several tasks, but I have made plans in the past to add multiple threading officially As a platformer example, take a look at this that I posted yesterday (also in grayscale with collision detection): http://ourl.ca/15386
2193
« on: March 01, 2012, 10:14:10 pm »
You will want to use this version which is a prerelease, actually http://ourl.ca/13558/288236 If you want, here is my current version of the program... It is a bit glitchy and I still have to tease out the specific bugs (it will draw in places where it definitely should not).
2194
« on: March 01, 2012, 10:08:50 pm »
You can do that and the pixel test command will let you check the buffers. For example, you can make your sprite on the black layer detect only collision on the gray layer (so it can go through anything else on the black layer). I made a program earlier that had fire on the gray as the "background" while a box bounced around the screen (also leaving a trail of fire on the gray layer). I added some code so that I could stop the fire and bouncing to watch the gray fire
2195
« on: March 01, 2012, 06:25:33 pm »
The values are actually RAM addresses. The calculator has 3 buffers the size of the graph screen (768 bytes). pi9340 is the graph buffer that the OS uses pi86EC is a 768 byte buffer that Grammer makes use of for temporary operations and whatnot. You are probably safe if you use this to very temporarily store a screen here or something. It gets used by text conversion routines and I believe that is all, now. I have been trying to make Grammer not use this buffer, so I will have to rewrite the text display routine. Pretty much, if you want to use this, you can probably start at pi87EC and be safe with 512 bytes of RAKM there pi9872 is AppBackUpScreen. At the moment, Grammer initialises this with the first two bytes for the particle buffer. If you are not using the particle routines or you have set your own buffer, you can use this with no problems. Also, I am about to test my first attempt at a 2D cellular automata as a Fill( option. I am sure it won't work this time, but if it does, I am hoping for 6 to 8 FPS in 6MHz (though it might be much slower ). EDIT: Yeah, my anticipations went a bit too high it didn't work, but I am sure it only needs minor adjustments. It only gets about 2.3 FPS at 6MHz and about 6FPS at 15MHz
2196
« on: February 29, 2012, 10:05:08 pm »
No, the arguments are pretty much the same as the Line( command. I was originally going to add this as a rectangle option, actually.
2197
« on: February 29, 2012, 10:01:46 pm »
Height and width start at 1 and go to 96 and 64, respectively, sorry.
2198
« on: February 29, 2012, 09:52:38 pm »
I am posting this because I figure it might be useful for anybody who wants to design a platformer in Grammer code. It also might serve as a decent example for pseudocode for others writing a similar engine *cough* It features collision detection, grayscale, and gravity. For this example, use Enter to jump and left/right to move. Press clear to exit It draws a border, but otherwise leaves the screen untouched for your own obstacles. :.0: :13→G' :π9872→W :Disp oW :0→B→A :64→X→Y :Line(0,0,64,96,3 :Repeat getKey(15 :Y/64→F :X/64→E :Line(E,F,5,5,6 :Line(E+1,F+1,3,3,1,W :DispGraph :Line(E,F,5,5,4 :Line(E+1,F+1,3,3,0,W :pxl-Test('E,F+5,1,5,0→C :If *B=abs(B :0→A→B :Y→Z :If !C:+B≠abs(B :B+G'→B+Y→Z :If B :Then :If B≠abs(B:*pxl-Test('E,F-1,1,5,0 :0→B :If B=abs(B :Then :Z/64→D :While D≠F :F+1→F :If pxl-Test('E,F+5,1,5,0 :F→D*64→Z :End :End :Z→Y :End :If C*getKey(9 :‾63→B :getKey(3 :-getKey(2→H*64 :→I+X :/64 :E+2+H*3→H :For(G,F,F+4 :If pxl-Test(G,H :0→I :End :X+I→X :End :Stop
2199
« on: February 29, 2012, 09:41:45 pm »
This is kind of a prerelease that includes the still faulty pxl-Test( change. It will be a while before I can get back to work on it, so I will give these tips: It currently does not properly pixel-test regions one pixel wide. It automatically quits if it is out of bounds on the left and top (otherwises, it resizes the region which will not happen in the final version).
So to use it, pxl-Test('X,Y,H,W,0 (that is a zero). It will return the number of set pixels on the perimeter. This is also so that I can release my Gravity Jump program ^_^
(It also can have an optional argument for the buffer to test on)
2200
« on: February 29, 2012, 03:10:30 pm »
I can still tell that it isn't a phone, though There are only so many ways to make an 8x8 sprite, anyways. (well, 2^64 ways, but not that many that look good )
2201
« on: February 29, 2012, 03:09:00 pm »
Thanks I figured that because it wasn't too difficult, I would do that. I wanted to be able to see what I was making.
2202
« on: February 29, 2012, 01:27:15 pm »
I can see that I always saw a person because that is what I expected, but that could actually be a really nice telephone sprite o.o
2203
« on: February 29, 2012, 01:12:50 pm »
Okay, so from IRC, I saw you want gravity to be constant and: A=X velocity, B=Y velocity. So what I would do is something like this: If pxl-Test(X/64,Y/64+1 0→A→B ;If it hits a barrier, zero the velocity Else B+2→B+Y→Z ;2 is the value of gravity, so increment the velocity by 2, then add it to the position If (Z/64)-(Y/64)=2*pxl-Test(X/64,Z/64 ;in case you fell 2 pixels, test if you are on a barrier Z-64→Z End Z→Y End
I am not sure if that works in Axe, but I tried turning my Grammer code into Axe code .__. It will still need tweaking
2204
« on: February 29, 2012, 12:15:44 pm »
I want a B as well o.o This means I am going to have to start learning how to use computers
2205
« on: February 29, 2012, 11:54:19 am »
That is like a calculator on steroids We could use this for that old project to create OTCalc, right?
Pages: 1 ... 145 146 [147] 148 149 ... 317
|