Jump to content
You are about to reply to a thread that has been inactive for 3159 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

I have an idea for something I'd like to do, but I don't know if it's something I can do using SL's scripting language. I also have limited programming experience (but I do have some), so I'm unsure where to start. Please read on.

The idea I have is to make a simple card game that can be played via a hud. The rules will be handled by the players themselves, so I don't need that aspect scripted; all I need is the ability to drop "cards" (scripted objects from your inventory) into the hud, have the hud draw a random hand from those cards and diplay them in the hud, be able to discard cards so they can late rbe reshuffled into the deck, and be able to display chosen cards from your hand in-world during play so that the other player(s) know what card you are playing.

My first question is about feasibility. Is this something that can be done in SL? I specifically want the cards to be visual rather than chat broadcasts so that the game feels real. And I don't want to have to rez out a table to play this; I want it to be something you can just attach and play anywhere.

My second question is about scripting tutorials. Besides just reading a wiki, what resources are there to learn LSL? Are there any good video series on YouTube or really good tutorial sims? If I can, I'd like to make this myself, but I live in a timezone that does not make logging and seeing North American players easy.

Thanks for your help.

Posted

Yes, that's possible.  I scripted something like that for a client three or four years ago.  It's not an easy scripting job, but if you break it down into subtasks and tackle them as modules in the final project, it shouldn't be overwhelming.  As you describe it, there doesn't seem to be a compelling reason for the cards to have much of a script in them.  All the work of shufling, creating a random hand, and rezzing them in world would be done in the HUD.  I'd suggest displaying cards in the HUD with a texture changer, simply displaying the card textures on prim (mesh) faces in the HUD rather than rezzing and moving around the cards themselves.

Your prior programming experience will be both a help and a handicap.  You already appreciate the logic of writing scripts, which is the hardest part for most people. LSL is not like other languages you have used, though, so you will find yourself fighting to understand its State/Event structure. There are no good YouTube tutorials that I am aware of, although there are some for specific tasks.  The LSL wiki is our primary resource.  It can be arcane at times, but it's actually well laid out and reasonably well documented.  I suggest spending a weekend with some of the tutorials in it and then grabbing example scripts to dissect and tinker with.  That's how most of us started.  Your HUD project is a good goal, but don't expect to complete it to your satisfaction until you have LSL whipped into submission.

Oh, and read http://wiki.secondlife.com/wiki/Creating_HUDs

Posted


HarrisonMcKenzie wrote:

... display chosen cards from your hand in-world during play so that the other player(s) know what card you are playing.

...  And I don't want to have to rez out a table to play this; I want it to be something you can just attach and play anywhere.

This is the only feasibility concern I see, it's nothing to do with script limitations, and you may very well have already sidestepped the issue. If by not rezzing a table to play the game you mean that no cards or anything else is to be rezzed (except the HUD attachments themselves), then everything is cool, and that's kinda what I understood from your post. But if "display chosen cards from your hand in-world during play" means that they're to be rezzed as unattached objects, then that would interfere with the "play anywhere" requirement, because most of SL wouldn't allow them to be rezzed.

Again, it's a simple fix: just make the "playing surface" be part of the HUD itself, and update everybody's HUD simultaneously as cards are played -- which is probably what you had in mind all along.

In passing, I'm not (yet) seeing the point of the cards being Objects at all, nor why they should pass through the player's Inventory to be used in the game. Maybe that's an effect of how they're to be distributed to players, but if not, it may be simpler if card distribution were wholly self-contained in the game scripts, not involving Inventory at all.

Posted


Qie Niangao wrote:

[ .... ]

This is the only feasibility concern I see, it's nothing to do with script limitations, and you may very well have already sidestepped the issue. If by not rezzing a table to play the game you mean that no cards or anything else is to be rezzed (except the HUD attachments themselves), then everything is cool, and that's kinda what I understood from your post. But if "display chosen cards from your hand in-world during play" means that they're to be rezzed as unattached objects, then that would interfere with the "play anywhere" requirement, because most of SL wouldn't allow them to be rezzed.

Again, it's a simple fix: just make the "playing surface" be part of the HUD itself, and update everybody's HUD simultaneously as cards are played -- which is
probably
what you had in mind all along.

[ .... ]

 I somehow glossed over that bit about not wanting to rez a table, but I agree that simultaneous display on all players' HUDs is a good solution.  It's also possible to display on any other attachment -- a board attached to your chest or floating over your head, for example.  The game I produced a few years ago simply involved somebody being able to rez objects wherever you were playing, so everyone's cards appeared on that board, but of course that violates the OP's "anywhere" requirement.

You are about to reply to a thread that has been inactive for 3159 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...