Hacker News new | past | comments | ask | show | jobs | submit login
Microsoft Tilecode (microsoft.github.io)
425 points by Impossible on Oct 24, 2020 | hide | past | favorite | 60 comments



With Christmas coming up soonish, and many of us going to be locked in at home (even more than ever before), there's a device I can recommend that is fun to build and reasonably fun to build on. It's basically a GameBoy (and runs emulators for it and other devices) for a laughably low price: https://www.hardkernel.com/shop/odroid-go/ (first link I found, there may be better ones — I bought it in Europe, where a few of the bigger electronics retailers had it).

It has a color screen and has quite a few tricks up its sleeve. I think I remember it even runs Wifi-Scanners and whatnot (ESP32). Here's some more background info: https://wiki.odroid.com/odroid_go/go_assembling

Just thought that could be an interesting platform to try this on.


I really got into these retro handhelds recently and I love them, but I would like to suggest some more options as Odroid has stock issues a lot of the time (do go for them if they're in stock, though, the shipping times are much better than other retro handhelds.)

For cheap, I'd suggest the Pocket Go, [1] but for my favourite I love the RG350P, [2] which is a little more expensive but has a community with a lot of homebrew behind it and it can run pretty much anything from PS1 downwards. There is also the RK2020 [3] with a little more oomph than the RG350P, the RK2020 is a pretty brazen Odroid-Go Advance clone, so if Odroid has the Go Advance in stock, get that instead, but they rarely do.

If you find these just a touch too expensive, they can be found on Banggood for small to hefty discounts. I got my RG350 (not RG350P, the RG350P is a minor improvement over the RG350 but at around the same price) for $60 on Banggood. Also, expect 1-2 month shipping on these consoles, but in my opinion it's so worth it.

[1] https://retromimi.com/collections/handhelds/products/pocketg... [2] https://retromimi.com/collections/handhelds/products/rg350p [3] https://retromimi.com/collections/handhelds/products/rk2020


I've been somewhat thinking of getting one of these handheld Game Boy-esque systems, so it's nice to see some options and opinions, thank you. Does the RG350P provide any other software besides emulation (Pico-8 support for example), or is that about it?


There are basically three broad sets of handhelds: OpenDingux devices, ARM Linux devices, and Android ones. The RG350P is an OpenDingux device.

There's a lot of OpenDingux devices- they have MIPS CPUs, so they don't run the same variety of software as the ARM-based ones. There's still a bunch of homebrew for OpenDingux, but it's not exactly organized, compared to Android and Linux devices. It involves hunting down poorly-documented executables, etc. Here's one list of software available:

https://github.com/retrogamehandheld/OpenDingux

There are two Pico-8 emulators that run on those things, tac08 and retro8. They both work on many games, but it's a bit hit-and-miss.

https://0xcafed00d.itch.io/tac08-rg350 / https://github.com/Jakz/retro8

However, it is apparently possible to get the official Raspberry Pi version of pico-8 running on the Odroid Go Advance, which is an ARM CPU running Linux, just like the RPi.

https://forum.odroid.com/viewtopic.php?f=193&t=37256&start=8...

Additionally to that, I dug up a version of TIC-80 ( https://tic80.com/ ), an open-source PICO-like environment, compiled for the OpenDingux which will run on the RG350:

https://github.com/retrogamehandheld/OpenDingux/raw/master/E...


Do you assemble these yourself? I don't really care that much about the console, more about the fun and reward of building it yourself. I see it more as a fun project.


In the case of Odroid Go and Odroid Go Advance, yes. The others no, they're more like an actual product.


You do assemble the Odroid Go & Go Advance, but it's a matter of dropping the buttons into place, plugging the screen & battery into the single PCB, dropping that into the shell, and screwing it together. It's not very involved, but enjoyable.


If it can play Game Boy games I’ve made an easy to use game maker that’s starting to get quite popular https://www.gbstudio.dev/


Wow It is really cool to see you on hackernews as well. I have programmed 2 different gameboy advance games for game jams in the past. But building it from scratch is really hard. Most resources are down with the exception of TONC https://www.coranac.com/tonc/text/ So you will have to use the spec sheets a lot. Gbstudio is very well made and easy to use. But if you are looking for a challenge i will leave the trivial excessive to you, the reader.


I ordered ODroidGO about a year ago. Back then the worst part of the handheld was the screen. It was a cheap TFT screen with very poor viewing angles. The console is also not very comfortable, my (adult) hands start to hurt after about 1h of playing. In the end, as too many gadgets before, ODroidGo is gathering dust in one of the forgotten boxes in my home...

The most difficult part, during the assembly process, was connecting the "ribbon" from the main board to the screen. Be careful as it is way too easy to lock the ribbon than to unlock it from the socket.

Not all games are working, but I managed to run both Mario and Wario (GBC) on it. Some games are not working, some you can play but the save feature is not working. The battery life is impressive, comparing to my smartphone.


This is really underpowered....

For the same money you can get a powkiddy or something simillar, running linux and with support for GBA, (S)NES, etc.

https://www.youtube.com/watch?v=dNrpVhP8fDc

All the usual suspects (ebay, aliexpress,...) have it.

also firmware: https://github.com/TriForceX/MiyooCFW


Those don't have GPIO pins, the Odroid Go does. There's something inherently charming about being able to run emulated games on a microcontroller. Also, because it's an ESP32, it supports Arduino so playing around with programming it is fairly straightforward.

The Go has good battery life, instant-on, and has a certain DIY spirit. I don't know if it's possible to run MakeCode programs directly on the Odroid Go but it would probably be doable for someone with more knowledge of these things.


You're speaking my language. This is a shameless self plug but we - that is Pimoroni - are working on 32blit which is an STM32F750-based microcontroller games console that should be up for general sale soooon - https://www.kickstarter.com/projects/pimoroni/32blit-retro-i...

Our beta backer tier have been godlike in their ability to make the STM32 do things I'd never thought we'd see... much less see before it's even launched. I mean it already has a Doom port.

I think, compared to the off-the-shelf Emu handhelds on which I cut my teeth (as far back as GP2X and Dingoo A320 days) it's underpowered and overpriced but you're dead on the money that they have a different charm and set of challenges.

MakeCode compiles down to native instructions, IIRC, so it should run on pretty much anything capable of running a screen that meets their - relatively forgiving - specs - https://arcade.makecode.com/hardware/adding

Edit: GP2X not GP32X!


Yes, MakeCode compiles (in the web browser) to ARM machine code. The MakeCode team is very interested in new handhelds. Any handheld that can run MakeCode Arcade games will also be able to run TileCode, which is built using MakeCode Arcade.


I've been keeping an eye on the 32blit, glad to hear there will be a general release! I ported my game framework to the Cortex-M0+ Gamebuino earlier, and Cortex-M7 with FPU and 1MB RAM are next level in comparison, sounds more capable for computation than the GP2X too.


  > If a tile predicate has a non-empty Include set that 
  > contains only sprite kinds then the associated tile must 
  > contain a sprite if that predicate evaluates to true on a 
  > state. We call such a sprite a sprite witness, as it 
  > witnesses the truth of the predicate. Sprite witnesses are 
  > TileCode’s form of variable binding.
I can't figure out who this manual is written for. TileCode and the example games appear to target programming beginners and even children, but the lingo here is unlikely to be comprehensible to anyone but CS majors. And it's not like they're describing a complex idea here, it's just the language they use to describe it seems almost willfully arcane.


This text is from the page that documents the full programming experience, and was written for programmers. I've moved it out of the overview section.


Thanks for writing it. It's always good to read thorough implementation details and have them readily accessible even in a causal programming environment. I especially appreciated the conflict resolution section


This is a side effect of it being a research project. It's interesting to me because I've worked in this space (I designed and built the visual scripting system for Facebook Horizon) but otherwise I agree. Kids and non-programmers won't understand this


It's trying very hard to sound smart. But "...something with a non-empty include set that contains only x..." is the same as "...something that includes x and nothing else..."

There's this quote from a famous (in strictly relative terms) judge on the German Supreme Court: A good lawyer or judge will, according to him, "think like a philosopher and talk like a peasant!".

Of the three other possibilities, two are still fine. But trying too hard is a mortal sin.


This sort of comment is often similar to a North American hearing a British person speaking in their natural accent, and going "why are you trying so hard to sound fancy, dude?"

In fact, your own quote speaks to this: when you're thinking like a philosopher, it's easy to also speak like a philosopher; what takes effort is to speak like a peasant (and we've all had similar experiences with technical jargon in our own field, and having to translate that to a layperson). You can certainly accuse them of not having tried hard to translate it to simpler language, but it's an unwarranted accusation to say they're "trying very hard to sound smart" when they're using language that is similar to their own thought processes, and hence is probably easier to write in.

Reminds me of a scene in "I, Robot" (the movie):

Del Spooner: So, Dr. Calvin, what exactly do you do around here?

Dr. Susan Calvin: My general fields are advanced robotics and psychiatry. Although, I specialize in hardware-to-wetware interfaces in an effort to advance U.S.R.'s robotic anthropomorphization program.

Del Spooner: So, what exactly do you do around here?

Dr. Susan Calvin: I make the robots seem more human.

Del Spooner: Now wasn't that easier to say?

Dr. Susan Calvin: Not really. No.


I agree, communicating to big demographics with individuals of diverse backgrounds is a skill that a lot of people either don’t have (and choose not to cultivate) or don’t even know is a learnable skill. People on the internet take this for granted and just think all the great articles they read on the internet could have been written by anybody (which a lot of the times is untrue)


You're presuming that every phrase was worded _just so_. This could very well have been from the author refactoring their sentence and not simplifying everything. They probably were thinking in these terms (the author is a PL guy from MSR who's pretty heavy into a lot of the formalism) and this sounds like a not-perfectly-polished formal thought.

It's technical, and sometimes technical writing isn't written perfectly. That doesn't mean it's due to willful obtusity, or trying to sound smart.


Perhaps there is one description for existing programmers (who would appreciate the comparison to variable binding) and one that doesn’t (who could care less about that)?


Hi Sean, yes - that is the case. I've regrouped the documentation to make this clear. Happy to have any suggestions for improvements. This is just a starting point.


Hey Tom. Ya, I would guess that making some kind of material to get end users to understand this would be more challenging than getting us programmers to :) (and probably half the fun of the project).


It strongly looks like PuzzleScript [1]. In fact, I would be surprised that this wasn't inspired by PuzzleScript; the paper [2] seems to have no mention of PuzzleScript though.

[1] https://www.puzzlescript.net/

[2] https://www.microsoft.com/en-us/research/uploads/prod/2020/0...


There is a whole class of visual term rewriting programming languages, usually targeted at children. I think KidSim https://dl.acm.org/doi/10.1145/176789.176795 was the first of them. PuzzleScript is awesome and definitely in the same category. One of the interesting things about TileCode is that it works on a Gameboy like device with minimal inputs and no mouse or keyboard.


Thank you for the pointer! My bad that I didn't thoroughly read the related work section (which does mention KidSim). I think I was also misled because the "when" section of the rule is based on the pattern, but its "do" section is not the output pattern but the instruction list for each actor matched in the pattern. In the other words it can potentially do much more than pattern rewriting (note that PuzzleScript also extends on this, so it is evident that this mechanism has a strong limitation).


Not clear about the mechanics on reading the site, but it reminded me of AgentSheets by Alexander Repenning (https://agentsheets.com/). It was 2d before "graduating" to "agent cubes".


Thanks very much for the pointer to PuzzleScript. I was not aware of it. It's very cool to see a rewriting-based system in practice. I chose to work with a more imperative style of guarded commands in TileCode, but it's very close to a rewriting system.


I always have a soft spot for little game dev kits like this. Strict limitations often lead to a lot of creativity. The Arduboy is one I've used a lot.

https://en.wikipedia.org/wiki/Arduboy

And I guess I'll share this here because I don't know when else I'd ever be able to talk about it.

A few years ago I created a portable game console that consisted of two buttons (left and right) and a row of 9 LEDs (and an on off switch). It was powered by an Arduino Teensy and Lipo battery, letting it run for a pretty decent amount of time.

The idea is given the ultra minimal hardware, what's the craziest games you can make with it?

I made a 3d """ray tracer"" that would show your surroundings and walls using just the leds (flatland style). Left and right turned, and pushing both walked forward.

I also made a dungeon crawler with each LED being a specific indicator for the state of the world (I wanted to make overlays to help with ideas like this)

The best one imo was an ebook reader. I only simulated it due to code size constraints, but I made each LED blink out morse code for each letter in a book, and used left and right to scroll through it. I loaded Neuromancer in and it worked fine. Pretty ridiculous but one of the more interesting projects I've done! I should really look for that device....


Looks pretty cool. I was messing around with MakeCode for about an hour the other day, just to see what it could do, but board games are more in my wheelhouse, and it looks like I could maybe come up with some interesting things here.

The messing about I did was just having a flamingo running around eating algae and avoiding spawning lions, called Flamingo Panic. If you're curious, it's up here: https://bacable.github.io/flamingo-panic/


My top score was 210 after I figured out not to run through the middle.


Nice :) I've managed 345, but only once. That's usually when I die also.


Great game.


That was a fun diversion. I managed to hit 268!


It's good to see Microsoft pursue the field of educational programming further.

I remember another MS project (which I just had to look up). It was called MakeCode https://www.microsoft.com/en-us/makecode and I remember it because they had a nice Minecraft integration. Well... it still exists: https://minecraft.makecode.com/

So to go on a bit of a rant: there's Scratch, MakeCode, Tilecode now, on top of "fantasy consoles" and dozens of very easy-to-use game engines (like, really, lots of them, in the browser, native... way below the Unity and Godot stepping stones). You know what's sad? Somehow I feel like we can't solve this barrier to entry for casual coding. On the one hand, a teacher or parent wanting to teach their kid(s) is overwhelmed with choice. On the other hand there's the attention economy basically saying: "don't bother."

Later on in the academic career, you have lecturers either having to overwhelm students (especially non-CS students) with all the best practices at once (you need this IDE, and GIT, and tests...) or having to resort to something which looks like it's made for kids and "won't make it in the real world" (speaking from experience here).

It's a pity that computing got so complicated. This is a hard problem to solve. Nonetheless, I applaud any efforts made towards this.


Just FYI, TileCode is written using MakeCode Arcade:

https://arcade.makecode.com


> It's a pity that computing got so complicated

I disagree. For me it's much simpler now:

- Use python :)

I learned using a variety of languages from calculator assembly to C++ to GUI game scripting languages. Each had its quirks and C/C++ boilerplate definitely created friction. I was always really easy to write complicated algorithms and math but doing anything practical alluded me.

Now with python you're one library away from doing anything really interesting. There's almost zero boilerplate. 'import pygame' and with a bit of googling and basic knowledge you're off to making a pretty cool game! (learning physics, algorithms and more along the way)


It seems to be based on cellular automata kind of rules.

I've done experiments with this almost twenty years ago, and it's surprising how much can be done with simple rules.

However, it can also be difficult to debug when you have a large amount of rules.


Yes, it's very close to cellular automata, with a few tweaks to make it easier to program. You are quite right about the debugging situation with growth of rules - I've some plans about this, but it will probably require more screen real estate than the 160x120 MakeCode Arcade screens offer.


Well, I was working on a 2D engine that could do these kind of games (but mostly top down RPGs).

I end up developing a tile map editor[1], giving the user the ability to develop their own maps. I end up liking this tile editor so much that I spent more time adding isometric features to it. Both because I love isometric maps and it seems to please people playing the game.

So, as in right now, I have a tile map editor (in a usable state) and a 2D engine that is not near close to be used, and I don't know what to do with neither of them.

Anyways, isometric maps would hugely improve the looks of these 2D games. I would consider adding this options to your platform as well.

1 - https://github.com/victorqribeiro/tileEditor


Looks pretty cool! How would you self-compare your tile editor vs. mapeditor.org ? Where there any interesting ideas etc. that you tried in yours?


I would like to share my own take on the mini game console, a $5 ESP8266-based that runs games from the Arduboy library: https://github.com/edgarborja/Arduboy2ESP


https://www.microsoft.com/en-us/research/uploads/prod/2020/0...

“ Our work is motivated by the popularity of retro video games…“


Curious if this could be a good way for kids to learn programming. Does anyone have experience with this (or similar technologies) and children aged 7-10?


A potential application area for TileCode is perhaps in countries where a laptop for every child to learn programming is out of the question. Entirely on device programming, a relatively low cost, and an engaging experience could provide a convenient and affordable way forward for these countries.


there was a recent thread with some recommendations: https://news.ycombinator.com/item?id=24874888


We did studies with children ages 8-14 over the summer. It was quite successful. We'll be reporting on this evaluation once we've completed the analysis. Keep an eye out on https://www.microsoft.com/en-us/research/project/microsoft-t...


I had great experiences using a 'game maker' on my childhood (RPG Maker 3 on PS2). However, I couldn't share what I made, so I started seeing the hours of work I'd need to make something substantial as a waste.

I think having an easy way to share your game should be a priority. Clearly the web can be used to emulate and share almost anything now, so some kind of exporting system and web player would be ideal.


All modern versions of game creation software have internet based sharing and many support building commercial software, including every PC version of RPG Maker. RPG Maker on PS2 was a product of a weird era where consoles weren't really internet ready.

Dreams on PS4 has a complex sharing backend and the PS4 also let's you share directly to social media. https://indreams.me/


This is a fascinating pairing to what the block editors they have for micro:bit. I wonder if the new micro:bit will work with it.

Current hardware list:

https://arcade.makecode.com/hardware

https://news.ycombinator.com/item?id=24763120


The new micro:bit will be compatible with MakeCode Arcade and TileCode via an additional shield [0].

[0] - https://makecode.com/blog/microbit/arcade-shield


The micro:bit doesn't have enough buttons or pixels, but you can maybe go the other direction: the "meowbit" appears to be compatible with both MakeCode Arcade and micro:bit accessories—although maybe you have to use MicroPython instead of micro:bit MakeCode to do microcontroller stuff? It would definitely be cool to have something that is perfectly compatible with both.


MakeCode Arcade has an extension to work with the micro:bit edge connector pins from the meowbit.


Oh superb, thanks!


I really don't get the game. How do you play it? I put a good 5mins and couldn't figure out anything.

As a child, I remember getting hooked to Super Mario in < 5min after I saw my friends play it. I'm telling ya, these pretentious "researchers" really don't know how us "normies" think.


Arrow keys move, Z is the A button, X is the B button. It probably supports game controller, although I didn't try one.

This is a multi-cart. Move over a game slot number and press A to load it. The buttons at the top allow you to edit the map, sprites, code, and play the game in the slot.

Slot 1 has a player movement example. Slot 2 and 3 are empty. Slot 4 is Snake. Slot 5 is Boulder Dash. etc.


Side note, before I really learned how to code I was messing around with Touch Develop. I dropped maybe 6 months into that tech trying to build stuff, not sure if I consider it a waste of time in the end but maybe I learned some concepts for future work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: