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 …
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…
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.
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.
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, 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…
Terraforming
I spent some time exploring the land grid and played with “terraforming” to see how the mechanic works.
The “World” is composed of a Terrain which is controlled by a grid. Each grid segment has an elevation [controlled by a point in the corner], a texture [and the texture’s corresponding rotation]. Placed on the terrain are objects … basic model, works well.
Terrain geometry is “angular” in that when you elevate a grid cell, the edges of that cell form ridges with adjacent un-raised terrain. Let me illustrate:
As you elevate a grid section, the surrounding terrain distorts in a fairly controlled way, you can then pick a texture [still trying to source the catalogue of such textures, do not like the “trial and error” search technique nor the slight changes in shading between batches that accentuate the seams] and then, using the PgUp/PgDn keys rotate it in increments of 90° – this is nice but assume the way the textures are applied to terrain blocks smaller rotation increments are not possible. I have not found a way of picking LOTS of cells and adjusting them all at once, but assume you can. I have discovered you can COPY a cell and PASTE the elevation and texture settings separately – very handy for lots of tiling.
With only a little fiddling it is possible to raise mountain ranges, fairly nice crenulations and so on from the ground plain. The MACRO view is nice, flying above the scenery [in much the same way I do in 2l or OpenSim] works best. There seems to be an acceptable collection of terrain textures, including modular sections forming edges, roads and paths.
I have seen in other worlds, soaring mountains and other geographical features so assume it must be possible to either use built-in “rocks” [scaled appropriated and “sunk” into the terrain] and the like to compliment the deformed terrain, or there must be another trick. I am hoping that importing geometry created elsewhere would allow geographic features also – that way so long as the textures are right, some naturalistic outcrops, indentations and other stickey-outey bits would be possible. Not sure, however, what the clearances needs to be in gaps and undulations so as not to trap the avatar – might be a bit tricksey if you get caught in the scenery whilst trying to traverse it.
Walking across this terrain is much more controlled than in 2L [and in OpenSIM it is often downright dangerous to walk across undulating ground as you trip and fall constantly] – the avatar does not “flail” or fall as the terrain in an activeworld is much less “organic” because the deformation techniques are much more granular. I do not think this is a problem or a limitation, necessarily.
Lowering terrain below 0m and you intersect with the WATER PLAIN which appears to be [by default anyways] 1m below the surface. Time to put in a POOL:
Default water is an almost invisible miasma but it fills depressions faithfully. By tweaking the opacity, surface turbulence, wave motion and visibility settings, a convincing puddle or an oceanic expanse is possible – I created quite a “storm in my teacup”, literally whilst playing with the world settings. I quite liked the “tidal” movements but on small water masses they look silly. There must be additional “water” objects that can be used to fill containers, fountains etc. above the water table, because I have seen them in other worlds. Although the above “pool” is quite angular, the grid size would make larger such puddles look much better.
Oddly, you can, in a quite messianic way, walk ON the water if you are looking UP or LEVEL whilst walking. I thought I had broken something when first configuring the world water settings until I tried it with my gaze down slightly. Putting your head down a little [PgDn whilst looking ahead] and then walking INTO the water mass you have a nice sense of entering the water:
By changing the visibility settings [ie, how “murky”], colour and opacity, the combined effects [when taking into account World ambient lighting settings, fog, atmosphere and sun/s position] can be lovely and atmospheric. I went for an over-chlorinated feel and am not unhappy with the results. Like 2L, there are NO health penalties for being underwater, so it is entirely feasible to have water-based worlds where all the action is under the surface – this is great news. Pretty sure however that hollow objects [like a diving bell, for instance, if below the water table, would also be filled with water – must check to see if there is a work around – a sub-oceanic bubble city could be fun. Global water settings effect ALL water in that world, so there must be ways of making local water effects, as I might want to go from a quick dip in the ocean to a slow crawl through a tar pit.
Gravity settings in water and out do not have to be the same, so it is entirely feasible to create varying degrees of buoyancy, weightlessness and so on that would accompany the sensation of swimming through something that you can control the viscosity of. This is also nice.
I placed an object [yes, I know, it is a sofa, but hey, I wanted somewhere comfy to sit] under water and again, depending on the settings you can see it more or less above the surface. The visibility settings seem to work well even if there is an “odd” surface/subsurface transition as the client switches views where it appears as though everything is clear [ie. the water completely disappears for an instant] – I cannot manage to stop at that position so it is fine, just curious.
I can see me, with graph paper in hand, making quite complex terrains – a little planning and a fairly small space could be quite interesting to explore – still to find out the dimensions of each terrain grid, and the number of them you get in a world, but that is just research, so all good.
(more…)
Epiphane at Ikea
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.
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.
He 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.
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
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?
Networks …
I am as guilty of it as the rest of you: beavering away in isolation assuming that uninterrupted attention and personal research would be sufficient to get a handle on something new when … there are people who know stuff that you could ask, expertise that you can draw on. Yeah, I know, a “duh!” moment, but hey, it took me a while to re-realise this, my brain is in holiday mode and I am sporting about a week and a half’s beardy wierdy growth [should do something about the “bad santa” look actually].
The Internet is an amazing thing [will these revelations and original incites never cease I hear you face-palm], it provides a conduit through which people can reach out and share – not a Google “CDROM in the sky” sort of sharing [which is just really glorified “taking”] but providing a sounding board to bounce ideas off, offering fresh perspectives and re-directing questions to other contacts. It took a late night conversation [for me] with Lindy [early morning of previous day for her – she is on the other side of the planet physically and there is this pesky thing called linear time and an even more perplexing international date line thing that always messes with my head] to help me realise this again. Wow that was a convoluted sentence – English is teh sex!
The “virtual world community” is vast, and it makes sense to talk to other people about what they are doing, how they are doing it, why they are bothering to do it at all [shits and giggles are all very well – sheesh, I have built my life out of them; but work/play time needs to be value-added sometimes, right?], what others thought about it, how others used it and how effectively it did it’s job. More interestingly, was it done well enough for “emergent” behaviours to occur – you know, people/things using the stuff in ways that are perfectly valid, interesting, valuable but … unexpected or not specifically planned for – the mark of true success for me.
How you connect is a product of a few things – the situation you find yourself in, your social ability [those who have taken any real time to get to know me would realise I am actually a bit of an agorophobe, I get wierded out by people … so naturally I took on a career as a teacher, but I digress] and assuming that one pattern persists for any extended period of time is not necessarily correct either – a little from column A, little from column B and a little from column C at times [see how I seamlessly interwove a rambling with an included and shamelessly stolen image from Google?].
The biggest problem with relying on model A all the time is that the epicentre holds it all together. If I have learned nothing else from being employed, I have learned that NO ONE is indispensable. Model A works if the linchpin is dynamic and active, in touch with all the other stations and cognoscente of what they are doing but able to delegate responsibility to them – they hold the pieces and the linchpin holds the big picture.
Model B is more closely what usually happens – people form clusters of interest and activity and the relationships between puddles of activity need mediation to ensure all are on the same page. It is effective because the puddles form out of common purpose, vision or association. It fails when the puddles lose touch with each other or lack a basic understanding of what the others are doing – this can lead to duplication of effort and misundertsanding, power play and other politics [did I mention I am so not interested in politics, just putting that out there].
Model C “should” work, but is rarely if ever used in human society and I wonder why. Yeah, sure, organisationally it is fraught with issues around who is doing what, when, with what, why and when they will be done, but a distributed model is emerging from the murky ether of computer networks as the “smarter” way to get something big and complicated done effectively.
I attended a Secondlife presentation this morning on using GIS data [off topic? I no longer know, sorry], satellite imagery and other geo-spatial data sets are being harnessed to dynamically and [at least in the final phase] automatically generate faithful scale models of the real world in a virtual one – the demos were truly impressive as the data sets modellers can draw on for many parts of the planet are so rich and varied but wow, what an idea. I could see augmented reality products, architectural sims for planning permission, traffic flow sims etc that _could_ be where this was heading but the commercial applications were front and centre, sadly. What amused me the most [and it was naughty of me, and so off topic again, but you get that] was that the sims produced by this automated data acquisition were 1/3 size, so the presenters avatar was 1/3 size also – he presented in-world on a highchair specially built for him [presumably so as not to look like a highchair but failing miserably] as a very short munchkin [by established munchkin standards -yes I Googled that also].
Before I go on, I stole another image [thank you Google] that illustrates an artificial neural network – well one flavour of them called a back-error-propagation neural net. It exemplifies a connection pattern that I suspect is closer to what actually happens in many projects – there is INPUT, often at a high/conceptual level, a bunch of geeks then beaver away HIDDEN [well, in truth, in the background, but this is a metaphor so you can cut me some slack] and make something that is the OUTPUT that is either celebrated or derided. It is a long way from the DESIGN-DEVELOP-EVALUATE process that has built-in feedback backwards and forwards throughout the process, but I digress. Thought I would include it anyways because it was neat.
I skyped [is that a new iVerb? like “googled”, “blogged” …] with Bron about virtual world projects, in particular Activeworld projects and got some great advice, pointers to people, ideas for cross-pollination of projects and some insight into in-school resistance that any project will have to face. She reminded me [thanks again Bron] that the power of people and purpose is never stronger than when developing something new [particularly when there are people who have been there, done that, with that for a long while], and that the NEW should be considered a COMPANION for what is already there – building BRIDGES is much more constructivist [and conducive to skills transference, adoption, peace, harmony and the American way] than erecting FENCES. We also agreed that even the flashiest, twirliest new thing is a hopeless waste of time if there is not sound PEDAGOGY, and it is not embedded in quality CURRICULA and implemented by enthusiastic and capable MENTORS.
Much to follow up on, personal learning networks can be transformational, if you let them be. I also scored a guest account in Quest Atlantis [an ActiveWorld I first entered as part of the pilot years back, with Bron] and am interested in world feel, use of objects, layout and interface affordances. Some more play ahead I hope.
There was movement at the station …
So an object exists in 3D, right … that means they have absolute coordinates relative to some “origin”. In addition, they have 3 axes of rotation, commonly labelled X, Y and Z:
The object axes and the world axes may coincide, particularly if you are building straight things – that run north-south for instance, but may not also, if they have been rotated around, say, the Y axis. Thankfully after RTFM I found a bunch of key combinations that make movement of objects a little less pained:
Movement is in increments of 0.5, 0.05 and 0.01 units [I am assuming meters here, although I have yet to measure an avatar against an object to see if that scale is accurate. Arrow keys and the “+” and “-” keys move north/south/west/east/up/down – all very sensible. Shift with the same keys reduces the scale one notch, shift+control reduces it even further. Useful to know when gross then fine movement prior to alignment is necessary – again, all very straight forward if moving according to the compass. Any mathematician will, however, tell you it gets more complicated if the object is rotated slightly – as a change may not distribute itself evenly across the axes involved in the movement [*shakes fist at Pythagoras and his hippopotenuse*].
I also discovered mouse equivalents of most of these – once r-clicked to select, the mouse roller rotated on an axis, dragging moved it quickly n/s or w/e and so on, so rapid gross placement is also possible prior to final alignment and tidying up using more precise controls. Object alignment and seams between objects seem to be really important – overlap can cause some object seams to strobe oddly – something with the world engine and its rendering routines – this is particularly evident on floor pieces as you move over them.
Logic [yee gods, using logic already] would dictate that an object is easier to construct plumb first, then rotate it as a whole later if necessary [mental note: try to remember this]. Like a noob, I rushed to try something complicated – a geodesic dome, composed of sides made up of 6 equilateral triangle pieces [I found such a piece at my last visit to the Object Yard]. Aligning the pieces on each hexagonal facet was fairly straight forward, I then selected all of the objects and saved that as an object group – curiously to my local HDD. Then I was able to “pop” instances of the object group [although, strangely, each of the pieces of that group were still considered separate, still to work out how to “stick” bits together so they behave as one – nothing obvious has emerged yet]. Constructing the dome from the hexagonal facets helped me realise I know nothing of the angles involved and that will necessitate some research – I was guessing and that did not turn out well – the seams were messy, misaligned and in the end I just trashed it.
Rotation is conveniently achieved in scalable units of 15°, 1.5º and 0.1º – again, if the object is plumb these rotations can be relied on – combination roll, yaw and tilt complicate this however indicating that a PLAN might not be a bad idea when considering the structure of a constructed object.
Right-clicking on the object selects it and pops up an object properties dialog box – this box lets you edit some things, or records others – interestingly it lets you play with the position directly [so long as you know the absolute world coordinates that you are building in]. The dialog only echoes the rotation – this is annoying as I would like to type in the rotation I want directly.
The “Action” section of the object properties box is where it starts to get interesting – here you can script the object – in the above example, I made it 3x it’s original height using a “create scale” command. There appear to be heaps of things you can do here – stretching and distorting however can make the object look a little stretched also, so care is needed – I suspect some objects will scale terribly, given their textures stretch also [as opposed to tile – interestingly I cannot find how to get a texture to tile as of yet, early days though].
I notice you can assign an owner in the object properties also – I wonder if you can programmatically do this – that way if you spawn an object you could “give” it to the person who wanted it? Something else to explore. I also notice a “cell limit” and do not know what this means either. Some more research is warranted.