Skip to content

Online games

Totometeo

Online weather prediction game played in leagues: players forecast real conditions and the score comes automatically from Open-Meteo data.

TypeOnline games

The problem

Everybody thinks they can guess the weather. The idea behind Totometeo was to turn that into a game played in leagues, in the style of the TotoMondiale football prediction game: players forecast the weather of a city at a given hour, and the real data decides who scores. The game has to run on its own: close predictions on time, fetch the real weather, compute points and update standings, with nobody doing it by hand.

What I built

I built Totometeo, an online weather prediction game with public and private leagues and automatic scoring from real weather data.

  • Leagues — players create public or private leagues and invite friends with a 6-character code that leaves out look-alike characters such as I, O, 0 and 1. A general league includes everyone.
  • Rounds and predictions — each round holds weather events with a city, a time and a deadline. For each event the player predicts the sky condition, temperature, rain yes or no, millimetres of rain, wind speed and, optionally, a rare event such as hail or strong wind. Predictions can be changed until the deadline, then they lock.
  • Real weather data — after the event the app reads the hourly values from Open-Meteo, and falls back to the historical archive if the forecast data is missing. WMO weather codes are mapped to the game’s 7 conditions, and rare events are detected from the data, for example wind of 50 km/h or more.
  • Scoring engine — 10 scoring rules and 2 tolerances, from 5 points for the exact condition to a 10-point rare-event bonus. Every score is saved with its breakdown, so a player can see exactly where the points came from.
  • Automation — one scheduled job closes expired events every minute; another, every 15 minutes, fetches the real weather and scores up to 25 events per cycle.
  • Standings and admin — league, general and historical standings, and an admin panel for rounds, events, weather fetches, scoring, rules, users and leagues, with a log of admin actions.

Built with

Node.js and Express with server-rendered EJS pages. MySQL or MariaDB through the Prisma ORM, with 10 data models. Sessions with express-session and passwords hashed with bcrypt. Scheduled jobs with node-cron, processes managed by PM2 behind Nginx. Weather data comes from Open-Meteo, which needs no API key.

Why it was done this way

The scoring rules live in the database, not in the code. The default values from the game specification are loaded once at setup, and the administrator can then change points and tolerances from the panel without a new release. Because each score keeps its breakdown, any change to the rules stays transparent to the players.

Got an idea?
Let's talk.

Whether it is a website, an app, a video, a song or something bigger, I am ready to help you make it.

Get in touch
  • Naples
  • Ideas
  • Projects
  • People
  • Always forward