Jump to content
  • Advertisement
Sign in to follow this  
Keck

Creating a game in PHP and MySQL...

This topic is 4103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone I am trying to program a game in php. I have purchased the domain and have a host server. I have a vast knoweledge of html, xml, and ccs. I have no clue where to start with php though. I have been going to a site called https://sourceforge.net/ and downloading games...and trying to upload them to my server. I cannot figure out what I am doing wrong...I am trying to make the game in php with mysql. I have been flowing the instructions for 5 games now and nothing is working. Does ANYONE know where I can go to get some code (THAT WORKS) for either a game that is already made that is now public sorce so I can use it, or a program that populates a game on my server for me? It has to have very detailed step by step directions...like I said I know my html...but have no knowledge of php or sql... PLEASE PLEASE PLEASE any help on where to find a source code or if anyone can give me some good instruction as to how to get started I'd very much appreciate it....thanks Joe

Share this post


Link to post
Share on other sites
Advertisement
perhaps you should start with php in general instead of trying to make a game without any programming knowledge ?

you need to learn how to walk before you can run.

Share this post


Link to post
Share on other sites
start by googling: "php tutorial" and working your way through the first couple links.

Downloading games and trying to understand how they work by reading their code is like looking inside a car with no mechanical training and expecting to understand how it works.

Though not necessarily explicitly applicable to you this thread popped up today and you should give it a read:
http://www.gamedev.net/community/forums/topic.asp?topic_id=440930

-me

Share this post


Link to post
Share on other sites
For PHP, I would suggest find a simple tutorial website that will introduce you to the language. A good book wouldn't hurt either!

One that comes to mind is Tizag: http://www.tizag.com/phpT/. Focus on the syntax, the loops, conditionals, and variables. You can do a lot with just that little bit in your toolbox.

In terms of specific topics to learn AFTER gaining a general grasp:

Handling forms: This will be required for any type of registration and login you do. I would get started with the absolute basics of this; learning to get a simple hard coded login or registration working (No databases yet!).

When you begin to learn more you can use regular expressions to check the validity of information (for security and also those dumb users who put in fake emails, etc.). This plays in with security and other things to keep all of your information safe.

Handling information: Other topics you will eventually need to learn before you make even the simplest login are sessions, cookies, and the like. These help to pass data from page to page, making sure that the user calling a protected page actually has a right to be there.

Database (MySQL for example): This is eventually what you will need to run a full fledged game depending on your situation. Basic database connection and querying is the first thing you should learn. From there, you can work into more advanced MySQL queries. However, I would would worry about the hard stuff last.

This is for down the road:

PHP/CSS/HTML: Just as a tip: Spend some time doing little web pages where everything interacts together. Keep it clean and separated so it makes it easy to format, especially for a legitimate game.

When you finally become very comfortable with the above, you can delve into the more "advanced" (They aren't too bad :)) topics along the line of the GD library and others.

You can also begin to test yourself in the waters of AJAX or javascript to make things more interactive. Thats another ballgame though!

Good luck.

Do your best to avoid copy and pasting code because you really won't get to your final destination doing so. If you ever need help, the PHPFreaks websites have excellent tutorials and forums. Check them out.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!