# Re-create WordSmith



## davidblackledge

Ok, help me out here... somebody needs to re-create wordsmith for the angry customers. I'll try to do it, but it'll take me some time.

But most important, we need to write down the rules. I hadn't played it in years before they killed it.

I can get a public-domain scrabble-like dictionary, I'm pretty sure, so that's not a problem.

I think it's a row of letters, you choose from those letters, and new ones slid up to fill the gap and you could select that letter, then, until you have enough letters to spell a word.
So: 

how did scoring work?
How did the controls work? (left/right is obvious, but what about the rest?)
how did the game end? I remember you run short on letters eventually, I guess it's just one screen full (how many tall were they?) but what happened if e.g. you clear the board?
Any sense of the letter distribution? i.e. were there a lot more vowels than consonants? Maybe it's just English-usage-frequency.

Obviously this is an opportunity to make changes, too... any suggestions? I know one: add PIP Live TV ;]

Anybody have a screenshot? (oh...looks like there are plenty on Google)


----------



## telemark

Can you reuse this code base?
http://marc-abramowitz.com/wordly/
Is there HME for python?


----------



## davidblackledge

telemark said:


> Can you reuse this code base?
> http://marc-abramowitz.com/wordly/
> Is there HME for python?


Ok, wmcbrine, he's whistling your tune... wanna add that to the Reversi server?


----------



## davidblackledge

davidblackledge said:


> I think it's a row of letters, you choose from those letters, and new ones slid up to fill the gap and you could select that letter, then, until you have enough letters to spell a word.
> So:
> 
> how did scoring work?
> How did the controls work? (left/right is obvious, but what about the rest?)
> how did the game end? I remember you run short on letters eventually, I guess it's just one screen full (how many tall were they?) but what happened if e.g. you clear the board?
> Any sense of the letter distribution? i.e. were there a lot more vowels than consonants? Maybe it's just English-usage-frequency.


Most of my questions (except letter distribution and particular letter values) are answered at:
http://myaccount.mytivo.co.nz/tivoservice/wordsmith


----------



## davidblackledge

davidblackledge said:


> particular letter values


Oh, every letter is in the screenshot, and the values are visible. ok, then.


----------



## davidblackledge

I got to thinking about this and realized it's way to freaking easy to not just do it.

I'm about 50% there already. I still need to hook up the Moby crosswords dictionary, and add interesting stuff like graphics, live TV and maybe a system-wide high scores list. 

I should have it up and running this weekend.

Here's a screenshot of what I have so far:


----------



## wmcbrine

telemark said:


> Is there HME for python?


Dude, you know it.  See my sig.


----------



## telemark

Well if I ever ask anything obvious, let's just pretend it was rhetorical.


----------



## davidblackledge

davidblackledge said:


> I should have it up and running this weekend.


Done. Enjoy.


----------



## justen_m

davidblackledge said:


> Done. Enjoy.


How do we access this to try it out? I've got a Roamio Plus and Linux and Windows PCs, kmttg and pyTivo, etc.


----------



## davidblackledge

justen_m said:


> How do we access this to try it out? I've got a Roamio Plus and Linux and Windows PCs, kmttg and pyTivo, etc.


Go to EnterWebz.tv/connect.html

I didn't update the download version on my other site, so it's only at EnterWez.tv right now.


----------



## justen_m

davidblackledge said:


> Go to EnterWebz.tv/connect.html


Thanks. I've never played it be fore. It is a bit addictive. There is a fair amount of strategy involved, as you can see upcoming tiles and can dump letters accordingly. I've never used any home media apps before.


----------



## scandia101

So my Mom is kind of happy again - THANKS! but she says that she has never seen so many U's. Is there any way you could make the tiles a little larger or maybe just make the point values on the tiles easier to see? Also one thing that seems to be missing is the game knowing when no more words can be made and ending the game.


----------



## davidblackledge

scandia101 said:


> So my Mom is kind of happy again - THANKS!


Thanks, that made my day! Always glad to make Mom happy!


> but she says that she has never seen so many U's. Is there any way you could make the tiles a little larger or maybe just make the point values on the tiles easier to see?


When did you last talk to her? The version that has been running since late Sunday evening corrected the letter distributions and made tile colors different for each point value. If you haven't heard from her since that change, ask again, please - I do want feedback on the tile colors idea as I'm not sure if it plays well, and both of those problems may now be solved for her.

That said, I can adjust anything. Larger point values is pretty easy, but you also said larger tiles... could you state the actual problem(s) instead of your solution ideas so I can try all my ideas to solve the problem(s)? 
Are the letters visible enough? It sounds like the points are definitely not visible enough.
Is your mom's television SD, 720 HD, or 1080 HD?


> Also one thing that seems to be missing is the game knowing when no more words can be made and ending the game.


As for knowing when there are no more words, thanks for bringing that up. I wasn't sure if the original WordSmith did that or not. This is a surprisingly difficult thing to fix without a long pause after every word you make. I have some ideas for how to do it efficiently, though. If it's still not efficient enough, I could cut some corners like not checking until you're down to 10 or less letters. We'll see what I end up with.


----------



