Module · Detail
Frogger: Screen Control and Screen Boundaries
This module introduces the implementation of inputs as controlling actions within a game rule. At the same time, it shows how movement logic is modeled and limited to screen boundaries in fixed raster steps.

Introduction (Original excerpt)
Didactic classification
Subjective objective
This module deals with the implementation of inputs as controlling actions within a game. Initially, an abstract input model with actions is introduced, which maps multiple keys to a common game action. Then a rule is implemented that evaluates these actions and moves the game figure in fixed raster steps. At the same time, the connection between input, rule, and state change is made clear through the use of structured decision logic. Another focus lies on limiting coordinates within the visible game field. This makes it clear how mathematical boundary conditions and gameplay mechanics are connected with each other. The module thus illustrates the interplay between input model, game rule, and position logic.
Competence development
- Modeling inputs through actions instead of individual keys
- Linking inputs with game rules to control a game figure
- Implementation of raster-based movement in fixed pixel steps
- Application of structured decision logic to avoid simultaneous movements
- Use of context data such as window size for position limiting
- Understanding the connection between coordinate system and movement direction
- Secure processing of game objects through existence check before access
Didactic added value in teaching
- Clear structured introduction to the interplay between input and gameplay mechanics
- Transparent progression from simple actions to complete movement logic
- Promoting systematic thinking through structured decision logic
- Transparent goal orientation through visible change of game figure position
- Flexible adaptability for different learning groups or extension tasks
Lesson flow
Grid movement via keyboard + limitation
In this step, an action model for the game figure is defined by binding multiple key inputs to common movement actions. Subsequently, a game rule is implemented that evaluates these actions and moves the figure in fixed grid steps. Finally, a limiting logic is added to ensure that the figure cannot leave the playing field.
- Input processing and grid movement
- Typical challenge: correct decision structure and limitation of coordinates
Work assignment (excerpt)
Example (excerpt)
The following fragment shows the central structure of the movement logic with grid-based control.
| |
The structure illustrates how inputs are converted into distinct movement actions.
Notes for teaching practice
- The module is suitable as a short lesson unit after an introduction to scenes and game rules.
- Differentiation is possible by adding additional movement directions or alternative control methods.
- Results can be secured together by analyzing the interaction of action, rule, and position change.
- Extensions offer themselves for example through diagonal movement, different step lengths or animations.
- The content can be well connected with topics such as event processing, simulation or game development.
The clearly structured task sequence supports a transparent lesson organization and facilitates the securing of results. Differentiation can be done through additional control logics or extension tasks.
Request a demo access and test the module in your own course context.