PCMistress 3 redux (for developers)

This is the place for general discussions on fetishes, sexuality and anything else. What's on your mind right now?
solipsist
Explorer
Explorer
Posts: 21
Joined: Fri May 04, 2007 7:26 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive
Dom/me(s): Ms160
Location: Australia
Contact:

PCMistress 3 redux (for developers)

Post by solipsist »

Hi all,

For the last year or so, milovana has been hosting the source code for PCMistress 3, my re-implementation of the very popular PCMistress program. As plans for a new (re-)release of pcm3 fell foul of my real life commitments, it has been somewhat in limbo.

So for anyone wanting to take a look at the latest reincarnation of this program, you can access the subversion repository at

http://mv.openmoon.org/svn/pcm/pcm3/trunk

At the moment it isn't ready for a new release, so if you're not familiar with developing in Java, it won't be much use to you. Hopefully I will find some time in the next couple of months to push this version over the wall and do a full-fledged release.

For those who want to take a look, you will need to do:

Code: Select all

 # Check out the source codesvn checkout http://mv.openmoon.org/svn/pcm/pcm3/trunk pcm3# Download the external dependenciesant download# Build the distributionsant# Run the version for your platformjava -jar dist/linux-x86_64/pcm3.jar 
If anyone can pick it up and make some improvements, feel free to send me a patch and I'll apply it. After a few patches I'll be happy to talk about commit access.

Regards,
solipsist
Holdingout1
Explorer
Explorer
Posts: 19
Joined: Fri Sep 07, 2007 9:11 pm

Re: PCMistress 3 redux (for developers)

Post by Holdingout1 »

I wish I had Java skills to help out here I don't. What I can say is that I have used PCM2 for many years and its my go to tool for creating all sorts of mini teases with sound, video, and other features. My hope for PCM3 is that it is as easy to program as PCM2 but that it brings more options, and more functionality. Keep up the good work . . .we all appreciate it :-)
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: PCMistress 3 redux (for developers)

Post by MistressAlexa »

Hello,

Thank you for posting the source, it is very interesting, and I will look into it. Under what is it licensed?
User avatar
Human
Explorer At Heart
Explorer At Heart
Posts: 849
Joined: Tue Mar 16, 2010 7:40 pm

Re: PCMistress 3 redux (for developers)

Post by Human »

Hmm, I'm interested..I'll take a look.
:love: :love: :love: Stoya :love: :love: :love:                 :love: :love: :love: Denisa Heaven :love: :love: :love:
:love: :love: :love: Blue Angel :love: :love: :love:                 :love: :love: :love: Caprice :love: :love: :love:
thedane
Explorer
Explorer
Posts: 16
Joined: Sun May 27, 2007 8:14 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: PCMistress 3 redux (for developers)

Post by thedane »

Hi, I have trouble with compiling the source.

Do you have a further hint for the javacc home directory than this:

<!-- Override this on the command line if not running on linux -->
<!-- <property name="javacchome" value="/usr/share/java"/> -->

I get the following error when trying to build:
BUILD FAILED
C:\Temp\pcm\build.xml:69: JavaCC home must be a valid directory.
User avatar
slaveashish
Explorer At Heart
Explorer At Heart
Posts: 222
Joined: Sat Sep 26, 2009 10:18 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive
Location: Colombia

Re: PCMistress 3 redux (for developers)

Post by slaveashish »

not sure i am good enough but will take a look
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: PCMistress 3 redux (for developers)

Post by dtspam »

@thedane
You need JavaCC (Java Compiler Compiler), a parser generator. It's not part of the JDK: http://javacc.java.net/
I couldn't really figure out, what to set the path to, though. So I just commented out the call to javacc, and started it from the command line. There is only one JavaCC file in the project.

I took a quick look at the source code.
The most interesting part to me seems to be the parser for the old PCM 2 scripts. There is quite a bit of content for PCM 2.

The script interpreter for PCM 2 scripts seems to be more of a crude hack, so that's not that useful.
It looks like most of the work went into a new programming language called IMP. I don't really see the point in that. While it is always fun to invent new programming languages, there are really a lot scripting languages out there that could be used for that. And IMP seems to be a quite complex language (from a look at the AST and the examples). There even seems to be a compiler and stuff. That's far too much unnecessary complexity for a program like PCM. A script language and a really well designed API should do the job.

There is a bit of GUI-Code covering the typical PCM features. Since there isn't much GUI in PCM (some buttons, checkboxes, pictures and sounds sums it up), that's not so complicated. And since it uses SWT instead of Swing, I wouldn't like to touch it anyway ;-)

