Module 3 of 5

Choose Your Game Stack

20 minutes
3 sections

Learning Objectives

  • Choose Node.js or Python 3.12
  • Create the right starting project
  • Run a blank game loop before adding features
Section 1

Node.js Track

Choose this track if you want a browser game. Codex will build a Vite project with an HTML Canvas game.

Ask Codex:

Create a Node.js browser game project for a space alien shooter using Vite and plain TypeScript or JavaScript. Keep it simple: one canvas, one main game file, and npm scripts for dev and build. After creating it, tell me the exact command to run it locally.

Expected command:

npm run dev

Success means a local browser page opens with a blank or simple canvas.

Exercises

  • 1Run the local dev server.
  • 2Confirm you can see a canvas or starter screen.
Section 2

Python 3.12 Track

Choose this track if you want a desktop game window. Codex will build a Pygame project.

Create and activate the environment first:

conda create -n alien-shooter python=3.12 -y
conda activate alien-shooter
pip install pygame-ce

Then ask Codex:

Create a Python 3.12 Pygame space alien shooter project. Keep it beginner-friendly: one main.py file at first, clear constants at the top, and no art files yet. Create a running game window with a dark starfield background and a player ship placeholder. After creating it, tell me the exact command to run it.

Expected command:

python main.py

Exercises

  • 1Run python main.py.
  • 2Confirm a game window opens.
Section 3

Stop and Verify

Before adding enemies, verify three things:

  • You can run the project from a fresh terminal.
  • You know which file contains the main game loop.
  • You can stop the game and start it again.

If any of these fail, ask Codex to fix the setup before moving on.