Posts

Showing posts from April, 2026

Building a Country Higher or Lower Game

I Built a Country Higher or Lower Game with JavaScript and Country Data I recently built a small browser game called Country Higher or Lower. The idea is simple: the game shows two countries, one population is visible, and the player has to guess whether the other country has a higher or lower population. This project is based on a similar idea to my Pokémon Higher or Lower game, but it feels different in practice. Pokémon stats are fun if you know Pokémon, but countries are much more general. Almost everyone understands the concept immediately. You see two countries, compare them, and make a guess. That is why I think this version works well as a small browser game. It is clean, fast to play, and easy to understand. The player does not need to read a long explanation before starting. The game can be played directly in the browser, and it also works on mobile. You can play the game here: Country Higher or Lower Game The source code is available here: Country Higher or L...

How to Embed a GitHub Pages Project in Blogger

How to Embed a GitHub Pages Project in Blogger One of the most useful things I learned while building small web projects is that you can host a project on GitHub Pages and then embed it directly into a Blogger post or page. This is especially helpful if you are making small tools, browser games, JavaScript experiments, generators, calculators, or interactive pages. Instead of only writing about the project, you can let people try it directly on your blog. For example, I use this workflow for some of my own web tools. I build the project with HTML, CSS, and JavaScript, publish it with GitHub Pages, and then place it inside a Blogger page using a simple iframe. What you need To embed a GitHub Pages project in Blogger, you need three things: A working GitHub Pages project A Blogger post or Blogger page A little bit of HTML knowledge You do not need a complex setup. The main idea is simple: GitHub Pages hosts the actual project, and Blogger displays it inside y...

How to Use APIs in a Web Game (Pokémon Example with JSON Optimization)

I built a simple browser game where you compare two Pokémon and guess which one has higher total stats. The idea is simple: you see two Pokémon, choose the one you think is stronger, and then the game checks the real data. The project started as a small JavaScript game using the PokéAPI. At first, the game fetched new Pokémon data directly from the API during gameplay. That worked, but it also created a scaling problem. Every round needed new API requests, and every player would create more requests. To fix that, I changed the project so the game uses a local JSON file instead. The API is still used, but only once during the data-building step. During gameplay, the game loads the prepared JSON file and runs almost completely locally in the browser. Play the Pokémon Higher or Lower Game View Source Code Overview The earlier random Pokémon generator The first approach: fetching data per round ...