Jump to content
Corsair Community

Indie Game Taking Advantage of RGB Keyboard


Wolfenhex

Recommended Posts

Hello,

 

I'm one of the developers of Pixel: ru², a color theory based indie game for PC (currently Windows only, but we're planning Linux and Mac builds as well). Some of you might have heard of us already from Corsair Gaming's social media, but I wanted to come on here and say hello and ask the Corsair community for some assistance.

 

We currently have support for all three of Corsair's RGB keyboards in our game. What I mean by this is that the keyboard itself will change while you play the game. You can see a video demonstration of it here:

[ame]

[/ame]

 

What I would like is to get this in the hands of more people with Corsair RGB keyboards to help make sure there's nothing wrong. Please note that if you do decide to give it a try, you currently need to exit CUE. Reading about other stuff that people have done through programming, this seems like a common issue.

 

If you'd like to give it a try, you can download the latest demo at:

http://downloads.areyousquared.com/latest.exe

 

You can enable the LED mode by going into Video Settings and turning on Hardware LED.

 

The game itself is still in development, but I'd love to know what everyone thinks about it so far and definitely how people feel about games taking advantage of RGB keyboards like this. We're already talking with other indie devs about adding this to their games. Our end goal is to create an open source universal library for all developers.

Link to comment
Share on other sites

I currently have a K95 RGB with firmware 1.15 and Corsair-Utility-Engine-v1.3.70 (1.3.91 causes keyboard not to be recognized on start up) and as soon as i click Hardware LED the game locked up and he right half my keyboard turned blue and locked up.
Link to comment
Share on other sites

I currently have a K95 RGB with firmware 1.15 and Corsair-Utility-Engine-v1.3.70 (1.3.91 causes keyboard not to be recognized on start up) and as soon as i click Hardware LED the game locked up and he right half my keyboard turned blue and locked up.

 

