SDL What is that all about

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

SDL What is that all about

Postby J'Kla » Wed Jun 13, 2018 4:06 am

Please note this is an exploratory post and I understand that Python scripting is a dark art within the realm of Blender and age writing.

Now I am familiar with Blender, simple animations, of late I have come to terms with the Cycles render engine and associated node editor.

I have been in the process of migrating my ages that were built in the early days using alcScript (which we know is dead in the water) to the newer all singing and not quite dancing yet Korman addon.

Using some of the nifty tools I have added ladders and if any of you know my ages, you will know I am rather fond of ladders.

Recently I have been exploring building noob level instructions for building MOULa compatible LAN dirtsand shards. Something I think I may have nailed down for the time being.

I have now moved on to making clickables I have this at a stage where I am capable of manipulating an object at some basic level (for the time being in a test age) and that is something of an ongoing project.

I have built a sitting event although it did leave my age with some strange un-deletable objects but I moved them to an area that cannot be seen so that’s no big deal.

What I am looking to do is have a variable within an age and I am given to believe I need to be accessing SDL data.

SDL I hope stands for Specification and Description Language and in this I am prepared to be so wrong it is unimaginable.

What I do know is that every regular age within the Uru game space has a list of variables mostly Boolean some Byte some Integer, I am assuming somewhere there exists a type String but I have yet to see one of those.

In fact I have yet to see anything other than the first three, and this not only applies to ages but also to Avatar clothing, and appearance, as well as some door stuff.

For any given regular Age that list of variables is specified in its associated SDL file stored in an SDL sub-directory. These SDL files reflect values stored in the game Vault.

From discussions in various threads I gather if I need to build puzzles with some sort of stored state then I need to be looking at adding SDL data to my created ages and once created I can then use some sort of script embedded in a Python Script file and within that script use nodes that will allow game click actions to modify the value stored in one of these said variables.

It would also be delightful if we could read those variables and make some sort of logic decision based on the value or content/state of the variable.

So to that end I need to find someone that understands what I am talking about who can correct my thinking and if what I am explaining here is total (and I ask you to excuse the vernacular) shite! (That is an old Scottish word for rubbish)

I am looking for someone who can guide me to a place of understanding where I can translate some of that knowledge into fluent “Noob speak” because once we get there I believe we will be in a place where fan ages can evolve to the next level.
User avatar
J'Kla
 
Posts: 812
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: SDL What is that all about

Postby Ehren » Wed Jun 13, 2018 10:59 pm

J'Kla wrote:SDL I hope stands for Specification and Description Language and in this I am prepared to be so wrong it is unimaginable.


It's State Description Language, most of the SDL files even begin with something like:

#
# State Description Language for Garrison

Sorry, I can't give actual meaningful help in relation to age creation though...
User avatar
Ehren
 
Posts: 223
Joined: Fri Nov 16, 2007 9:45 pm
Location: Planet X

Re: SDL What is that all about

Postby J'Kla » Wed Jun 13, 2018 11:38 pm

I was really pleased when I saw that someone had posted a response.

Imagine my disapointment.

Ehren wrote:
J'Kla wrote:SDL I hope stands for Specification and Description Language and in this I am prepared to be so wrong it is unimaginable.


It's State Description Language, most of the SDL files even begin with something like:

#
# State Description Language for Garrison

Sorry, I can't give actual meaningful help in relation to age creation though...


Oh yes I went and looked the file name starts with SDL and "# State Description Language for " is a comment on line 43 so not really the start of the file.

You did notice that I did say

SDL I hope stands for Specification and Description Language and in this I am prepared to be so wrong it is unimaginable.


[edit2]
In my defense and on inspection a lot of the SDL files do not have that "# State Description Language for " line
[/edit2]

So that gem of information while correct does not really move me any further forward. ;)

You do see that I am trying to figure out if all that is needed (and I dont believe for one minute that it is that simple) is a text file with some unique variable names.

Do not get me wrong I will be really pleased if it is that simple.

I suspect that when it comes to building a dirtsand shard and we come to the stage where we pre-stuff the database with the line.

$ psql -d dirtsand < db/dbinit.sql

Some editing of that dbinit.sql file may allow the addition of new database entries.

I am going to look at this but in the expectation that I do not really know what I am going to find. 8-)

[edit]
OK looked at dbinit.sql and it is beginning unblur

