
It's not entirely clear, but I suspect the RGB display implies a total colour depth of 2^3 = 8 colours (red, green and blue set to on or off state).
It may be possible to vary the intensities more: certainly the screen shot suggests this (orange is displayed, which doesn't fall into the above criteria). I’d suggest that you can have a maximum of 28 distinguishable colours in a 'screen based' RGB display, based on what Leon Marrick achieved in Sangband.
For consistency, it’s probably best to refer to them as follows:
D - Dark Gray | w – White | s – Gray | o - Orange |
r – Red | g – Green | b – Blue | u - Brown |
d – Black | W - Light Gray | v – Violet | y - Yellow |
R - Light Red | G - Light Green | B - Light Blue | U - Light Brown |
p – Purple | P – Light Purple | t – Teal | m – mud |
Y – Light Yellow | i – Dark Pink | T – Light Teal | V – Light Violet |
M – Mustard | I – Light Pink | z – Blue Slate | Z – Deep Light Blue |
If you’re especially concerned, I can give you a copy of the RGB values that Sangband uses, or you can ask at the original 'challenge' location. Note that this is a maximum number of colours: you’re free to use less for bonus points and to make the game easier to understand.
Note the reference hardware supports a buzzer for a speaker and single life bar across the top consisting of a single colour status LEDs. It has a limited number of controls: a d-pad and two other buttons.
I’ll post my design separately to avoid influencing the discussion further.
May the best pixels win.
Sweet, glad to see I inspired something :)
ReplyDeleteFor reference, the "default" colors for the Meggy are:
Dark (off)
Red
Orange
Yellow
Green
Blue
Violet
White
DimRed
DimOrange
DimYellow
DimGreen
DimAqua
DimBlue
DimViolet
FullOn (bright white)
Anyone know of a IRC channel where they're playing with Meggy Jr.? I was wondering if there's a value for Tone_Start's Divisor parameter that'd function as a musical rest.
ReplyDeleteNathan: that would be 0.
ReplyDeleteOf course, to be true to the colourfulness of the hardware you'd have to port Piet then program it in that. :)
ReplyDeleteDocumentation: http://www.dangermouse.net/esoteric/piet.html
Pretty programs: http://www.dangermouse.net/esoteric/piet/samples.html
zero on the divisor? yeah right. :)
ReplyDeleteor zero on the irc channel?
and piet would be nice. (i've got a program on that piet page, btw. (5th from the bottom, check out the execution trace.))
BTW, I pondered a good BGM mechanism for meggy, and I think I've got a good solution. Lemme know if anyone is interested. :)
ReplyDeleteNathan, here's some code for making sounds with rests:
ReplyDeletevoid getKeySound(void)
{
byte i = 0;
unsigned int freqs[5] = { 7648,0,5730, 0,4048 };
while (i < 5)
{
Tone_Start(freqs[i], 50);
while (MakingSound) {}
i++;
}
}
The zeroes are rests.
yeah. I was gonna use a struct of two ints to have divisor and duration. Is there a check in the library that understands 0 is a rest? otherwise it seems it'd be a divide by zero error somewhere. :)
ReplyDeleteIt's actually hardware PWM (pulse width modulation) control registers you're setting -- there's not any actual division taking place. The divisor is just a model for thinking about it that works most of the time, but breaks down for 0.
ReplyDeleteawesome. hmm... i don't have a meggy jr yet... is the sound bit just pins on the AVR? (i have a breadboard arduino...)
ReplyDeletelast time i made a noisemaker, i used a 555 timer... but i'm wondering if i could PWM it just as easily... (or more easily)
I just ordered my Meggy Jr!
ReplyDeleteI've taken that music system a step further and now have a tempo setting and a system for input that supports triplets down to 8th triplets, as well as 8th dotteds and 16th notes.
ReplyDeleteI can transcribe sheet music at this point, and it sounds fairly decent.
http://paste2.org/p/160716
ReplyDeleteI stumbled across a Meggy kit today... and I knew I had seen it somewhere before. I'll give this rogue-like idea a shot.
ReplyDeletehttp://boingboing.net/rob/tinyhack/
ReplyDeleteFor your consideration!
Thanks Rob, but I think you're 9x9 :)
ReplyDeleteDarius is going to try to get a hold of you at some point...
It was coded at 8x8 originally; the reason it's 9x9 is because it seemed weird to not allow the player to occupy the central pixel given that they actually 'move' #OCD
ReplyDeleteRob: I figured that out pretty early on. My response was more to every journalist who couldn't count the number of pixels across and down the display :)
ReplyDeleteAnd congratulations on all the positive coverage btw. The Rock Paper Shotgun write up is particularly nice...
ReplyDelete