Strange Laptop-PC difference in my game

Started by Matti, Sun 28/06/2009 20:01:55

Previous topic - Next topic

Matti

I wasn't sure if that belongs in one of the technical forums, so I post it here.

I'm working on an action-RPG right now which involves a lot of fighting and different moves with different key combinations.

I encountered a problem with one(!) of the combinations which only worked when the character faces west, but not when facing east, so in order to use that move I always have to get my character to the right of the enemy. Well, first I thought this was a scripting error and couldn't find any, but then when I tested my game on another computer (a PC and not a laptop) I could make that move without any problems. I don't have any idea what the problem could be, the right arrow key works fine...

Well, I can't test that now but as far as I remember there was another thing, my game is in debug mode all the time and on my laptop there are only the fps displayed while on the PC there was also the loopcount.

Did anybody ever encountered a similar problem or does anyone know what the problem might be?

Gilbert

The problem is, you didn't tell us what is involved in pulling off that move. From what I read, it's a key combination, right? Then that's most probably a keyboard problem that's quite common.

In fact, different keyboard hardware might behave differently. One certain thing is that many keyboards cannot detect more than 3 keys pressed at the same time. Some might not be able to register all the key presses when certain combinations of keys are pressed. So, if the move in your game requires a rather complicated (by 'complicated' it could be only 3 keys or more) combination of key presses there are chances that it won't work on all computers.

Matti

#2
It's a combination of 3 keys: Right-Ctrl, down arrow and right arrow. Strange thing is, it works for the other side (the same combination, but the left arrow instead of the right.

Also, it very rarely works on the right side too, but it's unuasable that way.

Gilbert

As I mentioned some keyboards will not work for a certain combination of keys, so it's not surprising that one combination having an arrow key pressed works whereas it won't work anymore if that key is substituted by another arrow.

The problem is with how the keys are grouped/wired together internally in the hardware (something like that, not meant to be any accurate information as I couldn't give such anyway) that prevents some combinations to be registered.

Matti

Too bad. Then I guess the only option is to include a feature to let the player define the keys for the moves... or I just don't care since I'm sure the combinations will work on most keyboards..

By the way, I consider it rather stupid / weird that keyboards don't allow certain key combinations. I guess it isn't too difficult to wire all standard and important keys together.

Gilbert

Well, it's hardware limitation. Maybe if they're to allow more flexible combinations the production cost would be increased. So, I'm not sure, maybe expensive and sophiscated gaming keyboards would be more flexible. However, for playing your games you cannot expect others to be always be able to do complicated stuff so it's not that important anyway (as an unrelated note, I never (find it worth to) use keyboards costing more than HK$100 and mice costing more than HK$30 :=).

Anyway, in fact the PC keyboards are already an advancement compared to earlier cost-effective technologies like the Apple ][ (minus the GS) ones. For example, you can detect scancodes of the keys with a PC keyboard, which enables you to detect multiple keys pressed at the same time (with hardware restrictions though, as mentioned above); whereas with an Apple ][ keyboard you can only detect the ASCII code of the currently pressed key(s), i.e. you cannot have two codes at the same time, so say, no "A" and "B" simultaneously, and pressing "Ctrl" alone is not detectable (the open-apple and closed-apple keys could be detected at the same time as the other keys though, as they were actually cheating, that these two "keys" were actually hard-wired to the two joystick buttons).

Anian

#6
A tiny bit off topic:
3 keys in an RPG game? Is it for like a s MortalKombat type of duel or something, cause I really don't see the point of not using a mouse. Plus, why right
Ctrl, don't believe I've seen it used in anything recently, unless it's like a 2player game on 1 keyboard, I'd drop that and change it to a Space bar, or
left Ctrl...I mean, it's your choice in the end, just that it sounds clunky and unusual (like your own hands would get in the way for no real reason).
I don't want the world, I just want your half

Matti


Yeah, it's a real-time combat game (like Mortal Kombat) AND two players will have the possibility to fight against each other with one keyboard (as soon as I'll figure out how to rewrite the keyboard movement module so that a 2nd player can be controlled simultaneously  ;)). By the way, it's quite alright to play with the right Ctrl, the hands don't get in the way of each other...

It will be an RPG heavily inspired by the great Amiga classic "Moonstone". Here's a WIP-screenie (we'll replace the dummies as soon as we'll have all the animations and moves done):


SMF spam blocked by CleanTalk