Writing Ages for Shards

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Writing Ages for Shards

Postby diafero » Wed Jul 08, 2015 4:22 am

For your age to work fine on Shards, there are some precautions that you should take. Unfortunately, many of the issues that Shards like to expose cannot be observed if you test your age offline, on your single-player installation. So you have to be extra careful here. I started collecting such issues in the wiki: Writing Ages for Shards.

If you are an age writer, please go through that list before releasing the age, to make sure people can enjoy it online just as well as offline. (And even more so, since their friends are around!)
Also, that's a wiki, so feel free to extend the documentation if you think there's something missing! If you have questions, this forum is the right place to ask :)
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Writing Ages for Shards

Postby Karkadann » Wed Jul 08, 2015 6:27 am

On the subject of Max/Plasma and linking.
Would I use kBasicLink If I wanted to link from one place to another in the same age?
The Optimist see's the glass half full, The Pessimist see's the glass half empty.
Its the Realist who see's the glass is half full with air, half full with water
User avatar
Karkadann
 
Posts: 1223
Joined: Sun Aug 02, 2009 10:04 am
Location: Earth

Re: Writing Ages for Shards

Postby diafero » Wed Jul 08, 2015 7:39 am

If you want to link within the same age, you should not link at all, but rather use a fake link like Ahra Pahts does - that avoids the waiting time for clients. You can do this in Python:

Code: Select all
def fakelink(agename, spawnpoint):
    print ('fakelink to %s in %s' % (spawnpoint, agename))
    avatar = PtGetLocalAvatar()
    sp = PtFindSceneobject(spawnpoint, agename)
    PtFakeLinkAvatarToObject(avatar.getKey(), sp.getKey())


If you do want to do an actual link (to any age), you should do it in Python as well:
Code: Select all
import xLinkMgr
xLinkMgr.LinkToAge('AgeNameHere')

There's Python scripts by Sirius to help you doing this for linking books.
The xLinkMgr is part of Offline KI, and it knows all the things to get linking right.

Note that CWE shards will probably also want you to be very careful with linking, but I have no idea idea if they have something like xLinkMgr.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Writing Ages for Shards

Postby Tsar Hoikas » Wed Jul 08, 2015 11:05 am

kBasicLink is a bad idea on CWE unless you know what you're doing... Especially on MOULa. It generates an entirely new age vault :roll: . On UU/PotS, kBasic link worked as a sort of load balancing technique that would take you to an already created age.

Talk to the shard admin.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Writing Ages for Shards

Postby diafero » Wed Jul 08, 2015 3:11 pm

Alcugs pretty much entirely ignores the linking rule, and does what it wants. For kBasicLink, the client does pretty much nothing, so no harm is done. For the other linking rules, the client starts to make assumptions, and it starts to mess with the vault, so bad things can happen.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Writing Ages for Shards

Postby Ehren » Sat Jul 11, 2015 9:18 pm

diafero wrote:Alcugs pretty much entirely ignores the linking rule, and does what it wants. For kBasicLink, the client does pretty much nothing, so no harm is done. For the other linking rules, the client starts to make assumptions, and it starts to mess with the vault, so bad things can happen.


Now I'm curious, is Alcugs somehow set to ignore the linking rule specified in Responder Modifiers? Because almost every Cyan link in CC is kOriginalBook, and it seems hard to believe the same client assumptions would work for all of the places (both public and private) that are set for that rule. I mean kOriginalBook normally links to or creates a private instance right?
User avatar
Ehren
 
Posts: 272
Joined: Fri Nov 16, 2007 9:45 pm
Location: Planet X

Re: Writing Ages for Shards

Postby diafero » Sun Jul 12, 2015 3:50 am

The Shard's part in linking is to decide which concrete age instance (identified by its GUID) the player links to. All the vault manipulation is handled by the client, the Shard has no say there.
In the case of Alcugs, this (GUID) decision is based solely on the name of the age. There's a configuration variable telling Alcugs which ages to create per-player instances for. All the rest gets global instances. The GUID are formed systematically, encoding the sequence prefix of the age, and the KI number of the owner (in case of per-player instances). Thus the server can reliably send the player to the same instance again and again, without any persistent state. All of this stems from the fact that the Alcugs game servers do not ever access the vault themselves. They just forward the vault access of the client. This avoids the need for implementing a vault *client*, but it results in some hacks and weirdnesses. (The other one being the lack of synchrinization between the vault-stored SDL, and the game-server-managed SDL.)
I changed this a bit compared to the original Alcugs, in that the GUID generation is indeed now handled by the vault server - but I never went on to actually touch the database there, currently it's just a kind of pointless roundtrip.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Writing Ages for Shards

Postby Karkadann » Sun Jul 19, 2015 7:13 pm

Code: Select all
def fakelink(agename, spawnpoint):
    print ('fakelink to %s in %s' % (spawnpoint, agename))
    avatar = PtGetLocalAvatar()
    sp = PtFindSceneobject(spawnpoint, agename)
    PtFakeLinkAvatarToObject(avatar.getKey(), sp.getKey())



Can someone please help me to get this working in Max, Im still a bit coder incompetent.

progress

OK I got it to show up in the drop down menu but there are no setting
The Optimist see's the glass half full, The Pessimist see's the glass half empty.
Its the Realist who see's the glass is half full with air, half full with water
User avatar
Karkadann
 
Posts: 1223
Joined: Sun Aug 02, 2009 10:04 am
Location: Earth

Re: Writing Ages for Shards

Postby Sirius » Mon Jul 20, 2015 1:36 am

I assume the link is done automatically on entering a region or clicking something ? (not a book, I mean)
Then you could try using this script:
Show Spoiler

Don't forget to add the Python glue at the end of the file, and it should work in Max. I didn't test the script, though. Hopefully it will work without problem... :P
It will even handle the screen fadein/fadeout when linking.

Oh, and don't forget fakelinking doesn't reset the camera position. Meaning when linking the third person view will fly all across your Age. This can be solved by setting up a camera region where you link to, and set it to cut position, IIRC.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Writing Ages for Shards

Postby Karkadann » Mon Jul 20, 2015 2:57 am

Thank you both, I just might get this thing done yet. although im wondering what would have to be done to get the other one to show up with settings in Max. Im assuming it was more of a Blender python
The Optimist see's the glass half full, The Pessimist see's the glass half empty.
Its the Realist who see's the glass is half full with air, half full with water
User avatar
Karkadann
 
Posts: 1223
Joined: Sun Aug 02, 2009 10:04 am
Location: Earth

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests

cron