Skip to content

Talk

Nostalgia Meets Technology: Super Mario with TypeScript

DWX 2026by Manfred Steyer

Slides of the talk (32)

  1. Slide 1 of 32: Nostalgia Meets Technology
  2. Slide 2 of 32
  3. Slide 3 of 32: 1) Just for Fun!
  4. Slide 4 of 32: 1) Game Loop
  5. Slide 5 of 32: About Me
  6. Slide 6 of 32: DEMO
  7. Slide 7 of 32: Loading Images
  8. Slide 8 of 32: Game Loop
  9. Slide 9 of 32: A Simple Game Loop
  10. Slide 10 of 32: A Simple Game Loop
  11. Slide 11 of 32: A Simple Game Loop
  12. Slide 12 of 32: A Simple Game Loop
  13. Slide 13 of 32: A Simple Game Loop
  14. Slide 14 of 32: Tiles & Coordinates
  15. Slide 15 of 32: (Cols, Rows) vs. (x, y)
  16. Slide 16 of 32: GameGrid
  17. Slide 17 of 32: Gravity
  18. Slide 18 of 32
  19. Slide 19 of 32: WHILE not at ground
  20. Slide 20 of 32: DEMO
  21. Slide 21 of 32: Side Scrolling & View Port
  22. Slide 22 of 32: View Port
  23. Slide 23 of 32: DEMO
  24. Slide 24 of 32: Collision Detection
  25. Slide 25 of 32: Bounding Boxes
  26. Slide 26 of 32: First, in 1D
  27. Slide 27 of 32: First, in 1D
  28. Slide 28 of 32: Bounding Boxes
  29. Slide 29 of 32: DEMO
  30. Slide 30 of 32: Architecture, Concepts, Implementation
  31. Slide 31 of 32: 1) Game Loop: Take Care of Time Delta
  32. Slide 32 of 32: [Social Media] Manfred Steyer
Slide text (all slides)
  1. Nostalgia Meets Technology Super Mario with TypeScript ANGULARarchitects.io
  2. –
  3. 1) Just for Fun! 2) Learning/ Repeating Typical Patterns 3) Nice Programming Exercise Why?
  4. 1) Game Loop 2) Tiles & Coordinates 3) Gravity 4) Side Scrolling & View Port 5) Collision Detection Agenda
  5. About Me (Remote) Angular Workshops and Consulting Google Developer Expert for Angular Blog, Books, Articles, and Talks about Angular Manfred Steyer, ANGULARarchitects.io
  6. DEMO
  7. Loading Images const response = await fetch('/hero.png'); const blob = await response.blob(); const heroTile = await createImageBitmap( blob, 0, // x 8, // y 16, // width 16 // height );
  8. Game Loop
  9. A Simple Game Loop function tick(ctx: HeroContext, timeStamp: number): void { […] }
  10. A Simple Game Loop function tick(ctx: HeroContext, timeStamp: number): void { console.log('timeStamp', timeStamp); […] }
  11. A Simple Game Loop function tick(ctx: HeroContext, timeStamp: number): void { console.log('timeStamp', timeStamp); if (keyboard.right) { ctx.x += 1; } […] }
  12. A Simple Game Loop function tick(ctx: HeroContext, timeStamp: number): void { console.log('timeStamp', timeStamp); if (keyboard.right) { ctx.x += 1; } ctx.context.clearRect(0, 0, 1000, 1000); ctx.context.drawImage(ctx.heroTile, ctx.x, ctx.y, 16, 16); […] }
  13. A Simple Game Loop function tick(ctx: HeroContext, timeStamp: number): void { console.log('timeStamp', timeStamp); if (keyboard.right) { ctx.x += 1; } ctx.context.clearRect(0, 0, 1000, 1000); ctx.context.drawImage(ctx.heroTile, ctx.x, ctx.y, 16, 16); requestAnimationFrame((timeStamp) => tick(ctx, timeStamp)); }
  14. Tiles & Coordinates
  15. (Cols, Rows) vs. (x, y)
  16. GameGrid gameGrid[0][0] = { tile: skyTile }; gameGrid[1][0] = { tile: skyTile }; […]
  17. Gravity
  18. –
  19. WHILE not at ground Increase y by velocity Increase velocity Idea
  20. DEMO
  21. Side Scrolling & View Port
  22. View Port Scroll Offset Scroll Offset + View Port Width x renderX x - renderX
  23. DEMO
  24. Collision Detection
  25. Bounding Boxes
  26. First, in 1D < <
  27. First, in 1D < <
  28. Bounding Boxes a.left < b.right b.left < a.right a.top < b.bottom b.top < a.bottom a b
  29. DEMO
  30. Architecture, Concepts, Implementation Modern Angular 400+ pages, PDF, EPUB Regular Free Updates! Q1/2026 Waiting List: angular-book.com
  31. 1) Game Loop: Take Care of Time Delta 2) Tiles & Coordinates 3) Gravity: Increase/ Decrease Velocity 4) Side Scrolling & View Port: Change Offset i/o Hero Coordinates 5) Collision Detection: Bounding Boxes 6) We had fun! Conclusion
  32. [Social Media] Manfred Steyer [web] ANGULARarchitects.io Manfred Steyer @ Manfred Steyer Slides, Examples, Book Remote Company Workshops and Consulting http://angulararchitects.io

Book tip

Modern Angular

Architecture, Concepts, Implementation: practical guidance for modern Angular – Signals, Signal Forms, the NgRx Signal Store, AI and architecture.

More about the book: Modern Angular (opens in a new window)