Program pong on the ti-84 plus CE
Summary
TLDRIn this video tutorial by the Calculator Guy, viewers are guided through programming a classic Pong game on a TI-84 Plus CE calculator. The process begins with setting up variables for game elements like the ball and paddle positions. The script walks through coding the game logic, including ball movement, paddle interaction, and scoring. After a brief bug fix, the game is successfully demonstrated, encouraging viewers to try it and challenge the presenter's score.
Takeaways
- 😀 The video is a tutorial on how to program a Pong game on a TI-84 Plus CE calculator.
- 🎮 The presenter is surprised to find no existing videos on YouTube for Pong on the CE and aims to create the first one.
- 📝 The program is approximately 44 lines long, with about 35 lines of actual code.
- 💾 Variables are used to store the positions of the ball and paddle, the game's status, and the score.
- 🔢 The program starts by storing values to variables such as X, Y, P, L, C, D, and S.
- 🔄 The game loop uses a repeat command set to run until the game ends (L equals 1).
- 🔄 The game speed is selected by the user and stored in variable A, with constraints to ensure it's between 0 and 10.
- 🕹️ The paddle's movement and the ball's movement and direction are controlled by the program's logic.
- 🏓 The game checks for collisions with the top and bottom of the screen and with the paddle, adjusting the ball's direction accordingly.
- 💥 If the ball reaches the bottom of the screen without hitting the paddle, the game ends, and the score increases.
- 🐞 A bug was found in the initial run of the program, which was corrected to ensure proper spacing in the paddle's display.
- 🎉 The video concludes with the presenter playing the game and encouraging viewers to comment if they can beat their score.
Q & A
What is the purpose of the video?
-The purpose of the video is to teach viewers how to program a Pong game on the TI-84 Plus CE calculator.
What is unique about this video compared to others?
-This video is unique because it claims to be the first ever tutorial on programming Pong specifically for the TI-84 Plus CE on YouTube.
How long is the Pong program supposed to be?
-The Pong program is about 44 lines long, but the actual coding part is around 35 lines.
What are the variables used in the Pong program?
-The variables used include X and Y for the ball's coordinates, P for the paddle's x-coordinate, L for game stop condition, C and D for the ball's direction, and S for the score.
How does one store a variable in the TI-84 Plus CE calculator?
-To store a variable, you press the number key followed by the store button (STO) and then the variable key (e.g., X, Y, P, etc.).
What does the 'clear home' command do in the program?
-The 'clear home' command clears the home screen, preparing it for new outputs or calculations.
How does the program handle the selection of game speed?
-The program allows the user to select a game speed from 1 to 10. It uses the 'input' command to get the user's choice and then sets the speed using 'min' and 'max' functions to ensure the value is within the desired range.
What is the purpose of the 'repeat' loop in the program?
-The 'repeat' loop is used to continuously execute the game logic until the game ends, which is controlled by the variable L.
How does the program detect collisions with the paddle and the walls?
-The program checks if the ball's X coordinate is at the edges of the screen (1 or 26) to change direction. It also checks if the ball reaches the bottom of the screen (Y equals 10) and if it misses the paddle (X is less than P or greater than P+3), which results in ending the game and increasing the score.
How does the program display the ball and the paddle on the screen?
-The program uses the 'output' command to display the ball and the paddle at their respective coordinates. It also erases the previous position of the ball by outputting a space at that location.
What is the final step in the program before running it?
-The final step is to prevent the 'done' message from being displayed by outputting a quote at the end of the program.
What was the bug found in the program during the video?
-The bug was in the output command where instead of one space, four spaces were used, causing the paddle to not display correctly.
How does the presenter encourage interaction after the video?
-The presenter encourages viewers to comment if they beat the score of 28 and to like and subscribe for more content.
Outlines
Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.
Upgrade durchführenMindmap
Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.
Upgrade durchführenKeywords
Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.
Upgrade durchführenHighlights
Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.
Upgrade durchführenTranscripts
Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.
Upgrade durchführenWeitere ähnliche Videos ansehen
tutorial membuat game soccer ball - scratch
Lecture: 14 | WATER BOAT GAME IN SCRATCH | GAME DEVELOPMENT | SCRATCH TUTORIAL
Cara Membuat Tetris sederhana untuk pemula di Mit App inventor GRATIS 2024 | programmer pemula
CREATE a Flappy Bird Game in Unity with CLEAN CODE Like a PRO!
КАК ПЕРЕНЕСТИ ХП НА БОК МИНИ-КАРТЫ В ГТА 5 РП? / КАК СДЕЛАТЬ РЕДУКС ГТА 5 РП ( GRAND ) PROMO: FANTOM
Create Snake And Ladder Game In Mit App Inventor| By HighTech
5.0 / 5 (0 votes)