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

Pages: 1 ... 8 9 [10] 11 12 13
136
TI Z80 / Re: Breakout clone
« on: November 12, 2010, 11:30:24 am »
number of balls, yes.
Paddle length, not yet.

Block type 10 is having major problems...  :(

137
TI Z80 / Re: Breakout clone
« on: November 12, 2010, 11:02:12 am »
Ok so when score reaches 10000 it increases the second variable? Sounds interesting. I wonder how do you display them? I think I tried such thing before and failed. File size seems pretty nice so far. Keep up the good work and I hope you can solve the issues you are having.
Well thats why it increases the second variable when it hits 10000 instead of 65535 or 60000.
Code: [Select]
:Output(4,0,S>Dec)
:If Q
:Output(0,0,Q>Dec)
:End

I fixed the minor problems and got major. It crashes or just takes far longer than it should when using block 10.

Code: [Select]
:.blocks
:{B-3}->U
:For(D,1,C)                                        //for each block
:D*3+L2->A                                         //get pointer to block info
: If Z+1                                           //every other frame...
:  irrelevant code here
: End
: If the ball hit block D
:  do stuff with the ball's velocity and the score
:  0->F->N->V
:  C->{L2}
:Lbl DX
:  If {A-2}=0 or ({A-2}=8) or ({A-2}=9)            //destruction routines for different blocks
:   ...
:  ElseIf {A-2}=10                                 //start of problem code
:   C*3+L2->D                                      //I need to keep track of the block's info
:   Exch(D-2,A-2,3)                                //so I use Exch
:   C-1->C                                         //to destroy the block
:   For(E,1,C)                                     //for each block
:    E*3+L2->A                                     //get block info
:    If the blocks are close enough
:     N+1->N+({L2}*3)+L2->F                        //pointer to open table space
:     E->{F}                                       //store a link
:    End
:   End                                             //the destruction routines can mess up my links
:   SortD({L2}*3+L2+1,N)                           //so I have to go in order.
:   For(D,1,N)                                     //for each table entry,
:    If {{L2}*3+D+L2}*3+L2-A                       //If it doesnt link to the same block as the last one
:     +A->A                                        //store the link in A
:     V+1->V                                       //tell the destruction routine we need to return
:     sub(DX)                                      //I know it all works at least to here
:    End
:   End
:   0->D                                           //no idea as to which blocks it has & hasn't hittested...
:   ->N                                            //list is empty
:  ElseIf {A-2}<=7
:   ...
:  End
:  If V                                            //If we need to return
:   V-1->V                                         //then we return
:   Return
:  End
: End
:End

138
TI Z80 / Re: Breakout clone
« on: November 12, 2010, 12:40:07 am »
Ok I did a bit of optimization and added a ball cap and two-var scores (now the max score is 655359999).

The file size is: 7914.

I'm having a minor 'Return'ing  problem with the level editor, though. Seems I messed up an somewhere :P

139
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 11:46:04 pm »
I believe doing it that way it possible, but I'm only 80% sure as I've never tried it. :)
Ok then does Unarchive return a pointer? Don't want to throw in an unnecessary GetCalc routine... :/

140
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 11:38:35 pm »
Also: major improvements can be made if I can Copy(xx,Y1,yy) Is this possible? I'm afraid to test it :/
You can not store directly to archive, so that's impossible. :-\

Oh and one more, am I asking too many questions? ???
Nah, it's cool.  The more questions you ask, the more everyone learns. ;D

Whoops. I meant Copy(Y1,xx,yy) :P

141
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 11:30:50 pm »
I really need some answers.

Is !If X-56 also an optimisation?

What if I have compound If statements? I know splitting them up saves speed, but what about space?

Which is smaller? ClearDrawr or StorePic? (my guess is StorePic, but only by up to 5 bytes)

Also: major improvements can be made if I can Copy(xx,Y1,yy) Is this possible? I'm afraid to test it :/

Lastly, should I be using DelVar in my save routine? I do have to overwrite the appvar every time I save...

Oh and one more, am I asking too many questions? ???

Spoiler For Spoiler:
We observe the mentality of pushing you in the right direction and then letting you gain some experience yourself ;) Of course if you are totally lost or if we can give a few more pointers, we'll be happy :)
No thanks. My program uses too many already :P

142
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 07:56:12 pm »
I don't think I'm using that anywhere, just
Code: [Select]
:C*3+L2->E

It's here:

Code: (Axe) [Select]
:      !If rand^5
:P+1→P*3+L4→E
:rand^4→{E-2}
:{A-1}+4→{E-1}
:{A}→{E}
:      End
:C*3+C→E


I have no idea why that didn't cause problems... the second 'C' should've been 'L2'. I was using E as the second parameter for 'Copy('  ???

Ah well.  Back to work.  I guess I have enough to optimize my code sufficiently.

Also, will somebody look at my saving routine to make sure I'm doing that right?