A interesting project could be to just take the PCM2 parser code, rewrite the interpreter and the GUI and create a new PCM2 script viewer. I would be willing to help with that, but it would need some people, willing to figure out all the nasty details of the pcm2 script semantics.
gizmo686
Explorer
Explorer
Posts: 11
Joined: Wed Mar 16, 2011 2:47 am

Re: PCMistress 3 redux (for developers)

Post by gizmo686 »

How should we submit changes?
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: PCMistress 3 redux (for developers)

Post by MistressAlexa »

I agree about the complexity of the language. That's why I am writing a new CyberMistress-type program, which uses a much simpler "language". In fact, the parser is built in to Python, as the ConfigParser module.
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: PCMistress 3 redux (for developers)

Post by dtspam »

You're using python as a scripting language? Any plans of developing your CyberMistress clone as an open source project?
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: PCMistress 3 redux (for developers)

Post by MistressAlexa »

Yes, definitely. That was my intention. Also, using Python would allow it to run on all major operating systems, and possibly the web.

I have also found some Creative Commons-licensed images to use for a default script.
dtspam
Explorer At Heart
Explorer At Heart
Posts: 290
Joined: Sat Jul 28, 2007 6:02 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: PCMistress 3 redux (for developers)

Post by dtspam »

Any chance taking a glimpse at the current project state? ;-)
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: PCMistress 3 redux (for developers)

Post by MistressAlexa »

It's still in a very early stage; I'm just struggling with the GUI currently. The runtime and parsing is very easy to do. Essentially, I set up a recursive structure that reads blocks in routines as follows:

Code: Select all

 #!/usr/bin/env pythonimport ConfigParserimport sysimport time config = ConfigParser.RawConfigParser()config.read('CMOriginal/routines/IntroductionKala.CM')routine = 'Introduction' if 'start' not in config.options('General'):    print 'Error: No "General" block defined in routine %s.'%routine    sys.exit(1)if 'end' not in config.options('General'):    print 'Error: No "start" or "end" options defined in "General" block in routine %s'%routine    sys.exit(1)first = config.get('General', 'start')last = config.get('General', 'end') def run_block(block):    '''A recursive function that calls itself to advance to the next block.'''    if block!=last:        print(config.get(block, 'message').replace('\\n','\n')+'\n')         if 'askyn' in config.options(block):            dialog_message = config.get(block, 'askyn').replace('\\n', '\n').split('|')            YNDialog(None, 'Question', message=dialog_message[0], nlabel=dialog_message[1], ylabel=dialog_message[2]).ShowModal()            if answer == ID_YES:                run_block(config.get(block, 'yes'))            elif answer == ID_NO:                run_block(config.get(block, 'no'))         else:            delay = config.get(block, 'delay')            try:                time.sleep(float(delay))            except ValueError:                raw_input(delay[delay.index('|')+1:])            run_block(config.get(block, 'next'))    else:        return run_block(first) 
As you can see, parsing is made very easy with Python's ConfigParser module. I wrote a regex parser before noticing this existed. :rant:

YNDialog is inherited from the WxPython dialog. I have not included any of the GUI aspects here because they are not usable in their current state. WxPython seems to be the best choice for GUI since it adopts the native widget style.

If I'm not too busy I hope to have the basic program ready in a few months.
neo36
Experimentor
Experimentor
Posts: 1091
Joined: Mon Feb 19, 2007 5:43 am
Dom/me(s): Little Miss Jay
Location: Canada

Re: PCMistress 3 redux (for developers)

Post by neo36 »

wow keep us updated MisstressAlexa,

I would be more than happy to write scripts or help in anyway I can.

I toyed with PCM and cybermistress quite a bit but since they both got removed from the net I feel some kind of void and there is a "need" somewhere I m sure.''
Image
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: PCMistress 3 redux (for developers)

Post by MistressAlexa »

Actually, writing scripts would be a great help, especially the default script. I plan on making an all new one, since the old seems to not be open source.

Basically, the majority of the work in writing the default script would involve making a list of punishments and assignments, in the same format as assignments.CM and punishments.CM. The only requirement would be that you would have to release it under an open-source license compatible with the LGPL, because that is what I think the application should be licensed under.

If anyone is interested, please tell me. It could be a great cooperative effort.
Post Reply

Who is online

Users browsing this forum: Martin1990 and 26 guests