Comments (4)
I've been battling similar problems and think I can offer some help. Firstly, your "non response" problem, I believe you need to bump the value
key on the game_event
each time to prevent the device caching. In your example, you are missing the value
key as a sibling to the frame
key. I think this is supposed to be a unique integer each time.
POST http://127.0.0.1:49391/game_event HTTP/1.1
Content-Type: application/json
{
"game": "TS3TOSSE3",
"event": "POKE_MESSAGE",
"data": {
"value": 1, // make this increase each time you want to update
"frame": {
"custom-text": "test test 12345564556789"
}
}
}
I've also come across the problem of needing scrolling text. I first tried to force a new line (why does it only show 1 line in the centre?! Argh!!) but was unable to even inserting carriage returns in the JSON string.
I was able to get a scrolling affect by hitting the endpoint a lot bumping the aforementioned value
integer each time, and manually manipulating the text by cutting off the first character each time.
Another way is to abuse the suffix
key when you register the event, and then use the repeat
feature. This is probably closer to a final solution, since you first bind the event (I think this sends the frames to the device beforehand) then we "play" them by sending the event.
POST http://127.0.0.1:49391/bind_game_event HTTP/1.1
Content-Type: application/json
{
"game": "TS3TOSSE3",
"event": "POKE_MESSAGE",
"handlers": [
{
"device-type": "screened",
"mode": "screen",
"zone": "one",
"datas": [
{
"has-text": true,
"suffix": "I am a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": " am a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": "am a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": "m a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": " a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": "a long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": " long piece of text",
"length-millis": 200
},
{
"has-text": true,
"suffix": "long piece of text",
"length-millis": 200,
"repeats": true
}
]
}
]
}
It's hacky, but you can obviously build an abstraction on top of this. Still though, no way to wrap text as far as a I can see. For that reason, I'm probably going to generate and send my own bitmaps...
from gamesense-sdk.
Hey @adamscybot !
Thanks for the awesome responses. I'll be sure to tinker around with these during the weekend! Cheers
from gamesense-sdk.
Update: After removing the app from SSE3 and re-registering it, It just refuses to work. The message gets sent, the response is there, but nothing happens.
from gamesense-sdk.
I found some more tricks :). After looking into the DB that backs the game engine, I can see there are some undocumented features we can use. You can split text on multiple lines like so:
POST http://127.0.0.1:50035/bind_game_event HTTP/1.1
Content-Type: application/json
{
"game": "TEST",
"event": "DISPLAY",
"icon_id": 16,
"handlers": [
{"device-type": "screened",
"mode": "screen",
"zone": "one",
"datas": [
{
"length-millis": 5000,
"lines": [
{
"has-text": true,
"context-frame-key": "line1",
"bold": true
},
{
"has-text": true,
"context-frame-key": "line2"
},
{
"has-text": true,
"context-frame-key": "line3"
}
]
}
]
}
]
}
Then send the event like so:
POST http://127.0.0.1:50035/game_event HTTP/1.1
Content-Type: application/json
{
"game": "TEST",
"event": "DISPLAY",
"data": {
"value": 1,
"frame": {
"line1": "test1",
"line2": "test2",
"line3": "test3"
}
}
}
from gamesense-sdk.
Related Issues (20)
- Simple Prism Mousepad Light Configuration On/Off HOT 1
- Request - Ability to use configurations in JSON calls
- Keyboard Oled not responding to successfully sent bitmaps HOT 6
- Maximum update rate/refresh rate/best practices for full-keyboard lighting effects?
- Won't react to other event HOT 3
- Sending events breaks profile-switching on the mouse (Rival 710) HOT 3
- macro to write the curent date
- spam limiter triggering for no (apparent) reason HOT 3
- Missing zones for new Arctis Nova Pro Wireless HOT 1
- Multiple read and write permission errors on Standard user account on macOS 12.4 (Monterey) prevent usage of Steelseries GG and Gamesense SDK
- how to avoid this? wireless pro transceiver OLED display goes crazy after an hour or two of processing events HOT 2
- game_event - 404
- Incorrect Content-type value for error responses
- Are you serious? HOT 2
- Bug: Color Sequences not updating to new Event definitions
- Cancel Event
- Image, links, and custom description in SteelSeries GG/Engine HOT 1
- Temp display collision
- Reading key press distance HOT 2
- Text is suddenly clearer (bigger) and only displaying two lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamesense-sdk.