• @user96449

    Java is a great language and Java SE/EE has a huge amount of class libraries / packages to tackle all kinds of problems... more on general purpose computers though. In the case at hand, we are talking microcontroller and where - before Espruino/Javascript or MicroPython was not much else available than C/C++. Lot of low-level stuff - even the JavaScript Interpreter Espruino is written in C/C++. C/C++ and Java are for sure not the easy part... and pain does not promise much fun either... That is the reason the @Gordon, the creator of Espruino, motivated to put JavaScript interpreter on a micro controller, so that it is even easier than Arduino - which is really geared towards C/C++.

    @user96449, to get your game build going, you need not much hardware, either a pinned Espruino PICO, Espruino Wifi or an Espruino Pixl, a Neopixel string, a USB power bank to run disconnected (from battery), 3 LDR, 3 white LEDs, 4 100 Ohm resistors, a push button, some wires, and a bread board. That's it. The LDRs - light dependent resistors - white LEDS and resistors you use to sense which exit path the (pin) ball took - 1, 2 or 3. The push button you use to start the game (and move the game forward - from player to player / lane to lane). The rest is all software... the core pieces to control the display board are already provided above.

    The Espruino forum and main sites provide you with all kinds of examples showing how to use the different components, write code for them - if even needed, let the components talk to each other, etc.

    each player/horse is a complete circuit independent of another

    ...not really... because that would be too much for too little. One circuit can handle all the things. The software makes it possible to think of the lanes/players/horses as independent... at least for some time, but the first reaching the finish line defines 'Game Over' for everyone else.

    What we did not talk about is keep scores over more than one game... if you go for a Pixl, you even have a display to show the score, 4 push buttons to setup the game - how many players, how many positions, start the game, control the game flow, do score management, and- last but not least - give instructions what's next in the game...


Avatar for allObjects @allObjects started