Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Humble Request Of The Mighty Coders

Author
Message
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 27th Oct 2012 21:02
Hey, I have this idea that I'm not quite sure on the implementation of; I can think off several off-hand ways to do it, but I'm not sure if I want to use any of them and I believe someone here can think of a smarter way to do it.

Essentially, I want to hit a series of 11 characters in rapid sequence to open up a "Cheat" menu of sorts, without displaying any of the input characters to the screen. The series has several letter duplicates, but I was thinking about using a series of three held-down keys to signal the start of the timer (instead of just capturing the last 11 pressed keys CONSTANTLY.)

So, either:
[SHIFT+SPACE+UP] --> [Input sequence phrase] --> [Open menu]
Or
[Input sequence phrase] --> [Open menu]

The cheat menu is intended for debug purposes only, that's why it is an 11 character sequence.

So:

Which method would YOU use for your debug menu, of the options given?
How should I approach this, code-wise? Use a queue? How on earth do you do that? I think queues are useful, but I don't know how to use them. :\
GreenDixy
15
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 27th Oct 2012 21:51 Edited at: 27th Oct 2012 21:57
i just use the tab key for my debug menu etc that way its not in the way of other buttons


Edit: here is the keybored map key numbers

======================================
My software never has bugs. It just develops random features.

Attachments

Login to view attachments
nonZero
12
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 29th Oct 2012 12:24
Yeah, if you were just using it to debug, then stick to a key you don't use and add a directive at the beggining so that you can easily disable it come the release compile.
...Of course if you WANT the console available to players as some strange unlock-thingy (eg Medieval 1 and 2 on Playstation) then I'd go with a simple counter and keypress system:

^You'll have to excuse the formatting, my phone's charset is limitted.
Anyway, that's one way of doing it. It depends what you wanna more specifically what you wanna do with it coz, as GreenDixy said, a developer's debug console requires only one key.

RP Functions Library v1.0

Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 29th Oct 2012 17:29 Edited at: 29th Oct 2012 17:30
Yeah, I was planning to open it up to everyone. Notably, as a reward for my play-testers for their faithfulness, but also for anyone else who had reason to know the password.

Thanks nonZero!
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 29th Oct 2012 18:38 Edited at: 29th Oct 2012 18:39
Okay, I tried a method similar to what you suggested, but I'm getting the strangest glitch in regards to the timer. It seems like it's not checking how much time is left correctly. Also, how do I make a case for "If the key is not correct"?

EDIT: So you know, the password is "wordpass"

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Oct 2012 23:30 Edited at: 29th Oct 2012 23:31
If you're only looking for 1 particular code word, this would be a very easy method.



"You're not going crazy. You're going sane in a crazy world!" ~Tick
nonZero
12
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 30th Oct 2012 12:32 Edited at: 30th Oct 2012 12:52
Mr909, your timer problem is because you're using strange methods for timing(eg: dividing integers is never a good idea for reliability). Here's more what I meant (It's a little longer but it'll give you more stable results and you can use it for UP, UP, LEFT, RIGHT, RIGHT, KICK, PUNCH -style cheats too):


Obviously this is a template so I called the cheat console statically. In the game you'd maybe have to call it dynamically to keep the background things animated or whatever - if you wanted to (Personally, I like everything to freeze to I'd have called it statically) in my game.

This method's a little complex. Phaelax's method will be okay if it's just a simple words and you don't mind if other inputs like arrow keys don't cancel the cheat input. If you need to keep it simple, then use his method with the ENTRY BUFFER.

RP Functions Library v1.0

Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 30th Oct 2012 19:21
Thanks guys for your help.

Login to post a reply

Server time is: 2024-04-27 02:30:46
Your offset time is: 2024-04-27 02:30:46