Text On a Prim Update
I’ve been slowly adding features to my Second Life Text on a Prim system.
First, I moved the server-side code off of my overburdened Syndic8 server onto another server. I then registered textprim.com and set up my DNS using ZoneEdit.
The in-world prim now accepts a series of formatting commands on channel 2, as follows:
- Height:NNN to set the height of the generated image.
- Width:NNN to set the width of the generated image.
- Font:SSS to set the font (I have just one font file installed on the server right now, so this isn’t too useful just yet).
- FontSize:NNN to set the font size.
- BodyColorRGB:RRR,GGG,BBB to set the background color.
- TextColorRGB:RRR,GGG,BBB to set the text color.
- Reset! to set all of the parameters back to their default values.
Ok, so now I can type a sequence of commands like this:
- /2 Height:256
- /2 Width:256
- /2 BodyColorRGB:128,128,128
- /2 TextColorRGB:0,255,0
- /2 FontSize:32
- /1 Jeff Rocks
To get this:
Hmmm, the body color should be gray, not blue. Have to look in to that.
I have run into a snag, however! The llParcelMedia function limits the length of the URL argument to 255 characters for some reason. I was very verbose when I named the parameters that I pass to the server-side script, so I can’t enter in text messages of any real length yet. I can shorten the parameter names, but this is still a significant and unanticipated restriction. Sigh…
Jeff,
Have you considered creating a web interface and an API to this? My thinking is along these lines:
You sell “Text on a Prim” boxes from vendors, SLEX, whatever.
The box creates a hash of the ownername and parcel name
The hash is used as a key to launch the owners web configuration page
You call the hash as the parcel media url
You let the action page used to set the text (along with a password) be callable as an API
I buy one and start writing code to put my latest blog post onto a prim in SL, auto update pricing, etc.
Just a different approach, might be useful.
Comment by Michael Buckbee — 9/21/2006 @ 8:30 pm
Jeff, I can’t tell you how cool this is.
Comment by Roo Reynolds — 9/22/2006 @ 5:08 am
[...] Earlier today a couple of those random parts in my brain intersected and I realized that I could do a simple and crude version of HTML on a Prim, building on the work that I had already done to create Text on a Prim. As noted in a previous blog entry, there are lots of ways to create a graphical snapshot or thumbnail of a web page without too much trouble. [...]
Pingback by Jeff Barr’s Blog » Web Page on a Prim! — 9/23/2006 @ 11:10 pm
This is very cool Jeff.. Looking forward to your progress
Comment by Baba — 9/24/2006 @ 3:47 am
Jeff, while it seems like you may have carved out some new territory with formatting (I’m not a tekkie and am not sure of everything you did) — I’m not sure how it happened that you appeared to have re-created the wheel here. What you seem to have done is duplicated the Xy-writer that an early resident of SL already made — and which was tweaked in various ways by a half dozen others.
They all ran up against this very limitation you’ve indicated with your comment “I have run into a snag, however! The llParcelMedia function limits the length of the URL argument to 255 characters for some reason”. This has to do with prim capacity I believe, could be wrong.
All the inworld whiteboard writers, whether from Timeless Prototype or Foolish Frost or whomever, have faced that limitation, thought they try presenting the letters in various formats, lighting, prims, etc.
Toneless Tomba’s ThinCBook uses a system of textures, but then you have to type up the text in Photoshop and upload each page for $10. Frans Charming and others have made books using variations of these solutions with tga files.
Evidently these scripters aren’t trying to do anything more with this because of this very limitation they haven’t broken in years, and are just waiting for web-on-a-prim.
It’s frustrating because the one thing we need in this world where everybody is constantly typing, where Philip Linden says several novel-length books are written a day by all the residents, is the ability to write, manipulate, edit, and save text, as we would in Word.
Comment by Prokofy Neva — 9/26/2006 @ 2:17 am
Nice work Jeff. I was thinking of trying this method, getting php to generate the image.
I take it this is using the media url. ie: quicktime?
I may be digging up some old Quicktime and Flash project I did a few years ago, which might give us live news feeds.
Roll on uBrowser! ;)
FYI: I asked Philip Linden for a browser on a HUD-bound prim during the recent townhall, which he said was a good idea.
This is due to one of the issues of a primbowser is who controls it, who sees what, who has the right plugins etc. A multiuser control and view is pretty complicated when you come to think of it.
Chers! Koz Farina
Comment by Koz Farina — 9/26/2006 @ 10:05 am
[...] Ok, today I’m not on email and I’m not reading or blogging (other than this). I am going to dive headfirst into my Text on a Prim and Web Page on a Prim work in Second Life, and hope to have something sufficiently polished to sell by the time I wrap up tonight. [...]
Pingback by Jeff Barr’s Blog » PHD - Personal Hack Day — 10/6/2006 @ 5:48 am
[...] I’ve been writing PHP, MySQL, and LSL all day and made an amazing amount of progress on my Text on a Prim system. If you are impatient to see it, just click here for a teleport. [...]
Pingback by Jeff Barr’s Blog » 19 Hours in Front of the Keyboard - For This! — 10/6/2006 @ 11:19 pm
Anyone interested in creating their own text on prim similar to the way Jeff is doing should start by reading this article about dynamically replacing text with images using PHP and GD library. http://www.alistapart.com/articles/dynatext
Then check out the Flickr Screen for Second Life source code here: http://www.hackdiary.com/archives/000087.html
These are pretty much the key elements of what Jeff attempted. The rest is building the UI. If you are tired of waiting to get your hands on text on a prim it wouldn’t be too hard to DYI. However, rumor has it that Linden Lab is going to have some kind of text on prims in the next major upgrade.
Comment by Dave Anderson — 3/14/2007 @ 1:51 am