Interactive game

Odpovědět
Pascal
Příspěvky: 2
Registrován: 13 čer 2023, 12:46

Interactive game

Příspěvek od Pascal »

Hello,

My name is Pascal, I'm a French (software) engineer living in Prague. I apologize in advance for the message in English, as Czech is not my strong suit yet. The forum rules don't seem to mention any mandatory language, so I hope this is ok. If not, you can find a Czech (automatic) translation below, and I'll do my best to keep the conversation in Czech.

I saw your stand at the Maker Fair in Prague a few days ago.

I currently have a pet project, which is to replicate the following game, which currently only exists in Canada:

Each floor tile is a RGB pixel and a touch (very likely by induction) sensor. It receives RGB commands from a computer, and sends back touch signals.

I myself have limited experience with electronics, having done a few experiments with Arduino, but not much more. I'm therefore looking for some technical help in finding the best setup to achieve this.
This can be paid mentoring / collaboration, and I am open to any level of engagement.

Currently, here is what I assume will be the cheapest/easiest way:
- ESP32 in each tile, connected to an induction sensor.
- Each ESP32 is connected to a wifi network, from which they get their commands and send their signal.
I am currently wondering whether having ~400 ESP32 connected to the same wifi network won't make the communication too slow for the game (each pixel must be updated ASAP constantly). In which case we better use wired lower-level protocols (DMX/ArtNet? or something else?)

Thanks for any answer :-)


~~~~~~~~~~~~~~

Před pár dny jsem viděl váš stánek na Maker Fair v Praze.

V současné době mám pet projekt, který má replikovat následující hru, která v současnosti existuje pouze v Kanadě:

Každá podlahová dlaždice je RGB pixel a dotykový (velmi pravděpodobně indukční) senzor. Přijímá příkazy RGB z počítače a odesílá zpět dotykové signály.

Sám mám omezené zkušenosti s elektronikou, udělal jsem pár experimentů s Arduinem, ale nic moc víc. Hledám proto nějakou technickou pomoc při hledání nejlepšího nastavení, jak toho dosáhnout.
Může se jednat o placený mentoring / spolupráci a jsem otevřen jakékoli úrovni zapojení.

V současné době předpokládám, že nejlevnější/nejjednodušší způsob bude následující:
- ESP32 v každé dlaždici, připojené k indukčnímu senzoru.
- Každé ESP32 je připojeno k wifi síti, ze které získávají své příkazy a vysílají svůj signál.
Momentálně mě zajímá, jestli mít ~400 ESP32 připojených ke stejné wifi síti nezpomalí komunikaci příliš pro hru (každý pixel musí být neustále aktualizován ASAP). V tom případě je lepší použít kabelové protokoly nižší úrovně (DMX/ArtNet? nebo něco jiného?)

Děkuji za jakoukoliv odpověď :-)
DavidO
Příspěvky: 1138
Registrován: 01 kvě 2013, 21:27

Re: Interactive game

Příspěvek od DavidO »

Hi Pascal & welcome to Robodoupě!
Since your installation will be indoor and will need wall power fot the lights anyway, I'd opt for wired connectivity for sure. Even if ESP32 comes with wifi, I wouldn't bet on reliable connection with more than dozen of them at a time, not mentioning the response/delay. 400 is definitely way too much for standard wifi. It could be done, though, but you would need to use more than a typical home grade wifi AP and you also would have to craft to ESP wifi firmware to cope with the congestion; I don't think it is worth that effort. You could get inspired by light panels/displays topologies, or DMX512, or SPI-based WS28xx LED chains.
Nikoho plánovaně neurážím. Jestli se Vám nelíbí co píšu, tak to nečtěte. A ostatně, třeba za to nemůžu - Researchers believe that dark humor can be a significant symptom of dementia.
Uživatelský avatar
fulda
Příspěvky: 1374
Registrován: 04 led 2016, 17:18

Re: Interactive game

Příspěvek od fulda »

Hi Pascal,

I assume you saw THIS project.
It use one string of cca 250 RGB leds. In my case I have much smaller "tiles", so I can use compact eco LEDs. For you, you will need to spend more time with light mechanic to have "good enough" light distribution. So I acpect, you will need more leds for one tile. Then for example some WS2811 will be your target.
Do not forget, people dancing and jumping on the floor, so you need good enough mechanic. People waring shoes, nowadays shoes with thick soles are popular. Not sure, you will manage it with capacitive sensor.

I expect, you will spend more time with basic mechanic, than with programming and other IT activity.
Za pravopisné chyby v této zprávě může moje učitelka češtiny.
Uživatelský avatar
gilhad
Příspěvky: 264
Registrován: 29 kvě 2015, 00:36
Kontaktovat uživatele:

Re: Interactive game

Příspěvek od gilhad »

Hello, I played a long ago the game Stepmania https://www.stepmania.com/ which is also based on jumping on tiles to press/unpress them in right time.
There can be found a lot about the construction of hardpads (the tiles) for DDR (Dance Dance Revolution) for your inspiration.

