HapticSeer: A Multi-channel, Black-box, Platform-agnostic Approach to Detecting Video Game Events for Real-time Haptic Feedback
This project is undergoing a major code refactoring for a better developer experience. For instance, we are making feature extractors get rid of integrated raw capturers one by one.
More details will be announced in next few months. (If you're interested, the "WIP" repo could be found HERE)
-
git clone https://github.com/ntu-hci-lab/HapticSeer
-
Open
GameSolution.sln
with Visual Studio -
Create a new config file inside
HapticSeerDashboard
. (e.g. myApp.json) -
Copy the skeleton into config file. Fill in the blank section with components.
-
Import config file into project
HapticSeerDashboard
and make it copy if newer -
Build again in order to copy the config file into execution folder
-
Start a Windows Command Prompt, type in
cd {YourSolutionDirHere}\HapticSeerDashboard\bin\Debug\netcoreapp3.1
-
Start the game. then execute HapticSeer by
.\HapticSeerDashboard.exe {ConfigFileName}
for listening to game events
- Follow this section to connect your device to HapticSeer
Recommended: Pick EventDetectors
first and traceback needed ExtractorSets
and RawCaptures
by inlets/outlets
{
"EventDetectors": [
// Add Components Here
],
"ExtractorSets": [
// Add Componests Here
],
"RawCapturers": [
// Add Components Here
]
}
- Clone project from https://github.com/eKL016/RedisEndpoint
- Import project into YOUR SOLUTION
- NuGet install
StackExchange.Redis
using RedisEndpoint;
using StackExchange.Redis;
namespace Example
{
class Program
{
//Constants, DO NOT MODIFY
const string URL = "localhost";
const ushort PORT = 6380;
//Declare a subscriber for SINGLE outlet
//If you want to subscribe to an another outlet, INSTANTIATE MORE
private static Subscriber mySubscriber = new Subscriber(URL, PORT);
static int Main()
{
// Listen to a certain TARGET_OUTLET
mySubscriber.SubscribeTo("TARGET_OUTLET");
//"handler" will be invoked when
//the system receives a message from TARGET_CHANNEL
mySubscriber.msgQueue.OnMessage(handler);
_ = Console.ReadKey();
return 0;
}
// Implement a message Handler
static void handler(ChannelMessage msg)
{
// This struct will be passed into the function
// ChannelMessage msg
// {
// string Channel; => Which channel did this message come from?
// string Messages; => What is the message?
// }
//
// Example:
// Listen to outlet "ACCELY"
// Console.WriteLine(msg.Channel); => "ACCELY"
// COnsole.WriteLine(msg.Messages); => "15.7"
// Invoke your haptic controller here
}
}
}