Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Konami Code using C# and ASP.net [closed]

Tags:

c#

http://en.wikipedia.org/wiki/Konami_Code

I already done this using full javascript but how can i do this in C#/asp.net website (not winform). thanks..

like image 718
CSharpNoob Avatar asked Dec 10 '10 13:12

CSharpNoob


People also ask

Can you use the Konami Code in Super C?

Super C (NES) – Entering the code( → ← ↓ ↑ A B Start ) before the title screen appears, gives the player 10 lives in the US version of the game while in the Japanese version the code gives 30 lives.

How do you write the Konami Code?

Up, Up, Down, Down, Left, Right, Left, Right, B, A. It's called the Konami Code, and it often meant the difference between life and death in a video game back in the 1980s. Perform those button presses in the right sequence, and you'll unlock cheats that help you win.


1 Answers

So you mean the user should not find out about your ultra secret konami code when viewing the source?

It's not possible to do it entirely server-side, unless you want a postback on every keystroke, which is awkward.

You could compress and obfuscate the javascript, but I guess a user with a strong determination still can figure it out.

You could use Silverlight, but again, a user with a strong determination can unpack the XAP from the browser cache and view your DLLs in reflector.

What you could do is sending every keystroke to the server using AJAX (or maybe collect them client-side and send them in a batch), which is actually not that painfully slow. On the server you'd have to analyse the keystrokes. This code will not be visible to the user. You'd then have to simulate some push mechanism to trigger your desired reaction on the client side.

like image 110
herzmeister Avatar answered Oct 04 '22 17:10

herzmeister