Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: lookitsan00b on November 07, 2010, 09:08:37 pm

Title: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:08:37 pm
I need ideas.

I have noticed these bugs:
  Occasionally, the ball will pass through a block vertically instead of bouncing off of it.
  The C4 block is somewhat unreliable, and it lags a little.

If you have any idea why this is happening, please tell me.

See readme for version history
Title: Re: Breakout clone
Post by: Deep Toaster on November 07, 2010, 09:11:22 pm
It looks really good! Especially the multi-ball blocks. Not sure about the bug, though. Do you have a screenshot of that?
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:13:45 pm
Actually, yes. the second screenshot, just before it hits the multi-ball blocks. it passes upwards through two blocks...
Title: Re: Breakout clone
Post by: yunhua98 on November 07, 2010, 09:13:52 pm
Very Nice!
maybe you caould add weapons and other powerups?
Title: Re: Breakout clone
Post by: Deep Toaster on November 07, 2010, 09:14:56 pm
Actually, yes. the second screenshot, just before it hits the multi-ball blocks. it passes upwards through two blocks...

Oh, you mean when it hits between two blocks? That's common in a lot of Breakout games. The ball changes direction twice in a row, and it ends up going through.

An idea: Score counter.
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:17:00 pm
weapons? how would I do that? like a laser shot upwards from the center of the paddle? that would be cool, but game-breaking.  
something that catches the ball the next time it hits the paddle? easy, and useful.
Something that makes the paddle wider? would require a bit of work, especially the timer...

Actually having the powerups drop down from the hit block on-screen?... you're kidding, right?

EDIT: that's common? I have it actually set 1->Yv when it hits the bottom of the block. it's somehow just passing through the bottom. the zig-zagging is because I have it set so in the middle of the block, it negates Xv

Hmmm... what would the score be based on?
Title: Re: Breakout clone
Post by: MRide on November 07, 2010, 09:18:09 pm
Wow, this looks great!  Really nice job.

And, maybe for weapons, like bullets shooting out of the paddle.  They wouldn't be continuous.
Title: Re: Breakout clone
Post by: yunhua98 on November 07, 2010, 09:19:19 pm
Idk, I haven't really played many breakout games, only the one a Blackberries.  ;)  IMO this game is good enough as it is, though.  ;)
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:21:20 pm
Idk, I haven't really played many breakout games, only the one a Blackberries.  ;)  IMO this game is good enough as it is, though.  ;)
except, of course, only having one level :P
Title: Re: Breakout clone
Post by: yunhua98 on November 07, 2010, 09:23:16 pm
maybe have it create random levels?
Title: Re: Breakout clone
Post by: Deep Toaster on November 07, 2010, 09:23:32 pm
Hmmm... what would the score be based on?

Something like 10 a hit would work nicely.

And as for powerups, it'd be cool to have features like temporarily making the ball go really fast and hit for twice as much damage. I have seen Breakout games with powerups dropping from the hit block, and that sometimes adds a lot to the game because you have to catch it...
Title: Re: Breakout clone
Post by: TIfanx1999 on November 07, 2010, 09:24:30 pm
This looks really nice! ^^
Actually having the powerups drop down from the hit block on-screen?... you're kidding, right?
Yea, I'm not sure how else you would do it. That's how the break clones that have power ups work. A couple of power-ups I've seen are mulitball, longer paddle, shorter power, or gun(gives you a couple of shots that fire directly upwards and destroy a block on impact)

As for score, different style blocks usually give a different amount of points.
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 07, 2010, 09:26:45 pm
Wow that,s nice. I especially like the multi-ball support. Will there be a faster mode with fewer balls too?
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:28:14 pm
Hmmm... what would the score be based on?

Something like 10 a hit would work nicely.

And as for powerups, it'd be cool to have features like temporarily making the ball go really fast and hit for twice as much damage. I have seen Breakout games with powerups dropping from the hit block, and that sometimes adds a lot to the game because you have to catch it...
Yes, it really does (the power-ups dropping down), but it'd be really interesting to code, I think. 10 a hit might do well. 2x damage... well that could work, but certainly not easy.

maybe have it create random levels?
Actually in one of my earlier versions (I'd say v.40) it did that. But I think for the sake of testing, one constant level works better... also the random levels were 8x8 blocks of blocks, and that lagged with only 1 ball... imagine 2 or 3 :P

EDIT:
This looks really nice! ^^
Actually having the powerups drop down from the hit block on-screen?... you're kidding, right?
Yea, I'm not sure how else you would do it. That's how the break clones that have power ups work. A couple of power-ups I've seen are mulitball, longer paddle, shorter power, or gun(gives you a couple of shots that fire directly upwards and destroy a block on impact)

As for score, different style blocks usually give a different amount of points.
I guess that'd work... but the score counter would look like... what?

Wow that,s nice. I especially like the multi-ball support. Will there be a faster mode with fewer balls too?
I'm not sure what you mean there.  It's running at max speed as is.  If I only allowed for one ball, yes, it would run faster. Or are you saying actually make the ball move twice as fast?
Title: Re: Breakout clone
Post by: Builderboy on November 07, 2010, 09:30:45 pm
But if each block give a certain amount of points, wont the score for every level (READ: After you have hit every single block!) be the same?
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 09:36:38 pm
But if each block give a certain amount of points, wont the score for every level (READ: After you have hit every single block!) be the same?
three words: multipliers.
Multi-ball multiplier
Power-up multiplier
Combo multiplier?

Ok so summary:
  Random levels
  Score counter (no hud for now)
  Power-ups
  and multipliers.
  I'll have it done by this time tomorrow (unless I have any MAJOR problems, you know, probably) :P

I'll also probably decrease the amount the paddle increases in size per ball on screen.
The power-ups and conditions for the multipliers will be the only hard parts :P
Title: Re: Breakout clone
Post by: ztrumpet on November 07, 2010, 10:48:09 pm
That looks wonderful.  Great job lookitsacompetentprogrammer! ;D
Title: Re: Breakout clone
Post by: yunhua98 on November 07, 2010, 10:54:35 pm
lookitsacompetentprogrammer! ;D
yes^  ;)
Title: Re: Breakout clone
Post by: meishe91 on November 07, 2010, 11:20:52 pm
Looking really cool. Can't wait to see more on this.
Title: Re: Breakout clone
Post by: lookitsan00b on November 07, 2010, 11:30:45 pm
I won't keep you waiting ;)

done already:
  paddle length reworked, no longer dependant on # of balls
  power-up framework: done.
  paddle length power-ups fully functional :D

I said it'd be done by tomorrow, didn't I? Time to catch some zzz's, though :P

EDIT: actually, i haven't limited the max paddle length yet... ;)
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 07, 2010, 11:46:17 pm
I can't wait to try this with that many balls at once. Must be wacky fun ;D
Title: Re: Breakout clone
Post by: Deep Toaster on November 07, 2010, 11:52:47 pm
Idea for a level: A level completely made from bricks with balls inside. See how many balls you can fit in one level ;)