## wmcbrine

It would be easier to make the titles larger if you dropped the log / list of played words, which wasn't in the original Wordsmith. I actually like the feature, but perhaps it could be a pop-up / separate screen, accessed by a button press?


----------



## scandia101

davidblackledge said:


> As for knowing when there are no more words, thanks for bringing that up. I wasn't sure if the original WordSmith did that or not. This is a surprisingly difficult thing to fix without a long pause after every word you make. I have some ideas for how to do it efficiently, though. If it's still not efficient enough, I could cut some corners like not checking until you're down to 10 or less letters. We'll see what I end up with.


How long of a pause? It does take some time to find the next best word before entering it anyway.


----------



## wmcbrine

Do the checking in a separate thread.

IIRC, the original WordSmith wouldn't record your score unless you played to the end, so the check was more important there. I prefer it this way, where you can give up early and still have your score counted. (The endgame of WordSmith could be very frustrating, when it thought you had a playable word, and you just couldn't see it.)


----------



## davidblackledge

scandia101 said:


> How long of a pause? It does take some time to find the next best word before entering it anyway.


I won't know until I write the whole thing. It might be a non-issue, or it might be horrid. I could always throw a "please wait" up on the screen if necessary.


wmcbrine said:


> Do the checking in a separate thread.
> 
> IIRC, the original WordSmith wouldn't record your score unless you played to the end, so the check was more important there. I prefer it this way, where you can give up early and still have your score counted. (The endgame of WordSmith could be very frustrating, when it thought you had a playable word, and you just couldn't see it.)


Ah... interesting. Yeah, I like it this way better, too. FYI, I do have a bug where if you leave the game with e.g. the TiVo button, I don't think it will record your high score, so I need to fix that.

RE: threading. I'm using the Java SDK 1.4.1e "thread safe" version... where they turned it into a thread BRICK. The only way I can do threading is if I just do processing to a result variable, then use sendEvent "animation chaining" to poll for updates to the result. It's not possible in 1.4.1e to have a thread update the UI directly anymore.
That said, I already have sendEvent refreshes going on, so no big deal.

Anyhow, I probably won't get a chance to think more about it until this weekend.


----------



## scandia101

Thanks for everything you're doing.
I was able to see the colored tiles earlier today. 
My opinion (and my Mom's) is that the 1 point tiles being brown makes the whole thing look like mud. We think the higher value tiles should be darker because there are far fewer of them and lower value tiles lighter.
Or
Leave all the tiles the same color and change the color of the tile point values from white to black.

I don't expect any changes to be made because I want them, I'm just making suggestions. When you declare the game finished, my Mom will just get used to whatever the end result is because she knows something is better than nothing. And honestly, the end result doesn't matter at all to me because I rarely play this type of word game and when I do, it's on a tablet.


----------



## davidblackledge

davidblackledge said:


> I won't know until I write the whole thing. It might be a non-issue, or it might be horrid. I could always throw a "please wait" up on the screen if necessary.


Looks like it's a non-issue... the technique I'm using is pretty much instant. Now I just have to decide on the morals of what to do with the information.

Obviously the game round ends if there are no more words.

But the game could also say "there are now 980 words possible with a maximum score of 360" or so every time you complete a word.... but I think that would be horribly depressing unless you're one of the few people that can actually find that 360 point word. My mother was one of those, but I'm not.

I don't think it's NECESSARY to put out any of that information, but it's certainly interesting information.


----------



## gonzotek

davidblackledge said:


> Looks like it's a non-issue... the technique I'm using is pretty much instant. Now I just have to decide on the morals of what to do with the information.
> 
> Obviously the game round ends if there are no more words.
> 
> But the game could also say "there are now 980 words possible with a maximum score of 360" or so every time you complete a word.... but I think that would be horribly depressing unless you're one of the few people that can actually find that 360 point word. My mother was one of those, but I'm not.
> 
> I don't think it's NECESSARY to put out any of that information, but it's certainly interesting information.


Maybe hide it behind something like a Konami-code sequence, so it's a bit of an easter egg.


----------



## wmcbrine

I'm not really liking the multiple tile colors. They obscure where the selector is, and the dark backgrounds are hard to read (especially the dark + faded letters below the first row).


----------



## scandia101

wmcbrine said:


> I'm not really liking the multiple tile colors. They obscure where the selector is, and the dark backgrounds are hard to read (especially the dark + faded letters below the first row).


:up:


----------



## davidblackledge

gonzotek said:


> Maybe hide it behind something like a Konami-code sequence, so it's a bit of an easter egg.


Done. Thanks for the idea, and I'm glad the TiVo remote has B and A keys now. ;]

up up down down left right left right B A (no start button, sorry)

I'm actually adding it to my main utilities as a new "onKonami" event handler ;]


----------



## wmcbrine

The local high-score list (right-hand column) has a weird flicker, like it's being redrawn every second or so.


----------



## davidblackledge

wmcbrine said:


> The local high-score list (right-hand column) has a weird flicker, like it's being redrawn every second or so.


Yeah, actually both high score lists are hooked up to the same update as the list of connected/playing users.

The thought was the high scores should update live when somebody gets a new score.

However,
a) the personal high score list doesn't need that, and 
b) the Java SDK forcibly caches the global properties where the global high scores are stored, so it'll never actually update until you reconnect.

