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

Pages: 1 ... 56 57 [58] 59 60 ... 70
856
TI Z80 / Re: Light
« on: October 17, 2010, 11:38:10 pm »
Any optimization suggestions, please?
(I'm using a variant of Bresenham's line algorithm, for those interested)

It looks awesome, but why are you using that algorithm? It could very well be faster to set the initial screen and adjust the start/end points of the Line( function (which already uses Bresenham's algorithm).

I'm using the algorithm to test when the shadows should start.  The algorithm tests all the points in the line, and when it encounters a black pixel, it switches over to the built in line( function to draw it.

--
Okay, grayscale it is!
--
Anybody know where I can find a TI-86 emulator?  I wanna try Blinded by the Dark.

857
TI Z80 / Light
« on: October 17, 2010, 10:40:42 pm »
So I was thinking of making a new game, based around a single gameplay mechanic: light and shadows.
I was planning on making a rogue-like game (where you descend endlessly down a randomly generated dungeon, finding treasures, killing monsters, and avoiding traps and whatnot).
I decided that it would be cool to add light and shadow to the game, so that it's like you're in a DARK dungeon, emanating light (and it's scary - what could be lurking around the next corner?)

Sadly, it's extremely slow - this is an Axe assembly program going at full speed on an TI-84+SE, and moving the circle feels like pulling teeth.

Any optimization suggestions, please?
(I'm using a variant of Bresenham's line algorithm, for those interested)

Also: how fast does pxl-Test work?  And the line( command?

Code: [Select]
.LIGHT
Full
DiagnosticOff
Fix 5
Fix 9
Fix 0
ClrDraw
ClrDraw[radians]

[FFFFFFFFFFFFFFFF]->PIC1
[3844828282443800]->PIC2
45->A->B
0->C
sub(MAP)
Pt-On(A-3,B-3,PIC2)
DispGraph
::While 1
If getKey(15)
Goto END
End
getKey(1)-getKey(4)->E
getKey(3)-getKey(2)->D

If D or E
ClrDraw
A+D->A
B+E->B
sub(MAP)
For(C,0,64)
sub(LIN,A,B,96,C)
sub(LIN,A,B,0,C)
End
For(C,1,95)
sub(LIN,A,B,C,64)
sub(LIN,A,B,C,0)
End
Pt-On(A-3,B-3,PIC2)
0->C
DispGraph
:End

::End

Label MAP
For(F,0,7)
For(G,0,1)
Pt-On(G*16,F*8,PIC1)
Pt-On(G*16+72,F*8,PIC1)
End
Pt-On(F*8+16,0,PIC1)
Pt-On(F*8+16,56,PIC1)
End
Pt-Change(16,24,PIC1)
Pt-Change(72,32,PIC1)
For(F,0,1)
For(G,0,1)
Pt-On(F*24+32,G*24+16,PIC1
End
End
Return



Label LIN
If abs(R4-R2)>abs(R3-R1)->U
expr([degrees]R1,[degrees]R2,2)
expr([degrees]R3,[degrees]R4,2)
End
R1>R3->K
abs(R3-R1)->S/2->V
abs(R4-R2)->T
R2<R4*2-1->W
R2->Y
For(Z,R1,abs(R3-R1)+R1)
If K
2*R1-Z->X
Else
Z->X
End
getKey(15)*9+W->W
ReturnIf getKey(15)
If U
If pxl-Test(Y,X)
Line(Y,X,R4,R3)
Return
End
Else
If pxl-Test(X,Y)
Line(X,Y,R3,R4)
Return
End
End

V-T->V
If V>99
Y+W->Y
V+S->V
End
End
Return

Label END
Fix 4

858
General Calculator Help / Re: Program TI-8x
« on: October 17, 2010, 10:14:39 pm »
About the ROM-
I just installed what I think is the latest version of wabbitemu, and it had an option to emulate using open source software.
I think it pulled the ROM from TI's website.
:)

859
Aha!  I tried what you suggested, then investigated a hunch and discovered a fix: the sample programs are compatible with 2.53, but only if it's set on classic mode.
(My emulator defaulted to mathprint mode, which doesn't seem to work very well.)

Also, a question: does the amount of spaces you use matter?
For example, is there a difference between
Code: [Select]
.db t2ByteTok, tAsmCmp
        ld a, 1
or
Code: [Select]
.db t2ByteTok,tAsmCmp
        ld a,1
or
Code: [Select]
.db t2ByteTok ,    tAsmCmp
        ld a,  1
(although the last example is pretty ridiculous)

860
Introduce Yourself! / Re: yo everybody!
« on: October 16, 2010, 03:34:48 pm »
We omnimaga-ians are big on memes.
One such meme is peanuts - it is customary to give various photoshopped versions of peanuts to newcomers (not sure why).
The only other confusing meme I can think of is the 'Whacky Fun Numbar Generator" - it was a program intentionally written to be crappy, therefore everybody treats it as if it were gold.  (Just play along)

Edit: ninja'd

Double edit: Wacky Fun Random Numbar Generator.  I knew I was missing a word.

861
TI Z80 / Re: Axe Minesweeper
« on: October 16, 2010, 02:43:24 pm »
Erm... Yes.

I'm actually browsing on Amazon at this very moment.

862
Hi - I just recently begun your lessons, and I've run into trouble with the first sample problem (Where it displays 1+5)
It doesn't display anything, but quits normally when I press any key.
I have 2.53 OS - does that make a difference?

(I've attached the asm file because I'm probably doing something wrong in it)

863
The Axe Parser Project / Re: Axe Parser
« on: October 14, 2010, 07:58:37 pm »
Sweet.  Problem solved, thanks.

864
The Axe Parser Project / Re: Axe Parser
« on: October 14, 2010, 06:55:31 pm »
Okay, tried that, but nothing happened.  The two numbers aren't switching at all.

865
The Axe Parser Project / Re: Axe Parser
« on: October 14, 2010, 06:51:45 pm »
I don't think I quite have the hang of the Exch( command yet - I'm trying to switch the numbers at variables A and B

Code: [Select]
.TEST
30->A
55->B
ClrHome
Disp A->DEC,B->DEC,i
Exch(A,B,2)
Disp A->DEC,B->DEC,i
Pause 5000

This doesn't work - what am I doing wrong?

(Edited)

866
TI Z80 / Re: Zedd Physics Library
« on: October 13, 2010, 08:06:33 pm »
Ooh - this looks like fun!

867
News / Re: The REAL contest results are in!
« on: October 13, 2010, 12:44:50 am »
If anyone wants a more in-depth review of their entry or how I judged, feel free to ask.

Me please!

868
Miscellaneous / Re: How are those "versions" of programms numbered?
« on: October 12, 2010, 06:30:47 pm »
I ended up doing this:

a.bb.ccc

a is the main number, b is for medium to small updates, and ccc is the compile number.

It's a bit long, though.  I'm probably going to change it.

869
Introduce Yourself! / Re: I introduce myself
« on: October 12, 2010, 06:16:13 pm »
Hello!  Welcome to the forum - your peanuts should be arriving shortly.

Also: blockade?  What's that?

870
Axe / Re: Bluescale
« on: October 12, 2010, 06:11:06 pm »
Woah.  This is very cool.
Alarming at first (from looking at the first video), but if you can control it so you can get actual bluescale, like in the second vid, then this could be really awesome!

Source code please?  (or did I miss it?)

Pages: 1 ... 56 57 [58] 59 60 ... 70