However, once I got into the code of the article, I noticed it wasn’t very cleanly separated. For example, jQuery calls to animate tiles were performed in the same function as checking for the validity of a move. So, I thought about writing my own game engine before tackling the AI part. After all, it would be nice to swap out different input devices (Adafruit Trello, Wii Nunchuck, computer vision-instructued robots (what?)) and have a separated output, so that a game could be played with a arbitrary photo.
After I started separating the code, I ended up with a browser app which separated presentation (using jQuery) and logic (using a knockout viewmodel). Not quite sufficient: handling input from hardware devices would remain difficult. Off to node! This would allow me to make games persistent, handle multiple games, etc. However, this could make the simple functionality slow, so caching is needed. In the end, I try to learn about:
Ondertussen heb ik al verschillende custom bindings gebruikt, die het opzetten van web apps versnellen. Om hergebruik te vergemakkelijken, hierbij een lijst:
Apache Cordova laat toe om native mobile apps te schrijven in HTML + JS. Sounds like my cup of tea…
Adafruit gebruikt dit in bluetooth tutorials:
Vooral die laatste lijkt zeer interessant: een sensor wordt ingelezen op een pro trinket, die dan via een SPI bluetooth module de data naar de iPhone stuurt. Interessant voor bvb de Canon trigger?