EDIT: Did you start working on this today? If so, wow, you work fast :o
Title: Re: Breakout clone
Post by: TIfanx1999 on November 08, 2010, 08:17:55 am
But if each block give a certain amount of points, wont the score for every level (READ: After you have hit every single block!) be the same?

It wouldn't have to be for a couple of reasons:

1. Not all levels would need to have the same number of blocks.
2. Different blocks can have different point values. IE some blocks take multiple hits to destroy and would be worth more points(other clones have done this).
3. Powerups. Power ups could affect point values also. Say for example he added a gun powerup that allowed you 3 free shots, (where if a bullet hits a block it destroys the block) he could make it so that blocks destroyed in this manner did not give points since they are essentially freebies.

Just some thoughts anyways. =)
Title: Re: Breakout clone
Post by: lookitsan00b on November 08, 2010, 05:29:24 pm
ok new in v.70:
  power-up block: looks just like a normal 1-hit block, but drops a pre-determined power up
  power-ups:
    paddle elongator
    paddle shrinker
    3x multiplier (lasts 300 frames)
    pass-through ball (lasts 100 frames)
  SCORES!!!
  combo multiplier (hit three blocks within 10 frames, 4 within 20, etc., for a 2x multiplier)
  Levels are once again random.
  A somewhat mediocre teacher key.

What do you think? should the power-ups be random? should I use different icons for each power-up?

Attached to first post:
  new screenie
  modified game and source
Title: Re: Breakout clone
Post by: meishe91 on November 08, 2010, 05:32:33 pm
But if each block give a certain amount of points, wont the score for every level (READ: After you have hit every single block!) be the same?

It wouldn't have to be for a couple of reasons:

1. Not all levels would need to have the same number of blocks.
2. Different blocks can have different point values. IE some blocks take multiple hits to destroy and would be worth more points(other clones have done this).
3. Powerups. Power ups could affect point values also. Say for example he added a gun powerup that allowed you 3 free shots, (where if a bullet hits a block it destroys the block) he could make it so that blocks destroyed in this manner did not give points since they are essentially freebies.

Just some thoughts anyways. =)

Well what I think he was saying is that for any given level if a certain type of block has a certain point amount assigned to it then every time you beat that level you'll have exactly the same points. That's when the idea of multipliers and such came in from lookitsan00b. Builder was just saying there wouldn't be much of a point system if each time it was the same number each time you beat the same level.
Title: Re: Breakout clone
Post by: lookitsan00b on November 08, 2010, 05:39:57 pm
okay the point system works as follows:

every time you grab a power up, 10*M+S->S

Every time you hit a block, 10*M+S->S

M is 1 + combo_multiplier + 2*Multiplier_power_ups_recently

combo multiplier is either 0 or 1.  every time you hit a block, T+20->T, and every frame, T-(T=/=1)->T.
  The multiplier is active if T gets above 40 and has not since hit 0.

The power-ups just last 300 frames, and reset the timer every time you grab another, however, the multipliers do add together.
  Note: they share a timer with the pass-through-ball. This means that grabbing one will set your multiplier timer to 100.
Title: Re: Breakout clone
Post by: ztrumpet on November 08, 2010, 08:21:32 pm
Nice job on this version. :)  I think it would be helpful to have multiple images for the falling power ups so you can know which is which. ;D
Title: Re: Breakout clone
Post by: TIfanx1999 on November 08, 2010, 08:32:23 pm
What do you think? should the power-ups be random? should I use different icons for each power-up?
Great job on this, and in my opinion, yes and yes. :D
Title: Re: Breakout clone
Post by: Deep Toaster on November 08, 2010, 08:46:22 pm
Powerups look great! Why did it seem to go blank somewhere in the third screenie, though?
Title: Re: Breakout clone
Post by: lookitsan00b on November 08, 2010, 09:03:31 pm
Quote
Powerups look great! Why did it seem to go blank somewhere in the third screenie, though?
lol thats the teacher key. ALPHA, in case anybody was wondering. It clears the screen in emergency situations, for example, your math teacher walks by...

What do you think? should the power-ups be random? should I use different icons for each power-up?
Great job on this, and in my opinion, yes and yes. :D
Nice job on this version. :)  I think it would be helpful to have multiple images for the falling power ups so you can know which is which. ;D

How is this? (I wonder as to the cause of the powerups falling through the paddle...)

Title: Re: Breakout clone
Post by: MRide on November 08, 2010, 09:08:38 pm
Nice.  That looks really, really, good.  This will definitely be on my to-download list when it's finished.
Title: Re: Breakout clone
Post by: ztrumpet on November 08, 2010, 09:24:31 pm
I think that looks fine. :)

This will definitely be on my to-download list when it's finished.
Me too.  In fact, I think it's better than Ping. ;D
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 08, 2010, 11:27:57 pm
Wow looks great! I'll download the new version now. :)

EDIT: Awesome game! However, I was bored and this is what happened ;D
Title: Re: Breakout clone
Post by: TIfanx1999 on November 09, 2010, 09:43:04 am
As the others said, looks great. ^^
Title: Re: Breakout clone
Post by: JustCause on November 09, 2010, 09:58:12 am
*bookmarks* Looks great! "Bomb" blocks (that destroy blocks near them, even if they're normally unbreakable) shouldn't be too hard to implement...haven't seen your code tho, so I don't know. We're all behind you!
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 09, 2010, 12:19:23 pm
Btw question: why does the paddle move this fast when there are many balls at once? Or is it just in 15 MHz mode (like I added to create this screenshot)
Title: Re: Breakout clone
Post by: Builderboy on November 09, 2010, 03:48:11 pm
Huh thats strange, maybe he added some sort of speed control so that when the game starts to lag (as you can see by the greyscale) the paddle moves faster to try to make it look like the same speed.
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 09, 2010, 05:23:46 pm
Yeah that's what I though. Maybe in 15 MHz it lags much less and it causes the paddle to go extremly fast when the game would start to lag in 6 MHz mode. I'll have to try it without adding full to see.
Title: Re: Breakout clone
Post by: lookitsan00b on November 09, 2010, 07:43:38 pm
Wow looks great! I'll download the new version now. :)

EDIT: Awesome game! However, I was bored and this is what happened ;D
lol that should be much easier on you now ;)

Btw question: why does the paddle move this fast when there are many balls at once? Or is it just in 15 MHz mode (like I added to create this screenshot)

Actually, neither.  I figured with many balls on the screen it'd be harder to keep them all on, so I made paddle_speed = 1 + Number_of_balls to compensate.  Now that I think about it, a cap would be nice.

Spoiler For Spoiler:
New in V.85:
  Readme
  Menu
  Level Editor :D
  No more bug with powerups falling through when the paddle is on the far left side of the screen
