Commit graph

39 commits

Author SHA1 Message Date
forgebot
d8bf72b79d chore: update version to 1.0.4 [skip ci] 2025-11-27 04:07:30 +00:00
f75e42d131 Bugfix/Correct version tagging (#22)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Reviewed-on: #22
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 23:07:24 -05:00
forgebot
8f4047d151 chore: update version to 1.0.3 [skip ci] 2025-11-27 00:40:50 +00:00
98ec60641d Hotfix/Cache bust all js files (#21)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Reviewed-on: #21
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 19:40:41 -05:00
forgebot
9739d5e8e9 chore: update version to 1.0.2 [skip ci] 2025-11-27 00:24:32 +00:00
c4466ae7e6 Hotfix/Cache busting (#20)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 7s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Reviewed-on: #20
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 19:24:25 -05:00
forgebot
fe4c91e711 chore: update version to 1.0.1 [skip ci] 2025-11-27 00:18:18 +00:00
80153461e7 Hotfix/No way to pause on mobile (#19)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
- Added pause button functionality to control game state (pause/resume).
- Updated sound status button visibility and styling for improved user experience.
- Adjusted button styles for better responsiveness and aesthetics on mobile devices.
- Implemented logic to show/hide buttons based on game state transitions.

This update improves gameplay interaction and visual feedback for users.

Reviewed-on: #19
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 19:18:09 -05:00
forgebot
b793b83c96 chore: update version to 1.0.0 [skip ci] 2025-11-26 23:47:50 +00:00
d8f4604e69 Release/First full release version (#18)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 1s
- Added start menu, pause menu, and game over screens to enhance user experience.
- Introduced UISystem to manage UI state transitions and visibility.
- Updated Game class to handle game state (menu, playing, paused, game over).
- Integrated CameraSystem for improved camera control and screen shake effects.
- Added new components for collision handling, scoring, and game state management.
- Refactored sound management to separate background music handling.

This update significantly improves the game's UI and overall gameplay flow.

Reviewed-on: #18
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 18:47:41 -05:00
forgebot
a95a079d0b chore: update version to 0.5.0 [skip ci] 2025-11-26 22:53:49 +00:00
323f0be900 Feature/Gameloop enhancements (#17)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Reviewed-on: #17
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 17:53:40 -05:00
forgebot
77bd5bb395 chore: update version to 0.4.0 [skip ci] 2025-11-26 21:49:32 +00:00
112aa68a83 Feature/Implement invincibility and combo systems (#16)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
- Added Invincibility component to manage invincibility state and duration.
- Introduced InvincibilitySystem to handle visual effects during invincibility.
- Updated Game class to integrate combo multiplier mechanics and high score tracking.
- Enhanced UI to display current combo status and high score.
- Configured GameConfig for centralized game settings, including obstacle damage and invincibility duration.
- Updated game logic to reset combo on damage and manage health regeneration.

This update enhances gameplay dynamics by introducing invincibility frames and a scoring combo system.

Reviewed-on: #16
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 16:49:25 -05:00
forgebot
e33f5a97a7 chore: update version to 0.3.1 [skip ci] 2025-11-26 21:30:45 +00:00
e82446cf00 Bugfix/Separate CI files (#15)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 9s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Reviewed-on: #15
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 16:30:37 -05:00
forgebot
94ddf8bde4 chore: update version to 0.3.0 [skip ci] 2025-11-26 20:39:24 +00:00
cec1fccc22 Feature/Refactor to use ecs architecture (#14)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 9s
Reviewed-on: #14
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 15:39:05 -05:00
forgebot
e0436e7769 chore: update version to 0.2.2 [skip ci] 2025-11-26 18:59:04 +00:00
956bb14321 Hotfix/image not being pull (#13)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 9s
Reviewed-on: #13
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 13:58:45 -05:00
forgebot
c3de24cb11 chore: update version to 0.2.1 [skip ci] 2025-11-26 18:24:11 +00:00
712ea7a0c5 Bugfix/deploy to portainer on merge (#12)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 9s
- Introduced a new step in the CI workflow to trigger a Portainer deployment using a webhook.
- Added checks for the presence of the PORTAINER_WEBHOOK_URL secret and handled HTTP response codes from the webhook call.
- Ensured that the workflow does not fail if the webhook call is unsuccessful.

This enhancement streamlines the deployment process by automating updates to the Portainer stack upon successful CI runs.

Reviewed-on: #12
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 13:23:52 -05:00
forgebot
186fb03ab8 chore: update version to 0.2.0 [skip ci] 2025-11-26 18:13:35 +00:00
21402bf0b4 Feature/new semver tagging logic (#11)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
- Introduced a step to validate PR titles, ensuring they start with the correct prefixes (Release/, Feature/, Hotfix/, Bugfix/).
- Enhanced versioning logic to determine version type based on PR title or merge commit message, allowing for appropriate version increments.
- Improved handling of versioning for different types of changes, including major, minor, and patch updates.

This update aims to enforce consistent PR title formatting and streamline version management in the CI process.

Reviewed-on: #11
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 13:13:18 -05:00
forgebot
379d4f6b54 chore: update version to 0.1.8 [skip ci] 2025-11-26 17:53:11 +00:00
9adb60d244 Refactor CI workflow to simplify remote URL configuration (#10)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
- Removed complex remote URL configuration logic for authentication.
- Updated comments to clarify that the remote should already be configured with the token before pushing to the main branch.

Reviewed-on: #10
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 12:52:52 -05:00
7e6eb26fad Hotfix/fix release notes (#9)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 9s
Build and Publish Docker Image / Publish to Registry (push) Successful in 9s
- Improved handling of the {{COMMITS}} placeholder to support multi-line content.
- Introduced a while loop for safe replacement of multi-line commit messages.
- Added temporary files for intermediate processing to ensure accurate output.

Reviewed-on: #9
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 12:46:30 -05:00
171be2ef17 Hotfix/Fix push version update (#8)
Some checks failed
Build and Publish Docker Image / Build and Validate (push) Successful in 8s
Build and Publish Docker Image / Publish to Registry (push) Failing after 6s
Reviewed-on: #8
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 11:58:12 -05:00
22c16e533e chore: update version to 0.1.6 [skip ci] 2025-11-26 11:31:37 -05:00
28c820488e Feature/Update versioning logic (#7)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 8s
Build and Publish Docker Image / Publish to Registry (push) Successful in 7s
Reviewed-on: #7
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 11:22:30 -05:00
c933f5f8cc Feature/Add portainer setup (#6)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 6s
Reviewed-on: #6
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 10:23:45 -05:00
c5a7f160bc Feature/Add movement interpolation (#5)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 7s
- Updated Player class to use maxSpeed, acceleration, and deceleration for smoother movement.
- Introduced velocity vector for more responsive control and smoother diagonal movement.
- Enhanced update method to calculate target velocity based on input and apply easing for acceleration and deceleration.
- Implemented boundary checks to stop movement when hitting the edges of the play area.

Reviewed-on: #5
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 09:36:39 -05:00
dfe87d63cc Feature/Touch support (#4)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 8s
Build and Publish Docker Image / Publish to Registry (push) Successful in 6s
# Add Touch Support and Documentation

## 📋 Summary

This PR adds comprehensive touch support for mobile devices and tablets, enabling players to control the game using touch gestures. Additionally, a complete README.md file has been added to document the game features, controls, and gameplay mechanics.

## 🎯 Changes Made

###  New Features
- **Touch Controls**: Full touch support for smartphones and tablets
  - Touch and drag anywhere on the screen to move the player
  - Movement direction calculated relative to screen center
  - Smooth, responsive touch input handling
  - Multi-touch support with proper touch ID tracking

- **Documentation**: Comprehensive README.md
  - Game overview and features
  - Detailed controls (keyboard and touch)
  - Game mechanics explanation
  - Technical details and architecture
  - Getting started guide
  - Tips for high scores

### 🔧 Technical Implementation

#### Touch Event Handling
- Added touch event listeners (`touchstart`, `touchmove`, `touchend`, `touchcancel`)
- Implemented touch position tracking relative to screen center
- Converted touch input to WASD key states for seamless integration
- Proper touch ID tracking to handle multiple simultaneous touches
- Touch movement threshold (10px) to prevent accidental movements

#### Code Structure
- Added touch-related properties to `Game` class:
  - `touchActive`, `touchStartX/Y`, `touchCurrentX/Y`, `touchId`
- New methods:
  - `setupTouchControls()`: Initializes touch event listeners
  - `handleTouchStart()`: Handles touch initiation
  - `handleTouchMove()`: Updates touch position during drag
  - `handleTouchEnd()`: Resets touch state
  - `updateTouchMovement()`: Converts touch input to movement keys

#### UI Updates
- Updated instructions to mention touch controls
- Responsive design maintained for mobile devices

## 📊 Statistics

- **Files Changed**: 2
  - `index.html`: +123 lines, -1 line
  - `README.md`: +171 lines (new file)
- **Total Changes**: +293 insertions, -1 deletion
- **Commits**: 2

## 🧪 Testing

### Desktop Testing
-  Keyboard controls (WASD and Arrow Keys) still work correctly
-  No regression in existing functionality
-  Game performance unchanged

### Mobile Testing
-  Touch controls work on smartphones
-  Touch controls work on tablets
-  Movement is smooth and responsive
-  Touch input properly resets on touch end
-  Multiple touches handled correctly (only first touch tracked)

## 📱 Mobile Compatibility

The game now fully supports:
- iOS devices (iPhone, iPad)
- Android devices (phones and tablets)
- Other touch-enabled devices

Touch controls use the center of the screen as a reference point, making it intuitive for users to drag in any direction to move.

## 🎮 User Experience Improvements

1. **Accessibility**: Game is now playable on mobile devices without keyboard
2. **Intuitive Controls**: Touch and drag is natural for mobile users
3. **Documentation**: README provides clear instructions for all users
4. **No Visual Clutter**: Touch controls work without on-screen joystick

## 🔍 Code Quality

- Clean, maintainable code structure
- Proper event handling with `preventDefault()` to avoid browser defaults
- Touch events use `{ passive: false }` for proper scroll prevention
- Consistent with existing code style and patterns
- No breaking changes to existing functionality

## 📝 Notes

- Touch controls integrate seamlessly with existing keyboard controls
- Both input methods can work simultaneously (though not recommended)
- Touch movement uses the same movement system as keyboard input
- README includes comprehensive documentation for future developers

##  Checklist

- [x] Touch controls implemented and tested
- [x] Mobile compatibility verified
- [x] README.md created with comprehensive documentation
- [x] No regression in desktop functionality
- [x] Code follows existing patterns and style
- [x] Instructions updated to mention touch controls

---

**Ready for Review** 🚀

Reviewed-on: #4
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 01:31:15 -05:00
4bf8897370 Feature/Add workflow summaries (#3)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 8s
Build and Publish Docker Image / Publish to Registry (push) Successful in 7s
Reviewed-on: #3
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-25 18:32:17 -05:00
3d78da0228 Merge pull request 'Feature/Enhanced release notes' (#2) from feature/enhanced-release-notes into main
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 7s
Build and Publish Docker Image / Publish to Registry (push) Successful in 6s
Reviewed-on: #2
2025-11-25 17:33:33 -05:00
3ac719cfb1 Add release notes template with enhanced tag information
All checks were successful
Build and Publish Docker Image / Build and Validate (pull_request) Successful in 8s
Build and Publish Docker Image / Publish to Registry (pull_request) Has been skipped
2025-11-25 17:31:18 -05:00
b21a0e3a39 Feature/CI Workflow (#1)
All checks were successful
Build and Publish Docker Image / Build and Validate (push) Successful in 6s
Build and Publish Docker Image / Publish to Registry (push) Successful in 6s
# Add CI/CD Pipeline with Docker Build and Publish

## Summary
This PR adds a complete CI/CD pipeline for building and publishing Docker images of the Three.js game to the Forgejo container registry. The workflow automatically builds, validates, and publishes Docker images with semantic versioning when code is merged to main.

## Changes

### 🚀 CI/CD Workflow (`.forgejo/workflows/ci.yaml`)
- **Build & Validation**: Automatically builds Docker image on PRs and validates it works
- **Semantic Versioning**: Auto-increments patch version on each merge to main
  - First version: `0.1.0` (when no tags exist)
  - Subsequent merges: Auto-increments patch (e.g., `0.1.0` → `0.1.1` → `0.1.2`)
- **Publishing**: Publishes images to `git.jusemon.com/jusemon/threejs-test:<version>` and `latest` tag
- **Git Tagging**: Automatically creates git tags (e.g., `v0.1.0`) for releases
- **Registry Integration**: Uses Forgejo container registry with secrets-based authentication

### 🐳 Docker Setup
- **Dockerfile**: Custom nginx:alpine image with the game HTML file
- **docker-compose.yml**: Simple orchestration for local development
- **nginx.conf**: Minimal nginx configuration with gzip compression

## Workflow Behavior

### On Pull Requests
-  Builds Docker image
-  Validates image by running container and checking HTTP response
-  Does NOT publish (validation only)

### On Merge to Main
-  Builds Docker image
-  Validates image
-  Publishes to registry with version tag
-  Tags as `latest`
-  Creates git tag for the release

## Required Setup

Before merging, ensure these secrets are configured in the repository:
- `REGISTRY_USERNAME`: Forgejo username
- `REGISTRY_PASSWORD`: Personal Access Token with package write permissions

## Versioning Strategy

- **First Release**: `0.1.0` (when no tags exist)
- **Subsequent Releases**: Auto-increments patch version on each merge
- **Image Tags**:
  - `git.jusemon.com/jusemon/threejs-test:0.1.0`
  - `git.jusemon.com/jusemon/threejs-test:latest` (always points to latest main)

## Testing

The workflow includes validation steps that:
1. Build the Docker image
2. Run a test container
3. Verify the web server responds correctly
4. Only publish if all validations pass

## Benefits

-  Automated builds and deployments
-  Consistent versioning
-  Image validation before publishing
-  Easy rollback using version tags
-  Latest tag for easy deployment

Reviewed-on: #1
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-25 17:21:46 -05:00
fc24028ed9 Refactor to ES6 classes with GameObject inheritance pattern
- Convert from function-based to class-based architecture
- Create GameObject base class with common functionality (position, collision, scene management)
- Implement Player, Coin, and Obstacle classes extending GameObject
- Add Game class to manage game lifecycle and state
- Fix shadow rendering by configuring directional light shadow camera bounds
- Fix player collision to prevent sinking below ground (horizontal push only)
- Improve code organization and maintainability with OOP principles
2025-11-25 14:32:48 -05:00
0bf4afd499 initial commit 2025-11-25 14:21:59 -05:00