Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: BrownyTCat on April 18, 2011, 02:36:24 pm
-
:(
It doesn't seem to be working, I had a pure BASIC ASCII platform engine a while ago, but I need a simple engine for making arrays to store the levels, which are approximately... 12x8 tiles that are 8x8 pixels.
I barely started but need:
♦Level arrays that can be read for collisions and drawing the level (of course)
♦Better gravity/velocity engine, support 'jumping'.
(SOLVED)♦How to store over 10 sprites? [Hex]->Pic1 twice even with new hex produces an ERR:DUPLICATE.
I have these under control:
♦ Sprites
♦ Concept/Gameplay
Here is the sauce source so far:
.TESTPROG A test program
ClrHome
.CHARACTER
[3C243C3C7EBD2442]->Pic1
.BLOCK
[FFD5ABD5ABD5ABFF]->Pic2
0->K
0->X
0->Y
0->V //Was going to hold velocity or something, left it in.
ClrDraw
While K =/= 1 //Using "Down" as a placeholder
ClrDraw
Pt-On(0,48,Pic2)
Pt-On(8,48,Pic2)
Pt-On(16,48,Pic2)
Pt-On(X,Y,Pic1)
DispGraph
getKey->K
If pxl-Test(X,Y+8)=0
Y+1->Y
End
If K=3
X+4->X
End
If K=2
X-4->X
End
If K=4 //This is going to be 2ND.
If pxl-Test(X,Y+8)=1
Y-16->Y //Utterly crappy excuse for a jump
End
End
End
-
I am not really good at this, and I don't program for the z80 calcs, but can't you just use a matrix to store your levels?
For example in your matrix 1 stands for sprite1, 2 for sprite2, etc...
And with a while in your program you could load the level.
-
:(
It doesn't seem to be working, I had a pure BASIC ASCII platform engine a while ago, but I need a simple engine for making arrays to store the levels, which are approximately... 12x8 tiles that are 8x8 pixels.
I barely started but need:
♦Level arrays that can be read for collisions and drawing the level (of course)
♦Better gravity/velocity engine, support 'jumping'.
♦How to store over 10 sprites? [Hex]->Pic1 twice even with new hex produces an ERR:DUPLICATE.
I have these under control:
♦ Sprites
♦ Concept/Gameplay
Here is the sauce source so far:
.TESTPROG A test program
ClrHome
.CHARACTER
[3C243C3C7EBD2442]->Pic1
.BLOCK
[FFD5ABD5ABD5ABFF]->Pic2
0->K
0->X
0->Y
0->V //Was going to hold velocity or something, left it in.
ClrDraw
While K =/= 1 //Using "Down" as a placeholder
ClrDraw
Pt-On(0,48,Pic2)
Pt-On(8,48,Pic2)
Pt-On(16,48,Pic2)
Pt-On(X,Y,Pic1)
DispGraph
getKey->K
If pxl-Test(X,Y+8)=0
Y+1->Y
End
If K=3
X+4->X
End
If K=2
X-4->X
End
If K=4 //This is going to be 2ND.
If pxl-Test(X,Y+8)=1
Y-16->Y //Utterly crappy excuse for a jump
End
End
End
Use Pic1+, Pic1- there are over 256 sprite images, you can symbols after Pic
-
You can't use [HEX]->Pic1 multiple times. Storing data to Pic1 creates a pointer to that data. The pointer remains constant. You have to use Copy( to copy sprite data to the data at that pointer in order to use it.
-
I'm currently just working on gravity, I have this in my initialization:
V=50
And this is in the main loop:
If
pxl-Test(X,Y+8)=0
V-1->V
If V>1
Pause V
End
Y+1->Y
Else
50->V
End
Basically, this is a gravity handler, and it's fine for the most part, I just need the "jumping" thing. Maybe use a variable in place of 1, ie:
Y+G->Y
Possibly keep the pause and add more dramatic gravity, like in each falling loop until you hit ground, you get +1 to G until you reach Terminal Veocity.
???
-
This helped me a lot :
http://ourl.ca/4279
-
It helped me a little, and also made my head burst into flames.