I want to create a trivia game for my website. The graphic design does not have to be too fancy, probably no more advanced than a typical flash game. It needs to be secure because I want users to be able to play for real money. It also needs to run fast so users don't spend their time frustrated with game freezing. Compatibility, as with almost all online products, is key because of the large target market.

I am most acquainted with Java programming, but I don't want to do it in Java if there is something much better. I am assuming I will have to utilize a variety of different languages in order for everything to come together.

If someone could point out the main structure of everything so I could get a good start that would be great!

  1. Language choice for simple secure online multiplayer games?

  2. Perhaps use a database like MySQL, stored on a secure server for the trivia questions?

  3. Free educational resources and even simpler projects to practice?

Any ideas or suggestions would be helpful...


closed as not a real question by Tetrad Jan 22 '12 at 7:36

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    \$\begingroup\$ I don't know if play for cash and trivia questions will work too well for an online game; everyone is going to be using google to cheat. \$\endgroup\$ – AttackingHobo Feb 16 '11 at 6:21
  • \$\begingroup\$ There is now something much better - Meteor. \$\endgroup\$ – Dan Dascalescu Feb 6 '15 at 17:33

I think most would agree with me that security is almost completely unrelated to the programming language you develop a project in. Security is mostly achieved by having a well thought security-centric architecture, proven crypto where needed and a good management of secret information (such as crypto keys).

Designing a secure system is not trivial, and there are no recipes for it. As I said before, security is not a programming language, a platform or a set of tools. You can say you make a program in C++, deploy it on OpenBSD, and have RSA all over the place, yet have holes big enough to drive trucks through.

In ultra-broad terms, designing secure client-server applications comes down to:

a. Anything that effects the data (such as scores, etc.) must be calculated on the server. Design your application so even a user with access to your source code cannot act improperly.

b. Use high grade symmetric encryption (such as AES, or Blowfish) for communication between the server and client, with key exchange with a good public key crypto algorithm, such as RSA. Encryption between trusted components is unnecessary.

c. Make sure your network is well designed. For example, the database server should be on a private network, only visible by the game server. Good firewall rules and router settings should complement everything.

d. Make sure all your keys and passwords are secure and well kept. What good is an ultra-secure system, whose admin password is qwertyuiop? Remember, the security of a system is that of its weakest link.

So basically, you should always assume the worst for every line of code you write. If this is your first time designing a secure system, I'd advice you either get some experience with other test systems, or get somebody to help you design it.

  • \$\begingroup\$ Ah, ok...that makes sense. I am bit of an amateur cryptographer myself, so considering this the security part should not be too much of a problem so long as I go in with the mindset that any and all attributes that could be altered to favor someone or give them access to money should be encrypted and done server-sided. Do you have any preference on language for this? I was thinking flash...? \$\endgroup\$ – Mr_CryptoPrime Feb 16 '11 at 3:05
  • 1
    \$\begingroup\$ @Mr_CryproPrime It depends on your target audience. If you aim to the general public, I think flash is best. I'd definitely recommend it over java, as the runtime is more widely deployed. DHTML is also okay, but I think flash is more mature as a multimedia platform today. Server-side, anything you want, so what you have the most experience with would be best. You could also try silverlight on the client and c# on the server. \$\endgroup\$ – slcpfmmm Feb 16 '11 at 4:15

Your need for it to run fast and have high compatibility point to writing it in regular HTML and avoiding the likes of Flash and Java (applets) for this. If you haven't written any HTML before, you're in for a long road and yes you will need to utilize a variety of languages (HTML, JavaScript, CSS).

If you have the server hosting, I recently found Socket.IO which I think is really neat - it will facilitate true real-time communication between the browser and your server. Otherwise, if you want to only use your web server, then you'd need to write a system probably based on polling, and the backend would most likely be PHP pages. It wouldn't be true real time but it could be close enough.

It's interesting you mention real money upfront though. That seems to raise the stakes a lot. You will then need to deal with APIs of your virtual money systems (Google Checkout, etc.), make sure your system is airtight from hackers and scams and such, design your game in such a way that seems fair to the players, eliminate cheating in every way possible... It complicates the whole thing, honestly, and I think it's much too early to rush into something with no knowledge with a goal of making money. But if you're determined, I can only stand aside and wish you the best of luck in your adventure.

  • \$\begingroup\$ I have some experience with HTML, Javascript, PHP, MySQL and Java. I have not messed too much with CSS, but I believe that is for layout properties? And in regards to money, I agree I am no position to set up such a site. I just wanted to get a gist of what I am getting into and a better view of what I need to work towards. If I can just get a simple game going, then I can slowly improve on it and then when I am feeling ready, then I will develop my commercial version or what not. Thanks for your suggestions, I will definitely check out socket.IO...I definitely want it in true RT as possible. \$\endgroup\$ – Mr_CryptoPrime Feb 16 '11 at 3:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.