Koding in Kotlin: KorGE. Part 2: Cleanup code, put it into GitHub, make it change color on collision

Опубликовано: 11 Октябрь 2024
на канале: Koding in Kotlin
113
4

What we did today:

Published the whole thing to GitHub and checked that it works
Tried to figure out how to add a dotted stroke (and failed)
Made the ball change the colors when it hit the border
Added a keyboard control of the ball's velocity

Repository: https://github.com/cra/koding-in-kotlin/
Demo: https://cra.github.io/koding-in-kotlin

#Kotlin #KorGE #gamedev #programming #learning

00:00 Intro
02:12 Publishing the project on GitHub
07:45 Pasha explains what we built last time from the physics and framework point of view while Igor sets up a GH action (plot twist: no setup was necessary, just enable GH pages, and it works)
13:50 We are surprised to see it works in the browser and how easy it is
16:00 Trying to see if it's easy to make the border using dashed stroke, but it's not that easy, apparently
23:00 Picking a more straightforward task: changing color when hitting a border and picking a new color randomly from a preset list
30:00 Searching for a to-do list plugin in IDEA: there's none, apparently! Let's improvise a markdown TODO-list instead
40:44 Adding keyboard/mouse input to the project
53:28 Storing ball velocity separately in a separate hashMap and learning about nullable receivers and how we can protect against it
01:20:00 Accounting for ball direction when changing velocity
01:27:06 Wrapping up, making plans, and pushing commits
01:30:40 Waiting for an updated build