There Are Games in Here

javascriptgameseaster-eggs

There Are Games in Here

There are two games buried in this portfolio. I'm not going to tell you what they are. Finding them is part of the fun.

How to Find Them

Both games are available from either terminal mode — the default one you see when you open the terminal, and the other one. If you've found the other one, you already know it lists more commands than the restricted mode does, so the games are easier to discover there.

In the default terminal, you can still launch them. You just need to know what to type.

The Leaderboard Situation

Both games track high scores on the server. When you finish a round, your score gets saved to a database with your name and how long you played.

One of the games asks for your name when the round ends. Type whatever you want, hit save, and your name shows up on the leaderboard. Simple.

The other game doesn't ask. It pulls your identity from somewhere else in the session. If you haven't set that up, you'll show up on the leaderboard as a generic name. Not very satisfying when you've just beaten the high score.

Here's the hint: the terminal has environment variables. One of them determines who you are. If you want credit for your score, make sure the system knows your name before you start playing. The command you need isn't hidden — it's the same one any real terminal would use to set a variable.

Why Games

Because portfolios are boring. A list of projects and a contact form tells you what someone has built, but it doesn't give you a reason to stay. Games give people a reason to spend five minutes on the site instead of thirty seconds.

They also demonstrate things that are hard to show in a project description. Real-time WebSocket communication. Server-side game state. Canvas rendering. Input handling. Physics (sort of). These are all things that go into the games and they all run in the browser without any game engine or framework.

Scores Are Real

The leaderboards are persistent. They're stored in the same SQLite database as everything else on the site. If you set a high score today, it'll still be there next week. The scores endpoint is a real API — you can even check the leaderboard from the terminal without launching the game.

I check the scores occasionally. Some people get surprisingly competitive about it.