This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Releases => Your Projects
United-TI Archives -> Project Releases
 
    » Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Author Message
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 03:42:24 pm    Post subject:

File Name :: Lightning v2.6
Author :: TheStorm
Category :: Ti-83plus Basic Games
Screenshot ::
Description ::
A basic lightning game where you avoid getting struck by lightning. hope you like it.

Updated Wed, Jun 20 2007 2:24 pm

View File


Last edited by Guest on 20 Jun 2007 06:29:46 pm; edited 1 time in total
Back to top
baorder54
Elite


Active Member


Joined: 25 Nov 2006
Posts: 748

Posted: 18 May 2007 04:01:43 pm    Post subject:

Very easy.
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 04:05:58 pm    Post subject:

How far did you get it gets harder.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 18 May 2007 04:06:12 pm    Post subject:

Very simple, and addicting. You didn't use my blackening method though... Q.Q
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 04:13:03 pm    Post subject:

This was uploaded before you told me that
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 05:08:22 pm    Post subject:

My current version uses a better asm lib so thats not an issue. BTW can I add another screenie somehow?
P.S. Try it you'll soon be addicted, and I bet you can't beat 20.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 18 May 2007 05:20:00 pm    Post subject:

Send one to DarkerLine.

I think you should get lafferjm to add a sprite function to his API, it might speed things up a bit.