You have no concept how rusty my knowledge of SQL is :shock:
[/edit]

[edit3]
I have a local Age of my own build which is called Abmortoxas

When I was linking to this age the dirtsand console was gibbering about not being able to find an SDL and it could not find Abmortoxas in the Vault (I kind of expected that).

So using one of the other SDL files as a template I created a new SDL file called Abmortoxas.sdl emptied out most of the content added it to my Local SDL folder and the SDL folder on my dirtsand shard now when I link to Abmortoxas using the plasma console I no longer get those messages.

Now I was half hoping to see the SDL missing message gone but not the VAULT message.

By way of experiment I am going to try and construct a BYTE variable for Abmortoxas. ;)
[/edit3]
User avatar
J'Kla
 
Posts: 812
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: SDL What is that all about

Postby J'Kla » Thu Jun 14, 2018 4:00 am

OK other than all of the commented licence stuff this is what my Abmortoxas.sdl contained

Code: Select all

# State Description Language for the Abmortoxas

STATEDESC Abmortoxas
{
   VERSION 1
}


With this added I was no longer getting the missing SDL and VAULT Messages.

[edit]
I changed the SDL to the folowing

Code: Select all
# State Description Language for the Abmortoxas

STATEDESC Abmortoxas
{
   VERSION 1
    # TestVar
    VAR BYTE        AbmortVar[1]          DEFAULT=100 DEFAULTOPTION=VAULT
}


The dirtsand console spat out the following and the age failed

Code: Select all
ds-918> [Status] Running on 0.0.0.0/8080
[Lobby] Running on 0.0.0.0/14617

ds-918> [Auth] 192.168.0.11/6861 logged in as sid {105a7342-8b02-4819-ba72-7b671 0336fa5}
[Auth] {105a7342-8b02-4819-ba72-7b6710336fa5} signed in as Xxxxx (10104)
Segfault at bin/dirtsand() [0x816fc21]
    from bin/dirtsand() [0x816fd2c]
    from [0xb7f03cf0]
    from bin/dirtsand(_ZNSt6vectorIN3SDL8VariableESaIS1_EEixEj+0x6) [0x8187ccc]
    from bin/dirtsand(_ZN3SDL5State5mergeERKS0_+0x77) [0x8186c6b]
    from bin/dirtsand(_Z15start_game_hostj+0x787) [0x815ee2a]
    from bin/dirtsand(_Z14find_game_hostj+0xa9) [0x81535b0]
    from bin/dirtsand(_Z7cb_joinR18GameClient_Private+0xb8) [0x815374e]
    from bin/dirtsand(_Z11cb_sockReadR18GameClient_Private+0x7c) [0x8153f13]
    from bin/dirtsand(_Z13wk_gameWorkerPv+0x170) [0x815430a]
    from bin/dirtsand(_ZNSt12_Bind_simpleIFPFvPvES0_EE9_M_invokeIILj0EEEEvSt12_I                                                                                       ndex_tupleIIXspT_EEE+0x47) [0x8121fe9]
    from bin/dirtsand(_ZNSt12_Bind_simpleIFPFvPvES0_EEclEv+0x23) [0x8121f0d]
    from bin/dirtsand(_ZNSt6thread5_ImplISt12_Bind_simpleIFPFvPvES2_EEE6_M_runEv                                                                                       +0x15) [0x8121eb3]
    from /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x9d62e) [0xb7b4b62e]
    from /lib/i386-linux-gnu/libpthread.so.0(+0x6295) [0xb7a7a295]
    from /lib/i386-linux-gnu/libc.so.6(clone+0x6e) [0xb79a50ae]
Segmentation fault (core dumped)


[/edit]
User avatar
J'Kla
 
Posts: 812
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: SDL What is that all about

Postby Deledrius » Thu Jun 14, 2018 9:23 am

I don't have time right now for a longer reply, but you should check out the wiki page on SDL. It's very lacking, but it would have saved you from some of the misinformation at the start.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1101
Joined: Mon Oct 01, 2007 1:21 pm

Re: SDL What is that all about

Postby J'Kla » Thu Jun 14, 2018 9:57 am

Deledrius wrote:I don't have time right now for a longer reply, but you should check out the wiki page on SDL. It's very lacking, but it would have saved you from some of the misinformation at the start.