*bookmarks* Looks great! "Bomb" blocks (that destroy blocks near them, even if they're normally unbreakable) shouldn't be too hard to implement...haven't seen your code tho, so I don't know. We're all behind you!
The first time I read this I was almost laughing... then I realized that it really wouldn't be that hard...
It's certainly a possibility.
The question is: I have blocks 0-7. Should I cap it at 9, or find more keys/another control scheme for the editor?
Title: Re: Breakout clone
Post by: MRide on November 09, 2010, 09:16:39 pm
Bomb blocks would be cool.  For the editor, you could always go with the Mario style one: scroll through the different types with two keys, or select the block from a list
Title: Re: Breakout clone
Post by: lookitsan00b on November 09, 2010, 10:16:32 pm
Bomb blocks would be cool.  For the editor, you could always go with the Mario style one: scroll through the different types with two keys, or select the block from a list
When I said "another control scheme", that is exactly what I had in mind. ;)
Title: Re: Breakout clone
Post by: Darl181 on November 10, 2010, 01:31:44 am
Great game, but it starts kind of slow (at least for me)
Are difficulty levels/speeds planned?
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 10, 2010, 02:52:15 am
Wow looks great! I'll download the new version now. :)

EDIT: Awesome game! However, I was bored and this is what happened ;D
lol that should be much easier on you now ;)

Btw question: why does the paddle move this fast when there are many balls at once? Or is it just in 15 MHz mode (like I added to create this screenshot)

Actually, neither.  I figured with many balls on the screen it'd be harder to keep them all on, so I made paddle_speed = 1 + Number_of_balls to compensate.  Now that I think about it, a cap would be nice.

Spoiler For Spoiler:
New in V.85:
  Readme
  Menu
  Level Editor :D
  No more bug with powerups falling through when the paddle is on the far left side of the screen
*bookmarks* Looks great! "Bomb" blocks (that destroy blocks near them, even if they're normally unbreakable) shouldn't be too hard to implement...haven't seen your code tho, so I don't know. We're all behind you!
The first time I read this I was almost laughing... then I realized that it really wouldn't be that hard...
It's certainly a possibility.
The question is: I have blocks 0-7. Should I cap it at 9, or find more keys/another control scheme for the editor?
capping it at 9 would be fine, although I guess you could maybe change the control scheme and have people just select the block they want to insert. By the way what will be the max rows of blocks in a level?
Title: Re: Breakout clone
Post by: lookitsan00b on November 10, 2010, 04:10:19 pm
capping it at 9 would be fine, although I guess you could maybe change the control scheme and have people just select the block they want to insert. By the way what will be the max rows of blocks in a level?
For the max paddle movement: I chose 5.
Max rows: 14. :P

Spoiler For No don't look!:
Spoiler For I told you not to look!:
Spoiler For what you'll get if you look again:
New in v.95:
  level save, load for both edit and play
  changed controls for editor
  limited paddle speed to 5
  decreased lag
  added Endless mode!

Wow looks great! I'll download the new version now. :)

EDIT: Awesome game! However, I was bored and this is what happened ;D
This inspired the level in screenieV.95 ;)  (which, if you haven't looked, is on the first post, I've been editing that one and keeping it up to date)
That is as much lag as I could possibly cause with the new & partially improved main loop :D
Title: Re: Breakout clone
Post by: Darl181 on November 10, 2010, 06:38:28 pm
Looks great, it's on my calc now :)
Idea: ability to pause.
Nvm, just read the readme :P
I should probably do that first...
Title: Re: Breakout clone
Post by: lookitsan00b on November 10, 2010, 11:23:51 pm
Four things I've learned about Axe from this project:

Code: [Select]
0->{A-3}->{A-2}
fails, as does
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

The first stumped me for quite a while :P I was optimising and suddenly the game would only display the first frame...
All better now :D
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 11, 2010, 01:45:21 am
Woah! I just saw the new screenshot and it looks even better! It's sure gonna be fun to create levels. ;D
Title: Re: Breakout clone
Post by: Darl181 on November 11, 2010, 02:03:40 am
I spent about half an hour in endless mode.
A few limits might help to keep the game challenging and interesting.

1) Paddle width--after a while it was wider than the screen, so you could just leave it and/or watch the score increase ;D
2) # of balls limit--there were about 20 by the time I got tired of it
3) some way to keep track of the score if it goes over 65535.  It looped six or seven times :P
Code: [Select]
Disp <Score>,i,"65535 times ",<Var>  With <var> incrementing by 1 each 65535 or something. 
Title: Re: Breakout clone
Post by: lookitsan00b on November 11, 2010, 08:50:35 am
I spent about half an hour in endless mode.
A few limits might help to keep the game challenging and interesting.

1) Paddle width--after a while it was wider than the screen, so you could just leave it and/or watch the score increase ;D
2) # of balls limit--there were about 20 by the time I got tired of it
3) some way to keep track of the score if it goes over 65535.  It looped six or seven times :P
Code: [Select]
Disp <Score>,i,"65535 times ",<Var>  With <var> incrementing by 1 each 65535 or something. 
...Whoa.  I never really expected it to be possible to make it loop... I'll probably think of something. (like using one variable for the lower 4 digits and another for the upper, max 655,359,990)  I thought the paddle-size power-downs would make up for the lack of a cap... they seem far more common than their happy counterparts to me. :P

Lol I just found a bug that existed since v.50(and before) :D
 Whenever I deleted something, I just copy the last item in the list over the one that got deleted.
 I just realized that the item that gets copied doesn't get hittested, etc. (whatever the loop is for)
 Just 3 more increments in the whole thing, probably amounts to, at most, 9 bytes :)
 (I've been having really big problems with size recently... can't fit both the source and the program in ram at the same time)
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 11, 2010, 05:29:48 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.
Title: Re: Breakout clone
Post by: lookitsan00b 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 :()
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 11, 2010, 05:53:51 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?
Title: Re: Breakout clone
Post by: lookitsan00b 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?)
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 11, 2010, 06:16:32 pm
8 KB for the executable code. That excludes the data included in the executable. For Flash APPs it's 16 KB for both the code and data included inside it.
Title: Re: Breakout clone
Post by: Deep Toaster on November 11, 2010, 06:17:02 pm
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(.
Title: Re: Breakout clone
Post by: Darl181 on November 11, 2010, 06:19:41 pm
8811, to be exact, if it's compiled for a shell.
Quote
also, I have exhausted the whole alphabet :(
Are you already using L1?
Title: Re: Breakout clone
Post by: Deep Toaster on November 11, 2010, 06:20:30 pm
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.
Title: Re: Breakout clone
Post by: lookitsan00b 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(
Title: Re: Breakout clone
Post by: Deep Toaster on November 11, 2010, 06:27:08 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)
Title: Re: Breakout clone
Post by: lookitsan00b 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.
Title: Re: Breakout clone
Post by: Deep Toaster on November 11, 2010, 06:30:35 pm
More:

Code: (Axe) [Select]
:0→F
:0→N
:0→V

can be optimized into

Code: (Axe) [Select]
:0→F→N→V
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
Saves 7 bytes, in fact.
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: Deep Toaster on November 11, 2010, 06:36:34 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

Also, take advantage of the last calculated value. In other words,

Code: (Axe) [Select]
:If {B}-{A}≥≥‾1 and (K≠1)
:1→{B-2}

can be optimized to

Code: (Axe) [Select]
:If {B}-{A}≥≥‾1 and (K≠1)
:→{B-2}

because the If  statement results in 1 if it's true, anyway.

(Also, the If  statement can be optimized again by doing {B}-{A}+1≥≥0 instead of {B}-{A}≥≥‾1.)
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: Builderboy on November 11, 2010, 07:07:10 pm
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 :)
Title: Re: Breakout clone
Post by: lookitsan00b 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.
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: ztrumpet on November 11, 2010, 11:35:23 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
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: ztrumpet on November 11, 2010, 11:39:20 pm
I believe doing it that way it possible, but I'm only 80% sure as I've never tried it. :)
Title: Re: Breakout clone
Post by: lookitsan00b 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... :/
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 12, 2010, 03:54:01 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.
Title: Re: Breakout clone
Post by: squidgetx on November 12, 2010, 07:11:23 am
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

