Skip to content

LuSilvaDeveloper/Frogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿธ Frogger (HTML5 Canvas)

A fully playable Frogger-style arcade game built from scratch using vanilla JavaScript and HTML5 Canvas.
This project focuses on game fundamentals, including game loops, collision detection, sprite animation, and state management โ€” without using any external game engines.


๐ŸŽฎ Features

  • Classic Frogger gameplay
  • Multi-layer canvas rendering (background, sprites, UI)
  • Custom game loop and timing system
  • Collision detection (vehicles, logs, river)
  • Score, lives, and countdown timer
  • Start screen and end-game screen
  • Sprite atlas rendering

๐Ÿ›  Technologies Used

  • JavaScript (ES6)
  • HTML5 Canvas
  • CSS
  • No external libraries or frameworks

๐Ÿง  Architecture Overview

  • Three Canvas Layers

    • Background (static environment)
    • Sprites (moving objects)
    • Interface (UI & overlays)
  • Core Concepts Implemented

    • Manual game loop
    • State-based game flow (start, playing, end)
    • Axis-aligned bounding box (AABB) collision
    • Sprite atlas rendering
    • Object movement and wrapping logic

๐ŸŽฏ Controls

Action Key
Move Up Arrow โ†‘
Move Down Arrow โ†“
Move Left Arrow โ†
Move Right Arrow โ†’

Click Start to begin or Play Again after game over.



๐Ÿšง Next Steps

This project is intentionally built without a game engine to focus on core gameplay and system fundamentals.

Planned improvements include:

  • ๐Ÿ” Rewrite the game in C++

    • Implement the same mechanics using C++ and a lightweight graphics library (SFML or SDL)
    • Recreate the game loop, collision detection, and entity system
    • Compare architectural differences between JavaScript and C++
    • Explore memory management, ownership, and performance considerations
  • ๐Ÿงฑ Improve architecture

    • Introduce a Game class to own global state
    • Convert entities (Frog, Vehicles, Logs) into reusable components
  • ๐ŸŽฎ Gameplay improvements

    • Difficulty scaling
    • Level progression
    • Improved collision precision
    • Sound effects and animations

The goal is to use this project as a cross-language gameplay engineering exercise

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published