Yes, a Sodoku board with numbers to put on it. You can lock some of them and let movable the others so anybody can place and replace until the game is completed.
Ask me for a copy to put in your land or a sandbox and enjoy with friends...or students.
Thank you for dropping in and inspecting the dominoes. The script is below. The textures/colours/shapes are very simple, of course - this was my first attempt to rez something useful. You're right: it'd be nice to have more domino-shaped blocks, etc. But the crucial question is the script which can "intelligently" attract or repel the blocks, depending on their content, be it phonetic or otherwise. The original script, as shown below, comes from Peter Bloomfield (SL: Pedro McMillan), and was not meant to achieve this. The script simply checks if two blocks are near and then snaps them together, with some regard for physics. It's great as it is (especially as it is free), but not quite what I fancy for my game...
Thank you for your interest.
PS. Tried to [send] this in Ning, but there's apparently a limit of 2 K chars :-(
-------------------------------------------------------------------
// What size are all cubes expected to be?
vector cubeSize = <0.5, 0.5, 0.5>;
// How far should we scan for other cubes?
float scanRange = 1.0;
// This will store the position after our last movement
vector lastMove = <0.0, 0.0, 0.0>;
// Should we use physics?
integer USE_PHYSICS = TRUE;
default
{
state_entry()
{
// Whether we will use physics or not, disable it until we are moved
llSetPrimitiveParams([PRIM_PHYSICS, FALSE]);
llSetText( "Link me with dominoes
matching my first and last sound", < 1,1,1>, 1 );
}
touch_start(integer num)
{
// Activate physics for as long as the cube is being moved
if (USE_PHYSICS) llSetPrimitiveParams([PRIM_PHYSICS, TRUE]);
}
touch_end(integer num)
{
// Store our current position (in case the sensor is delayed)
lastMove = llGetPos();
// Look around for other nearby graph cubes
llSensor(llGetObjectName(), NULL_KEY, SCRIPTED | PASSIVE, scanRange, PI);
// Deactivate physics so we don't get a feedback loop
// (aligns self -> physics moves it slightly -> realigns self -> etc..)
if (USE_PHYSICS) llSetPrimitiveParams([PRIM_PHYSICS, FALSE]);
}
sensor(integer num_detected)
{
// Go through each sensed object to find the nearest one
integer i = 0;
float nearestDist = -1.0;
float curDist = 0.0;
vector nearestPos = <0.0, 0.0, 0.0>;
vector curPos = <0.0, 0.0, 0.0>;
rotation nearestRot = ZERO_ROTATION;
for (i = 0; i < num_detected; i++) {
// Is it the nearest so far?
curPos = llDetectedPos(i);
curDist = llVecDist(curPos, lastMove);
if (nearestDist < 0.0 || curDist < nearestDist) {
nearestDist = curDist;
nearestPos = curPos;
nearestRot = llDetectedRot(i);
}
}
// Did we end up finding a suitable cube nearby?
if (nearestDist > 0.0) {
// Calculate the vector between the sensed object and this one,
// and translate it to local space for the sensed object
// (this lets us figure out which side of it we're on)
vector offset = (lastMove - nearestPos) / nearestRot;
// Figure out which side of it we're on by checking which dimension different is biggest
float xDiff = llFabs(offset.x);
float yDiff = llFabs(offset.y);
float zDiff = llFabs(offset.z);
vector snapPos = <0.0, 0.0, 0.0>;
// Determine the position we ought to be in, relative to the local
// rotation of the object we are snapping to
if (xDiff > yDiff) {
if (xDiff > zDiff) {
if (offset.x < 0.0) snapPos.x = -cubeSize.x;
else snapPos.x = cubeSize.x;
} else {
if (offset.z < 0.0) snapPos.z = -cubeSize.z;
else snapPos.z = cubeSize.z;
}
} else {
if (yDiff > zDiff) {
if (offset.y < 0.0) snapPos.y = -cubeSize.y;
else snapPos.y = cubeSize.y;
} else {
if (offset.z < 0.0) snapPos.z = -cubeSize.z;
else snapPos.z = cubeSize.z;
}
}
// Apply our snap offset according to the detected rotation
snapPos = nearestPos + (snapPos * nearestRot);
Comment by Carolina on February 12, 2009 at 2:54am
It sounds like very complicated scripting thing...I tried but I can't see it, nobody can but owner at least you change permissions. Other way...you can send me the code by mail copying and pasting from script. I know some very good scripters that can give us a clue.
Playing around with your cubes I think...coudn't be more easy real domino blocks with the word printed on it and two colors?? every color is a phonem...setting permissions only to move...no script at all.
Thank you! Best if you drop in my launchroom in Virtlantis, open the blocks and inspect the script. Take your time, no hurry here :-).
Here's the idea:
Phonetic dominoes: idea
----------------------------
(C) Wlodek Barbosa
Audio-enhanced objects are linked to each other domino-style one by one to match the offset-onset sounds, e.g.: alcohol-lemonade-duck-cabbage-gin. Complications are discussed (e.g. 'linking' /r/). Correctly linked objects 'stick' into a flexible chain, wrongly linked repel each other. In both cases objects 'say their name' without any additional learner action.
This original phonetic idea can be applied to any language units and structures. Their properties/features/functions can be the basis for their differential behaviour, e.g. irregular verbs will attract each other, or parts of a complex grammatical structure, such as some English tenses.
Phonetic dominoes: implementation
----------------------------------------
I used Pedro McMillan's (SL) stackable cubes, which do attract, but do not repel. So, right now, the dominoes are happy to snap into any sequence whatsoever. According to Pedro (email communication): "the Stackable Graph Cubes would need a lot of changes to make them work" in the selective domino fashion, i.e. with movement TO and AWAY.
Right now, there're only nine dominoes in the set. Arrange the nine coloured cubes domino-style to match SOUNDS at the edges of words. Cubes say their name when left-clicked. Here's the list (in alphabet order): apricot, cereal, cream, ketchup, lettuce, milk, pork chops, spoon, T-bone steak.
Phonetic dominoes: correct order
--------------------------------------
Dominoes rezzed on 20th Dec 2008 in my launchroom. This is the correct order:
Wow, carolina! So maybe you're the right person to help me with my phonetic domino blocks (so that they not only attract but repel each other depending on their phonetic content?
You need to be a member of Second Life English Community to add comments!
Join this social network