lol...and nice job on the 32bit numbers...I hate trying to code 32 bit numbers >.<
Title: Re: Breakout clone
Post by: lookitsan00b 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
Title: Re: Breakout clone
Post by: Darl181 on November 12, 2010, 11:13:14 am
Oh and one more, am I asking too many questions? ???
Nah, it's cool.  The more questions you ask, the more everyone learns. ;D
True, I didn't make the connection about the difference of a number for !If .

Also, nice to hear about the looping ;D
Has the paddle length and number of balls been taken care of as well?
Title: Re: Breakout clone
Post by: lookitsan00b on November 12, 2010, 11:30:24 am
number of balls, yes.
Paddle length, not yet.

Block type 10 is having major problems...  :(
Title: Re: Breakout clone
Post by: Darl181 on November 12, 2010, 11:37:47 am
Quote
Block type 10 is having major problems...  :(
What will that be? The C4/chain reaction block?
Title: Re: Breakout clone
Post by: lookitsan00b on November 12, 2010, 11:45:26 am
yup. it just crashes my calc when it tries to return...
Title: Re: Breakout clone
Post by: Deep Toaster on November 12, 2010, 01:51:34 pm
I really need some answers.

Is !If X-56 also an optimisation?

Yes, it is. If you want to quickly check if something's an optimization, just compare the before-and-after sizes of the exec :)

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

Same amount of space in many circumstances. That's kinda how they work anyway.

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

Nope, creating a var overwrites it anyway.

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

XD
Title: Re: Breakout clone
Post by: Darl181 on November 12, 2010, 02:11:13 pm
I spent about half an hour in endless mode.
A few limits might help to keep the game challenging and interesting.

1) Paddle width--after a while it was wider than the screen, so you could just leave it and/or watch the score increase ;D
2) # of balls limit--there were about 20 by the time I got tired of it
3) some way to keep track of the score if it goes over 65535.  It looped six or seven times :P
Code: [Select]
Disp <Score>,i,"65535 times ",<Var>  With <var> incrementing by 1 each 65535 or something. 
I kind of replicated it, but didn't get nearly as far this time :P
video (it was too big) (http://www.mediafire.com/?dwgfqyuudq5mrqr)
Title: Re: Breakout clone
Post by: lookitsan00b on November 12, 2010, 04:51:14 pm
yup. it just crashes my calc when it tries to return...
I think I have an idea what the problem is.  I noticed that when the ball just barely clips the corner of the block, it doesn't cause problems. So I think it may be having trouble deleting the C4 block.
Title: Re: Breakout clone
Post by: ztrumpet on November 12, 2010, 07:33:58 pm
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
That's a great idea!  I've been wondering how to do this. :D  Thanks. ;D
Title: Re: Breakout clone
Post by: lookitsan00b on November 12, 2010, 10:34:30 pm
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
That's a great idea!  I've been wondering how to do this. :D  Thanks. ;D
Lol I found a minor problem with that code. take 10010 for example. It'll output
1  10
so a minor modification:
Code: [Select]
:Output(4,0,Q=/=0*10000+S>Dec)
:If Q
:Output(0,0,Q>Dec)
:End
Adding 10000 forces it to display all the zeros :D

Feel free to use it wherever you want ;)
Title: Re: Breakout clone
Post by: lookitsan00b on November 12, 2010, 11:58:21 pm
:) ;) :D ;D :) ;) :D ;D ;D :D ;) :) ;D :D ;) :)
:o
Spoiler For translation:
Well, after an epiphany, a blue screen of death, and a good half-hour's work, I have C4 mostly working!!! :) :) :) :) :)

Two things left:
  It often misses a couple blocks.
  When the only block on-screen is a C4 block, hitting it acts just as though I had thrown in a 'Pause 400'...

And yes, blue screen of death on a calculator :P
Title: Re: Breakout clone
Post by: Darl181 on November 13, 2010, 01:03:23 am
You got the really blue screen?  What effect were you trying?
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 13, 2010, 03:04:12 am
Glad to hear it's working. :)

@Darl181 I think he means test mode blue screen. The one that can damage the screen if left like that for a minute.
Title: Re: Breakout clone
Post by: lookitsan00b on November 13, 2010, 08:33:05 am
Glad to hear it's working. :)

@Darl181 I think he means test mode blue screen. The one that can damage the screen if left like that for a minute.
Well actually I'm not sure. The game exited to the os.  I pushed enter, and the whole screen became an almost-blue black.  I've never actually seen the test mode, so that might've been just contrast 64, but I was gonna pull the battery either way.

Well the problem was mostly that my inner and outer loop variables were the same.  Whenever a block was destroyed, I decremented D. That's not really the problem, though, because that'll just repeat that block, and I have protections against that. The problem is immediately AFTER my inner loop.  I set D to zero!  That tells it to repeat EVERYTHING!!!  And that most likely includes the C4 block that just got destroyed...
Endless loop. :P
Title: Re: Breakout clone
Post by: aeTIos on November 13, 2010, 08:37:16 am
Thats the only thing you can do.
contrast 64 doesnt exist, but it is contr63+ every pixel is on

BTW, MSD8X can cause it, too. I had it 2 weeks ago, was shocked, and pulled a battery after 2,5 seconds of being confused :D :D :D :D :D :D :D :D :D :D :D ;D ;D ;D ;D ;D ;D

Title: Re: Breakout clone
Post by: lookitsan00b on November 13, 2010, 08:50:32 am
63, 64, same thing :P
It was a solid screen. The blue might've been an illusion...
Either way, the problem there was I forgot to remove a set of curly braces ({}) (: :)

EDIT: what is MSD8x?
Title: Re: Breakout clone
Post by: aeTIos on November 13, 2010, 08:55:11 am
It's not an illusion, you can make it by setting contrast to 9 and then start impossible game or so, with a black background.
to know more, check the 'Bluescale' topic
WARNING: Don't use bluescale too long (max. 5 seconds) , either it will damage your screen or destroy your calc
(not a joke)
Title: Re: Breakout clone
Post by: lookitsan00b on November 13, 2010, 09:02:42 am
Yes, I understand the seriousness, but I do think 5 seconds is a little harsh... do you know anybody who tried it?

Also, the whole screen was completely uniform. I heard that test mode has horizontal lines...
Title: Re: Breakout clone
Post by: aeTIos on November 13, 2010, 09:07:04 am
I said 5 seconds, because thats absolutely safe, I dont want you to brick your calc because you tried something that I said, understand?
I tried it myself, btw.
link to bluescale topic: http://ourl.ca/7397/127481

Edit: 1 Post to go- then LV4 !
Title: Re: Breakout clone
Post by: lookitsan00b on November 13, 2010, 02:40:44 pm
Spoiler For hoo wantz dem updateses? ;D:
New in v 0.97:
  moving and C4 blocks (the C4 is still a little unreliable, but completely stable)
  slightly decreased program size, I'll eventually want to put the editor in its own program.
  limited paddle size to half the screen, I'm thinking of this as a temporary fix.
  limited number of balls to 10 (or 11, I'll have to check my code), same here.
  Fixed a couple bugs:
    no more random blocks in random level or endless modes. (I mean, outstandingly random)
    the score no longer loops when it hits 65536. Now the magic number is 655360000.
  Known bugs:
    as I said before, the C4 is a little unreliable, it occasionally won't destroy everything it should.
    when you hit a C4 block with nothing around it it seems to freeze for a couple milliseconds. note that this is temporary, and I doubt any of you could pull out a battery that fast anyways :P
  also, a brand-new, fresh off the press readme! (ok, not all of it, just the editor controls, known bugs, and update notes...)

EDIT: the scrolling and C4 blocks don't get used in the random level or endless modes, only custom levels

Beat this :P :
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 14, 2010, 04:36:25 am
Aw you limited the amount of balls :(. I loved having OVER 9000 on the screen. J/k, but is it because of memory limitations? It seemed to run pretty fine with like 30 at once. ??? It was just hard to keep them all in the screen. :P

I'll try this when I get some time. :)
Title: Re: Breakout clone
Post by: Darl181 on November 14, 2010, 03:19:37 pm
I don't know how it worked, but something i did made the screen turn blue, but I can't remember what it was...

EDIT....
here it is

Code: [Select]
Repeat 1=2
If getKey=15
Goto E
End
-1→B
62→A
Repeat A>62
Shade(A)
A+B→A
If A<1
-B→B
End
End
End
Lbl E
Shade(47)

Remember that?  I think I still have that program :P

Glad to hear it's working. :)

@Darl181 I think he means test mode blue screen. The one that can damage the screen if left like that for a minute.
What I don't get is the "test mode" part.  Is this something TIOS does?

Also, great to see the update ;D

Quote
Beat this :P :
Hmm, how long did that take?

OK, downloaded and sent to calc.
Title: Re: Breakout clone
Post by: Deep Toaster on November 14, 2010, 05:10:39 pm
Spoiler For hoo wantz dem updateses? ;D:
New in v 0.97:
  moving and C4 blocks (the C4 is still a little unreliable, but completely stable)
  slightly decreased program size, I'll eventually want to put the editor in its own program.
  limited paddle size to half the screen, I'm thinking of this as a temporary fix.
  limited number of balls to 10 (or 11, I'll have to check my code), same here.
  Fixed a couple bugs:
    no more random blocks in random level or endless modes. (I mean, outstandingly random)
    the score no longer loops when it hits 65536. Now the magic number is 655360000.
  Known bugs:
    as I said before, the C4 is a little unreliable, it occasionally won't destroy everything it should.
    when you hit a C4 block with nothing around it it seems to freeze for a couple milliseconds. note that this is temporary, and I doubt any of you could pull out a battery that fast anyways :P
  also, a brand-new, fresh off the press readme! (ok, not all of it, just the editor controls, known bugs, and update notes...)

EDIT: the scrolling and C4 blocks don't get used in the random level or endless modes, only custom levels

Beat this :P :

Nice! You must be enjoying debugging a lot ;)
Title: Re: Breakout clone
Post by: Darl181 on November 14, 2010, 06:12:38 pm
/me forgot to check the readme again
So, 2nd and the number... now I know :P

Oh, and I got 610980.  Tip: don't try to play in a poorly lit room and try to record it with a digital camera at the same time, playing it by watching the camera screen.
Title: Re: Breakout clone
Post by: lookitsan00b on November 14, 2010, 08:57:49 pm
Aw you limited the amount of balls :(. I loved having OVER 9000 on the screen. J/k, but is it because of memory limitations? It seemed to run pretty fine with like 30 at once. ??? It was just hard to keep them all in the screen. :P

I'll try this when I get some time. :)
Memory limitations? A ball takes up 4 bytes in memory. I have them stuck one on top of another in L1 how many balls can I have then? :P (EDIT: ran the numbers, I can have 178 at a time ;))
It was because it got far too easy in endless mode if you had 50 balls on screen :P
As I said, I consider it a temporary measure. I fully intend to remove the cap eventually ;)
I don't know how it worked, but something i did made the screen turn blue, but I can't remember what it was...

EDIT....
here it is

Code: [Select]
Repeat 1=2
If getKey=15
Goto E
End
-1→B
62→A
Repeat A>62
Shade(A)
A+B→A
If A<1
-B→B
End
End
End
Lbl E
Shade(47)

Remember that?  I think I still have that program :P
No the problem was writing to random bytes in ram then returning to TI-OS. ;D
It was just contrast 63, though. Looks a little purple, and I've never seen my calc do blue. Made me think it might be the infamous test mode :P


Glad to hear it's working. :)

@Darl181 I think he means test mode blue screen. The one that can damage the screen if left like that for a minute.
What I don't get is the "test mode" part.  Is this something TIOS does?
No. It's a particular mode of the lcd driver that puts lots of random blue lines on the screen and potentially (i'm pretty sure it's unconfirmed) damages your screen.

Also, great to see the update ;D

Quote
Beat this :P :
Hmm, how long did that take?

OK, downloaded and sent to calc.
... I wasn't really watching the time. I paused a couple times in the middle, and all I really know is that I ended up with that number at the end of the school day.
Spoiler For hoo wantz dem updateses? ;D:
New in v 0.97:
  moving and C4 blocks (the C4 is still a little unreliable, but completely stable)
  slightly decreased program size, I'll eventually want to put the editor in its own program.
  limited paddle size to half the screen, I'm thinking of this as a temporary fix.
  limited number of balls to 10 (or 11, I'll have to check my code), same here.
  Fixed a couple bugs:
    no more random blocks in random level or endless modes. (I mean, outstandingly random)
    the score no longer loops when it hits 65536. Now the magic number is 655360000.
  Known bugs:
    as I said before, the C4 is a little unreliable, it occasionally won't destroy everything it should.
    when you hit a C4 block with nothing around it it seems to freeze for a couple milliseconds. note that this is temporary, and I doubt any of you could pull out a battery that fast anyways :P
  also, a brand-new, fresh off the press readme! (ok, not all of it, just the editor controls, known bugs, and update notes...)

EDIT: the scrolling and C4 blocks don't get used in the random level or endless modes, only custom levels

Beat this :P :

Nice! You must be enjoying debugging a lot ;)
I don't really enjoy debugging, just finding the bugs :P

/me forgot to check the readme again
So, 2nd and the number... now I know :P

Oh, and I got 610980.  Tip: don't try to play in a poorly lit room and try to record it with a digital camera at the same time, playing it by watching the camera screen.
Wow that's a big number... a 20 bit number to be exact
My system supports 29.3 bits. try using all of them :P (jk)


Also, anybody who has messed with the teacher keys recently will have noticed that the cursor blinks too fast in this version, will be fixed in the next.  Also, I've modified the blank-screen one since to set the contrast to 0, thus making the lcd look like it is off.  Also, the contrast sets itself to 45 when you exit that mode, which I find to be a decent number.  If you don't like that, please tell me :P (note, for those of you inexperienced in axe/asm, reading the contrast value is not possible, so no maintaining it, sry) (at least not in axe without hex codes)
Also, I have the C4 blocks working slightly more consistently, and I think I have the lag issue resolved. Still a bit inconsistent, though.
Title: Re: Breakout clone
Post by: Darl181 on November 14, 2010, 09:19:52 pm
So many smileys...
So, I'll need to clarify this, because it isn't working.  To select a different block in the level editor, you hold 2nd and press the number while it's held down, right?  If that's the case, it isn't working.

After the score gets to the max, it just loops I guess?

And for the teacher key contrast thing, I've found from playing Simul that changing the contrast once you're back in TIOS restores it to what it was before.
Title: Re: Breakout clone
Post by: Runer112 on November 14, 2010, 09:43:58 pm
Also, the contrast sets itself to 45 when you exit that mode, which I find to be a decent number.  If you don't like that, please tell me :P (note, for those of you inexperienced in axe/asm, reading the contrast value is not possible, so no maintaining it, sry) (at least not in axe without hex codes)

It's actually very simple to return the contrast to the value it was previously set to, without any need for assembly. To change the contrast value to what the user had it set to:

Code: [Select]
Shade({ᴇ8447}ʳ+24)
Title: Re: Breakout clone
Post by: lookitsan00b on November 14, 2010, 09:55:19 pm
So many smileys...
So, I'll need to clarify this, because it isn't working.  To select a different block in the level editor, you hold 2nd and press the number while it's held down, right?  If that's the case, it isn't working.

After the score gets to the max, it just loops I guess?

And for the teacher key contrast thing, I've found from playing Simul that changing the contrast once you're back in TIOS restores it to what it was before.
Okay sorry if I was a little unclear, but how would you select C4 block (#10) with that control scheme?
No, you hold 2nd and use the up and down arrows.
*looks back at the readme   EDIT: *edits the readme
Also, yep, when (and if) you manage to hit 655360000, it does loop.  Note that that is 600 million, in increments of 10.

Also, the contrast sets itself to 45 when you exit that mode, which I find to be a decent number.  If you don't like that, please tell me :P (note, for those of you inexperienced in axe/asm, reading the contrast value is not possible, so no maintaining it, sry) (at least not in axe without hex codes)


It's actually very simple to return the contrast to the value it was previously set to, without any need for assembly. To change the contrast value to what the user had it set to:

Code: [Select]
Shade({ᴇ8447}ʳ+24)
Wow I forgot that the OS saved your previous contrast setting, thanks! :)
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 15, 2010, 02:11:32 am
The test mode sends an overly high amount of energy to the LCD which causes it to turn blue, and it can damage the screen. I don't know why this was included.
Aw you limited the amount of balls :(. I loved having OVER 9000 on the screen. J/k, but is it because of memory limitations? It seemed to run pretty fine with like 30 at once. ??? It was just hard to keep them all in the screen. :P

I'll try this when I get some time. :)
Memory limitations? A ball takes up 4 bytes in memory. I have them stuck one on top of another in L1 how many balls can I have then? :P (EDIT: ran the numbers, I can have 178 at a time ;))
It was because it got far too easy in endless mode if you had 50 balls on screen :P
As I said, I consider it a temporary measure. I fully intend to remove the cap eventually ;)
Ah cool to hear. I like intense stuff a lot. :P

