Now that the base game logic is in place, this course introduces user interaction, semantic scoring, and a leaderboard system to bring competition and personalization into the experience. Learners will integrate server logic that connects the frontend with dynamic game behavior.
Overview
Syllabus
- Unit 1: Scoring Word Similarity
- Initialize OpenAI Client in scorer.js
- Create scoreGuess Function Definition
- Implement OpenAI Embedding Logic in scoreGuess
- Implement Case Insensitive Similarity Scoring
- Implement the Cosine Similarity Function
- Implement Word Similarity Scoring
- Unit 2: Building a Game Leaderboard
- Initialize SQLite Database Connection in db.js
- Implement HighScore Table and toScoreObject Function
- Create submitScore and getLeaderboard Function Signatures
- Implement submitScore Function
- Implement getLeaderboard Function
- Leaderboard Sorting and Formatting
- Unit 3: Connecting Game Routes
- Create and Export Express Router Instance
- Implement the /game Endpoint
- Implement the /submit_guess Route
- Implement Submit Score Endpoint
- Implement Leaderboard Endpoint
- Unit 4: Building the Game Server
- Express App and Database Initialization for Word Prediction Game
- Initialize Highscores Table in Express App
- Integrate Express Router with createApp
- Implement Standalone Execution for Express Application