Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How intricate can I get?

Rook Inventor
Registered User
Join date: 11 Mar 2009
Posts: 22
03-24-2009 17:19
I originally posted this in the games forum, but the traffic is so low there, I don't have any answers. And this is really a scripting question anyway....


I'm working on an RPG system. Before I get too far, I'm wondering what's the limits? I know about prim limits and memory for scripts, but help me to visualize it. My game will be HUD based. It will have perhaps over 100 prims that may or may not have scripts running. The game is turn based, so I don't need quick action, but I'm just worried about the number of scripts. Most of the scripts will be tiny touch events. Not sure if that has any bearing on it. The other thing is the game will take up to 8 players and the HUDs will need to pass data to each other.

The HUD will only be for the game and players won't need to walk around with it attached. Is there some examples of complicated systems I can dismantle and see what I can and can't do?

Any tips and tricks will be appreciated. I don't want to be a resource hog.
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
03-24-2009 19:17
You can use llDetectedTouchFace plus llDetectedLinkNumber to reduce the number of scripts in your HUD to maybe 1 script.depend on how you whant your buttons with one prim you can get 4 or 5 button in just one prim .
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-24-2009 19:46
You could get pretty intricate in your game mechanics, certainly. I don't know that you are going to get a lot more help here unless you come up with more specific questions. As always when designing a software system, start with the high level requirements and user work flow. That should get you started on some details.
Rook Inventor
Registered User
Join date: 11 Mar 2009
Posts: 22
03-25-2009 06:54
Those two functions may help a lot Papa. I wasn't aware of them earlier. I learn by actually doing the scripting, but I need a project that will hold my interest.
This build may be a little too much for a novice scripter, but I think I can handle the task. My only concern is am I going to be pushing the Sim too much.

It's going to be a turn based RPG. Up to 8 players including the GM will interface with each other through a HUD. There will be another object, (probably a table) that will act as the central "server" for the game.

The HUD's will relay all information to the players as well as interfacing with the game mechanics.

Because it's an RPG, the amount of data that needs to be kept track of is large. I'm assuming note cards can be used to store large amounts of data both during and inbetween game sessions.

Does this sound doable? 8 people all running a heavy duty HUD. I know I can build such a thing, but Im not sure what kind of affect it will have on the Sim it's being played on.
Jack Abraham
Lantern By Day
Join date: 11 Apr 2008
Posts: 113
03-25-2009 07:04
Rook, you're not going to be able to use notecards as you describe because LSL is not able to write to them. Either you'll have to hold the data in memory, or write it to an outside server.
Rook Inventor
Registered User
Join date: 11 Mar 2009
Posts: 22
03-25-2009 07:45
Oh man! That screws me up big time. I thought I saw something about writing a note card. Can it read them? Is there a reason why LSL doesn't write notecards?
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-25-2009 08:17
From: Rook Inventor
Oh man! That screws me up big time. I thought I saw something about writing a note card. Can it read them? Is there a reason why LSL doesn't write notecards?


There are libopenmv bots that can write notecards, though I can't immediately see how that would be helpful in this situation.

It's a fairly simple matter to interface with a website/database for data storage and retrieval, and there are several hosting companies that make doing so rather affordable. I would even argue that it could be more stable to store data that way, since notecards have been known to randomly disappear from the database over time (see http://www.vintfalken.com/ao-notecard-missing-from-database-advice-needed/ and http://www.daikonforge.com/webtab/2008/02/19/notecard-is-missing-from-database/ for example).


.
_____________________
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
03-25-2009 10:51
Yes if you need store a lot of data that can be a problem, you can try a few things:

Prim storage: you say the HUD has a lot of prims so in the prim description you can store some data.

Script storage:Again you say you have a lot of scripts, so you can comunicate between script with linked messages and hig up the memory space.

Web side storage:you can comunicate between a webserver with a sql database to store and retrive any amount of data (2048 bytes limited on each message string).The only negative thing is when you webserver is down your game too.
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
Rook Inventor
Registered User
Join date: 11 Mar 2009
Posts: 22
03-25-2009 12:14
How much we talking about here for web hosting? If the game turns into something that I can sell, then it would be one thing to pay for a host site or maintain a small server at home. But I was only planning on building it for friends. If it becomes popular, then I can deal with that later. How's this for a workaround? After each session, the game can email stat sheets to the GM, who can then cut and paste manually into a notecard. Would that work? The GM could keep the data on his local machine and load it before each session. Thanks for the input. It's helping me to see the big picture.

What about the scripts? Would 8 agents each wearing a HUD that is running maybe 50 small scripts be lag city? What I am trying to figure out is, if a script is nothing more than a touch event waiting for the user to touch, what kind of load does it put on the system compared to an active script that is doing calculations and stuff?
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-25-2009 15:43
From: Rook Inventor
How much we talking about here for web hosting?

The hosting company I use costs me about $60US a year, I think, or something in that range. I've higher bandwidth and storage allowances than I know what to do with at the moment, and maintenance is pretty easy.

Rather than try to turn myself into an advertisement for them (not everyone likes that company, and I just went with the first cheap one I found), I'd suggest looking into several different companies. You are almost certain to find one that is cheaper and has more features that will suit you.

.
_____________________
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
03-25-2009 15:46
From: Rook Inventor
How much we talking about here for web hosting? If the game turns into something that I can sell, then it would be one thing to pay for a host site or maintain a small server at home.


You can find webhosting for 3 or 4 u$s out there (i prefer from 15 u$s and so on)


From: someone
What about the scripts? Would 8 agents each wearing a HUD that is running maybe 50 small scripts be lag city? What I am trying to figure out is, if a script is nothing more than a touch event waiting for the user to touch, what kind of load does it put on the system compared to an active script that is doing calculations and stuff?


Umm the response can be a bit tricky because depend on what do your scripts, "opens listen events, calculations, intersim comunication etc" , lag of the sim and from each player (i mean not all player has the same PC specs or Network conection).

Also you can test in the ways you have it now and see what happends and later improve the comunication , storage etc.

PS:you can check this too:

/54/b2/312865/1.html
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
03-26-2009 01:44
you know, depending on the data and capacity needs, a short-term data solution might be to script an inworld server object using Very Keynes' VK-DBMS
/54/4a/290413/1.html
or it's storage application Storage Cube /54/99/311137/1.html. I've been working with it, and once
you get started, it's really quite nice to work with, and nice to be able to keep some data
inworld, for speed and ease of use.