mirror of
https://github.com/ApfelTeeSaft/HolyPong.git
synced 2026-08-26 19:23:33 +00:00
fcd317ed81fbd1734b3ad4665a502cb6983710be
Pong Game in TempleOS
This is a simple Pong game created for TempleOS using the HolyC programming language. Player 1 controls the left paddle with the keys W (up) and S (down), and Player 2 controls the right paddle with the keypad arrows ↑ (up) and ↓ (down). Each player’s score is displayed above their respective paddles.
How to Run the Game
1. Set Up TempleOS in a Virtual Machine
If you don’t have TempleOS set up yet, follow these steps:
-
Download TempleOS:
- Download the latest ISO from the TempleOS website.
-
Set Up TempleOS in VirtualBox:
- Install VirtualBox or another virtual machine software.
- Create a new VM with the following settings:
- 64-bit OS
- 512 MB RAM or more
- 1 GB storage or more
- Attach the TempleOS ISO to the VM and boot into TempleOS.
2. Save the Pong Code in TempleOS
- Open the editor in TempleOS.
- Copy the Pong game code (from
Pong.HCprovided in this repository) and paste it into the TempleOS editor. - Save the file as
Pong.HC.
3. Run the Game
- Go to the TempleOS command line.
- Load and run the game by typing:
#include "Pong.HC" PongGame(); - The game will start, and you can control the paddles as specified.
Adding a Desktop Shortcut in the Red Sea Menu
You can create a shortcut in the TempleOS "Red Sea" menu for easier access to the Pong game.
-
Open the Red Sea Menu Configuration File:
- At the TempleOS command line, open the
REDSEA.HCfile by typing:Edit("SYS:/REDSEA.HC");
- At the TempleOS command line, open the
-
Add a Menu Entry for Pong:
- Scroll to the bottom of the file or locate an appropriate section to add your entry.
- Add the following line:
MenuItem("Pong Game", "include \"Pong.HC\""); - This line adds a new menu item labeled "Pong Game" to the Red Sea menu. Selecting it will load and run
Pong.HC.
-
Save the File:
-
Test the Shortcut:
- Reload the Red Sea menu by typing:
RedSeaMenu(); - Press
F1to open the menu. You should see "Pong Game" listed. Select it to run the game.
- Reload the Red Sea menu by typing:
Controls
- Player 1 (Left Paddle): Use
W(up) andS(down). - Player 2 (Right Paddle): Use
↑(up arrow) and↓(down arrow) on the keypad.
Game Rules
- Each time the ball crosses a side of the screen, the opposite player scores a point.
- The game will reset the ball after each score.
- The scores are displayed above each paddle.
Rest in Peace Terry.
Languages
HolyC
100%