I would have done if there was some hint that it was there. ;)
User avatar
J'Kla
 
Posts: 812
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: SDL What is that all about

Postby Sirius » Thu Jun 14, 2018 10:21 am

Yeah, the Wiki has lots of good pages, but is still lacking some rather important info. It's also outdated in some places as most of it was written for PyPRP, and the forum rarely links to it.

I don't have time to write a detailed explanation either, but might at some point (this weekend, maybe ? SDLs are tied to Python scripting, and while you don't need to write Python scripts to use them, I still have to check how these things interact with Korman.)

In truth we're lacking a lot of Korman tutorials. I know Doobes wrote some related to basic setup and visuals (I think ?), but I don't recall anything about logic and scripting.
Maybe at some point I could try to write a few detailed articles about how logic works in Plasma and how to use it in Korman. I don't really build Ages nowadays, but I can handle setting up Node Trees, which would be a useful addition. I'll think about it when I have time to kill.
User avatar
Sirius
 
Posts: 1013
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: SDL What is that all about

Postby Tweek » Thu Jun 14, 2018 11:29 am

Step 1. Click wiki on navigation at top of the site
Step 2. Click "Special Pages" in the side bar on the left of the wiki
Step 3. Click "All pages".
Step 4. Enjoy all the pages currently hosted on the wiki
Step 5. Enjoy a tasty donut, cause donuts are delicious.

Yeah Del and I have been discussing the state of the wiki recently, it's just a case of finding some time to reorganize everything better. Korman could definitely benefit from more documentation, Doobes has been doing some fine work where he can on that though.
Beneath - IC Blog.
Grey Skies - Portfolio and blog.
User avatar
Tweek
 
Posts: 671
Joined: Sat Sep 29, 2007 6:37 am

Re: SDL What is that all about

Postby J'Kla » Thu Jun 14, 2018 11:52 am

Tweek wrote:Step 1. Click wiki on navigation at top of the site
Step 2. Click "Special Pages" in the side bar on the left of the wiki
Step 3. Click "All pages".
Step 4. Enjoy all the pages currently hosted on the wiki
Step 5. Enjoy a tasty donut, cause donuts are delicious.

Yeah Del and I have been discussing the state of the wiki recently, it's just a case of finding some time to reorganize everything better. Korman could definitely benefit from more documentation, Doobes has been doing some fine work where he can on that though.

Donuts are a non starter I have type 2 diabeties.

But that method for finding Wiki pages sounds good.

If you put together some sample Blender Tweek probably based on that MagicBall age I made there is a link on one of my posts on this page

viewtopic.php?f=7&t=6234&start=90


Newer version attached here see comment at the end of the post.

Do some Python with the ball give me some clues I will write the guide.

Lets start with something simple like changing the color or making it disappear for 10 seconds or make it change color to the color of the block that's been clicked.

The age is very simple it has a ball, plane two clickable blocks and a floating white ball.

This age was written with Korman 0.06 and I can test it using my LAN dirtsand.

I do build ages and understanding Python will allow me to add puzzles to my ages.

[edit]
The post before the one with the MagicBall attachment is the description of how to build it.
[/edit]

[edit2]
I have added a Newer MagicBall4.blend file here In this one I have done some renaming of the click objects and the node trees just so it is easier to see whats what in the age.
[/edit2]
Attachments
MagicBall4.blend
Newer MagicBall Blend File
(585.73 KiB) Downloaded 1 time
Last edited by J'Kla on Fri Jun 15, 2018 4:22 am, edited 1 time in total.
User avatar
J'Kla
 
Posts: 812
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: SDL What is that all about

Postby Ehren » Thu Jun 14, 2018 5:48 pm

J'Kla wrote:I was really pleased when I saw that someone had posted a response.

Imagine my disapointment.


I'm not going to lie, that stings a little...

In my defense, the point I was trying to make was that you actually weren't THAT far off, I was just trying to "cite a source", so to speak, rather than just assert its meaning. I was not implying that it was terrible that you missed it or anything.

I was kind of disappointed in myself, how little I understood what your post was saying at all for the most part. But then the comment about being prepared to be wrong about what SDL stood for just seemed odd to me, so, yeah...

Cautious response optimism, I guess.
User avatar
Ehren
 
Posts: 223
Joined: Fri Nov 16, 2007 9:45 pm
Location: Planet X

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests