Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with Pixelmovent Script by f0tz!baerchen

Hey everyone, I was having an issue with a Pixelmovement Script for RMXP written by f0tz!baerchen. Here's a link to the demo http://www.rpg-palace.com/mewsterus/Pix ... nt-1.6.zip (it contains multiple scripts, too many to post here). I've noticed that whenever the player holds a button (for example, the space bar), the player is unable to move in all eight directions, but can only move up-left and down-left, but is no longer able to move up-right or down-right until that key is released. I've noticed each key is different, for example if you hold the enter key, you can move down-left and down-right, but can't move up-left or up-right until that key is released. That means that, if I wanted the player to be able to hold a key to run faster, they won't be able to move in all 8 directions anymore, which is frustrating.

I'm not sure if the problem I'm having is related to the pixelmovement script, or just the input commands used by RMXP default scripts. If anyone with scripting experience has any ideas of suggestions, help would be greatly appreciated. Thanks!
 
I think your problem is probably your keyboard. Cheap keyboards do what's called "ghosting" (explanation). More expensive keyboards will have anti-ghosting or key rollover features to avoid this problem. But since not everyone who has your game will necessarily understand, it might be a good idea to try different input mappings. Maybe the spacebar has a problem but shift doesn't. Or maybe you want a totally different key like the grave/tilde (`/~) key. And of course that all depends on what you're using for directional keys.

That's my guess having used the pixel movement script a lot (as you can maybe tell, your demo is linked to my personal file storage where I put it up after f0tz! disappeared and his links broke). Let me know if that helps.
 
Thank you rey meustrus for breaking down the problem for me, and for the link to that article, that was really helpful. I'm on a laptop that's several years old now, so hopefully it won't effect too many users. In the meantime, I'll try to enable controller support, which I think would be preferable anyways. I love this community, everyone's so quick to offer help, thanks again!
 
Damn, I actually gave up a game over this a few years ago.

I think the best solution would be using Q/E/Z/X (with WASD) because holding two keys at once is a problem.

Or, have pressing a key start a timer/bar, in which they run faster until the timer runs out, so they don't have to hold a key continuously.
 
Sadly newer keyboards aren't likely to be any better. This isn't a software issue, it's a matter of the quality of the hardware. The Microsoft article talks about using some multi-touch thing as a cheaper alternative to diodes on all the switches, and typical cheap "anti-ghosting" gaming keyboards only put diodes on common gaming keys (especially the WASD area, and probably the spacebar), but most cheap keyboards still have this problem. They likely always will.
 
Thanks again for the replies everyone, it's helpful to know that this is a common issue. After mulling it over, I've decided to leave the dash boots the way I had coded it originally, where the player holds the item key and dashes forward automatically, ala the Pegasus Boots from Zelda LTTP.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top