Jump to content

Browser Based Game

Guest killygang

Recommended Posts

  • 2 weeks later...

HTML / PHP (+ MySQL) / JavaScript.you'd want to create a file, or a function for each action in the game. for example, (using the online manager game as an example) you'd want a function/file to "buy player". the user would have some details in the database, like their money, status etc. you'd deduct the the cost of the player from their money in the database. of course the game would need some logic to it, so if they bought a GOOD player, you'd want to increase their chances of winning - oposite if it's a BAD, or less-talented player.by file or function i mean...if it's a file, when you link to it, you'd send variables in the URL... for example: file.php?buy=David Beckham. the file would execute the dynamic code, then send you back, or display an output message to the user. because the variables are sent in the url, you'll not want to send any sensitive information such as passwords.if it's a function, you'll have a set of PHP code contained in a function, for example the function could be called buyPlayer() you'd then link to that function in the file being used. like with files, you can send variables to them, and then collect their value within the function, for example: buyPlayer('David Beckham');. because these are contained within the code and un-seeable by the user, you could send passwords and other sensitive information.if you don't already know PHP you'll need to learn: www.w3schools.com/php and mysql: http://www.w3schools.com/php/php_mysql_intro.asp.javascript will come in useful somewhere along the line, it's a bonus for you if you know it: www.w3schools.com/js.what i've said will become more understandable as you learn more.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...