How benceszalaiii/valorantgeoguessr works
1. Overall shape
This is a static browser game: HTML entry pages, shared JavaScript for behavior, and CSS for presentation. There is no obvious server-side application layer in the repo tree; the runtime appears to be the client browser plus static asset hosting.
2. Localized page structure
The app is duplicated by language into en/, hu/, de/, es/, fr/, jp/, and ar/. Each language folder contains its own index.html, game.html, leaderboard.html, and options.html, which suggests the UI text/navigation is localized per page while the core behavior is shared.
3. Core navigation entrypoint
The root index.html is the top-level entry, likely acting as the language selection or main landing page. From there, users move into the game, leaderboard, and options screens within the chosen language subtree.
4. Shared application logic
The javascript/ directory holds the main runtime modules:
- game.js for gameplay flow
- leaderboard.js for score/ranking views and submission
- options.js for user settings
- index.js for landing-page behavior
- locations.js for map/location data
- database.js for persistence/data access
- cookies.js for browser-stored preferences or session state
This separation implies a modular client-side architecture with feature-specific scripts.
5. Game flow
The central loop is likely: load a map/location set, present an image or scene, let the player guess, calculate distance/score, then advance through rounds and maps. The presence of sources/<Map>/<Difficulty>/ strongly indicates the game selects content by map and difficulty.
6. Content model
The sources/ tree is the main content boundary:
- map folders for Ascent, Bind, Breeze, Fracture, Haven, Icebox, Lotus, Pearl, Split
- difficulty subfolders: Easy, Medium, Hard
- additional asset groups: Logo, minimaps, and lang
This looks like a curated content pack of images and localization resources rather than dynamically generated data.
7. Leaderboard and persistence
leaderboard.html in each language and javascript/leaderboard.js suggest a separate ranking screen. database.js plus cookies.js imply that scores/settings are persisted on the client side and/or through a small data-access abstraction. The repo tree does not reveal a traditional backend service, so leaderboard storage is likely browser-based or handled via a lightweight external data layer hidden behind database.js.
8. Options/settings boundary
options.html and javascript/options.js represent a settings subsystem, likely controlling game preferences such as language, difficulty, sound, or display behavior. cookies.js indicates these preferences are stored across sessions in browser cookies or similar client storage.
9. Styling separation
Styling is split by feature in style/:
- style.css for shared/global layout
- game.css, leaderboard.css, options.css, submit.css for feature-specific views
That suggests each screen is treated as a distinct UI state with its own layout constraints rather than one SPA shell.
10. Authoring/tooling subsystem
The tools/ directory (index.js, map.html, style.css) is a separate internal tool, likely for preparing or previewing map images/content before they are placed into sources/. This is an important boundary: the main game consumes curated assets, while tools/ supports content creation/maintenance.
11. Data flow summary
User input flows from localized HTML pages into shared JS, which reads map assets from sources/, tracks preferences via cookies, and writes/reads score data through the database abstraction. The main external dependency is the browser itself; the only other named integration in the README is the GeoGuessr-style gameplay concept, not an API dependency.
12. What to show in an architecture diagram
A clean diagram would have three main layers:
- Localized pages (<lang>/...html, root index.html)
- Shared client logic (javascript/*.js)
- Static content/assets (sources/, style/)
with a side branch for tools/ as a content-authoring utility and a small persistence layer behind database.js/cookies.js.
Main entry points: game.js Game core · leaderboard.js Leaderboard · sources Maps · options.js Options
Components 21
Localized pages
Root and language-specific HTML entry points
- Landing · Top-level entry page
index.html - Lang pages · Per-language game, leaderboard, and options screens
Shared logic
Client-side JavaScript modules
- Home logic · Landing-page behavior
javascript/index.js - Game core · Gameplay flow and round handling
javascript/game.js - Leaderboard · Scoreboard display and submission flow
javascript/leaderboard.js - Options · User preferences and settings behavior
javascript/options.js - Locations · Map and location metadata
javascript/locations.js - Database · Score and data access abstraction
javascript/database.js - Cookies · Browser-stored preferences and session state
javascript/cookies.js
Static content
Game maps, imagery, and language assets
- Maps · Per-map source folders with difficulty variants
sources - Logos · Brand and UI imagery
sources/Logo - Minimaps · Mini-map imagery for gameplay UI
sources/minimaps - Lang assets · Shared language resources
sources/lang
Styles
Global and feature-specific CSS
- Global CSS · Base layout and shared presentation
style/style.css - Game CSS · Game screen styling
style/game.css - Leaderboard CSS · Leaderboard screen styling
style/leaderboard.css - Options CSS · Options screen styling
style/options.css - Submit CSS · Submission dialog styling
style/submit.css
Tooling
Content-authoring utilities
- Tool UI · Map/content preparation entrypoint
tools/index.js - Map editor · Map preview or editing page
tools/map.html - Tool CSS · Styling for the authoring tool
tools/style.css
Connections 23
- Landing → Home logic: loads · Landing page behavior
- Landing → Global CSS: styles · Shared layout and presentation
- Lang pages → Game core: game page · Localized gameplay screens use the shared runtime
- Lang pages → Leaderboard: leaderboard · Localized scoreboard screens use shared logic
- Lang pages → Options: options · Localized settings screens use shared logic
- Lang pages → Global CSS: styles · Shared base styling
- Game core → Locations: uses · Loads map/location metadata
- Game core → Database: stores · Persists score or run data
- Game core → Cookies: reads · Reads player preferences
- Leaderboard → Database: reads/writes · Leaderboard data access
- Leaderboard → Cookies: reads · Language or preference state
- Options → Cookies: saves · Persists settings across sessions
- Locations → Maps: indexes · Map content hierarchy
- Maps → Logos: includes · Shared imagery assets
- Maps → Minimaps: includes · Mini-map imagery assets
- Maps → Lang assets: includes · Localization resources
- Game core → Game CSS: styles · Game view styling
- Leaderboard → Leaderboard CSS: styles · Leaderboard view styling
- Options → Options CSS: styles · Options view styling
- Leaderboard → Submit CSS: styles · Submission UI styling
- Tool UI → Map editor: opens · Tool entry to map page
- Tool UI → Tool CSS: styles · Tool-specific styling
- Map editor → Maps: edits/uses · Authoring tool works on content packs