Emily Crutcher
Emily Crutcher

Reputation: 658

Is there a visual programming language with a large/configurable stage resolution?

My 8-year-old daughter is learning to program, and was excited to create projects using Code.org. Now she wants to design a program that creates a Babylonian number chart, with numbers from 1 to 1000, but there is no way to render such a thing with any of the visual programming environments that I know of. I've looked at Hopscotch, Tynker, Scratch, so far to no avail. She does not yet type, so switching to a text based system is not yet an option, so I'm hoping that someone else knows of a good solution.

Upvotes: 4

Views: 421

Answers (6)

Ela Cai
Ela Cai

Reputation: 21

This question is old but still interesting.

I think your daughter can use scratch to achieve the goal by using the "nextcostume" action associated with a sprite.

The Babylonins used base 60 meaning that we need a pair of 2 sprites to represent for 0-9 and 10,20,30,40,50,(6)0. Then we keep adding these pairs in front when the number grows larger than 59.

I did work out a poc within 30 min, including time I spent to cut/save/import the costumes.

I use the variable to show the Babylonian number count. The code is simple. By the end, 1 tricky thing is the time sync between different sprites. To make it easy, I had to manually "adjust" the early pop by adding a sound.

You can cehck out my published project here. https://scratch.mit.edu/projects/154836328/

Scratch project snapshots Costume

Upvotes: 0

Joshua Cook
Joshua Cook

Reputation: 13435

Pure Data is an open-source visual programming language with implementations for all the major operating systems.

Upvotes: 0

tjvr
tjvr

Reputation: 17951

Snap! is a block-based programming language based on Scratch. It lets you configure the stage size:

Configure -> Stage Size

Snap! also adds exciting functional programming features, such as anonymous functions and nested lists.

There's a tool for importing Scratch projects: https://djdolphin.github.io/Snapin8r2/

Upvotes: 3

boisvert
boisvert

Reputation: 3739

There should be no difficulty implementing it in Scratch. But it's a big project at 8!

  • screen size: at 4 sprites per number, 1000 numbers, 4000 characters on screen is difficult. But that is one ugly chart to display statically anyway. You could use the dynamic characteristics of a computer display to zoom the sprites very small (fitting it all into one illegible table), or large enough but incomplete, and use the arrow keys to scroll through. This is a lesson in UI: computers don't have display the size of dining-room tables, but their displays are dynamic, so use that.

The conversion is a bit of a job.

  • first, get a set of images for numbers 1-9 and 10-60.
  • create two sprites - the first with the costumes for 1-9 images; the next for 10-60.

  • to show the correct image, use switch costume.

  • I recommend that you start with smaller numbers, first up to 9, then up to 59. After that, the generic solution would be to use stamping, then shift the sprites left, change costumes and stamp again.

  • to calculate the correct values given input X:

  • units = X modulus 10

X' = X/10-units

if your number is up to 59, that's it; X' is the number of the tens costume. If not:

  • tens = X' modulus 6

X'' = X'/10-units

Start again with X''. If you want a generic solution, stamp the sprites, shift them left and calculate. Otherwise, use X'' to calculate the correct costumes of two new sprites.

Upvotes: 0

C8H10N4O2
C8H10N4O2

Reputation: 19005

The Babylonians used base 60. It appears that each numeral is composed of up to two unique sprites repeated and arranged in a base 10 paradigm.

You might want to consider an animated counter using Scratch.

  • At every tick of the clock, another right-hand "ones" sprite appears, and all disappear on the 10th tick).
  • At each 10th tick, another left-hand "tens" sprite appears (and all disappear on the 60th tick).
  • Then on the 60th ticks, a left-of-left numeral appears or updates in the 60th place.
  • To get to 1000 in base 60, you need only two numerals.
  • Somewhere else on the screen, a text field containing the decimal number tracks the ticks.

  • You could animate little Babylonians riding chariots around from ziggurat to ziggurat. (Sorry to any Babylonians if I'm making stereotypes.)

Sounds like fun, good luck.

Upvotes: 0

Kate Fractal
Kate Fractal

Reputation: 84

There are two difficulties in rendering such a chart in Scratch.

1) The screen size is too small.
2) There isn't an obvious way to render the basic characters of Babylonian numbers.

The small screen size is going to be a problem in any development environment, block-based or text-based. Even using an entire 1366 x 768 pixel display, she would only have a 30 pixel square for each number. Breaking up the chart into parts (10 pages of 100 numbers each, for instance) or rendering a single number based on user input are two possible work arounds for the screen size issue.

Both of these related projects (a smaller chart or a number converter) are possible in Scratch. Your daughter will need to create a renderer sprite which can draw the symbols on the stage. A renderer sprite can either have costumes of the Babylonian symbols and use the stamp block to create combinations, or the sprite can be draw the symbols with the pen. This project has some examples of renderer sprites and how they can be used.

Upvotes: 0

Related Questions