Btw I love the endless mode. Maybe there could be an endless mode where additional ball blocks are more frequent but it scrolls down 4 times faster? ;D
Title: Re: Breakout clone
Post by: AngelFish on November 15, 2010, 02:29:40 am
The test mode sends an overly high amount of energy to the LCD which causes it to turn blue, and it can damage the screen. I don't know why this was included.

It's probably how they test the drivers in the production factory.
Title: Re: Breakout clone
Post by: lookitsan00b on November 15, 2010, 04:46:33 pm
Well, I've hit the wall. (figuratively :P)
There's like no way I can add more to this and stay under the 8kb limit, so I'm going to take away so I can add more.
I've got the editor fully functional (I think) in a separate program. Question is, is it possible to make my "play" button still work? Or even launch the editor from the main menu? (main menu -> editor shouldn't be too hard, but the play button will certainly give me problems...)

The test mode sends an overly high amount of energy to the LCD which causes it to turn blue, and it can damage the screen. I don't know why this was included.
Aw you limited the amount of balls :(. I loved having OVER 9000 on the screen. J/k, but is it because of memory limitations? It seemed to run pretty fine with like 30 at once. ??? It was just hard to keep them all in the screen. :P

I'll try this when I get some time. :)
Memory limitations? A ball takes up 4 bytes in memory. I have them stuck one on top of another in L1 how many balls can I have then? :P (EDIT: ran the numbers, I can have 178 at a time ;))
It was because it got far too easy in endless mode if you had 50 balls on screen :P
As I said, I consider it a temporary measure. I fully intend to remove the cap eventually ;)
Ah cool to hear. I like intense stuff a lot. :P

Btw I love the endless mode. Maybe there could be an endless mode where additional ball blocks are more frequent but it scrolls down 4 times faster? ;D

I have to delete the editor from the main program. Then I can add that... btw, should it be "Epic mode" or "Extreme mode"?  :P

The test mode sends an overly high amount of energy to the LCD which causes it to turn blue, and it can damage the screen. I don't know why this was included.

It's probably how they test the drivers in the production factory.