I saw a few [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(12,82)
's in there. You should replace them with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]12+int(71rand), and replace [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(0,2) with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]int(3rand), without the parentheses if possible.

I also saw something that looked like this: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]{LLHS(1),LLHS(2.... You could replace this with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]seq(LLHS(Z),Z,1,11→L2, which is much smaller. And replace the following one with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]seq(LLHS(Z),Z,12,22→L3.

These are a few optimizations I see just glancing through, other than the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Text(-1, thing.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 18 May 2007 07:21:35 pm    Post subject:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(12,82 and [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]12+int(71rand are of equal size, so we pick the faster of the two.

Perform a speed test:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]startTmr→T
For(X,0,E4)
randInt(12,82
End
checkTmr(T

Result: 199

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]startTmr→T
For(X,0,E4)
12+int(71rand
End
checkTmr(T

Result: 217

Conclusion: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(12,82 is faster. Replacing [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(0,2 with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]int(3rand is
still a choice optimization, however, as it saves space without much sacrifice.

Last edited by Guest on 15 Jun 2007 02:47:12 am; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 18 May 2007 07:34:04 pm    Post subject:

Weird. Someone at Cemetech found that the combination of [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]int(0 and [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]rand was faster than [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]randInt(.

Memory-wise, my other optimizations still stand.

Last edited by Guest on 18 May 2007 07:34:28 pm; edited 1 time in total
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 09:25:56 pm    Post subject:

Harrierfalcon wrote:
Send one to DarkerLine.

I think you should get lafferjm to add a sprite function to his API, it might speed things up a bit.

I also saw something that looked like this: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]{LLHS(1),LLHS(2....  You could replace this with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]seq(LLHS(Z),Z,1,11→L2, which is much smaller.  And replace the following one with [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]seq(LLHS(Z),Z,12,22→L3.

[post="104503"]<{POST_SNAPBACK}>[/post]

ohh ohh theirs an easier way to do that I didn't know any fast way to do this For( loops were too slow.
And about the sprite thing said he was working on it but he said he wasn't skilled enough.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 18 May 2007 09:41:14 pm    Post subject:

...
.......

PM him this routine:

Code:
xorSprite:
    ld    e,l
    ld    h,$00
    ld    d,h
    add    hl,de
    add    hl,de
    add    hl,hl
    add    hl,hl             ;Find the Y displacement offset
    ld    e,a
    and    $07             ;Find the bit number
    ld    c,a
    srl    e
    srl    e
    srl    e
    add    hl,de           ;Find the X displacement offset
    ld    de,plotsscreen
    add    hl,de
xorSpriteLoop1:
   ld    d,(ix)           ;loads image byte into D
    ld    e,$00
    ld    a,c
    or    a
    jr    z,xorSpriteSkip1
xorSpriteLoop2:
    srl    d                ;rotate to give out smooth moving
    rr    e
    dec    a
    jr    nz,xorSpriteLoop2
xorSpriteSkip1:
    ld    a,(hl)
    xor    d
    ld    (hl),a
    inc    hl
    ld    a,(hl)
    xor    e
    ld    (hl),a            ;copy to buffer using XOR logic
    ld    de,$0B
    add    hl,de
    inc    ix                 ;Set for next byte of image
    djnz    xorSpriteLoop1
    ret
And tell him it's the code for IonPutSprite.

Last edited by Guest on 18 May 2007 09:41:27 pm; edited 1 time in total
Back to top
lafferjm


Member


Joined: 02 Aug 2006
Posts: 169

Posted: 18 May 2007 10:10:08 pm    Post subject:

That might be the code for ionputsprite but i still need to figure out how to read hex data from a string so it can be converted to a sprite to display.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 18 May 2007 10:11:44 pm    Post subject:

Considering there really is only one sprite in his game, you could hard-code the sprite into your API.
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 18 May 2007 10:13:00 pm    Post subject:

Well It looks like I might just wait and learn asm on my own and make it that way.
Back to top
lafferjm


Member


Joined: 02 Aug 2006
Posts: 169

Posted: 18 May 2007 10:15:27 pm    Post subject:

I will do that but the next version will hopefully have a sprite function added.
Back to top
lafferjm


Member


Joined: 02 Aug 2006
Posts: 169

Posted: 18 May 2007 10:46:39 pm    Post subject:

I know you guys will probably be mad because i double posted but oh well. Here is a version of my api TheStorm that has a sprite function in it. The sprite is a man sprite similar to yours but because of the way iputsprite works it had to be 8*8. Just store your x-coordinate to x and your y-coordinate to y. Then just do
Code:
12:Asm(prgmA



http://lafferealm.awardspace.com/A.8xp
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 18 May 2007 11:20:41 pm    Post subject:

Oh well? Warning level increased – you don't throw out the rules just because you feel like lazying around instead of making a simple edit. In signing up at these forums, you obligated yourself to abide by the Terms and Conditions. If you continue to detract from the promise that you have made, then we'll sever our end of the arrangement by discontinuing your membership. Please respect the rules from now on.

Last edited by Guest on 18 May 2007 11:42:29 pm; edited 1 time in total
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 19 May 2007 07:39:24 am    Post subject:

Well my original version is now uploaded to Ticalc ( which I submitted 3 mouths ago) and now I have to wait for the screen shots to be uploaded then wait for all the newer versions to be admitted.

P.S. that highscor program is a subroutine I made for the game but then just integrated it in to lightnin, but any one can use it to add high scores with names to their game.


Last edited by Guest on 19 May 2007 07:55:29 am; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 19 May 2007 07:48:51 am    Post subject:

lafferjm wrote:
I know you guys will probably be mad because i double posted but oh well.  Here is a version of my api TheStorm that has a sprite function in it.  The sprite is a man sprite similar to yours but because of the way iputsprite works it had to be 8*8.  Just store your x-coordinate to x and your y-coordinate to y.  Then just do
Code:
12:Asm(prgmA



http://lafferealm.awardspace.com/A.8xp
[post="104563"]<{POST_SNAPBACK}>[/post]
It doesn't necessarily have to be 8*8. The code I gave you has these inputs:

  • a = X location
  • l = Y location
  • ix → Sprite
  • b = height of the sprite in pixels
.
But because this is an API specific to a game, you should be able to set L as a constant, instead of at an input. And because we're only talking one sprite, you should simply be able to have the X coordinate in Ans.
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 19 May 2007 07:59:47 am    Post subject:

I knew enough about asm to know that but obously he doesn't well I 'll see what I can do. Maybe I should look at other ASM Libs what do you guys think, i was looking at codex if lafferjm needed more experience to finish the api.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 1 of 9 » All times are UTC - 5 Hours

 

Advertisement