Course Template

The Complete Frogger: From Scene to Polish

Learn frameCraft with Frogger: Movement, Collisions, HUD, Restart Logic, and Graphic Design – Step by Step as a Complete Teaching Template.

Category: frameCraft Language: Python 2 Components: 12 Theme: pygame / Game-DSL
Includes teaching materials: PowerPoint slides and handouts for teachers.
Preview Image: The Complete Frogger: From Scene to Polish

Didactic Objective

A complete game as a structured learning series

This course template guides through the development of a simple Frogger game with the Game-DSL frameCraft. The focus is on systematically building central gameplay mechanics such as movement, collisions, state management, and user interfaces.

Modeling

Students recognize how game figures, enemies, level strips, and game states are modeled as clear program structures.

Implementation

Gameplay mechanics grow step by step: Scene, Rules, Inputs, Movement, Collisions, Points, Lives, HUD, and Restart Logic.

Reflect

At the end, the codebase will be revised: structure, naming, and comments make it clear how a project remains maintainable.

Preview: Collisions and Lives in Frogger

Competence Building

From the first object to the game state

The template shows not only that a game works. It makes it clear how interactive systems are built: through scenes, recurring rules, events, object tags, and state variables.

  • Foundations of Game Structure with Scene, Build Phase, and Rules
  • Motion Logic and Input Processing via Actions
  • Raster-Based Control of Game Figures with Screen Boundaries
  • Time-Based Enemy Movement with Delta-Time
  • Collision Handling, Lives, Points, and Game State
  • HUD, Graphic Forms, and Clean Code Organization

Structure of Building Blocks

Twelve Steps from Scene to Polish

The building blocks are designed so that learners can continuously expand the game. Each unit adds a clearly recognizable function and strengthens a specific informatic concept.

Preview: Scene and Rule: Frog Automatically Moves

Scene & Rule: Frog Automatically Moves

Introduction to the basic structure of a frameCraft game with scene, object, and automatically executed rule.

20 minutes🧩 1 Task
Preview: Frogger Raster Control and Screen Boundaries

Frogger: Raster Control and Screen Boundaries

Implementation of a raster-based control through actions as well as limitation of the game figure to the visible play area.

20 minutes🧩 1 Aufgabe
Preview: Touch-Buttons via VKNO

Touch-Buttons: same Frog-control via VKNO

Alternative input options through virtual buttons that trigger the same actions as keyboard control.

20 minutes🧩 1 Aufgabe
Preview: Level layout Road markings and signs

Level layout: Road markings and signs

Game landscape construction using helper functions and loops for recurring level structures.

25 minutes🧩 1 Aufgabe
Preview: Frogger Cars with dt and Wrap-around

Frogger: Cars with dt & Wrap-around

Time-based movement for enemy objects and continuous movement across screen boundaries.

⏱️ 25 min🧩 1 Aufgabe
Preview: Frogger Cars data-driven generation

Frogger: Cars data-driven generation

Automated creation of multiple enemies through data-driven structures and systematic naming conventions.

⏱️ 35 min🧩 1 Aufgabe
Preview: Collisions and Lives Frogger Logic

Collisions & Lives: Frogger-Logic

Implementation of collision events and game state management over lives, respawns, and game over.

20 minutes🧩 1 Task
Preview: Victory condition points and game state

Frogger: Victory condition, points & Game State

Extension with point allocation, victory condition, and clear game states for the course of a level.

25 minutes🧩 1 Task
Preview: HUD and end texts with frameCraftUI

HUD & End texts with frameCraftUI

Development of a user interface to display lives, points, and game endings.

20 minutes🧩 1 Task
Preview: Robust restart with lock and button

Robust restart with lock and button

Stable reset logic with locking mechanism as well as an embedded restart button after game end.

25 minutes🧩 1 Task
Preview: GFX forms and coordinates

Frogger: GFX forms & Coordinates

Design of game figures and enemies through programmed graphic forms in the local coordinate system.

35 minutes🧩 1 Task
Preview: Frogger Refactoring Structure and naming

Frogger-Refactoring: Structure & Naming

Overhaul of the code base through clear structuring, consistent naming, and explanatory comments.

⏱️ 35 min🧩 1 Aufgabe

Example from the course

Collisions and lives will be visible as game state

In the module "Collisions & Lives", the central Frogger logic is implemented: When the frog touches a car, a life is deducted. Then the game state decides whether the figure is reset or the game is ended.

def kollision_auto(ctx, frosch_e, auto_e):
    if ctx.vars.get("tot"):
        return
    ctx.vars["leben"] -= 1
    frog_ent = ctx.E("frosch")
    if ctx.vars["leben"] <= 0:
        ctx.vars["tot"] = True
        if frog_ent is not None:
            frog_ent.alive = False
    else:
        if frog_ent is not None:
            frog_ent.x = FROG_START_X
            frog_ent.y = FROG_START_Y

BEI_KOLLISION(“frosch”, “auto”, kollision_auto)

Use in teaching

Directly usable and easy to adapt

The clearly structured modules enable transparent lesson planning and facilitate integration into existing computer science courses. Teachers can use the template immediately and then adapt it to group, time frame, and teaching setting.

For beginners

The course starts with visible movements and simple rules. This creates quick success experiences and a clear entry into frameCraft.

For project work

The modules can be connected to form a longer lesson series, a project day, or a differentiated extension task.

For own variants

From the Frogger basic framework, new levels, enemies, rules, graphics, scoring systems, or your own game ideas can emerge.

Try now

Use Frogger as a template for your own game projects

This template supports the structured development of a simple game and illustrates central principles of modeling and implementing interactive systems.