You have not uploaded your program! Please edit the page to upload your program.
|
![]() |
||||||||||||||
Part 2 is where you are trying to get through the city walls. You control the paddle on the bottom, and the calculator controls the paddle on the top. If you get the ball past the paddle on top, it smashes part of the wall and you need to get the ball through there. This is a modified version of a program I found online. (The original coding only had one paddle (yours), and there wasn't a way to win) If you played this game, please comment, I want to see how many people have played this.
|
What the community thinks:
How did you manage to make the ball reflect off the fortress and then make it disappear? I would like to know the code on how to do it.
:If A=2 // If ball's Y co-ordinate is 2
:Then
:While not(W=16 // Keep repeating until W is 16
:W+1→W // Add 1 to W
:If B=W // If ball's X co-ordinate equals W
:Then
:If ⌊1(W)=0 // If the wall above the ball is already destroyed
:Then
:Pause "YOU WON PART 2! // Tell the player he won
:Output(100,100,"P // Stop the program
:End
:If ⌊1(W)=1 // If the wall above the ball isn't destroyed
:Then
:0→⌊1(W // Destroy the wall above the ball
:End
:End
:End
:End
:If A=1 // If the ball's Y co-ordinate is 1
:-D→D // Change the ball's direction
It may be hard to see, but there is a negative sign before the D in the previous comment ^
|
Hmmm… Didn't feel like copying the code, but I can see some optimizations right off the bat:
Ever heard of the repeat loop?
It would be good to give a full-through explanation about this game and also try to do that with every game that you made or you're going to make.
In lines like Line 3:
:{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}→⌊1
What is the [ looking thing (second to last symbol).
It is the "L" that is used in front of a list. "L1" should already exist on your calculator, so you shouldn't have to create it.
so i finished typing in the code and i can only move my paddle right. how do i fix this so i can also move left?
Double check you typed everything 100% correctly
i looked over my code and i typed it in correctly. any other suggestions?
Triple check you typed everything correctly. I just tried the source code from the original post on my calculator and it worked flawlessly
In Line 3:
Change
To
This saves 22 bytes