Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d0084cf87 | |||
| 82d978dfb8 | |||
| d9fcbd3204 | |||
| e749965459 | |||
| 937912765a | |||
| fa687286c2 | |||
| 88a90fa7ac |
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: 🐛 Bug Report
|
||||
about: Create a report to help us improve Pong Reloaded
|
||||
title: '[BUG] '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- OS: [e.g. Windows 11]
|
||||
- Display Resolution: [e.g. 1920x1080]
|
||||
- Graphic Settings used: [e.g. Fullscreen, VSync, 60fps]
|
||||
|
||||
**Additional Context**
|
||||
Add any other context about the problem here (e.g. logs from the F7 Developer Console).
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: ✨ Feature Request
|
||||
about: Suggest an idea or enhancement for Pong Reloaded
|
||||
title: '[FEATURE] '
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,101 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '17 11 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
- language: c-cpp
|
||||
build-mode: autobuild
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- name: Run manual build steps
|
||||
if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -38,4 +38,10 @@ jobs:
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
# Add additional options to the MSBuild command line here (like platform or verbosity level).
|
||||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pong-reloaded-exe
|
||||
path: x64/Release/pong-reloaded.exe
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) [year] [fullname]
|
||||
Copyright (c) 2026 Dr20Ervin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
# 🏓 Pong Reloaded
|
||||
<p align="center">
|
||||
<img src="icon.svg" alt="Pong Reloaded Logo" width="128" height="128" />
|
||||
</p>
|
||||
|
||||
A classic arcade game rebuilt from the ground up using **Modern C++ (C++20)** and the **Raylib** library. Designed with performance, customization, and modularity in mind.
|
||||
<h1 align="center">🏓 Pong Reloaded</h1>
|
||||
|
||||
[](https://en.cppreference.com/w/cpp/compiler_support/20)
|
||||
[](https://www.raylib.com/)
|
||||
[](https://www.microsoft.com/windows)
|
||||
[](LICENSE.txt)
|
||||
<p align="center">
|
||||
A classic arcade game rebuilt from the ground up using <strong>Modern C++ (C++20)</strong> and the <strong>Raylib</strong> library. Designed with performance, customization, and modularity in mind.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://en.cppreference.com/w/cpp/compiler_support/20"><img src="https://img.shields.io/badge/Language-C%2B%2B20-blue?logo=c%2B%2B&style=flat-square" alt="C++ Version" /></a>
|
||||
<a href="https://www.raylib.com/"><img src="https://img.shields.io/badge/Framework-Raylib--5.0-red?style=flat-square" alt="Raylib" /></a>
|
||||
<a href="https://www.microsoft.com/windows"><img src="https://img.shields.io/badge/Platform-Windows-0078d7?logo=windows&style=flat-square" alt="Platform" /></a>
|
||||
<a href="LICENSE.txt"><img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License" /></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
@@ -38,6 +46,18 @@ The key goals of this project:
|
||||
|
||||
---
|
||||
|
||||
## 📐 Architecture & System Design
|
||||
|
||||
To ensure modularity, high performance, and clear separation of concerns, **Pong Reloaded** is built around a decoupled Object-Oriented design.
|
||||
|
||||
Below is the UML class diagram outlining the relationships between the game entities, screen controllers, state management, and resource loaders:
|
||||
|
||||
<p align="center">
|
||||
<img src="UML.svg" alt="Pong Reloaded UML Diagram" width="100%" />
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## 💾 Quick Install & Play
|
||||
|
||||
No installers, DLLs, or complex dependency installations are required!
|
||||
@@ -99,4 +119,4 @@ The graphical and audio resources used in this game were curated from the open-s
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the [MIT License](LICENSE.txt).
|
||||
This project is licensed under the [MIT License](LICENSE.txt).
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 1.2 MiB |
@@ -1,16 +0,0 @@
|
||||
# Asset Credits & Attribution
|
||||
|
||||
The multimedia resources (graphics, sprites, and audio files) contained within this folder are not my personal creations. They have been curated and adapted from the open-source community for educational development.
|
||||
|
||||
## Original Source Information
|
||||
* **Project:** Moddable Pong
|
||||
* **Author / Creator:** Endless OS Foundation & Endless Studios
|
||||
* **Website:** [endlessos.org](https://endlessos.org)
|
||||
* **Source Code Repository:** [github.com/endlessm/moddable-pong](https://github.com/endlessm/moddable-pong/)
|
||||
|
||||
---
|
||||
|
||||
## Usage Notice
|
||||
These assets are integrated strictly for non-commercial, academic layout validation and development milestones. This work is part of a student engineering project within the **Helios Additional_activity** initiative at the **Technical University of Cluj-Napoca (UTCN) - Faculty of Electronics, Telecommunications and Information Technology (ETTI)**.
|
||||
|
||||
All rights, ownership, and copyrights belong entirely to the original creators at the Endless OS Foundation.
|
||||
+10
-5
@@ -3,13 +3,14 @@
|
||||
#include "menu.h"
|
||||
#include "resource.h"
|
||||
|
||||
constexpr const char* gameVersion = "0.9.1";
|
||||
// Application Version Metadata
|
||||
constexpr const char* gameVersion = "1.0";
|
||||
|
||||
// Define global colors
|
||||
Color Green = Color{ 38, 185, 154, 255 };
|
||||
Color Dark_Green = Color{ 20, 160, 133, 255 };
|
||||
// Global Theme Color Configurations
|
||||
Color Green = Color{ 38, 185, 154, 255 };
|
||||
Color Dark_Green = Color{ 20, 160, 133, 255 };
|
||||
Color Light_Green = Color{ 129, 204, 184, 255 };
|
||||
Color Yellow = Color{ 243, 213, 91, 255 };
|
||||
Color Yellow = Color{ 243, 213, 91, 255 };
|
||||
|
||||
std::vector<std::string> logHistory;
|
||||
std::mutex logMutex;
|
||||
@@ -184,10 +185,14 @@ int main() {
|
||||
case GameState::MainMenu:
|
||||
{
|
||||
mainMenu.Draw();
|
||||
|
||||
// Render navigation controls hint
|
||||
int menuHintWidth = MeasureText("Use UP/DOWN to navigate | ENTER to select", 20);
|
||||
DrawText("Use UP/DOWN to navigate | ENTER to select",
|
||||
screen_width / 2 - menuHintWidth / 2,
|
||||
screen_height - 80, 20, WHITE);
|
||||
|
||||
// Render version string in bottom-left corner
|
||||
DrawText(TextFormat("v%s", gameVersion), 20, screen_height - 40, 20, LIGHTGRAY);
|
||||
break;
|
||||
}
|
||||
|
||||
+27
-7
@@ -24,12 +24,28 @@ void Menu::Draw() {
|
||||
int screenWidth = GetScreenWidth();
|
||||
int screenHeight = GetScreenHeight();
|
||||
|
||||
// Menu title and elements rendering
|
||||
DrawText(title.c_str(), screenWidth / 2 - MeasureText(title.c_str(), 60) / 2, screenHeight / 4, 60, WHITE);
|
||||
// Render Menu Title (aligned down for balanced spacing)
|
||||
DrawText(title.c_str(), screenWidth / 2 - MeasureText(title.c_str(), 60) / 2, screenHeight / 4 + 20, 60, WHITE);
|
||||
|
||||
for (int i = 0; i < static_cast<int>(options.size()); i++) {
|
||||
int numOptions = static_cast<int>(options.size());
|
||||
int spacing = 60;
|
||||
|
||||
// Isolate "Back" buttons at the bottom; group all other menu items in the center
|
||||
bool separateLast = (!options.empty() && options.back() == "Back");
|
||||
int groupCount = separateLast ? (numOptions - 1) : numOptions;
|
||||
|
||||
// Center grouped options vertically
|
||||
int startY = (screenHeight / 2) - (((groupCount - 1) * spacing) / 2);
|
||||
|
||||
for (int i = 0; i < numOptions; i++) {
|
||||
Color textColor = (i == selectedIndex) ? YELLOW : WHITE;
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, screenHeight / 2 + (i * 60), 40, textColor);
|
||||
if (separateLast && i == numOptions - 1) {
|
||||
// Render separated "Back" action button at the bottom of the screen
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, screenHeight - 120, 40, textColor);
|
||||
} else {
|
||||
// Render standard grouped options in the center
|
||||
DrawText(options[i].c_str(), screenWidth / 2 - MeasureText(options[i].c_str(), 40) / 2, startY + (i * spacing), 40, textColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +211,7 @@ void UpdateSettingsState(GameContext& ctx, Ball& ball, Paddle& player, CpuPaddle
|
||||
|
||||
void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight) {
|
||||
int titleWidth = MeasureText("SETTINGS", 60);
|
||||
DrawText("SETTINGS", screenWidth / 2 - titleWidth / 2, screenHeight / 4 - 40, 60, WHITE);
|
||||
DrawText("SETTINGS", screenWidth / 2 - titleWidth / 2, screenHeight / 4 + 20, 60, WHITE);
|
||||
|
||||
// Option labels formatting
|
||||
std::string resStr = "Resolution: ";
|
||||
@@ -247,7 +263,8 @@ void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight
|
||||
Color paddleColor = (ctx.config.selectedSettingLine == 7) ? YELLOW : WHITE;
|
||||
Color backColor = (ctx.config.selectedSettingLine == 8) ? YELLOW : WHITE;
|
||||
|
||||
int startY = screenHeight / 2 - 80;
|
||||
// Render settings toggles centered in the middle of the screen
|
||||
int startY = 300;
|
||||
DrawText(resStr.c_str(), screenWidth / 2 - MeasureText(resStr.c_str(), 30) / 2, startY, 30, resColor);
|
||||
DrawText(fpsStr.c_str(), screenWidth / 2 - MeasureText(fpsStr.c_str(), 30) / 2, startY + 40, 30, fpsColor);
|
||||
DrawText(modeStr.c_str(), screenWidth / 2 - MeasureText(modeStr.c_str(), 30) / 2, startY + 80, 30, modeColor);
|
||||
@@ -256,8 +273,11 @@ void DrawSettingsState(const GameContext& ctx, int screenWidth, int screenHeight
|
||||
DrawText(spaceThemeStr.c_str(), screenWidth / 2 - MeasureText(spaceThemeStr.c_str(), 30) / 2, startY + 200, 30, spaceColor);
|
||||
DrawText(ballThemeStr.c_str(), screenWidth / 2 - MeasureText(ballThemeStr.c_str(), 30) / 2, startY + 240, 30, ballColor);
|
||||
DrawText(paddleThemeStr.c_str(), screenWidth / 2 - MeasureText(paddleThemeStr.c_str(), 30) / 2, startY + 280, 30, paddleColor);
|
||||
DrawText("Back", screenWidth / 2 - MeasureText("Back", 30) / 2, startY + 320, 30, backColor);
|
||||
|
||||
// Render separated "Back" action button at the bottom of the screen
|
||||
DrawText("Back", screenWidth / 2 - MeasureText("Back", 30) / 2, screenHeight - 120, 30, backColor);
|
||||
|
||||
// Render bottom hint for settings controls
|
||||
int settingsHintWidth = MeasureText("UP/DOWN to navigate | LEFT/RIGHT to change settings | ENTER to select", 20);
|
||||
DrawText("UP/DOWN to navigate | LEFT/RIGHT to change settings | ENTER to select",
|
||||
screenWidth / 2 - settingsHintWidth / 2,
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 1.2 MiB |
Reference in New Issue
Block a user