Skip to content

Commit

Permalink
KR resources documentation + Chess tutorial link (#1675)
Browse files Browse the repository at this point in the history
* Added KR resources documentation

* Adds KorGE Chess tutorial and code
  • Loading branch information
soywiz authored Jun 2, 2023
1 parent 20cc264 commit 7b8d5d7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Binary file added docs/korge/reference/resources/KR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/korge/reference/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ KorGE uses the [Virtual File Systems from Korio](/korio/) to load resources from
and its most basic resources are [Bitmaps from KorIM](/korim/) and [Sounds from KorAU](/korau/).
But it can also load bitmap fonts, tiled maps, etc.

## `KR`

Since KorGE 4.0.3, there is a new autogenerated class called `KR`. This is similar to Android `R`,
and provides a type-safe way of accessing resources. It exposes all the files in the resources folder,
and provides reading shortcuts for images and sounds. In the case of folders ended with `.atlas` it generates
automatically an optimized atlas of the images, and provides a way to access them.

KorGE IntelliJ plugin will also display previews for files and atlases:

![](KR.png)

You can see it in action in the KorGE youtube channel with the [KorGE Chess tutorial](https://www.youtube.com/watch?v=mSK7ruZbam0&list=PLzb5P1l-LxelGV8bWyT7tnLsF96MQxqCM&index=4).

## resourcesVfs

KorIO offers a `resourcesVfs` global property that holds a Virtual File System that include the
Expand Down
2 changes: 2 additions & 0 deletions docs/korge/samples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ priority: 2

- [Tobse's HitKlack Remake](https://blog.korge.org/showcase-tobses-hitklack-remake/) ([play it NOW](https://tobsef.github.io/HitKlack/webstart/index.html)) ([code](https://github.com/TobseF/HitKlack))

- [KorGE Chess](https://www.youtube.com/watch?v=mSK7ruZbam0&list=PLzb5P1l-LxelGV8bWyT7tnLsF96MQxqCM&index=4) ([code](https://github.com/korge-showcases/korge-chess))

## YouTube tutorials

### Korge main channel
Expand Down

0 comments on commit 7b8d5d7

Please sign in to comment.