SDL replacement

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

SDL replacement

Postby ddb174 » Sun Jul 04, 2010 7:47 pm

I've been working in my head on a replacement for SDL, which uses the vault directly. The idea is to create a set of python-file primitives for use within 3dsmax, so that things like network synchronization, linking, journals, etc, are done for you. This way, the writer does not need to deal with creating SDL nor Python. (Cyan didn't do this, and it's one of the reasons they have the same bugs crop up in dozens of different places.)

Basically, varname->value mappings are stored as chronicles in the Age's vault (not the player's), and there is Python code which listens for changes. There are python files which map from detectors (like clickables and enter/exit regions) to these vars. And there are python files which map from these vars to responders, such as animations(e.g. a door opening). And there are Python files for the logic in between, such as sequence puzzles, formulas, combinations, etc. So you can build puzzles from these primitives by chaining them together without touching any Python code, *and* you get multiplayer and cross-game for free. (Hopefully^^)

I've got some basics working, but I want to do it right the first time, so that there will not have to be a second set of these files in the future. (I.e. UamVars1* and UamVars2*)

One idea is to have type inference so that when you link into the Age it will immediately warn you of typos, etc, in your configuration. Current types include triggers, bools, floats, and strings. An alternative to type inference is to just have varnames because with the type, like bDoorOpen for a boolean, or tFlareFire for a trigger, and so on.

It should be relatively easy to do a number of tasks that are currently fairly difficult. There might be some show-stopper that I haven't encountered yet, but so far it's all looking possible, and feasibility tests have confirmed that.

(P.S. These functions will still be available for Blender/Pyprp users, they just won't have the nice auto-generated GUIs from 3dsmax.)

Any thoughts or examples of puzzles you would like to see supportable in the future?
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: SDL replacement

Postby D'Lanor » Sun Jul 04, 2010 10:49 pm

I am not sure which bugs you are referring to. SDL has always worked perfect for me. It is IMO the best feature of Plasma and I would hate to see it replaced.

Perhaps you are thinking of Uru CC (and consequently also Alcugs) which doesn't handle SDL the same way as the online versions? But then SDL was never designed for offline use so that is no surprise. It's purpose is to sync states between players and it does that job very well if used correctly.

I agree that it would be good to make it easier for people to use.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: SDL replacement

Postby ddb174 » Sun Jul 04, 2010 11:12 pm

I'm not referring to bugs in the implementation of SDL per se, but in how the design of SDL encourages bugs in Python code. It's basically just a struct definition language, and shouldn't be used directly. It has all the problems of a low-level system *and* the problems of a dynamic language. And they require parsing of the previous versions at runtime, etc, etc. It's okay, but not great. Plasma is really horrible when it comes to code/asset maintainability, in large part because of the lack of primitives and code-reuse and static-checking and cleanliness.

There's only so much we can do to fix the situation, since we obviously want all the old Ages to run, and this is something that can be done. People can keep making their Ages with SDL if they want to, but it's their pain.

Anyway, the two things will of course co-exist, so there's no need to worry ;)
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: SDL replacement

Postby ZURI » Fri Jul 23, 2010 8:53 pm

Is this going to be a plugin of sorts for Blender? What I mean, is it something that we "non-wizards" can use with relative ease from inside blender? Will it be GUI based? I noticed that it would be usable without the need to write Python code directly. I'm very excited to hear that you're working on this, and am trying to get my head around how it will work for the end-user.
MOULagain KI: 45001
User avatar
ZURI
 
Posts: 366
Joined: Mon Nov 16, 2009 8:34 pm
Location: Cincinnati

Re: SDL replacement

Postby Paradox » Fri Jul 23, 2010 9:06 pm

For the majority of SDL uses, there is no need to write any Python.

I'm not quite sure why we need a "new" SDL system... the more I learn about the existing one, the more I see how well-designed it really is. I'd hate to see how animation states and physicals would be handled by Age Chronicles o.o
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: SDL replacement

Postby ddb174 » Fri Jul 23, 2010 11:04 pm

There would be a GUI for 3dsmax, but not Blender. Blender folks could still use it, but like most everything, it's quite a bit more difficult for them ;) Anyway, yes, it would be usable by non-wizards with relative ease!

(Paradox: this is a replacement for writing and wiring SDL/Python for fan Ages. It is not a replacement for transient gameserver SDL states, such as clones, animation states, or physicals. I thought that was pretty clear :P And SDL in general is a decent low-level idea done poorly and dragged to higher levels where it did not belong, like so many things in Uru. It certainly should not be used by artists trying to create an Age, and the lack of alternatives is the reason it is.)
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: SDL replacement

Postby ZURI » Sat Jul 24, 2010 12:06 am

Thanks for the quick reply. So, ... would it be better for me to learn to use SDL states, or wait for you to finish with this? I know I rarely (if ever) post in this part of the forum - but I've reached the point where I want to start adding the puzzles to my ages.

Also, my ages are not intended for single player use. As such, I've been waiting patiently for word from Cyan pertaining to a timetable as to the inclusion of Fan Ages in Moula. I have no intentions of creating offline versions of my puzzles (it would be rather difficult if not impossible "think Tsogal and Delin" to do so.) As such, I have been waiting to start working on the technical bits.

Sorry for the newb questions. :oops: Hehe, if you want something modelled or textured - I can help you. That's up my alley. However, if it requires coding - I'm afraid I'm not your man.

After reading your initial post, my heart started racing. //Alright, an easy way to do this!!// :o
MOULagain KI: 45001
User avatar
ZURI
 
Posts: 366
Joined: Mon Nov 16, 2009 8:34 pm
Location: Cincinnati

Re: SDL replacement

Postby ddb174 » Sun Jul 25, 2010 10:36 am

Well, I'm not providing a timeline, because progress depends on how much interest there is (both from myself and others.) And I wouldn't want someone to stop working because they are waiting for me.

As for Delin/Tsogal, if you play the converted versions, you'll see that it can be played both online and offline!
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests