Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Looking for people to help with QtSense  (Read 764 times)

SGH

  • Escaped Lunatic
    • View Profile
Looking for people to help with QtSense
« on: February 21, 2020, 05:17:31 pm »

I just published yet another SoundSense remake and I'm looking for people with dfhack experience to build more sound feedback than ever!

The software backend has just been finished, but more events need to be built into the dfhack plugin and I don't have much experience with it and its events.

Anyone willing to help?
Logged

Broms

  • Bay Watcher
    • View Profile
Re: Looking for people to help with QtSense
« Reply #1 on: February 21, 2020, 09:43:41 pm »

I don't have any experience with this stuff but I wish I did.  I look forward to seeing the results.
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Looking for people to help with QtSense
« Reply #2 on: February 22, 2020, 02:36:25 am »

What kind of things do you want sounds for that don't show up in the gamelog?
Logged

SGH

  • Escaped Lunatic
    • View Profile
Re: Looking for people to help with QtSense
« Reply #3 on: February 22, 2020, 07:34:11 am »

What kind of things do you want sounds for that don't show up in the gamelog?
Anything "spammy", like dwarves mining.
It can also allow for higher level effects (You're looking at an underground layer? let's apply a reverb filter to the SFX channel and let's muffle the weather!)
With the OpenAL backend, there's plenty of things to do!

As a side note (it isn't documented anywhere) all the non-sfx channels already have crossfade enabled - rain sound fades out when it ends, music fades in and out at the same time.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Looking for people to help with QtSense
« Reply #4 on: February 22, 2020, 01:19:18 pm »

You don't need to start a server in lua and interchange data with your application.
Thanks to Clement, it's possible to use Qt directly in DFHack as a C++ plugin.

See https://github.com/cvuchener/dfhack-qt for the framework and
my plugin https://github.com/ragundo/DwarfExplorer as a working Qt dfhack plugin example.

Also, I'm working in something similar, but I started working for the "DF events area" instead of the "sound area".
See https://github.com/ragundo/dwidder.

Anyway, I'd prefer to collaborate in a C++ plugin.
Logged

SGH

  • Escaped Lunatic
    • View Profile
Re: Looking for people to help with QtSense
« Reply #5 on: February 22, 2020, 02:36:45 pm »

You don't need to start a server in lua and interchange data with your application.
Thanks to Clement, it's possible to use Qt directly in DFHack as a C++ plugin.

See https://github.com/cvuchener/dfhack-qt for the framework and
my plugin https://github.com/ragundo/DwarfExplorer as a working Qt dfhack plugin example.

Also, I'm working in something similar, but I started working for the "DF events area" instead of the "sound area".
See https://github.com/ragundo/dwidder.

Anyway, I'd prefer to collaborate in a C++ plugin.

That's awesome. I'll be honest and say that I had no clue such a project existed.
Still, there's a great disadvantage to that, and that's the reason why I chose not to use C++: you'd have to recompile the plugin whenever you upgrade df/dfhack.
There's plenty of df players out there who don't have the knowledge/time/environment... to build a plugin.
Perhaps they're running old versions, maybe the build environment cannot be reproduced easily.

Luckily, the QtSense's approach allows dfhack to have multiple "clients" or "plugins" that connect to QtSense.
So, one could still develop a dfhack integration with a C++ or a Qt plugin that connects to QtSense simply using a TCP socket to localhost.

If this helps, let me document the protocol down here:

Whenever a client connects, QtSense sends back his version and its status:
Code: [Select]
QtSense 1.0.0
READY
Any QtSense version 1.0.x uses the same protocol as 1.0.0.

The protocol follows a fixed line-based command protocol;
A command can have multiple distinct arguments.
After each command, a newline ('\n') character needs to be appended in order to run the command.

The only commands that actually do something are MSG and PING.
MSG
All arguments are all distinct phrases that need to be interpreted and played by QtSense.
Arguments are separated by the '|' character.
Code: [Select]
MSG|It is raining.PING
Sends a PING to the server.
The server will send a PONG back.

Some character substitution needs to happen on the plugin-side as per the following table:
BeforeAfter
&&1
|&2
\n&3
\r&4
All the arguments have to be joined together using the separator character '|'.

The server will transform the resulting string back into the original command and run it.
The server will never send you any data, unless you use a "PING" command in which case it sends a PONG back.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Looking for people to help with QtSense
« Reply #6 on: February 22, 2020, 04:55:31 pm »

It would be nice if you could provide binary packages in the github releases page. At least for windows as most players are in that platform and setting a complete Qt toolchain would be very complicated.
Also, in that way, it could be included in Peridexiserrant's df starter pack.
Logged

SGH

  • Escaped Lunatic
    • View Profile
Re: Looking for people to help with QtSense
« Reply #7 on: February 22, 2020, 05:33:02 pm »

It would be nice if you could provide binary packages in the github releases page. At least for windows as most players are in that platform and setting a complete Qt toolchain would be very complicated.
Also, in that way, it could be included in Peridexiserrant's df starter pack.
Sure thing, but there's still some work to do on the main executable.
I'm writing a built-in event-sound editor right now.
Then it's time for some audio FX commands and that's when I think I should get it built and distributed.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Looking for people to help with QtSense
« Reply #8 on: February 23, 2020, 06:12:08 am »

You don't need to start a server in lua and interchange data with your application.
Thanks to Clement, it's possible to use Qt directly in DFHack as a C++ plugin.

See https://github.com/cvuchener/dfhack-qt for the framework and
my plugin https://github.com/ragundo/DwarfExplorer as a working Qt dfhack plugin example.

Also, I'm working in something similar, but I started working for the "DF events area" instead of the "sound area".
See https://github.com/ragundo/dwidder.

Anyway, I'd prefer to collaborate in a C++ plugin.

That's awesome. I'll be honest and say that I had no clue such a project existed.

I did not advertise it much, I find it has too many flaws. Although it's fun to experiment with.

But if your end goal is making sound, a GUI is not mandatory. One could make a dfhack plugin that plays sounds and is configured through scripts or custom viewscreens.

Still, there's a great disadvantage to that, and that's the reason why I chose not to use C++: you'd have to recompile the plugin whenever you upgrade df/dfhack.
There's plenty of df players out there who don't have the knowledge/time/environment... to build a plugin.

If you make it part of DFHack repository, that's not really an issue, at least in the long-term: it will get rebuilt and distributed with each new DFHack release. Actually I think the issue is more the opposite: in the early development, when the plugin evolves faster than DFHack releases are made.
Logged