Skip to content

casparjones/MyPong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MyPong

A classic Pong game built in ActionScript 3, featuring human and AI-controlled paddles. The game logic is implemented in a modular fashion using controllers, models, and views.

This project includes a precompiled MyPong.swf file that can be played directly in the browser using the Ruffle Flash emulator.

πŸ•ΉοΈ Play It Online

You can play this game directly in your browser via GitHub Pages:

πŸ‘‰ Play MyPong

πŸ”§ How to Run the Game with Ruffle

Since modern browsers no longer support the Adobe Flash Player, this project uses Ruffle, a Flash Player emulator written in Rust.

To enable playback of the .swf file on GitHub Pages:

  1. Download the latest ruffle_web_selfhosted bundle (choose ruffle_web_selfhosted zip).
  2. Extract the contents and copy the following files into your repository's root directory:
    • ruffle.js
    • ruffle.wasm
  3. Create an index.html file in your root directory with the following contents:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MyPong</title>
    <script src="ruffle.js"></script>
</head>
<body>
    <h1>MyPong</h1>
    <p>A simple Pong game made with AS3</p>
    <div id="game">
        <embed src="MyPong.swf" width="550" height="400">
    </div>
</body>
</html>
  1. Commit and push your changes to GitHub.
  2. In your repository settings, enable GitHub Pages:
    • Go to Settings > Pages
    • Choose the root of the main branch (/ (root))
    • Save and wait a few moments

Now your game should be playable via your GitHub Pages URL!

πŸ“ Project Structure

MyPong/
β”œβ”€β”€ MyPong.swf              # Compiled SWF file
β”œβ”€β”€ src/                    # Source code in ActionScript 3
β”‚   β”œβ”€β”€ MyPong.as           # Main entry point
β”‚   β”œβ”€β”€ Controlers/         # Startup and game control logic
β”‚   β”œβ”€β”€ Models/             # Game configuration and player logic (AI/Human)
β”‚   └── Views/              # Ball, field, and paddles
β”œβ”€β”€ .as3_classpath          # AS3 classpath configuration
β”œβ”€β”€ .project                # Project metadata for FDT
└── README.md               # You're reading it!

πŸ‘¨β€πŸ’» Author

Created by Frank Vlatten


Happy retro gaming! πŸ•ΉοΈ

About

My first try in ActionScript3 - a simple pong game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published