<p dir="ltr">This sounds ideal. I'll check it out.</p>
<div class="gmail_quote">On Nov 28, 2012 8:00 AM, "Matthew Flatt" <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For what it's worth<br>
<br>
<a href="https://github.com/mflatt/scratchy" target="_blank">https://github.com/mflatt/scratchy</a><br>
<br>
is an implementation of the Scratch sprite and evaluation model plus a<br>
textual language. It has all of the drawbacks of Scratch --- mutation,<br>
race conditions, and busy waiting --- without the nice graphical<br>
syntax! It has a collision detector that's much like John's, but I<br>
spent some time making it go faster. There's also a notion of "lands"<br>
within a program.<br>
<br>
I wrote Scratchy as an example of building languages in Racket for this<br>
year's RacketCon.[*] I dream about a phase 2 where I figure out how to<br>
change the evaluation model to something good and/or connect with<br>
`2htdp/universe', but I don't see that happening soon.<br>
<br>
[*] At the suggestion of my son. He's a Scratch fan, though he quickly<br>
became frustrated by the lack of abstraction in Scratch, and I<br>
don't know whether to be happy or sad that he's a 12-year-old who<br>
understands the phrase "race condition". Scratchy has "lands" because<br>
he wanted something like that for his game.<br>
<br>
At Wed, 28 Nov 2012 07:37:27 -0500, Yaron Minsky wrote:<br>
> To be clear, I'm firmly interested in tinkering, which is why I'm<br>
> using universe.ss and image.ss.<br>
><br>
> I do think that a good design goal for Racket's kid-oriented libraries<br>
> would be to be feature compatible with Scratch. It would be great if<br>
> there were good ways of doing everything that Scratch can do, from<br>
> playing sounds to detecting collisions, to (more aggressively) on-line<br>
> hosting of the final result. I'd love it if Racket were strictly<br>
> better than Scratch for someone who really can figure out how to<br>
> program, but it's just not true now.<br>
><br>
> y<br>
><br>
> On Wed, Nov 28, 2012 at 7:11 AM, Hendrik Boom <<a href="mailto:hendrik@topoi.pooq.com">hendrik@topoi.pooq.com</a>> wrote:<br>
> > On Tue, Nov 27, 2012 at 08:56:13PM -0500, Yaron Minsky wrote:<br>
> >> I've been weaning my son off of Scratch in favor of Racket, and trying<br>
> >> to get him to write interactive games using universe.ss and image.ss.<br>
> >> I'm wondering if anyone has suggestions for how to do things like<br>
> >> collision detection. image.ss has these nice first-class images, but<br>
> >> I don't see a good way of querying two images to see if they overlap.<br>
> >><br>
> >> Has anyone else had luck in doing this? universe has a nice<br>
> >> programming model, but I've found it challenging to find simple ways<br>
> >> of doing the kinds of things that Scratch makes easy.<br>
> ><br>
> > There are two arts to collision detection: figuring out whether two<br>
> > images collide (which gets trickier when they're in motion) and<br>
> > organising all your objects so you don't have to test very many<br>
> > combinations of them.<br>
> ><br>
> > Both of these can get quite complicated, and are susceptible to<br>
> > nontrivial, complicated, and often necessary efficiency improvements<br>
> > depending on special properties of the game.<br>
> ><br>
> > A one-size-fits-all solution may be good enough for tinkering with, but<br>
> > serious use may well need serious hacking.<br>
> ><br>
> > -- hendrik<br>
> > ____________________<br>
> > Racket Users list:<br>
> > <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div>