Show Posts

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 - MRide

Pages: 1 ... 50 51 [52] 53 54 ... 56
766
Humour and Jokes / Re: The best xkcd ever (NOT a rickroll)!
« on: August 01, 2010, 11:02:26 pm »
This reminds of an incident in my c++ class. the teacher asked us to turn to page 404, and one student yelled out, "I can't find it!"

767
Axe / Re: Tilemap scrolling
« on: July 30, 2010, 09:10:22 pm »
Thanks.  would it be any faster to put the getkey tests inside one if statement. and put the rest of the repeat loop (except the DispGraphr) in Full Mode?

768
Axe / Re: Tilemap scrolling
« on: July 30, 2010, 07:50:30 pm »
Even if I remove the Pause 7, It still updates too slowly.  Is there a way to speed it up?

769
Axe / Re: Tilemap scrolling
« on: July 30, 2010, 06:07:59 pm »
GN does not explicitly return 1 or 0, it returns the half byte tile 0-F (0-15 in decimal).  Although personally, I don't like that routine since there is no X and Y its usage is confusing.

If you want a solid gameboy gray, you have to turn interrupts off for the entire code and you also need to make sure to adjust the pause time in between each DispGraph to the perfect amount.  It will take some tuning since every display is different unfortunately.  For me, I have a TI-84 Plus K-0108H and my perfect gray setting is this:

Code: [Select]
:FnOff
:Repeat getkey(15)
:
:Pause 7           ;Long pause
:For(A,0,15):End   ;Fine tuning
:
:DispGraphr
:End

By perfect, I mean like a gameboy, not even one of those slowly scanning lines that moves diagonally from one side to the other, I mean literal gray.  The pause times will of course have to be different depending on how much other code you have in your loop.

Hmm... If I use this without the If getKey(0), then it doesn't update fast enough.
Here is the code:
Code: [Select]
:.ATILMAP
:[11111111111111111111→GDB1
:[10001000000000000001
:[10000100000000000001
:[10000001000000000001
:[10000000001000000001
:[10001000000000000001
:[10000010000000000001
:[10000000000000000001
:[10010000000000000001
:[10100000000000000001
:[10000000000000000101
:[11111111111111111111
:[55AA55AA55AA55AA→Pic1
:[FFFFFFFFFFFFFFFF
:0→S→D
:ClrDraw
:ClrDrawr
:Shade(48)
:FnOff
:Repeat getKey(15)
:If D<80 and getKey(1)
:20+D→D
:End
:If D≠0 and getKey(4)
:D-20→D
:End
:S<8 and getKey(3)-(S≠0 and getKey(2))+S→S
:Pause 7
:sub(DS)
:DispGraphr
:End
:Return
:.Drawing sub
:Lbl DS
:ClrDraw
:ClrDrawr
:For(Y,0,7)
:For(X,0,11)
:sub(GN,Y*20+X+D+S)→W
:!If W
:Pt-Off(X*8,Y*8,sub(GN,Y*20+X+D+S)*8+Pic1)
:End
:Pt-Off(X*8,Y*8,sub(GN,Y*20+X+D+S)*8+Pic1)r
:End
:End
:.Extraction
:Lbl GN
:{r1/2+GDB1}→A
:If r1^2
:A^16:Else
:A/16:End

770
Axe / Re: Tilemap scrolling
« on: July 30, 2010, 04:03:02 pm »
the subroutine GN definitely returns a 0 or a 1, based on the tile in the tilemap. could you post some code? and yes, the way grayscale is made is turning pixels on and off very quickly. so when you do DispGraphr, you actually turn on a checkerboard pattern on the backbuffer, and then the next time you call it the checkerboard pattern is shifted, making the appearance of gray. you probably see the checkerboard because the screen is not updating quickly enough. you could put an If getKey(0) around the part where you draw the tilemap to remedy this.

Won't this ruin the grayscale when you try to move, though?

771
Music Showcase / Re: Piano-Cello
« on: July 29, 2010, 06:48:59 pm »
Thanks.  Cool idea.
I'm taking a Java and an AI class this year, so maybe....

772
Music Showcase / Piano-Cello
« on: July 29, 2010, 03:33:12 pm »
A piano and violoncello duet.  Currently unnamed, so any suggestions for a name are welcome.

773
Music Showcase / Re: Octatonic
« on: July 29, 2010, 03:26:36 pm »
Thanks.  I'm working on a piece I started during my free time at a camp over the summer.  Until then, I still need to finish making MIDIs and mp3s of the rest of my pieces.

774
Humour and Jokes / Re: How Rick REALLY Rolls
« on: July 29, 2010, 02:25:44 pm »
Pokemon and Yu-gi-oh abridged series is epic!  Anyway, Deep Tought, didn't you post that some where else?  I seem to remember pointing out it links to that video.
That was me in the "OMG Today's xkcd!" thread.

775
Axe / Re: Tilemap scrolling
« on: July 29, 2010, 01:26:38 pm »
Well, I fixed one problem.  Now the gray stays the whole time, but instead of being solid gray, it appears to have the checkerboard pattern behind it.

EDIT: Hmm...Well, If store the result of the call to GN in W, then W is either 0 or 1.  If its zero, then I want to write to the buffer, and I always write to the back-buffer.  However, it seems that the patterned tile is being written to the buffer over the whole tilemap.

EDIT 2: I have come to these possibilities:
            1) The GN call does not return 0 or 1 as I had supposed, therefore, the If conditional is always true, and always draws the patterned tile to the buffer
            2) The above statement is false, because the drawing command inside the if conditional wouldn't just draw the patterned tile,  and after looking at the code, GN does return 0 or 1.
            3) If #2 is true, then there shouldn't be anything wrong with that section of the code, and I messed up somewhere else.

776
Axe / Re: Tilemap scrolling
« on: July 28, 2010, 11:55:38 pm »
So you would need to draw the patterned tile to both buffers, and the solid tile to just the back buffer?

EDIT: Well, it starts out looking good (if a bit flickery), but when I try to move, it messes up.

EDIT 2: Would this be a sort of upside down ninja'd?

777
Axe / Re: Tilemap scrolling
« on: July 28, 2010, 11:43:56 pm »
That just creates a flashy screen.  Wouldn't would need a separate drawing command if you want only the solid black tiles turned gray?

778
Axe / Re: Tilemap scrolling
« on: July 28, 2010, 11:37:01 pm »
Thanks.
Also, how would you implement 3 lvl grayscale tiles?  Say, instead of just black tiles, I wanted all gray tiles.

779
Axe / Tilemap scrolling
« on: July 28, 2010, 12:17:03 pm »
Thanks to SirCmpwn and nemo, I was able to write a tilemap display routine.  I then added scrolling by one tile at a time (as opposed to one pixel.)
Here is the code:

Code: [Select]
:.ATILMAP
:[11111111111111111111→GDB1
:[10001000000000000001
:[10000100000000000001
:[10000001000000000001
:[10000000001000000001
:[10001000000000000001
:[10000010000000000001
:[10000000000000000001
:[10010000000000000001
:[10100000000000000001
:[10000000000000000101
:[11111111111111111111
:[55AA55AA55AA55AA→Pic1
:[FFFFFFFFFFFFFFFF
:0→S→D→U
:ClrDraw
:sub(DS)
:Repeat getKey(15)
:If D<40 and getKey(1)
:20+D→U
:End
:If D≠0 and getKey(4)
:D-20→U
:End
:S+(S<4 and getKey(3))-(S≠0 and getKey(2))→T
:If D≠U or (S≠T)
:U→D
:T→S
:ClrDraw
:End
:sub(DS)
:End
:Return
:Lbl DS
:For(Y,0,7)
:For(X,0,11)
:{Y*10+X+GDB1+D+S}→A
:Pt-On(X*16,Y*8,A/16*8+Pic1
:Pt-On(X*16+8,Y*8,A^16*8+Pic1
:End
:End
:DispGraph

For some reason, it skips two tiles at a time.  So far, I have been unable to figure out why this is.

780
Other Calculators / Re: ti-nspire google group
« on: July 27, 2010, 07:27:49 pm »
And what most of the regular users play is Block Dude, or one of the other puzzpack games, which comes with the calculator anyway. (At least, this is the case at my school)

Pages: 1 ... 50 51 [52] 53 54 ... 56