0 Members and 3 Guests are viewing this topic.
That shouldn't be too bad -- you just need to decide what the X and Y values mean. They might represent the X and Y coordinates of the top-left corner of the screen in terms of the larger map, in which case the player would be about 44 pixels to the right of that and 28 pixels down, or they might represent the actual position of the player.
.GREYDiagnosticOff[FCACACFC007C3828]→Pic1[3F35353F003E1C14][FCACACFC007C3848][3F35353F003E1C12][FCACACFC007C3818][3F35353F003E1C18][FCACACFC007C3824][3F35353F003E1C24][0000000000000000]→Pic2[FFFFFFFFFFFFFFFF][010101010101010101010101010101]→GDB1[010000000000000000000000000001][010000000100000000000000000001][010000000101000000000000000001][010000000000000000000101000001][010000000000000000000000000001][010000000000000000000000000001][010101010101010101010101010101]0→X0→Y1→C0→M0→NClrDrawsub(H)Pt-On(24,40,Pic1)DispGraphRepeat getKey(15)If getKey(2)1→MIf C<4C+1→CElse1→CEndEndIf getKey(3)1→NIf C<4C+1→CElse1→CEndEndIf M=10→MFor(A,1,8)sub(P)Lbl TIf (C=1)Pt-On(24,40,Pic1)EndIf (C=2)Pt-On(24,40,Pic1+16)EndIf (C=3)Pt-On(24,40,Pic1+32)EndIf (C=4)Pt-On(24,40,Pic1+48)EndDispGraphEndY-1→YEndIf N=10→NFor(A,1,8)sub(Q)Lbl UIf C=1Pt-On(24,40,Pic1+8)EndIf C=2Pt-On(24,40,Pic1+24)EndIf C=3Pt-On(24,40,Pic1+40)EndIf C=4Pt-On(24,40,Pic1+56)EndDispGraphEndY+1→YEnd.MAPDRAWEnd.STARTDRAWLbl HClrDrawFor(J,0,8)For(I,0,13)Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}*8+Pic2EndEndReturn.RIGHTLbl QPt-Off(24,40,Pic2)Horizontal -For(J,0,8)Pt-On((12*8)-A,(J*8)+R,{(J*15)+12+Y+GDB1}*8+Pic2EndReturn.LEFTLbl PPt-Off(24,40,Pic2)Horizontal +For(J,0,8)Pt-On(–8+A,J*8,{(J*15)-1+Y+GDB1}*8+Pic2EndReturn
Stefan,Correct me if I'm wrong, but a TI83 would be unable to include the music, color, or transparent ghosting effects that Grey depends on. Without those I don't see how it is possible to tell the game's story.
You are correct about the music. But I don't think thats so important. I think Grey without sound still is good.I'm using AXE PARSER(http://www.ticalc.org/archives/files/fileinfo/428/42813.html) to make this. With it stuff go a lot faster than the original language and I am able to have some greyscale(see the screenshots in the link). I would use different sprites and greyscales to make it look more 'lively' every time, in stead of colour. The ghosty effect will probably work with greyscale too.You can let me try, can you?Stefan
Basically the concept of smooth scrolling is that you have two variables for the X and Y offset of the map, and two variables for the characters X and Y position, so four variables in total. To handle movement, just do it normally by changing the character's X and Y values. Like, getkey(3)+X-(getkey(2))->X or whatever. You don't have to do it like that, but just remember to change the character's X and Y, not the offset. Then, every iteration of the main game loop, you center the character on the screen (unless he's at the edge of the map, he should go to the side of the screen to signify the edge) and calculate the offsets accordingly. At least, that's how I do it. And this way, you can have smooth movement (*256 coordinate inflation) and a big map, because you calculate the offset based on the nearest pixel (/256)
:[010101010101]->GDB1 etc...
:[111111]->GDB1 etc...
Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}/16*8+Pic2Pt-On(I*8+8,J*8,{(J*15)+I+Y+GDB1}^16*8+Pic2
Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}*8+Pic2
You can, but you would have to draw two sprites per byte :Spoiler For Spoiler: Code: [Select]Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}/16*8+Pic2Pt-On(I*8+8,J*8,{(J*15)+I+Y+GDB1}^16*8+Pic2Instead of doing thisCode: [Select]Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}*8+Pic2Am I right ? That's what I personnaly do for big maps
Quote from: Wellen on October 14, 2011, 09:57:35 amYou can, but you would have to draw two sprites per byte :Spoiler For Spoiler: Code: [Select]Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}/16*8+Pic2Pt-On(I*8+8,J*8,{(J*15)+I+Y+GDB1}^16*8+Pic2Instead of doing thisCode: [Select]Pt-On(I*8,J*8,{(J*15)+I+Y+GDB1}*8+Pic2Am I right ? That's what I personnaly do for big mapsHow does my GDB look like then?
Pt-On((12*8)-A,(J*8)+R,GetCalc("appvGreyMap",{(J*15)+12+Y+GDB1}*8+Pic2)