Therefore, I might as well turn off the high score updates completely. If I change how the global scores are handled somehow, I could turn that one back on.

Thanks for the feedback,
David.


----------



## davidblackledge

davidblackledge said:


> b) the Java SDK forcibly caches the global properties where the global high scores are stored, so it'll never actually update until you reconnect.


oh crap... I'll have to check, but it's possible that if two people are connected, and get a high score, the second one might overwrite the high score list to not include the first one's because of this caching.

I believe TiVo didn't bother to cache at a static level for this "static" type properties file. Dang.


----------



## wmcbrine

Just do your own score files, there's no reason to go through the HME SDK for that stuff.

You can of course check whether the scores need updating without redrawing, and only redraw if they do. Anyway, the left column never had this flicker, so something must be different between them.


----------



## beyobe

Is EnterWebz.TV supported on a Premiere?
When I try to connect my Premiere to 66.193.212.44 as described in enterwebz.tv/connect.html, I get error code MSG_V307_ID (error occurred on the server).

I can connect successfully from a Roamio Plus.


----------



## wmcbrine

beyobe said:


> Is EnterWebz.TV supported on a Premiere?


It was this morning...


----------



## davidblackledge

davidblackledge said:


> oh crap... I'll have to check, but it's possible that if two people are connected, and get a high score, the second one might overwrite the high score list to not include the first one's because of this caching.
> 
> I believe TiVo didn't bother to cache at a static level for this "static" type properties file. Dang.


It gets much creepier. I don't know how the two scores are working at ALL right now. It ends up the code in the SDK caches ONE properties file for all persistence in the application instance. It picks the file name to load/save on each request, but it doesn't seem to have a way to load the 2nd requested file because it already has something cached and doesn't cache one per file name. I would think it is overwriting the global scores with personal scores or vice versa!

I've backed up the scores files for now and this weekend will fix the crappy implementation TiVo supplied or just write my own (I think I'd rather fix theirs to only cache per file name and do a static cache for global files). TiVo wanted this feature for high scores and such, so I figure I should fix it for the next time I fall for it. However fixing it only works when I'm using my own version of sample host... OK, I guess I should just do a full implementation of my own separate from their persistence.

As for the flicker, they're both drawn at the exact same time... not sure why the 2nd one flickers. Also a little creepy. It generates content, clears and sets the global one, generates content, clears and sets the local one, all in one method. But I didn't turn off painting for the update, that probably would help... and I might as well track the display value so I don't update at all when not needed, like you said. Plus, like I said, the local scores don't need to be refreshed at all after the page displays.


----------



## davidblackledge

Ok, global high scores are now truly static and synchronized so they work properly at all times.
Personal high scores don't try to update continuously in the Lobby.
Global high scores actually reflect the latest additions if you're watching them from the Lobby.


----------



## wmcbrine

Not to be a pain, but the high score list still flickers.


----------



## davidblackledge

wmcbrine said:


> Not to be a pain, but the high score list still flickers.


I can't see any flickering my Roamio or Mini 2... what are you seeing it on?

And it's the global high scores now, right?
Shouldn't be possible for the personal high scores to flicker any more - that only updates on entry.


----------



## wmcbrine

I noticed it on a Premiere (not that I think this is model-related), and yes, it was the global list. Not as bad as it used to be, but still there.

I mean, seriously, it just needs to work like this (very broad pseudo-code):



Code:


old_list = nil
loop:
    get new_list
    if new_list != old_list:
        update screen        /* ONLY DO THIS HERE */
        old_list = new_list
    end if
end loop


----------



## davidblackledge

wmcbrine said:


> I noticed it on a Premiere (not that I think this is model-related),


I wouldn't be surprised if it is - the Roamio runs the rest of Enter Webz so incredibly faster. Considering this is literally "clear resource, set resource with same string" it should be instant if the machine is fast enough.



> I mean, seriously, it just needs to work like this (very broad pseudo-code):
> 
> 
> 
> Code:
> 
> 
> old_list = nil
> loop:
> get new_list
> if new_list != old_list:
> update screen        /* ONLY DO THIS HERE */
> old_list = new_list
> end if
> end loop


Oh, is THAT how you do that. I've been looking for an example of that elusive algorithm for YEARS.


I wasn't really concerned with the issue, but realized there was no reason to be updating the personal high scores at all, and that was the only place the flickering was showing up before, so I didn't feel like introducing a new instance variable or two when I had other improvements to think about in my very limited time.

--

FYI to everybody, not that it's anybody here's business, but I've got major family health issues going on right now, so I am only reading posts or working on code if I need a moment's mental break... not likely enough time to make any significant releases for quite a while.


----------



## wmcbrine

davidblackledge said:


> Considering this is literally "clear resource, set resource with same string" it should be instant if the machine is fast enough.


That's wrong in the general case, but doubly so here, where each command is being sent over the public Internet from the server to the TiVo, introducing unpredictable delays.


----------

