Motivation

I started to develop this game in accordance to my kids 2019 Summer vacation home task. I tried to do the home task as a s primary school student. I would like to done followings list.

  1. To develop this game with kotlin language.
  2. To use gradle in build cycle.
  3. To get javascript program with which I want to do by extending build.gradle with groovy.
  4. To investigate the potential about webgl rendering UI
  5. To know the details of Open gl rendering.

How to do these tasks

I create a usable program not a prototype. Through this process, I get a skill to solve the specification which I want the program to became to.

Predication

I would have lots of resource about kotlin language. Because Google recommend the first program language as kotlin. I would be able to use lots of library for multiplatform.

The process about development

periodMy work
2019/7/142019/7/16I understood the relation gradle system and groovy. I knew that we can useful script language in java environment.
2019/7/172019/7/25I create simple user interface with webgl examples. I re-recognized that user interface with using html dom-node is easy and flexible to develop software.
2019/7/262019/7/28I knew that javascript modules is in jar by gradl. Firstly I try to extract javascript source from jar on runtime. It is natural to use servlet to extract file frorm jar. To use servlet, I have to build tomcat environment. I abort this plan for needing lots of time. I extend build.gradle for deploying javascript.
2019/7/292019/8/3In mac environment, I found the webgl error when button is clicked in safari browser. I investigated the details. The error is caused that click detection by color indexed is using 16bit for offscreen rendering. I worked around this bug for using 32bit rgba color temporary and convert to 16bit.
2019/8/42019/8/14Program use a bitmap texture to display the number on the button. I tried to use web-font for the number texture, but started texture generation before the font is alived. I had to find the way to make start texture generation after font arrived on browser. I put off to find the way. Html is originated to reach the information to people. It might be useless to display infomation after to get font.
2019/8/152019/8/16I reached the mile stone to have a game logic. I adjust css setting for responsive. My kids reviewed my game. I had a lots of suggestions. I promised them to change the game for their requests.

Result of development

If I have no compilation error, I have almost no error on runtime. Build.gradle for multiplatform is working on progress. If you use it, you need some custom tasks to get the output you want to. chrome and safari have same html rendering engine, but each browse do webgl rendering with little different ways. I hoped that my kids were interested in to the computer program, but they did not have interest.

Consideration

kotlin is statically typed general purpose programmig language. You have to define class to pass data between objects. The specification to get rid of NullPointerException force you fill temporary value where will be replaced on runtime.

Conclusion

If you have to manage the project which is made by lots of people, the kotlin will be the better one of compulter programming languages. When the program can be played, I had lots of suggestions.

Impressions

I would like to chage the program having followings.

  1. To have a lap time.
  2. To change difficulty of the game.

Documents

Source code