This is a port of B4A GameView library and modules.
If you are not familiar with it then start with these tutorials:
https://www.b4x.com/android/forum/threads/20038/#content
https://www.b4x.com/android/forum/threads/20075/#content
GameView is implemented as a Class module. It is included in the attached example.
It depends on a library named jGameViewHelper. This library is also attached.
The attached example is a port of B4A asteroids game example (make sure to change the video settings to HD):
jGameViewHelper includes the following features:
- Low latency playback (LoadAudioClip / PlayAudioClip)
- DrawImageRotateAndFlipped - Allows drawing rotated and flipped images.
- AddKeyListener - Adds a key listener to the form and allows handling the key events before they are processed by other controls.
- SetBoxBlur - This method should improve the smoothness of Canvas drawings.
You can run it in debug mode however it will be very jumpy. The performance should be good in release mode.
The compiled executable jar file is available here www.b4x.com/b4j/files/Asteroids.jar (Requires Java 8)
If you are not familiar with it then start with these tutorials:
https://www.b4x.com/android/forum/threads/20038/#content
https://www.b4x.com/android/forum/threads/20075/#content
GameView is implemented as a Class module. It is included in the attached example.
It depends on a library named jGameViewHelper. This library is also attached.
The attached example is a port of B4A asteroids game example (make sure to change the video settings to HD):
jGameViewHelper includes the following features:
- Low latency playback (LoadAudioClip / PlayAudioClip)
- DrawImageRotateAndFlipped - Allows drawing rotated and flipped images.
- AddKeyListener - Adds a key listener to the form and allows handling the key events before they are processed by other controls.
- SetBoxBlur - This method should improve the smoothness of Canvas drawings.
You can run it in debug mode however it will be very jumpy. The performance should be good in release mode.
The compiled executable jar file is available here www.b4x.com/b4j/files/Asteroids.jar (Requires Java 8)
Attachments
Last edited: