Ready to Rok

So I was determined to play around with sound in-world…

A Real Rock Band

A Real Rock Band

and built a rock-based apparatus [this is, after all, Rockshop 101 in da Henge, man] and experimented with the “noise” command and the “sound” command which, on external appearances seem quite similar.

Both trigger samples [wav, midi or mp3], but in different ways.

Using “noise”, you can trigger it, by activating an object, say, [clicking on it] – you can wait until it finishes playing before you click on it again, or you can use an “overlap” parameter to let many concurrent noises [including multiple copies of the same one] play until they finish. In no time a wonderful cacophony results from overlapping samples.

So … I embedded the following script in one rock:

activate noise http://www.wonko.info/wOnKoBUZZ/samplesRus/percussion/drums/bigconga1.wav overlap

then chose other sounds [from my own online sample collection] for the other rocks, and a nice long sample for the big rock. I even did a dodgy flash capture [the sound quality is a bit mashed]: RokandRoll Flash Capture

The SOUND command is a bit different – there can only ONE sound playing for each citizen, that sound comes from the sound-enabled object closest to you. Nicely, that sound is “spatial” in that it appears to come from the direction the object emitting the sound it which is nice. You can LOOP but I have yet to work out how to programatically STOP the noise [I can go to the menu system and stop it there, but I am sure there must be a command that lets me do this].

I changed the “activate” script for the big rock to:

activate sound http://www.wonko.info/UoD/objects/aural/UoD8.mp3 noloop

and now when you click it is directional – as you walk around, it moves in the stereo picture [left to right], not yet sure of the range though I notice that the volume increases as you get closer and diminishes when you move away – nice for creating ambient noises and atmosphere, although I suspect it impacts a little on the bandwidth as the sound downloads before it starts playing [unlike other technologies that can stream it as it arrives].

The sound/noise can be from any accessible URL – I am hoping the new proposed “Mytunes” upload and share thingy that The Learning Place are developing will have sufficiently exposed URLs of the sounds stored in it so that we can link to them in-world – that way juke-boxes and other interactive sound-art is possible.

Imagine, building a sculpture and linking it to hand-made noises – audio performance art harnesses a number of intelligences [and is a lot of fun]. More practically, things like buttons [that need to sound like they have been pressed], doors that creak as they open, water splashing as it falls and so on are now all possible – this is a good thing if we are to create a sense of place and immersion.

Rockshop 101

One of my favourite authors of all times, Douglas Adams, once coined an expression encapsulating the basis of evolution – he said “The secret is to keep banging the rocks together guys”.

I love this sentiment – chipping away at stuff that is not clear to seek clarity; being accurate to seek accuracy … thank goodness my brain is still accommodating enough to let me learn new stuff. So I delve [all be it tentatively] into the murky depths of object scripting for the first time …

wonko-henge, rockshop 101

wonko-henge, rockshop 101

So I needed a workshop, and found a collection of rocks in the standard object bin, so decided to partially construct WonkyHenge so I could sacrifice things in the name of the new deity – knowledge.

My mission was to begin to explore object scripting, because that is where the smarts of an interactive environment will lie. Deftly I delved into the object properties and in minutes was scaling objects in X, Y and Z, easy peasy.

To something new…

Actions are applied in the object properties

Actions are applied in the object properties

There are a number of things an object can “detect” – events for those of you familiar with event-drive, object oriented programming. The “Create” event is useful – you can tell the object to do stuff when it is first rezzed [encountered] by a player – useful for size, initial appearance etc. Scripts can be “stacked inside the action field

command; command; command      or

command part, other part, other part; command part, other part  etc.

Annoyingly, a de-bugger is NOT present, so if there is even ONE error in the script, none of it works and you get NO error message, no on-screen display [and oddly sometimes your object even disappears into an unreachable place], nothing except a non-working object [if you are lucky]. From a noob perspective this is fine because you do not get beaten up as normal programming/scripting languages do with pages of indecipherable error codes … but, some feed back would be nice.

programmed movement - translation in 2 axes - doors etc

programmed movement - translation in 2 axes - doors etc

When an object is “Activated” [left clicked on], it knows – you can get it to do stuff when it detects such a click – very useful. The first thing I tried was the “move” command.

activate move -2 2 0 noloop time=5 wait=3

= when clicked on, move backwards 2m in the x direction, up 2 m in the y direction and do not change your z position, do this thing once, take 5 seconds to do it, wait 3 seconds before un-doing it.

Nice,  slidey-door [think star trek, and an accompanying and very satisfying “wooshing” sound] sorted. Automatically translating objects is nice, fairly easy to control and it can be done on create or triggered by a click also.

A programmed rotation "onclick"

A programmed rotation "onclick"

Translation is not that dissimilar in concept to rotation, except the controls that Activeworlds use are a little interesting [different from what I was expecting, but manageable]

activate rotate 0 0 5 time=3 noloop wait=3 smooth

= on click, rotate at 5 rpm on the z-axis, do not keep repeating this, rotate for a total time of 3 seconds, smoothly, wait 3 seconds before un-doing the movement at the same speed. Easy – the opening door thing sorted. Just gotta learn how to move the axis of rotation – some objects have their axes plumb centre and so a door that has a “hinge” in the middle is a little odd.

objects that "know" other objects and communicate

objects that "know" other objects and communicate

Objects, on create, can be named – this name can be used programatically. In the above rockshop experiment, I spawned a big rock and called it “fred” – conveniently I could call other things “fred” as well – the name does NOT have to be unique in the collection of things that I create. Also usefully, a thing called “fred” that I make is DIFFERENT to a thing called “fred” that some one else makes – this is a good thing as side-effects caused by scripts someone else wrote using names you did not were already taken would be really really annoying but more importantly, very difficult to debug.

I then made 2 other rocks, and programmed them to reach out to things called “fred” and change their appearance:

activate color name=fred red

= when you are clicked on, look for objects owned by this citizen that are called “fred” and apply a red texture to them.

I rinsed and repeated to make a blue one, and added into “fred” an activate command that re-applied “granite” as a texture to it when you clicked on “fred”, itself so you can do a colour cycle and return to the base state if you wanted.

That objects can be aware and effect others is a terrific discovery [well, I say discovery, because it was for me, I know accomplished Activeworlds builders will be wondering what this dweeb is lathering on about].

I had convinced myself that the land of scripting must be pained and difficult, so was avoiding it. Having some success and more importantly finally getting what is happening, I am now eager to beaver away in the rock shop to see what else the world can let me do

I can see you quiver with antici …[wait for it] … pation…

Epiphane at Ikea

The Ellusive SKÄRPT Peeler

The Ellusive SKÄRPT Peeler

We went recently to Ikea [a Swedish shop of everything] on a particular mission, we had a list. In particular we were looking for a replacement to a vegetable peeler that we had bought years back and really liked [sadly, it is getting blunt so naturally we thought a replacement was a good idea]. [CUT TO THE CHASE]

Everything at Ikea has a Swedish name, most unpronounceable and none of the names gives a hint as to what is in the box, or to an ignorant aussie [that is me] what it might be useful for. Annoyingly [well, it is a brilliant marketing ploy actually] you have to traverse a maze, literally, of room mock-ups, where some of the products are showcased in-situ so you can see what they look like, how they might be combined, how colours and fabrics look together and so on. It is designed to distract you from your central mission, and even the hardest of hearts end up buying the bag of tea-lights that was on special next to the luscious and cozy looking lounge mock-up, the mini-chalk board that was on special [two for the price of one, only this week] hanging on a rack beside the kids bedroom mockup and so on. Warehouse
Now this maze consumed much of my day, I looked amongst the kitchen mock-ups for artily placed utensils that gave a clue about my peeler, I studiously examined bargain bins in the hope they were on special. I scoured the homewares section with no luck, coursed the kitchen solutions department finding almost but not entirely the wrong things, entered the warehouse and searched amongst the canyon-like aisles, carefully reading shelf labels and viewing thumbnails of a myriad of things, hoping to recognise amongst the impossible to pronounce names something that looked like my vegetable peeler to no avail. It was frustrating, exhausting and more annoyingly it took up time that I did not really have.

After much trudging, a trolley full of things that we did not realise we needed until we saw them, and their perfectly reasonable prices we stumbled across the rarest of commodities – a shop assistant and I asked the tall, blonde thing about my quest – the search for this one particular peeler.

ikea_merit_badgeHe popped on a terminal, performed a simple search and told me that product has been discontinued. He searched using a tool that was on the Ikea Website – something I [to my shame] had not even considered using prior to the trip.

We receive regularly [being put on their snail-mail list after the first visit – you remember, when the Ikea first opened, it had a “ball room” and our kids, then little tykes played in there whilst we browsed, anxiously hoping they were all right] their annual catalogue faithfully snailmailed to our home. The catalogues are lush, shiny and full of similar mock-ups, whole rooms and so on showing product being used – all themed and grouped according to living area.

Product Catalogs

Product Catalogues

Now, if you are searching for a chair, for instance, there is no one place to look, as “chairs” might appear in multiple sections of the catalogue, and although there is a “seat” section, not all chairs are there, indeed not all available to purchase chairs are in the catalogue as the print run clearly has limited pages and they want to feature “some” of their range.

Interestingly, however, on further investigation of the WEB catalogue, everything is there, every product [past, unavailable and present in-stock]. You get “meta” information – dimensions, available colours, a “thumbnail” of the item with a click to zoom web 2-ish feel, items are categorised into a product tree with breadcrumb trail navigation to explore and so on – a “modern tool” for finding things.

Epiphane

Some Assembly Required

Some Assembly Required

Our “object yard” in-world should break with the established convention of being an instantiated warehouse and get with the times. The ActiveWorlds client has an integrated WEB BROWSER – what is to stop us building a web catalogue of all available objects that can be used, provide categories for browsing and examining them WITHOUT having to POP a copy of everything?

This makes sense on a bunch of levels – blowout in browser cache occurs when you visit the object yard – your browser caches a copy of everything, regardless of whether you use it [3456 objects left to download…] – this is silly when all you really need is a “starter object” – a place holder object like a lump of clay, say, and the NAME of the object you want to build. To select an appropriate object, a THUMBNAIL [possibly with a click to zoom] along with other meta details [like dimensions, textures used, size if cell capacity is an indication of storage consumed and NAME in a copy-paste able form].

This also streamlines builds, as out of world, you could browse and select, collaborate and get ready a “pick list” so you are able, realistically, to PLAN before the build – brainstorm, share, swap ideas etc. – this is sensible, right, to encourage our in-worlders to plan, design and then build?

Some FACTS: most of this meta data ALREADY EXISTS on the activeworlds help page [no thumbnails, sadly, but that is a minor thing, surely we could get someone to make them], dimensions, textures etc. are already there – example of “walk objects” . I do not know how “clever” the in-world browser is, and whether it could, for instance, “talk” to the object, “telling” it what to become based on what the searcher has found – this would be very cool [an “apply” button of sorts].

I am guessing that someone at Activeworlds has a complete catalogue – they make, package and SELL this content, and they commissioned its design and manufacture. I hazard to suggest they could provide this meta data to us in a form that would allow us to build a web-catalogue that could be used in-world and obviate the need for an object yard. More importantly, if the list is categorised it would allow us to SEARCH – watching kids work, when they want something the SEARCH for it [yes, admittedly most jump straight onto Google, but none the less the idea of using a search engine is not new and not silly] – it is a contemporary 21C skill and something we should provide as a basic service to our builders.

The list/web catalogue could be extensible, branded and pretty. It could allow us to easily add new clusters of objects [by updating things in the object path when new types of things are needed and making appropriate additions to the catalogue] and it could be organised – categories of objects would not be hard, and we could have subsetted versions for different audiences, and the language could suit them – from toddler [click on the pretty] to tweenie [that one is soooo lame, but that one is, like, cool].

I am, however, confused as to why this is not done. Seriously. Genuinely flummoxed as to how builders in ActiveWorlds put up with the status quo because the status is not … quo. Just because that is how it has been done it does not predicate how it CAN be done.  I must be missing something important, because this is sensible, surely … so why is it NOT an option? Can anyone enlighten me? Is there anyone actually reading this? Is the idea worthy of further exploration? How would we make such enquiries?

« Previous Page