My first game in Kotlin
Introduction
are you bored at work?
what give you this presenation?
Kotlin
Why Kotlin?
LLVM is future
compilation to js
Język dla przemysłu
Title Text
- Bullet One
- Bullet Two
- Bullet Three


7 best features
Syntax
Function extenions
Receivers
Property delegate
Nullsafe
Highorder functions
Java compability
Libgdx
LWJGL
JNI
- The library accesses native C code through the Java Native Interface (JNI). Bindings to each of the native libraries exist as different modules so developers can make custom builds with only the things they need in a certain program
- Kotlin external fun
org_lwjgl_opengl_GL11C.c
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin urna odio, aliquam vulputate faucibus id, elementum lobortis felis. Mauris urna dolor, placerat ac sagittis quis.
GL11C.java
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin urna odio, aliquam vulputate faucibus id, elementum lobortis felis. Mauris urna dolor, placerat ac sagittis quis.
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glClearColor(
JNIEnv *__env,
jclass clazz,
jfloat red,
jfloat green,
jfloat blue,
jfloat alpha
) {
glClearColorPROC glClearColor = (glClearColorPROC)tlsGetFunction(279);
UNUSED_PARAM(clazz)
glClearColor(red, green, blue, alpha);
}
/**
* Sets the clear value for fixed-point and floating-point color buffers in RGBA mode. The specified components are stored as floating-point values.
*
* @param red the value to which to clear the R channel of the color buffer
* @param green the value to which to clear the G channel of the color buffer
* @param blue the value to which to clear the B channel of the color buffer
* @param alpha the value to which to clear the A channel of the color buffer
*
* @see <a target="_blank" href="http://docs.gl/gl4/glClearColor">Reference Page</a>
*/
public static native void glClearColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha);
libgdx
Framework do tworzenia gier 2D/3D
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL), audio (OpenAL) and parallel computing (OpenCL) applications. This access is direct and high-performance, yet also wrapped in a type-safe and user-friendly layer, appropriate for the Java ecosystem.
Libgdx is a Java game development framework that provides a unified API that works across all supported platforms.
The framework provides an environment for rapid prototyping and fast iterations. Instead of deploying to Android/iOS/Javascript after each code change, you can run and debug your game on the desktop, natively. Desktop JVM features like code hotswapping reduce your iteration times considerably.
Wieloplatformowość
- Windows
- Linux
- Mac OS X
- Android (2.2+)
- BlackBerry
- iOS
- Java Applet (requires JVM to be installed)
- Javascript/WebGL (Chrome, Safari, Opera, Firefox, IE via Google Chrome Frame)
Audio/Input/IO
- Streaming music and sound effect playback for WAV, MP3 and OGG
- Abstractions for mouse and touch-screen, keyboard, accelerometer and compass
- Gesture detector, detects taps, panning, flinging and pinch zooming
- File system abstraction for all platforms
- Read-only file system emulation for Javascript backend
- Binary file support for Javascript backend
- Preferences for lightweight setting storage
Grafika
- Rendering through OpenGL ES 2.0 on all platforms
- Custom OpenGL ES 2.0 bindings for Android 2.0 and above
- textures, shaders
- camera
- 2D Particle system
- UI support
TMX tile map support
https://doc.mapeditor.org/en/stable/manual/layers/
2D Particle Editor
- Bullet One
- Bullet Two
- Bullet Three
TexturePacker
- Bullet One
- Bullet Two
- Bullet Three
Architektura gry
main loop
entity
Actor
- Bullet One
- Bullet Two
- Bullet Three
physics
Box2D support
- Bullet One
- Bullet Two
- Bullet Three
light
particles
events
Quo vadis?
Problems
Grafika
Nie musi być skomplikowana,
można użyć światła, cząsteczek
IoC
How it looks like?
Ending
deck
By Kamil Lolo
deck
- 747