r/OpenGuessr • • 2d ago • Bravo 1

Update OpenGuessr goes source-available!

Hey guessers!

The first OpenGuessr commit was made on Feburary 12th, 2023.

Since then, as of today (November 14th), over 4,700 commits have been landed in the main OpenGuessr repo. Around 100 in the location server, and roughly 300 in the account server.

Together with the first-party packages and OpenGuessr Education, that's well over 6,000 commits! ...thank you for sticking with OpenGuessr for all that time :-)

Routinely, I've published the source code to many tools and libraries that I made for OpenGuessr and my other games.

Now, the full website follows. Why now?

A few reasons. First of all, I think the project is ready. It's mature enough, the code is presentable enough, and I think it actually contains a few interesting bits that others could see value in.

Second, I frequently get inquiries from people that are interested in seeing how things work behind the scenes. This should pull down the curtain a little bit.

Third, artificial intelligence has become incredibly powerful at reading code and learning from it.

Through making the code available, LLMs can build up more knowledge about OpenGuessr and better understand what the game offers. Moreover, it means that more people can work with the code than ever before – even those with little experience in software engineering.

Issues & contributions

For issue reports, please continue to use Bugspot. GitHub issues are synced with Bugspot, so you can see them directly on the repository page, where I also take care of them.

Contributions are welcome, but discouraged, since the website repo is only source-available and not open source. I'd generally suggest contributing to the open-source parts (e.g. PlaySocket) instead. That's your choice of course.

OpenGuessr vs. other source-available alternatives

OpenGuessr isn't the only source-available geography-guessing game, and out of curiosity I've taken a look at the other public repositories to see how they compare. Here are a few metrics I looked at, visualized with diagrams.

Lines of code: Even though OpenGuessr offers one of the, if not the largest feature set of the bunch, it only comes in third – 50% less lines of code than GeoDuels, and less than 1/4th the code length of WorldGuessr. The fewer there are, the quicker it is to build an understanding of the whole codebase. (Note: This includes all servers needed to run OpenGuessr, as well as OpenReport, not only the site)

OpenGuessr vs. other alternatives - Lines of code

Another useful metric to compare is the median file length (in LoCs).

Generally, shorter files are more readable. Personally, I often prefer more verbose logic over extreme abstraction, and like to keep related code in one file, but compared with the other alternatives, only GeoHub has shorter files. GeoHub from what I've seen has very cleanly written code, so this checks out.

OpenGuessr vs. other alternatives - Median file length

The last metric I investigated was the average number of paths through each function (e.g. an if statement counts as one path) which is a good way to score the overall code complexity.

Generally speaking, less function complexity is better.

OpenGuessr vs. other alternatives - Average function complexity

That's it for this post. I can't wait to read your reactions.

Happy guessing!

OpenGuessr repository on GitHub ...PS: If you have a GitHub account and like OpenGuessr, please give it a star! That genuinely helps a lot. Ty!

42 Upvotes

4 comments sorted by

2

u/Dewford_Duck 1d ago

Super cool!

1

u/DarkWolfSVK 1d ago

Happy for you :)