I made my tiles cheap and simply, but reliable working (100's hours of 120+bpm jumping by grown adult without fail) by using two metal plates separated by tape/rope around borders (so distance around 1-2mm?). Stepping on it the iron slightly distorted and touched, so made connection, by stepping out the iron returned back, disconnecting. The move was so small, that no permanent distortion was made.(Here is my old pages about it, terrible and abadoned, but still - http://gilhad.wz.cz/DDR/hardpad1.php and http://gilhad.wz.cz/DDR/hardpad3.php)

I used (among others) also Arduino, to read it and emulate joystick with 9 buttons. It was nearly 100% idle.

So I suggest to you to use one module to operate more tiles (limited by free pins). And not use WiFi, but use normal wire connection.

(And I would make the clusters of tiles managed by simple controlers and the game itself run on another central "master computer" - maybe on similar/same HW, but as separated programs, as it will be a lot easier to organise)
Pascal
Příspěvky: 2
Registrován: 13 čer 2023, 12:46

Re: Interactive game

Příspěvek od Pascal »

Hello,
Thank you for the warm welcome :-)

Thank you for your feedback on the fact that wireless might be a problem. Wired it will be then.

I find it hard to figure out the best protocol, as I have experience with none of them.
What seems important to me:
- As fewer controllers as possible, as many slaves as possibles.
- As little wiring, therefore probably slaves must be addressed on a single line, so we don't have to use one wire per single slave.
- Two-way communication.

This is what I got so far, from wikipedia investigation (please correct me if I am wrong on something):

SPI: needs a dedicated line from master to each single slave. Therefore, this is hard to scale with >100 tiles.

WS2811: Seems to be only one-way. Slaves cannot send feedback. So it would require an additional chip/protocol/controller to do that. Ideally we would do everything at once.

DMX512: Could work, especially with ArtNet. However someone told me that it may be overkill, and DMX hardware is expensive because why not.
Some Chinese companies do sell such tiles using DMX in Alibaba (I've bought 9 of them just to try), but instead of using RDM to get the touch signal, they use a proprietary protocol, so they stay master of the solution. I don't wanna go this path, as I'd be prisoner to the Chinese manufacturer's whims.

Overall, from all the protocols I've heard of, DMX with RDM seems like the only one which covers all specs.
Are there simpler/cheaper protocols which may cover the specs?


Thank you Gilhad for the DDR suggestion. I did play Stepmania extensively during my university years :-) It is a good dilemma. The hard part with pressure-plate is at the same time to ensure a good LED light diffusion across the whole plate. I am not sure how this is physically possible. Maybe with some kind of blurry plexiglass, which would at the same time transfer light and physical pressure.
In addition, pressure plate may be subject to wear after thousands of hours. While induction would never wear, as it doesnt get "trauma" from the pressure.

The tiles that I've ordered from the Chinese manufacturer work with an induction antenna, and it is pretty satisfactory, although I assume one may not trigger them with thick-heel shoes.

Thanks a lot :-)
Uživatelský avatar
gilhad
Příspěvky: 264
Registrován: 29 kvě 2015, 00:36
Kontaktovat uživatele:

Re: Interactive game

Příspěvek od gilhad »

The plate, that I have, did not wear yet after all the time it is used, it is just that I do not use it much in recent years (as I am lazy). And in your game the tile will get one hit in couple of seconds, if even it get hit at all. So to match those 2*60*60*100 ~ 72.000 steps my hardpad may have just now it would take how many years of average use for single tile of your game?

The plexiglass or what will be the top of your plate may be enought flexible to transfer the step to lower contact plate. Alternatively the lighting cover may just rest on some rope/tape loop, which would press the metal plate.

For connection there must be many good protocols around (other will know better then me), but you can make for example loop, where only two adjusted tiles are connected with say SPI in this way
tile001 - tile002 - tile003 - ..... - tile999 - tile001
and let them send "messages" around until it hits its target.
The message could be like "targetID","TimeToLive","messageBody_really_long"
tile001 woud sent it (as SPI master) to tile002
tile002 would look, if targetID is 002 - if yes, then it would "eat it" - just do what it should with it.
if not, it will decrease TimeToLive and if it came to zero, then it will be done too (discarding the message)
if not zero, then it will send it as SPI Master to tile003 ... and so on and so on

If a tile want report something, it will just send such message on its own.
If tile/central_brain wants to see, if the loop is connected, it can send the message with its own ID and see, if it came from other side.
The TimeToLive prevents messages to non-existent tiles to be forwarded forever.
SPI may be HW or SW (as tile need one for incomming and one for outgoing messages).

And there must be much better and more standardised protocols doing the same and usable on really weak and cheap Arduinos ...
aladin
Příspěvky: 338
Registrován: 12 kvě 2013, 06:43

Re: Interactive game

Příspěvek od aladin »

I don't know how big the plates should be. If 33x33cm and bigger then it must be very safe and withstand a lot of stress. No compromise, much money. Organic glass or hardened glass
fischertip.cz, Stavebnice.com, MerkurRobot.cz, KlubTechniku.cz
Odpovědět