Black Lives Matter - Action and Equality.
0

Stage and Ugame on Clue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Stage and Ugame on Clue

by codingCat on Wed May 20, 2020 8:34 am

Has anyone done the work to get the stage and ugame modules to work on the Clue?

I'm hoping to use Clue as part of my Intro to Programming and Intro to Game design courses. For the experience to be meaningful the students will want the ability to play games on the Clue as well as produce animations to go along with the Clue's tricorder like abilities. The Clue is my first dip into CircuitPython and Looking through the modules suggests that stage and ugame are the way to go.

Can anyone give a noob to the Clue some hints on getting the modules working?

Thanks, :-)

codingCat
 
Posts: 2
Joined: Wed May 20, 2020 8:05 am

Re: Stage and Ugame on Clue

by kevinjwalters on Thu May 21, 2020 10:11 am

Just to make things more complicated, I'll raise the issue of MakeCode Arcade and the alternate set of devices for it like the Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino. The CLUE has a lot going for it but you should evaluate the MakeCode world (if you haven't already!) which I'd rate as one of the two interesting products that Microsoft produce.

The devices (there's lots of choice - at least one has the microbit edge connector if you have some investment there already) have all got input buttons/joysticks in the classic game controller style and a 160x120 resolution colour canvas for the games. There's a decent development environment for writing games with an easy learning curve with blocks style programming. There's JavaScript for more complex games too and you can mix JavaScript with blocks too in various ways. They've been working on a Python equivalent but I've not followed that more recent work.

kevinjwalters
 
Posts: 576
Joined: Sun Oct 01, 2017 3:15 pm

Re: Stage and Ugame on Clue

by kevinjwalters on Fri May 22, 2020 1:20 pm

Another twist is the availability of game controller boards designed for the micro:bit. These are likely to be compatible with the CLUE. I've not used these but here's a quick search, there's probably more out there too in the large micro:bit edge connected world:


Those or similar would need testing with a CLUE and availability and easy of adding support in libraries would need investigating.

I'm not sure what the support is for the nRF52840 chip in MakeCode Arcade world, if that interests you? It was mentioned briefly at tail end of: MakeCode Forum: What is an ARCADE F4?

What sort of course are you working on? What's the age range?

kevinjwalters
 
Posts: 576
Joined: Sun Oct 01, 2017 3:15 pm

Re: Stage and Ugame on Clue

by codingCat on Sun May 24, 2020 2:11 am

Nope. No interest in anything Microsoft.

I had been using Microsoft Small Basic for my Intro to programming course, and I had to abandon it mid semester because of the lockdown. From this point forward I need to use only languages and environments that work on any platform. I’m not about to chose something that is locked into windows, or requires a particular website. This is why I chose to go with a microcontroller and python.

The clue doesn’t have an operating system. And Python is universal. This means the students can work on projects from any platform as long aa it can access a USB device.

Can we stick to the topic please. Do you (or anyone else reading this) have any hints in getting Stage and Ugame working in the Clue?

codingCat
 
Posts: 2
Joined: Wed May 20, 2020 8:05 am

Re: Stage and Ugame on Clue

by kevinjwalters on Sun May 24, 2020 7:35 am

I've not used stage but I'll ask around. The import below fails on a CLUE so this suggests it's not compiled in for the CLUE and I'm not sure how it would or could adapt to a 2 button, 3 touch pad device.

Code: Select all | TOGGLE FULL SIZE
>>> import _stage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named '_stage'

kevinjwalters
 
Posts: 576
Joined: Sun Oct 01, 2017 3:15 pm

Re: Stage and Ugame on Clue

by deshipu on Sun May 24, 2020 8:17 am

@kevinjwalters is right here, the stage library requires a small component that is written in C for performance reasons, and that has to be compiled into the CircuitPython firmware to work. While both PyGamer and PyBadge have it included by default, the CLUE does not, so you would need to compile your own version of the firmware, with _stage enabled, to use the stage library.

Another problem I can see is with the ugame library, which provides a consistent interface for the display, sound, and buttons (so that all ugame games work on all boards that have the ugame library). Since CLUE doesn't have console-style buttons, I don't see a good way of implementing button handling for that board.

But all is not lost, because CLUE has the displayio library, which is actually more flexible than the stage library. You can use that to make games for CLUE.

deshipu
 
Posts: 14
Joined: Mon Jun 27, 2016 5:40 pm

Please be positive and constructive with your questions and comments.