Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

In World Chess.

Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
11-27-2002 16:41
Anyone interested in a living chess game a la harry potter?
I wouldn't want to write code to play *against* me, but two people playing against each other wouldn't be that hard.

It'd be pricey, and I would have to go pretty abstract with the pieces, would anyone be interested?

"King's pawn to KP4"
"Queen's rook to QR8"
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
11-27-2002 16:48
I wouldn't mind giving you a hand there Celerity. And about its expenisive ness, I bet that we could get our money back in one of two ways, either we charge exorbitant amounts to play, or we get the Lindens to buy it, which i bet we could do!

talk to you IG about it
_____________________
i've got nothing. ;)
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
Previously on Buffy the Vampire Slayer...
11-30-2002 08:23
I got started last night on this. I have the board (mostly) laying itself out. Next up is pieces, then comes the actual moving.

Whee!
Brock Stone
Registered User
Join date: 25 Nov 2002
Posts: 27
Where?
12-01-2002 13:12
celebrity, where exactly are you doing this at?
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
Where?
12-01-2002 14:50
In my tower! Why else build it?

The system is designed to be easily portable, a single object in fact, that way when I want to sell it or whatever I can do it as a single unit.

Vaguely useful.

Sadly I don't think it'll be real wizard's chess,
but the board will be able to dynamically scale itself based on small variable changes or by voice command - so while it may be small while I work on it ( roughly 8mx8m ), when I actually install it somewhere it'll be bigger.

I'm considering two modes of control of the pieces.
touching the piece then touching the square you want to put it on, or again by voice commands.

doing it by touch allows you to create it small enough that you can easily keep it in your screen while in mouselook mode (does touch work in mouselook?); basically a personal game where they don't want onlookers.

Voice commands (through a listening object they'd attach maybe? Have to decide on this.) would allow you to do a spectator game easily - board bigger than you'd want to normally try to use by hand, but easily enough seen by others watching.

My list of things to try seems to just get longer & longer =)
Brock Stone
Registered User
Join date: 25 Nov 2002
Posts: 27
12-01-2002 15:41
Um... do u have my calling card?

If not, where is your tower?
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
You know where the welcome area is?
12-01-2002 15:50
You know the bazaar is? If you look at the bazaar from the welcome area you'll see my towre (usually)

Prime real estate, eassy address =)

We should do street signs =)
BuhBuhCuh Fairchild
Professional BuhBuhCuh
Join date: 9 Oct 2002
Posts: 503
addresses
12-01-2002 15:57
back in the day, the servers had names, it would be cool to get that back so folks know where to look for stuff

I guess you could always make yourself a street, and name it, and giveyourself a number -

BuhBuhCuh Fairchild
1 N BuhBuhCuh Street
Buhbuhcuhserver, buhbuhcuhland 58203
bUTTONpUSHER Jones
professional puddlejumper
Join date: 10 Oct 2002
Posts: 172
i like to watch
12-01-2002 16:20
a couple notes, Celerity:
you can use touch in mouse look. the Tab key turns on/off your crosshair.
some people like to play chess and some like to watch. most big cities have a park or area where a bunch of people play or watch chess. if that happens in SL, you'll need to make sure their's no crosstalk between players and games in close proximity.

bp
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
Crosstalk.
12-01-2002 16:43
Ok, let me know if this is reasonable.

I already have the channels set as variables.

In ithe init I'll have the board make a request on a channel at the beginning of my range. If any chess board responds it'll increment the channel used and try again. That way we could have a whole lot in the area.

I'm currently using two channels for communications, one for interobject chat and one for "announcements" - stuff you'd want someone (players, spectators) to hear. I'm thinking that I will try to get that down to one though (still without using 0)

If I bought a street I'd have an aweful lot of road building to do, maybe I should put off the chess for a while =)
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
I just wish I knew how long I should wait for a response.
12-02-2002 11:30
one ever responded to my questions about llSay-.llListen response times.

Though I think that I account for upwards of 1/4 of the posts on the boards It makes sense that most of my questions dissappear amidst the clutter =)
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
12-02-2002 12:27
The only instance I have ever run into commands not acting instantaneously is when they are changing the objects status_physics flag...
_____________________
i've got nothing. ;)
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
yeah
12-02-2002 13:29
that sleep trick saves the day there, I just want to be sure. say you (theoretically) had 40 objects talking and listening on

(Tangent, anyone up for a second life for Eliza?)

a channel, is there time between saying something, having another object process it and lastly reponding, the original object acting on that response.

does cross talk slow? does massive use of a particular channel result in impairment of the speed of an object's response?

if I surround myself with a set of 100 floating objects all *listening* would that slow a sim?

just trying to guage limitations.
BuhBuhCuh Fairchild
Professional BuhBuhCuh
Join date: 9 Oct 2002
Posts: 503
ideas
12-02-2002 14:01
a easier solution to the crosstalk (besides channel vars) would be to get the board to find the players keys or names, and only listen for those players, thereby eliminating the need to reconfigure channel settings each new game.

as for listening slowing the server, back when my roof was flashing, each panel was listening for comands, there were only 12 of them or so, but I didn't notice any reduction of quality at all. when I made a big pile of monitors all showing an animated "matrix code" thingy, you could see the bandwith hit the red, but no problems from listen.

and whos eliza?

BBC
_____________________

START!
Make your own movie in Second Life for
The Take 5 Machinima Festival
Films due Dec 4, screening Dec 7!
http://www.alt-zoom.com/take5.htm

Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
12-02-2002 14:29
playing pieces listen to the board controller on a channel. The board controller is the only thing listening on a public channel. I guess I could get a key for that also.

thing is I'm building it so if you want a really private game you can listen on a channel with an object and listen in on a game which could then im you or shout, depending.

having it use a random channel makes it harder to eavesdrop.

Eliza is an AI, a game, she listens for specific phrases and resnds interogativly, done right it seems like you're talking to an extremely stupid psychiatrist.

all string parsing, possible...

As for listening.. I wonder if I cah have the H.A.L.O. listen on *every* channel?
bUTTONpUSHER Jones
professional puddlejumper
Join date: 10 Oct 2002
Posts: 172
12-02-2002 22:46
i picture it like:
the board is rezzed, the two players click the board, the board will only listen to them.

i don't understand in what way you will make a private game. no one else will hear the move commands, or no one else can see the playing board?

BBC, about the matrix monitors: i hear that happened because the change-texture information-stream has not yet been compressed and optimized. it should, in a future release, work just fine.
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
12-03-2002 06:22
Score announcements,
move announcements,
having several people on one side or both,
different verbosity levels,
linked game boards (what happens on one board happens on other boards near by)

I dunno. I'm building it more complex than it really needs to be because I will be reusing code. The chess board layout code, for example, could set up a seed for the relay network I was talking about ages ago. While the H.A.L.O gave me my own always on command intrepreter. (I can set listens and responses through voice commands, I can have it im or broadcast, I can make it do basic math for me when I don't want to alt tab or, well, lotsa things. Love my H.A.L.O.
Brock Stone
Registered User
Join date: 25 Nov 2002
Posts: 27
I'm in.
12-03-2002 08:43
I'll also give you a hand.

And what about in world checkers too?! :eek:
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
this could do both easily enough.
12-03-2002 09:04
since I'm not building game logic, this is just a board and pieces. It'll move whatever piece you want to any square you want, and if there;s already something occupying that space it will remove it from the board.

we could make it set up either easily enough.

I think it'd take about 20 mins to add the piece configuration, You'd have to do the piece removal manually for a whie though.


anyone who wants to help, I need modelling and textures for the pieces. Depending on submissions, I might make it configurable to allow different piece sets (neat eh?). Low primitive count is good as they're pretty expensive.

is it possible to transfer something from one object's inventory to another? That'd make my life easier.
Brock Stone
Registered User
Join date: 25 Nov 2002
Posts: 27
Yes.
12-03-2002 11:07
yes, that is a possibility. :D
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
sweet. So I can add scripts as I create objects
12-03-2002 11:17
polymorphism of a sort. Well, that's good then, I don't have to add the piece script to each piece type by hand every time there's a change.
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
12-12-2002 11:24
The response time of llSay() --> llListen() should be pretty fast... on the order of 0.1 sec. Most of that time would be the delay between the first script operating and execution of the second script (many other scripts could be executed between the two).

Don't rely on fast talkback between scripts, since timing failure may depend on the total load of the simulator --> could work today but fail tomorrow. Better safe than frustrated -- if one script is listening for a response I recommend at least 0.5 seconds sleep/wait before giving up on the response.

The load on the sim from each chatting object should be small. I don't have any numbers to provide off of the top of my head, however the danchall mixmaster is about 80 mixsticks all listening on one channel plus about 4 other scripts listening on several channels. When the chat messages were flying I never noticed the impact on the sim.

ButtonPusher and BBC are on the right track with making the pieces on each side listen only to speakers with the correct key (or name). The key (or name) would have to be communicated to the pieces via some button or something at the beginning of the game. Each piece could listen on channel 0 and execute accordingly. I don't see why a non-zero channel would have to be used for commands to the pieces; I don't see how eavesdropping would be a problem.

Any inter-game communication (such as whose turn it is) should go on a private unique channel and crosstalk would be a problem there. There is a way to pass a parameter to a rezed object using the argument of the on_rez(integer param) callback. I've used that in the past to tell the new object which channel to use for private communication.

In other words, I would make a chessboard (or a single object) that has all of the necessary pieces in its inventory and a script that rezzes them in the right place, passing the private channel to each piece. That way, you could put the creator object down, modify its script to use a unique channel, then tell it (by touch or something) to build all of the pieces. Then you could move the creator over to a new location, edit the script again to use a new private channel, and create a second board where all of the peices would talk on the second channel --> preventing intergame crosstalk between the two games.

I used this for the jug-toss game. For an example on how I tried to do it you could find the jug-toss over by the boardwalk and examine the various scripts -- look first at the object that launches the softball -- it has a mode that tries to build the jug-toss booth (probably a bit out of date since I didn't do the final touches to the game) as well as rezing the softball for throwing at the jugs.

(Hmm... maybe I should swing by the jug-toss to make sure the person who finished the games has prevented crosstalk between the two versions of the game.)

The only thing to be careful about is the order of operations on the on_rez() callback. Scripts keep track of which state they were in when they were copied into an inventory, so you have to put the on_rez() in the correct state. Also, when they are rezzed out of an inventory the on_rez() will be called before the on_entry().

I had some frustrating moments when I put an llResetScript() call inside my on_rez() which would then totally reset the script -- blowing away the parameter I had passed to the on_rez().

Good luck. Chess is an excellent project for learning some scripting magic.