You have not uploaded your program! Please edit the page to upload your program.
|
|||||||||||||||
This program has been remade. To see the remake, visit the Flappy Bird 2 page.Hi, this is my first post to this site! I knew how to program in Python, which got me interested in learning TI-Basic. Within 2 hours of knowing that Ti-Basic existed, I made a flappy bird game. The program might have a few bugs (I programed it from scratch on my friend's calculator, so I don't have it with me), so if you find any bugs, please edit this page to remove them if you can figure out where they are. Instead of the game plainly ending when you die, it returns an error message. Please comment if there is something wrong with the program. Note: The download link doesn't work, you'll have to type in the code by hand.
|
What the community thinks:
Hello to this community. Please first ask in the forum for help the next time, before you create a wiki page ;)
As you wrote, you only were knowing TI Basic for two hours, when you programmed this, which is a quite short time to learn a programming language, but there are still many easy to workaround problems in your code:
As you are quite a newbie to Basic, I wont go into much details yet, but there are some simple things to optimize:
Using For( this will become shortened to:
First note that when not putting an Then after the If, you also dont have to „End“ the If code block. If you dont put a Then after the If, the compiler, or more likely in TI Basic the Interpreter automatically knows that only the one following line of code belongs to the If.
Though I would do it in a complete other way, you can use Else here to achieve the same effect (Else gets executed, when the previous If expression got the boolean value False):
There are many other things to change here, but I think it is enough for that purpose for now, but let me give you another short advise: Only use Goto structures when you really need to, the alternative While or Repeat loops have the same effect of jumping in code, but will make your programming habit a lot better. Goto structures are often referred to as spaghetti programming and will make your hairs gray, when trying to get the sense of some huger programs back into your mind, that were programmed earlier.
Wake me, when you need me.
I tried the coding:
:For(I,1,8 //Note that you dont have to close parenthesis if you are at the end of an line
:Output(A,I,"H //the same for closing literal string signs
:End
but it gave me a domain error. I understand what it's SUPPOSED to do, but why didn't it work? (If it helps, I'm using a TI-84 Plus)
Then your above could would also return an error, because it is exactly the same. I guess that you accidantely swapped the parameters in your code above?
I mean you are using as X coordinate 1-8. I dont know exactly what you want to do, but I think putting the y coordinate 1-8 seems more legit. So if this is the case, just swap the parameter, so talking of the For loop it would be this now:
Make sure that A is not less than 1 and not greater than 16.
You could even use the following to catch a Domain Exception, however, this would only complicate things and it is also not the right way to prevent an error in such a way, because when the code is wrong, this also will not make it correct, and the error just would occur on a later part again:
Wake me, when you need me.
At if A<1
8->E
D->E
End
I get a syntax error and when I hit goto it takes me to the end command. If it helps I'm on a ti83+ that is a number of years old now (probably 5?)
Sorry, I just barely realized I typed it (The For loop) in wrong, it works now.
Yeah, sorry, I did switch the parameters, I fixed it now.
I'm used to Python, where X was always before Y.
Could someone post the whole code to Flappy Bird that actually works (with the clone)?
He's fine; he submitted his program to the archive, where anyone is allowed to submit their program freely.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Ok, then sorry for that. Good, that you mentioned this.
However, at the top of the page, it still says
Which is kind of confusing
Wake me, when you need me.
This thread is automatically created by the Wikidot system, and Wikidot assumes everything is a wiki-page. Unfortunately, that message cannot be changed, but on the actual page, you do not see that message.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
That's my calculator!!!!!
This would be a nice exercise: Optimize the code as much as you (I :D) can.
My Solution
*You can imagine me like a parse machine, they always pass two times… I passed one time. And I know Basic for only three months. So please, don't laugh about the above code:/
EDIT: Now I readed carefullier and found some mistakes.
EDIT: Sorry @the comunity for so much edits, optimization of code is always write and try and write and try:/
How do you edit your comments? I know how to edit your pages, but I don't see an Edit button for the comment buttons.
EDIT: Nevermind, I figured it out.
Hit options, then edit
what in the world is that line in "Y-(Ans=250)+(Ans='line'=25->Y"?
I cant even find it in the catalog.
They said it right in the post.
They used =|= for "does not equal" since for whatever reason they couldn't use "≠"
what mistakes did u find and can u post them.
every time i try to run this program the bird does not show up, but i can move it as if it were invisible, what do i do?
How do i put the not in? i know i cant type it with alpha but i need it lowercase! i looked it up on google and coudnt find a solution. Please tell me where i can insert the "not" or "If not". Thanks you!
im sorry it didnt show what part i was on. it is If A=0 16-> A & If [not]
this is in the beginning
2nd + MATH should bring you to the TEST menu. Go to the right to access the LOGIC menu. not( is the 4th result. You could also find it by pressing 2nd + 0, which brings you to CATALOG, then press N to skip to everything starting with the letter N, and then scroll through to find not(
You're Awesome! Thank you a lot!
you can find the "not(" command by [2nd and 0(zero) which is catalog.] this will take you to a long list of functions,
you want to scroll down to the "n" section(it is alphabetically arranged). then you will come upon the "not(" function.
you click 2nd, then you go to math, than you go up, then right, then down twice and there it is
I also programmed a clone Flappy Bird, not the best but very similar to yours.
Idk how to post code so here it is:
:3->X :12->A :3->Y
:0->S
:randInt(2,7-> Z
:Repeat Y=/Z and Y=/Z-1 and X=A
:getKey->K
:ClrHome
:Output(1,8,S
:Output(Y,X," "
:If K and Y>=3
:Y-3->Y
:For(B,1,8
:If B=/Z and B=/Z-1
:Output(B,A,"!
:End
:If Y=/8
:Y+1->Y
:A-1->A
:If A=X-1
:S+1->S
:If A=1 :Then
:12->A
:randInt(2,6->Z
:End :End
:S->L6(1+dim(L6
:SortA(L6
:If S=L6(dim(L6
:Then
:Output(2,1,"NEW HIGHSCORE!: "
:Output(2,16,S
:Else
:Output(2,1,"HIGHSCORE: "
:Output(2,12,L6(dim(L6
:End
I could optimize the whole code for you, but it doesn't look like theres an actual player yet. I could add the player, but I'll let you do that :)
Heres some basic tips:
Instead of:
Do:
Also, you can leave out some of those ending quotes you added. If you put spaces there, then be sure to do(for example):
Since you have an output at a specific spot on the next line after this code, you don't even need those extra spaces, so you can get rid of them.
I think there may be some other areas that could be improved, but I'm not sure exactly where.
Anyways, be sure to add in a player if people were to actually play it :P
I need the workijng code please!
Write it yourself please!
rly dud?
It shows me an error a the y=/Z and i cant tell why
Replace "=/" with "≠"
What is the l
how do you make the bird move the way that you want it to?
when you post, look for a 2 boxes that say the word "code". Then, click on the left box, then input your code. example:(it will look like this: [[code]] )
input code here
[[/code]]
[[/code]]
this does not work:
If A=0:16→A
im using a ti-84 plus calculator, how do i get the "=" sign on it?
2nd+Math
The key sequence in key ode format I believe is 21,51
The key code sequence is 21, 41, 105 - but most people probably don't think of the codes anyway. :)
You are right, I didn't have my calculator at the time. Also, just as a side note for guest, you can use the catalog to find every command on your calculator. 2nd+0 (Keys: 21,102) You can use the letters to jump to commands, so = would be closest to theta commands
The pipes don't change position, so it isn't as hard as it should be. Is there a way to randomize them?
it sas there is a problem at Output(Y,X," "
What kind of problem? Can you be more specific? Perhaps a domain error?
nevermind i fixed it but is there a way to make the pipes move
Whatdya do to fix it, same problem: error: domain
where the code says
:Output(100,100,"P"
cant work because it is not in the 8 by 16 range of the calculator