Szófogó

Szófogó is an online multiplayer word puzzle game. I worked on the project as freelance game programmer for over a year. Currently, it only supports the Hungarian language. It also features a single-player mode, where players can compete against bots with varying difficulty levels based on the player's in-game level. The higher your level, the smarter the bots become, ensuring you always have competition.

Szófogó AI Logic

One of my biggest challenges was refactoring the AI logic. I implemented a solving algorithm and created a custom Trie data structure to store the game's word dictionary, which was previously stored as simple strings. This was particularly challenging because the Hungarian language includes special characters made up of 2-3 letters, which are counted as a single letter in the game. I solved this by replacing these multi-character letters with special characters or numbers, allowing them to be stored as individual bytes.

Szófogó Performance

I primarily worked on the single-player aspect of the game but also contributed to some network-related features. For example I was working on implementing a flexible, reusable, and scalable system for player banners, displaying user data (username, profile picture, location, etc.) retrieved from a database. Additionally, I handled various front-end tasks, including UI animations and implementing a completely new UI design created by someone else.

Szófogó UI Implementation

The new data structure and algorithm greatly improved performance, eliminating the game's previous lag during the robot players' turns. Initially, the AI code had been patched over time to include features like bonus tile calculations and cross-word logic, but this made it increasingly difficult to add new functionality and led to performance issues. After some research, I spent a couple of weeks refactoring the code, and the results were impressive. On the hardest difficulty settings, the AI became nearly unbeatable for most players.

Take aways

Over the one year I spent working on the project, I learned a lot and improved both my hard and soft skills.

Some key takeaways include:

  • Taking ownership of my work: This was the first time my work had to be reported to someone. My code was reviewed, and I had to follow an already established system, rather than coding independently.

  • Importance of code reviews: I learned the value of having my code reviewed and adhering standards, which improved the quality of my work and collaboration.

  • Effective communication: While text communication was efficient for smaller tasks, I realized the importance of holding meetings before larger refactors or feature implementations to prevent miscommunication or misunderstandings.

  • Working with legacy code: I gained experience working with existing codebases and learned how to refactor and improve them without breaking functionality.

  • Performance optimization: I learned how to identify performance bottlenecks and implement efficient data structures and algorithms to solve them.