EDIT: does Copy( work with Y1? It would make my load routine lots smaller.

143
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 06:43:24 pm »
Well I gotta do homework... so is somebody gonna do this for me or do I need the experience? :P

144
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 06:32:11 pm »

Code: (Axe) [Select]
:0→F→N→V
Lol forgot about that one :P
And any reason you're doing

Code: (Axe) [Select]
:C*3+C→E
? It's a lot more optimized with

Code: (Axe) [Select]
:C*4→E
I don't think I'm using that anywhere, just
Code: [Select]
:C*3+L2->E

145
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 06:29:01 pm »
well then who wants to optimize some code ;D I don't have any experience in it, and my minor attempts so far have failed dramatically.

I actually have very little data in here. Most of my graphics are Rect(/RectI( commands.

Just a couple tips for anybody who wants to take this on:
  It's mostly uncommented.  All I have are section headers.
  The Output( statement immediately after the second DispGraphr was for debugging, it's what pushed me over the limit :P

any volunteers?

Hmm, let's see.

All If  statements that say something like

Code: (Axe) [Select]
If I=1
can be optimized to

Code: (Axe) [Select]
!If I-1
and it'll save several bytes. (I think there were certain conditions where you couldn't do that, but I don't remember what. They're not important, anyway ;D)

Actually I was thinking about asking if that would be better.
Condition where you can't do that:
  When you're using ElseIfs (at least with my version of Axe)

EDIT: actually, edit out that Output( statement and it will run perfectly, except for the new type of block I was putting in.

146
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 06:22:49 pm »
well then who wants to optimize some code ;D I don't have any experience in it, and my minor attempts so far have failed dramatically.

I actually have very little data in here. Most of my graphics are Rect(/RectI( commands.

Just a couple tips for anybody who wants to take this on:
  It's mostly uncommented.  All I have are section headers.
  The Output( statement immediately after the second DispGraphr was for debugging, it's what pushed me over the limit :P

any volunteers?

EDIT:
Code: [Select]
!If X
...
ElseIf X=1
...
ElseIf X=2
...
End
That throws a ERR: BLOCK.

Also, Rect( doesn't work well with negatives.
Spoiler For upcoming content:
Would be useful for a certain type of block...

And finally, I was pleasantly suprised that this works:
Code: [Select]
If X=0
...
ElseIf X=1
...
Else
...
End

That's a bug that should have been fixed in Axe 0.4.5... What version are you using?

Weird, I would do a backup somewhere like a computer in case, though.

EDIT: By the way what do you mean by bomb blocks being out? Do you mean you will not implement them?

Exactly what I meant... But now I'm having even more problems: I'm getting 'ERR: INVALID' when I try to run it... (no, I'm not trying to run the source :P, and yes, I am using 'Asm('. Isn't there a max program size or something? It isn't 8k, is it?)

If it's more than 8192 bytes, the OS refuses to run it with Asm(.
I'm using 0.4.5 :P

8811, to be exact.
Quote
also, I have exhausted the whole alphabet :(
Are you already using L1?

No, 8811 is the number of bytes that you can run from a shell. With Asm(, you can only run 8192 bytes. Any more and the OS gives you an ERR:INVALID.

I am using L1, L2, and L4, not to mention the buffers...
My program is 8216 running with Asm(

147
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 06:14:25 pm »
Weird, I would do a backup somewhere like a computer in case, though.

EDIT: By the way what do you mean by bomb blocks being out? Do you mean you will not implement them?

Exactly what I meant... But now I'm having even more problems: I'm getting 'ERR: INVALID' when I try to run it... (no, I'm not trying to run the source :P, and yes, I am using 'Asm('. Isn't there a max program size or something? It isn't 8k, is it?)

148
TI Z80 / Re: Breakout clone
« on: November 11, 2010, 05:42:56 pm »
Yeah I think at one point you need to delete the program then compile the source from archive. That said, I can't wait to see what you will come up with in updates.
Actually it wasn't that big, I just had to archive the source before running. Also, I pulled a battery, and for some odd reason it freed up some more ram ??? Probably should have another look at my saving routine... (should I be using delvar?)

Spoiler For future content:
It's not here yet. Check back later.
Spoiler For what I'm working on:
Well I can tell you for certain that bomb blocks are out. Can't say the same for C-4 blocks ;) (the destroyed blocks use their normal destruction routines: 1-hit blocks are destroyed, 3-hit blocks degrade, powerups drop, and C-4 blocks explode) (having a couple problems with cascading explosion, also, I have exhausted the whole alphabet :()

149
KnightOS / Re: KnightOS: Castle
« on: November 11, 2010, 05:20:12 pm »
what about 2 b&w .gifs? It'd then be easy to put them together & get greyscale...

150
Other Calculators / Re: Simple yet useful virus
« on: November 11, 2010, 04:50:48 pm »
lol fun virus ↓↓↓
prgmBETAINST[enter] (ungroup first)
Wait for a bit... you'll know when. Now quick! What's the tenth digit of pi!
Have you noticed ON doesn't help? 2nd + quit?
Spoiler For how to get out:
Sorry, APPS doesn't break it either!
Spoiler For how to really get out:
You have 2 choices:
  1: keep pressing APPS rapidly until you break through, OR
  2: guess the password.
Spoiler For a better way:
 3: type in an erroneous command (any will do), then push quit.
Keep in mind that the asm program is toggles byte $9A99 to know whether to install or uninstall the blocker,
So you'll have to toggle that off before running the virus again.

Pages: 1 ... 8 9 [10] 11 12 13