These are chat archives for CoraleStudios/Colore

22nd
Jun 2016
Christopher Guckes
@cguckes
Jun 22 2016 14:39
Hi, I'm using the Colore library and some of my users report a flickering issue with their keyboards. Basically it rapidly swaps between the desired color scheme and the system scheme. One of the guys sent me a video that shows what is happening, but I can't figure out how to post it here. Does anyone else have this issue?
Brandon Scott
@brandonscott
Jun 22 2016 15:42
That sounds like an SDK issue @cguckes. I've seen similar behaviour before. How many users?
Christopher Guckes
@cguckes
Jun 22 2016 16:46
Mhh, so far two contacted me, I have about 500 Downloads...
Don't know what that translates to ^^
Brandon Scott
@brandonscott
Jun 22 2016 18:13
@cguckes Make a issue on our GitHub project, I'll raise it to the Razer engineers and track it for yo
Christopher Guckes
@cguckes
Jun 22 2016 18:43
thanks :-)
Brandon Scott
@brandonscott
Jun 22 2016 19:08
@cguckes One thing if I can
Do you know what version of the SDK these users are on?
Christopher Guckes
@cguckes
Jun 22 2016 19:44
I'll ask
Brandon Scott
@brandonscott
Jun 22 2016 19:45
Thanks
Assuming their SDK installed gracefully (big assumption) their Synapse Version should be 1.20
Christopher Guckes
@cguckes
Jun 22 2016 19:46
mhh, the sdk is the dll I ship with my mod, right?
Brandon Scott
@brandonscott
Jun 22 2016 19:46
Corale.Colore.dll ?
Christopher Guckes
@cguckes
Jun 22 2016 19:46
or is it installed in windows' endlees sea of dlls folder
Oh right, thats the one I ship
Brandon Scott
@brandonscott
Jun 22 2016 19:46
No no
Thats not the SDK
was just asking if thats what you meant
haha
Christopher Guckes
@cguckes
Jun 22 2016 19:46
yeah RazerChromaSDK.dll
something like that
Brandon Scott
@brandonscott
Jun 22 2016 19:46
Thats the library
Christopher Guckes
@cguckes
Jun 22 2016 19:47
It's been a while since I touched the project
Brandon Scott
@brandonscott
Jun 22 2016 19:47
Can you find out that exact dll
It may be that causing the problem
As we no longer need to ship the SDK with the apps
It's all done for us through synapse
Christopher Guckes
@cguckes
Jun 22 2016 19:47
I asked him, but its 10pm here so I don't expect an answer till tomorrow
Brandon Scott
@brandonscott
Jun 22 2016 19:47
Your dll may be an old version
Can you find the exact file name for me?
On your side
Christopher Guckes
@cguckes
Jun 22 2016 19:48
I'm on linux right now, I'll see if I get the windows drive to mount ^^
Brandon Scott
@brandonscott
Jun 22 2016 19:48
lol
Good luck with that
Christopher Guckes
@cguckes
Jun 22 2016 19:49
stupid hibernation file crap...
Brandon Scott
@brandonscott
Jun 22 2016 19:49
Indeed
Christopher Guckes
@cguckes
Jun 22 2016 19:49
readonly mount works.. I got:
./System32/RzChromaSDK64.dll
./SysWOW64/RzAPIChromaSDK.dll
./SysWOW64/RzChromaSDK.dll
Brandon Scott
@brandonscott
Jun 22 2016 19:50
Sorry I meant what do you ship with the project
dll wise
Christopher Guckes
@cguckes
Jun 22 2016 19:50
ah, ok
It's implemented as a plugin for KSP, the folder contains:
ChromaAppInfo.xml Corale.Colore.dll KSP-Chroma-Control.dll
Brandon Scott
@brandonscott
Jun 22 2016 19:52
kk thats fine
Sounds like an SDK issue then
Christopher Guckes
@cguckes
Jun 22 2016 19:52
But it's a fork of your library, because I needed to remove the windows color files
*classes
Brandon Scott
@brandonscott
Jun 22 2016 19:52
Ah I see
We have a Unity branch now that handles that
Will need to ask your friend what version of the SDK he has
From the files you mentioned above
When he's around
If thats okay?
Christopher Guckes
@cguckes
Jun 22 2016 19:53
does it work with the .net2.0-subset version of the editor?
I don't know the guy he contacted me via my gitter room ^^
Brandon Scott
@brandonscott
Jun 22 2016 19:53
Ah
Don't want to bother the Razer engineers if he's potentially using an old version you see.
Christopher Guckes
@cguckes
Jun 22 2016 19:53
I told him to look for the latest version
Brandon Scott
@brandonscott
Jun 22 2016 19:53
Which editor do you use?
Christopher Guckes
@cguckes
Jun 22 2016 19:53
yeah, I can understand that
UnityEditor
is mark tay the guy you are in contact with?
Brandon Scott
@brandonscott
Jun 22 2016 19:54
Yes he is, plus the engineers directly
I've worked with Razer for about 4 years now.
Christopher Guckes
@cguckes
Jun 22 2016 19:54
if so, I can ask him myself, if you can rule out colore as a potential issue
Brandon Scott
@brandonscott
Jun 22 2016 19:54
90% of apps use Colore as their basis
Christopher Guckes
@cguckes
Jun 22 2016 19:54
Yeah, I figured ^^
Brandon Scott
@brandonscott
Jun 22 2016 19:54
And we haven't had any other complaints.
From my experience this seems SDK related.
Colore has no control over the system config.
So it would be impossible for it to switch.
Christopher Guckes
@cguckes
Jun 22 2016 19:55
I was forced to learn c# because of you and quite frankly I was really delighted how well designed the language is
Brandon Scott
@brandonscott
Jun 22 2016 19:55
Haha.
C# is lovely.
And we're pretty pleased with how the Colore library is architected.
Christopher Guckes
@cguckes
Jun 22 2016 19:56
yeah, it was pretty easy to learn
Brandon Scott
@brandonscott
Jun 22 2016 19:56
Could you email Mark and CC me in? Just so we can track it for any future reports from the rest of our dev-base?
Christopher Guckes
@cguckes
Jun 22 2016 19:56
can do, but I'll wait for the guy to get back to me with his version number
Brandon Scott
@brandonscott
Jun 22 2016 19:56
Sounds good to me Sir
:D
Christopher Guckes
@cguckes
Jun 22 2016 19:57
I would love a feature in Colore that allows me to say "switch from the current layout to the following layout in 2 seconds"
that interpolates between animation frames
I hacked something together that does that,
Brandon Scott
@brandonscott
Jun 22 2016 19:58
Sounds interesting
We'd be happy to work with you on integrating it into the library
Christopher Guckes
@cguckes
Jun 22 2016 19:58
And I think other game developers would appreciate that as well. I get eyecancer when I see the eight bit 1 fps keyboard layouts featured on the chroma apps page
The code is keyboard agnostic because I wanted to be able to support other keyboards as well
but it should be pretty copy-pasteable
on the other hand you need some sort of tick manager
but I assume that's implemented in your animations code, right?
Brandon Scott
@brandonscott
Jun 22 2016 20:02
In my apps its based on internal timers.
Christopher Guckes
@cguckes
Jun 22 2016 20:02
Colore does support animations, right?
Brandon Scott
@brandonscott
Jun 22 2016 20:02
If you manually animate each frame on the app side
Yes
For Colore interpolation I would be tempted to build a tick manager straight into the project
Christopher Guckes
@cguckes
Jun 22 2016 20:03
what does all the "Effect" code do?
Brandon Scott
@brandonscott
Jun 22 2016 20:03
That's all of Razer's built in effects
Including Custom
Which we mostly use
Christopher Guckes
@cguckes
Jun 22 2016 20:03
my implementation just gives you the desired amount of frames interpolated between "from" and "to"
ah, so you just tell the sdk to do that for you?
Brandon Scott
@brandonscott
Jun 22 2016 20:04
Mostly yes.
Christopher Guckes
@cguckes
Jun 22 2016 20:04
ah, alright
mhh, I'm not sure that can be implemented in the library without breaking the software design
Brandon Scott
@brandonscott
Jun 22 2016 20:05
We'd probably rework the design a bit
But the idea is fantastic
Christopher Guckes
@cguckes
Jun 22 2016 20:08
what is the best-practice way to manipulate the keyboard layout?
I'm currently using setKey for every key
Brandon Scott
@brandonscott
Jun 22 2016 20:08
I'd probably recommend using a custom
Christopher Guckes
@cguckes
Jun 22 2016 20:08
ok
Brandon Scott
@brandonscott
Jun 22 2016 20:08
So you can build out your custom effect and set it all in one go
For each animation "frame"
Christopher Guckes
@cguckes
Jun 22 2016 20:09
ah, right
So some sort of helper function that just gives you a stack of frames you interpolated should already be enough
Brandon Scott
@brandonscott
Jun 22 2016 20:10
I guess
Christopher Guckes
@cguckes
Jun 22 2016 20:11
My code is currently on GPLv3 but you can use it for Colore if you want to, I can change the license
Brandon Scott
@brandonscott
Jun 22 2016 20:11
Cheers
Will speak with @Sharparam about it
Probably in v6
Christopher Guckes
@cguckes
Jun 22 2016 20:12
the "frame" is stored in the 2-dim array right?
Brandon Scott
@brandonscott
Jun 22 2016 20:12
Yes
Christopher Guckes
@cguckes
Jun 22 2016 20:14
I had problems creating a bigger number of frames on the fly, which tanked the framerate of the game
Brandon Scott
@brandonscott
Jun 22 2016 20:14
For example
Christopher Guckes
@cguckes
Jun 22 2016 20:15
but keyboardGrid is some sort of smart array, right?
Brandon Scott
@brandonscott
Jun 22 2016 20:15
In what way?
Christopher Guckes
@cguckes
Jun 22 2016 20:15
the []-operator is overloaded
Brandon Scott
@brandonscott
Jun 22 2016 20:15
It can take Keys or Grid co-ordinates
Christopher Guckes
@cguckes
Jun 22 2016 20:16
ah, ok
I had one animation that ran at 30fps for 10 seconds which took a really long time to generate
Brandon Scott
@brandonscott
Jun 22 2016 20:17
The SDK is rate limited
Christopher Guckes
@cguckes
Jun 22 2016 20:17
I solved this by making color a factory that caches already used colors
no the bottleneck was in my function
Brandon Scott
@brandonscott
Jun 22 2016 20:17
Oh I see.
Christopher Guckes
@cguckes
Jun 22 2016 20:17
because it created a boatload of frames
that just played once the animation was triggered
I needed to implement the "frame" data structure myself, because I wanted to stay keyboard-agnostic. I ended up with this: https://gist.github.com/cguckes/2b6d0f9faf22d2674a3728fb34b6d0e7
the base color is set in the constructor
and reduced my memory footprint massively
Brandon Scott
@brandonscott
Jun 22 2016 20:21
Ah I see
Nice
Christopher Guckes
@cguckes
Jun 22 2016 20:21
you pass the array to the sdk, right?
so that won't work in colore...
Brandon Scott
@brandonscott
Jun 22 2016 20:22
We'd have to do conversions
The Key and Grid arrays are seperate
It's not nice
Christopher Guckes
@cguckes
Jun 22 2016 20:22
ah
Brandon Scott
@brandonscott
Jun 22 2016 20:22
But we help devs out by merging them together
We don't get a choice as thats how the SDK implements it
Then we figure it out and send it as one array
Christopher Guckes
@cguckes
Jun 22 2016 20:23
ok, so you do this for every possible frame, right?
that works stable with 60fps on my machine
Brandon Scott
@brandonscott
Jun 22 2016 20:23
As soon as a use calls SetCustom
We send it immediately to the SDK
or any Set method
is immediately send
Christopher Guckes
@cguckes
Jun 22 2016 20:33
If you create some sort of utility class to for the interpolation function, I can implement it for you
I got some other functions to create animations as well
I have a sine-wave like animation that alternates between two colors in a wave from the center of the keyboard
I would just need a hint on where to put them and how you would like to use them
I'll idle around here, if you need anything