Welcome to the "Roids" sample game which has been created for KaiOS. This is a very simple "Asteroids" clone where you turn the ship left and right key on your KaiOS device and fire at incoming meteors with Enter or Num 5.
Play the game!
- Supports KaiOS 1.0 or above
- KaiAds Ready
- Softkey Ready
Softkey Left -> Back to Main Menu
Softkey Right -> Instruction Page
Back -> Exit Game
Softkey Left -> Back to Main Menu
Softkey Right -> Restart Game
Enter or Num 5 -> Start Game
Left or 4 -> Turn Left
Right or 6 -> Turn Right
This is how the project is laid out:
- "controller.collection is the collection proxy component which is used to load and unload the main menu and game "worlds". The script is written in "controller.script.
- "main.collection" is loaded after the main menu. It ties every game components together.
- The flow of the game is controlled from "main.script". It keeps track of lives and score and sends timed messages to the rest of the game to set things up properly.
- "mainMenu.collection is loaded at game start. The script is written in "mainMenu.script".
- "mainMenuHUD.gui contains GUI elements of text and logo. Its script "mainMenuHUD.gui_script. These messages are all sent from main script.
- "hud.gui" contains GUI elements such as the lives and score counters, "get ready" and "game over" texts. Its script "hud.gui_script" listens to messages to update what to show. These messages are all sent from the main script.
- "player.go" contains the player ship. It runs a script that listens to input, turns and fires laser shots. All shots ("laser.go") are spawned dynamically. When the player ship collides it spawns an explosion effect ("explosion.go") and tells the main script what just happened.
- "spawner.script" contains the logic for spawning meteors. It calculates when and where meteors will spawn and sets them in motion by giving them a movement direction and speed. The script also keeps track of every spawned meteor so they can be deleted when the play field is reset on player death.
- "meteor_large.go" contains the large meteor type. It rotates and moves. If it detects a collision, it deletes itself but spawns two smaller meteors ("meteor_small.go"). The two meteor types share the same script. The type is determined by a property set on the script component in each game object file.
Check out the documentation pages for more examples, tutorials, manuals and API docs. If you run into trouble, help is available in the Defold forum.
Thanks to the Defold Team. The extension for KaiAds and Softkey with Play Sound feature are available to integrate in your application. Feel free to check it out!
Please be aware that there is a "kaios-assets" folder which includes a "manifest.webapp" and "assets" folder for icons. For more info: Manifest. These files are placed next to the index.html when bundling for HTML5 builds as the "kaios-assets" is listed as a Bundle Resources folder.
If you have trouble with the technical side of KaiOS such as app design guidelines or running the app, you can check out the KaiOS developer portal for more information. To integrate the KaiAds into your application, please browse our KaiAds website.
Moreover, you can submit your application to our submission portal. For more information, please check out our submission guideline.
Guideline of migrating from Defold game to KaiOS: TBC
Happy KaiOS!
This project is released under the Creative Commons CC0 1.0 Universal license & Open Font License. For more details, please find the license file under the "assets" folder.
You’re free to use these assets in any project, personal or commercial. There’s no need to ask permission before using these. Giving attribution is not required, but is greatly appreciated! Full license text
- Peter Wu
https://github.com/kaiostech
Email: [email protected]