Na. They eventually plan to form a SWAT team armed with flash drives and fry the lcd's out of all the calculators running 3rd party OS'es :P That's why I'm waiting on developing mine ::)
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 15, 2010, 08:00:29 pm
I think the editor should be separate. Some people may not want to create levels and will prefer a smaller file in that case. I don't think the play button will work, though.
Title: Re: Breakout clone
Post by: Builderboy on November 15, 2010, 08:24:26 pm
You could always make it an app if you wanted, you get double the file size that way ^^
Title: Re: Breakout clone
Post by: lookitsan00b on November 15, 2010, 09:31:50 pm
You could always make it an app if you wanted, you get double the file size that way ^^

I've never worked with apps before. I have no idea what I can/can't do from one... etc. Never really looked into it. I don't even know how to compile to an app with Axe...
Title: Re: Breakout clone
Post by: Builderboy on November 15, 2010, 09:38:03 pm
Its easy :) Just go to options, and select Application under 'shell'.  The only difference between apps and programs is you can't modify any data that you create in your program.  ie: you cant do this:

Code: [Select]
[000102030405]->Str1
9->{Str1+5}  //cant do that!

you have to do this instead

Code: [Select]
[000102030405]->Str1
Copy(Str1,L1,6)  //copy it to some free ram, but you cant copy back
9->{L1+5}
Title: Re: Breakout clone
Post by: lookitsan00b on November 15, 2010, 09:49:03 pm
Its easy :) Just go to options, and select Application under 'shell'.  The only difference between apps and programs is you can't modify any data that you create in your program.  ie: you cant do this:

Code: [Select]
[000102030405]->Str1
9->{Str1+5}  //cant do that!

you have to do this instead

Code: [Select]
[000102030405]->Str1
Copy(Str1,L1,6)  //copy it to some free ram, but you cant copy back
9->{L1+5}

Well I'm sure I don't do that anywhere...
... Actually SMC is possible but not realistically :P I know that...

I'm not sure it's worth it yet.  If I hit the point where I can't keep it below the limit, yep, it's an app.
Until then, I'll settle for a prgm's faster compile speed.
Title: Re: Breakout clone
Post by: AngelFish on November 15, 2010, 09:50:59 pm

Well I'm sure I don't do that anywhere...
... Actually SMC is possible but not realistically :P I know that...

SMC is easier to write than you might think. It's debugging that's the pain :P
Title: Re: Breakout clone
Post by: Builderboy on November 15, 2010, 09:51:39 pm
well just so you know that the option is easy to convert and you don't have to worry about keeping compatibility for the most part :)  And this isn't even the hard SMC :P the tricky part is where you start to modify more than just data ;)
Title: Re: Breakout clone
Post by: AngelFish on November 15, 2010, 10:06:14 pm
You're giving me a headache just thinking about the debugging  :(
Title: Re: Breakout clone
Post by: lookitsan00b on November 16, 2010, 11:49:52 pm
You're giving me a headache just thinking about the debugging  :(