If you have CUE running as well it will conflict (if you re-plugin the keyboard it should fix frozen LED's). Maybe when Corsair adds scripting through CUE this won't be an issue.

Link to comment
Share on other sites

Great to see game integrations for the keyboard.

 

Saw while ago video from CES 2015 (~11:30 on video) about Corsair showing up keyboard reacting to games, so hopefully we get way better integration soon so wouldn't need to turn off CUE.

 

[ame]

[/ame]
Link to comment
Share on other sites

If you have CUE running as well it will conflict (if you re-plugin the keyboard it should fix frozen LED's). Maybe when Corsair adds scripting through CUE this won't be an issue.

 

OK, so I quit CUE, started Pixel and then selected hardware LED and the Keyboard turned a nice rainbow colour, but the Game became unresponsive and locked up with 1-2 responsiveness every 20 seconds or so.

Link to comment
Share on other sites

The exact same results reported as above, with one minor difference. The game's sounds were heard during the 1-2 second intervals, but no keystrokes were accepted and no mouse cursor was seen.

 

Are you using a K95 as well? We only have K65's for testing so I'm wondering if something might be causing an issue. The code should work with the other keyboards, but there's a big difference in testing between should and does. I really appreciate the feedback.

 

The build I'm currently working on is putting the RGB code in it's own thread which should prevent the game from freezing if the RGB code freezes. It sounds like there is some issue going on with that being it only freezes up when Hardware LED is turned on.

Link to comment
Share on other sites

I've tried the game as well and I too get a rainbow for a second and then the game becomes frozen including the keyboard. This is without CUE open and a K70 keyboard.

 

Whats strange is I use other programs that make use of the keyboard besides CUE (such as CalcProgrammer1's Visualizer) and when CUE is open with it the keyboard will freeze like usual but only the LEDs, I can still type and if I want to reset the keyboard I can just flip the BIOS switch. When your game crashes the keyboard it becomes unusable and worst yet to reset it I can not use the BIOS switch trick, I need to unplug the keyboard (such a pain :[pouts:).

 

This is using 2 USB 2.0 ports because when I use one 3.0 my CUE profiles won't work on startup and I can't use the BIOS switch trick.

 

When I try your game with USB 3.0 it also reports Not Responding but does it instantly with no rainbow and I am able to still type with the keyboard. Weirdly enough now when I use the BIOS switch (normally I can't with USB 3) it will refresh the keyboard but now make it frozen (no key input) but the game resumes to normal.

 

Sorry for the long write up, just debugging as much as I can for you, would love to see this working with the keyboard! :biggrin:

Link to comment
Share on other sites

I've tried the game as well and I too get a rainbow for a second and then the game becomes frozen including the keyboard. This is without CUE open and a K70 keyboard.

 

Whats strange is I use other programs that make use of the keyboard besides CUE (such as CalcProgrammer1's Visualizer) and when CUE is open with it the keyboard will freeze like usual but only the LEDs, I can still type and if I want to reset the keyboard I can just flip the BIOS switch. When your game crashes the keyboard it becomes unusable and worst yet to reset it I can not use the BIOS switch trick, I need to unplug the keyboard (such a pain :[pouts:).

 

This is using 2 USB 2.0 ports because when I use one 3.0 my CUE profiles won't work on startup and I can't use the BIOS switch trick.

 

When I try your game with USB 3.0 it also reports Not Responding but does it instantly with no rainbow and I am able to still type with the keyboard. Weirdly enough now when I use the BIOS switch (normally I can't with USB 3) it will refresh the keyboard but now make it frozen (no key input) but the game resumes to normal.

 

Sorry for the long write up, just debugging as much as I can for you, would love to see this working with the keyboard! :biggrin:

 

Thank you for all of that information -- don't be sorry, the more the better. The code is actually based off of CalcProgrammer1's work and it works great on our setup (which you can see in the video), so I'm surprised it's having issues with everyone else, I was expecting this to go smoothly, I apologize that it's not.

 

I really want to get this working so I'm going to do a lot of experiments (trying it on different USB's, different settings, etc...) and see if I can replicate the issue to solve it. I doubt the issue is that one person is using a K95 and one is using a K65, if that was the case CalcProgrammer1's code wouldn't work for our keyboards. It sounds like it tries to work and then there are issues either with the game or the USB packets.

 

I'll keep everyone posted with what I find out.

Link to comment
Share on other sites

If I understand correctly CalcProgrammer1s code required a unique device ID, not sure if you have that setup for each keyboard or not.

 

His code has:

 this.keyboardUsbDevice = this.GetDeviceHandle(0x1B1C, 0x1B13, 0x3);

I believe k70 uses 0x1B13 where the K95 uses 0x1b11, not 100% sure, it's been a few years since I've looked at code :biggrin:

Link to comment
Share on other sites

The freezing could be caused by how frequently you send data to the keyboard.

I use some of CalcProgrammer1 and another guy's code to have a c++ project with different lightning effects.

At home I can keep the delay between loops really small, but at my work computer I need to increase the delay otherwise the keyboard just freezes.

Likely due to USB, motherboard etc.

 

Threading under video lowers my fps by quite a bit.

Intel Core i7-960 3,2 GHz

2x EVGA Geforce 780 Classified 3 GB in SLI

18 GB DDR3 @ 1066MHz

MSI X58 Platinum

 

Game fps drops down to like 20-30fps whenever it changes led on the keyboard.

ISO layout doesn't work correctly. ("<>\" and "*' " is white)

Link to comment
Share on other sites

Are you using a K95 as well? We only have K65's for testing so I'm wondering if something might be causing an issue. The code should work with the other keyboards, but there's a big difference in testing between should and does. I really appreciate the feedback.

 

The build I'm currently working on is putting the RGB code in it's own thread which should prevent the game from freezing if the RGB code freezes. It sounds like there is some issue going on with that being it only freezes up when Hardware LED is turned on.

 

No, I have the K65 same as you guys.

 

After a hard reboot, and trying to start the game again ... instant lockup (apparently some preferences are set when I changed to hardware LED the first time). Is there a way to get back to default installation condition without uninstalling the game? That way I can get a feel for what the game is all about -before- bringing the keyboard lighting into it and causing a lockup?

 

Never mind that last paragraph ... after uninstalling, reinstalling, and starting the game again it's still rainbow keyboard and instant lockup (even without selecting "hardware LED" in settings first). I can't find a preference file or anything ... do you make changes to the registry instead? If so I won't dare search it using the term "pixel", there would be tens of thousands of references to that and only one or two might be you guys. Needless to say that the uninstaller is missing this during it's operation.

Link to comment
Share on other sites

required a unique device ID, not sure if you have that setup for each keyboard or not

 

Yes, all three keyboards are in there.

 

 

The freezing could be caused by how frequently you send data to the keyboard.

 

We're using a very low data rate for this reason, in fact it's so low that you can use the keyboard just fine with a single USB 2.0 connection. In the video we have the keyboard connected to a USB 2.0 hub along with a Sabre RGB Laser Mouse and a H2100 wireless headset. There was no lag on any of it which really surprised us.

 

Threading under video lowers my fps by quite a bit.

 

This is something we're still working on, it seems to work well with powerful multi-core computers, but still has some quirks that we're working on fixing.

 

ISO layout doesn't work correctly. ("<>\" and "*' " is white)

 

This is something I was afraid of happening. I can see the library getting really big having to deal with different layouts, but it's something that really needs to be planned for.

 

Is there a way to get back to default installation condition without uninstalling the game?

 

There is a setting file that is stored in:

 

C:\Users\...\AppData\Roaming\C63 Industries\Pixel\

Link to comment
Share on other sites

I've been experimenting with the different polling rates as well as USB 2.0 and 3.0.

 

I noticed that on USB 3.0, the game actually slows down when data is being sent to the keyboard. It works fine on USB 2.0 though.

 

I also noticed that the polling rates of 1, 2, and BIOS all work, but the polling rates of 4 and 8 don't work.

 

I don't know if this helps anyone, but I wanted to pass along this information.

 

So far the only way I've been able to replicate this issue is if I have CUE (or something else sending signals to the keyboard) running at the same time. Even with CUE running it seems to depend on what my profile setup is, if I have something changing the lighting effects a lot then it will freeze up, but if I have something very simple that isn't sending much signals (if any) then CUE and Pixel can run at the same time. I'd still recommend just exiting CUE though rather than risk having your keyboard freeze up.

 

I should also mention that I have not upgraded the keyboard to Firmware 1.15 yet.

 

Yes, it's the Firmware. Version 1.13 was installed, I upgraded to 1.15 and am having the same issues as everyone else. Only on USB 2.0 though, USB 3.0 it doesn't freeze up but it is very slow as it sends signals to the keyboard.

 

The build I'm currently working on has the keyboard on it's own thread instead of part of the game cycles. It doesn't freeze up, but the keyboard itself is still really slow and doesn't do as smooth of updates as you can see in the video.

 

I also decided to experiment with different refresh rates. It seems that the fastest refresh rate I'm able to use without crashing the keyboard is 250 Hz (but only on USB 2.0, can't seem to crash it on 3.0). That would be a 4 ms delay between each update. Doing this made the lighting much smoother, so I'll probably upload a new build sometime tonight.

Link to comment
Share on other sites

Great to know that fixed it (at least for you). I hope other people that had issues try it again as well so I can be sure the issues are fixed for everyone.

 

It's interesting that the firmware changed things in a way that caused the code to break and require some minor tweaking. Makes me realize how on top of the firmware updates we need to be for this.

 

I'm really looking forward to the update that will allow all the colors to be accessed. Right now it's limiting some of the cool effects we wrote algorithms for because the fading just doesn't look good with the limited color palette.

 

I also really want an API so CUE doesn't need to be disabled.

Link to comment
Share on other sites

So initially it did not work for me, USB 3.0 or 2.0 or any of the polling/BIOS settings. The game would run fine but the colours would not display. I played around and think it has something to do with if you save a profile to on board memory that has colours displaying it would not work so I made a profile that was all off and it worked! Unfortunately I can't seem to repeat the error. It seems to always work now even with a fancy profile on board.

 

Some things that are still buggy though:

1. When I initially start the game the Tab, W, E, S, both Enter keys and the down arrow are all white. After playing and the first colour flashes on the keyboard they return to normal except W,S but after a few more flashes they too return to normal.

2. If I try to type while the game is running (turns out its only the menu screen with all the flashing colours) it is laggy where I can only type 1 key at a time.

3. More of a game bug but if you try to jump repeatedly the game seems to lag a fraction of a sec, unless the sound is intentional.

Link to comment
Share on other sites

Thank you very much for your feedback. I'm glad things are working better now.

 

1. When I initially start the game the Tab, W, E, S, both Enter keys and the down arrow are all white. After playing and the first colour flashes on the keyboard they return to normal except W,S but after a few more flashes they too return to normal.

 

This is kind of intentional. Those keys are white because those are the controls you're able to use. For example, W and S to move up and down the menu, E to select something. The key highlighting is still a little buggy though, it's something we're still working on, but that's the reasoning behind it.

 

2. If I try to type while the game is running (turns out its only the menu screen with all the flashing colours) it is laggy where I can only type 1 key at a time.

 

I'll do some experiments and look into what might be causing this and fix it.

 

3. More of a game bug but if you try to jump repeatedly the game seems to lag a fraction of a sec, unless the sound is intentional.

 

There is some weird quirkiness with the controls that we are still working on such as there sometimes being lag or a delay.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...