Skip to content

Talk

Nostalgia Meets Technology: Super Mario with TypeScript

BASTA!by Manfred Steyer

Slides of the talk (33)

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

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)