Are you talking about the epic amount of time it takes to compile an app? Yeah, me too. :(

Are you talking about how the calculator seems to not do what I tell it? Yeah, me too. :(

I think the editor should be separate. Some people may not want to create levels and will prefer a smaller file in that case. I don't think the play button will work, though.

Actually, do Axe programs initialize variables automatically?
If not, there's always:
Code: [Select]
GetCalc(prgmBREAKOUT)
Asm(jp hl)
... on second thought that won't work. It'll mess up all my pointers. :'(


Well I'm sure I don't do that anywhere...
... Actually SMC is possible but not realistically :P I know that...

SMC is easier to write than you might think. It's debugging that's the pain :P

Im saying SMC in an app is unrealistic, except when you have it copy itself to RAM... but that's cheating :P
Title: Re: Breakout clone
Post by: lookitsan00b on November 21, 2010, 11:22:11 pm
1: I have 7 things to say:
2: No, even though I have been idle for about a week, I didn't leave :P Just no comp access...
3: This project ain't dead yet. Just a bug I couldn't find.
4: The bug was idiotically wiping my flags variable on the start of the game, immidiately after setting a flag.
5: along with a fully functional extreme mode, I'm pretty sure I added something, and I will most likely upload all that tomorrow.
6: Would you prefer an app to a program?
7: I really only have 6 things to say ;D
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 21, 2010, 11:25:57 pm
Ah glad to see you back. I was getting a bit worried that you kinda lost interest or something. (Some people starts calc programming then quit 3 weeks later :( ). Glad you got the bug fixed. I don't mind if it's an app or a program, by the way. I would go with a program if your game still compiles under 15 KB, though (and if you're below the 8192 bytes code limit present with programs)
Title: Re: Breakout clone
Post by: Deep Toaster on November 21, 2010, 11:48:07 pm
1: I have 7 things to say:
2: No, even though I have been idle for about a week, I didn't leave :P Just no comp access...
3: This project ain't dead yet. Just a bug I couldn't find.
4: The bug was idiotically wiping my flags variable on the start of the game, immidiately after setting a flag.
5: along with a fully functional extreme mode, I'm pretty sure I added something, and I will most likely upload all that tomorrow.
6: Would you prefer an app to a program?
7: I really only have 6 things to say ;D

No, you only have five ;)

Glad you're back.

If not, there's always:
Code: [Select]
GetCalc(prgmBREAKOUT)
Asm(jp hl)
... on second thought that won't work. It'll mess up all my pointers. :'(

There's a b_call(ExecProg) or something like that that does that ... you'll have to move the program name to a particular spot in memory before you do that, though.
Title: Re: Breakout clone
Post by: lookitsan00b on November 22, 2010, 06:06:44 pm
If not, there's always:
Code: [Select]
GetCalc(prgmBREAKOUT)
Asm(jp hl)
... on second thought that won't work. It'll mess up all my pointers. :'(

There's a b_call(ExecProg) or something like that that does that ... you'll have to move the program name to a particular spot in memory before you do that, though.
I think I'll just make two versions: split programs, and an app.
On second thought, who wants a program when you can have an app? I'll just use the programs for debugging.
Then again, you can just push enter from the homescreen to re-run a program. not an app. I'll have to add in looping back to the menu. Not too hard.

So, new in v1.0
  semi-intelligent paddle size powerups
  removed caps on paddle size and ball number
  added good reason to look at the source (okay a mediocre reason) see readme :P
  extreme mode
  looping back to the menu with the app version
  both app and bi-program versions included
 
Title: Re: Breakout clone
Post by: ASHBAD_ALVIN on November 22, 2010, 06:09:07 pm
sounds great!  nice to see some great progress on this! :D
Title: Re: Breakout clone
Post by: lookitsan00b on November 22, 2010, 06:34:26 pm
I knew there was something I left out! I changed the winning and Game Over screens! :o
Sorry for forgetting to list that in the update list and readme.

Guess its about time to get me a ticalc account? ;D
Title: Re: Breakout clone
Post by: Munchor on November 22, 2010, 06:47:25 pm
I knew there was something I left out! I changed the winning and Game Over screens! :o
Sorry for forgetting to list that in the update list and readme.

Guess its about time to get me a ticalc account? ;D

Sure! That will make your program much more known and downloaded.

Most people find games in ticalc.org through Google :D
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 23, 2010, 01:40:59 am
Can't wait to try the new version out!

Also when you reach 100 posts you'll be able to upload it on Omnimaga download section as well.
Title: Re: Breakout clone
Post by: Darl181 on November 23, 2010, 01:42:45 am
It's on my flash drive now, will msd8x it to the calc tonight ;D

btw what exactly is extreme mode?
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 23, 2010, 01:55:23 am
Extreme mode is like Endless mode, but it scrolls down even faster.

Btw I just tried it and it's really epic. One amazing breakout clone you made here. My favorite mode is Extreme. ;D I got 9020.

Great job on this! ;D
Title: Re: Breakout clone
Post by: ztrumpet on November 23, 2010, 06:03:47 pm
This is great.  Well done Lookit'san00b! ;D

I got 9020.
What?!  But that's OVER my high score 9000! ;D
Title: Re: Breakout clone
Post by: lookitsan00b on November 23, 2010, 10:10:45 pm
This is great.  Well done Lookit'san00b! ;D

I got 9020.
What?!  But that's OVER my high score 9000! ;D

You seem to be implying that it is done.
Nope. Found a saving bug, finally fixed that bug with the balls passing through the blocks occasionally, and realized that, unless Axe 0.4.5 automatically signs apps, I forgot to do that. Oops :P I'll probably want to add some sort of delay on the editor's keypresses too.

So I'll try to get v1.05 uploaded by tomorrow. ;D
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 24, 2010, 02:55:46 am
Well it has version 1.00. 1.00 means it's finished, normally. :P (unless there are bugs)

Can't wait for next version! By the way, in case you only check the forums project/axe sections and not the front page news, I made a Youtube video of the endless mode. ;D

Title: Re: Breakout clone
Post by: lookitsan00b on November 24, 2010, 02:38:40 pm
new in v1.05:
Spoiler For lots of bugfixes:
no more balls passing through blocks
added delay after keypresses in editor
signed app (well, not yet, I'm transferring stuff to the computer as I'm writing this)
Spoiler For spoiler:
check out the awesome additions to the readme!

Well it has version 1.00. 1.00 means it's finished, normally. :P (unless there are bugs)

Can't wait for next version! By the way, in case you only check the forums project/axe sections and not the front page news, I made a Youtube video of the endless mode. ;D


Do you think I have enough space in my app (I've used 9000) for that soundtrack? :P
And, yes, there were bugs. :(

btw, why does it say it's a four page app, when 9k clearly fits in one page?
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 24, 2010, 08:53:12 pm
Lol that song would take like 4 calcs worth of flash memory XD. It would have to be converted (composed from scratch as well) into axe format to fit, and it would slow the game down a lot).

What do you mean about the 4 page apps thing? ??? Your game should be 1 page large (16 KB on calc and up to 33 KB on the comp)
Title: Re: Breakout clone
Post by: FinaleTI on November 24, 2010, 08:56:39 pm
Lol that song would take like 4 calcs worth of flash memory XD. It would have to be converted (composed from scratch as well) into axe format to fit, and it would slow the game down a lot).

What do you mean about the 4 page apps thing? ??? Your game should be 1 page large (16 KB on calc and up to 33 KB on the comp)
If only there was a midi version...
Title: Re: Breakout clone
Post by: DJ Omnimaga on November 24, 2010, 10:49:37 pm
Yeah that would make things easier. It could be converted with the MIDI converter, although sound quality is pretty low if I remember.

Title: Re: Breakout clone
Post by: lookitsan00b on December 11, 2010, 05:38:17 pm
NECROPOST!!! (but a good reason, and it IS my thread...)

I can't believe I never though of this earlier, but what about a:

Spoiler For Spoiler:
MULTIPLAYER MODE!!!!

 :w00t:

I think its a great idea ;D Never worked with a link cable before tho.
Title: Re: Breakout clone
Post by: Builderboy on December 11, 2010, 05:44:38 pm
Multiplayer mode sounds great to me :) Axe has some handy things for sending data too ^^ what would the objective of multiplayer mode be?
Title: Re: Breakout clone
Post by: lookitsan00b on December 11, 2010, 05:47:18 pm
basically pong with blocks in the middle :P
Title: Re: Breakout clone
Post by: Builderboy on December 11, 2010, 05:49:22 pm
Ooooooh i see, sounds awesome! 
Title: Re: Breakout clone
Post by: lookitsan00b on December 11, 2010, 05:54:59 pm
so, the question is: how big do I make the area?

2 screens (it looks like a perfectly normal game of breakout until one player hits the top wall)
1.5 screens (same, but the area with the blocks shows up on both screens)
1 screen (both paddles show up on screen, with a thin wall between them)

or should I make all of them :P
Title: Re: Breakout clone
Post by: Deep Toaster on December 12, 2010, 01:08:15 am
Wow, that would be awesome :D

What about a "race" mode with two screens, where a new row appears as soon as the player gets rid of a complete row?
Title: Re: Breakout clone
Post by: lookitsan00b on December 12, 2010, 06:31:11 pm
Ok I'm pretty much decided on the 2-screen method (it involves the least engine changes, only a 'warp' from one calc to another, and a way to determine whose balls are whose)

so there might be a normal mode, where the blocks are stationary and each player gets points for each block their balls eliminate, most points when all blocks are gone wins

a mode where for every block destroyed, a block appears on the other player's screen.

and maybe a warp block? :P fun fun :D
Title: Re: Breakout clone
Post by: DJ Omnimaga on December 13, 2010, 03:52:36 pm
2 player Breakout clone would be great. I like both ideas as well. Maybe also have a power-up that inverts the blocks position too (or is that what you mean by warp block?)?

Also in future versions it would be nice if all power ups looked differently. For example, ° sometimes makes ball go through blocks and other times they move twice faster, but it gets confusing sometimes. :(
Title: Re: Breakout clone
Post by: lookitsan00b on December 13, 2010, 04:02:50 pm
2 player Breakout clone would be great. I like both ideas as well. Maybe also have a power-up that inverts the blocks position too (or is that what you mean by warp block?)?

Also in future versions it would be nice if all power ups looked differently. For example, ° sometimes makes ball go through blocks and other times they move twice faster, but it gets confusing sometimes. :(
aaw... :'( but I liked them looking the same...  ._. <_<
 :P
I did it that way cause I thought it might make it harder... and because there are only so many good-looking 4x4 sprites.

I was thinking warp block = the ball that hits it warps to somewhere on the other player's screen. Surprise! ;D
Title: Re: Breakout clone
Post by: DJ Omnimaga on December 13, 2010, 04:25:08 pm
Oh I see now. I didn't realize it was on purpose. I guess it's fine, then :P

I like the warp block idea. The other player will have to watch out what the opponent is doing often, lol. :P