Free Multiplayer PHP/MySQL Game — Pits of Doom
About a month ago I started giving someone PHP/MySQL lessons. In the lessons I made up a little game to teach the guy how to do different things in PHP all the way up to making his own multiplayer online text-based game. So in the next few months I’m going to share insights on creating your own PHP/MySQL game by posting the code for this little game under the GNU public license. That way you’re free to edit/update and change it as you see fit. If you’d give me credit for it (or at least keep the link on it) I’d appreciate it.
I’ll post the tutorials here along with the final code for the game and an installation file (which I’ll even teach you how it works!) so you can follow along and see how I go about making an online game, the thought process behind it, and how to get one up and working yourself.
Game Tutorials
- Lesson 1 – the planning stage
- Lesson 2 – breaking it down
- Lesson 3 – mixing things up
- Lesson 4 – and array we go
- Lesson 5 – easy map editor
- Lesson 6 – mysql database class
- Lesson 7 – join, login & lost password
- Lesson 8 – monsters & field of view
- Lesson 9 – bring the fight
- Lesson 10 – member interaction
Download Game Code
.zip archive — Coming Soon!
.tar.gz archive — Coming Soon!
Download Game Tutorials
.zip archive — Coming Soon!
.tar.gz archive — Coming Soon!
Want your own custom online game? Get a price quote at my website: design1online.com
Great tutorial
Is it possible to create an online game without having a SQL database?
That would depend on the type of game you’re making. The kind of game where you play once and it never has to save any of your information would work. If it’s something where people login every day and can get access to their stuff then yes, you’d have to have something to store all the data into.
MySQL is a free database software so it’s not like you’d have to pay anything to use it. If you download XAMPP that’s free as well and already comes with MySQL and PHP setup and ready to go. That way you can create an online game on your own computer without any expense.
However if you wanted to have it available online you’d need a server or online hosting to make it visible to everyone.
Thank you so much for your tutorials. For me they are truly amazing! I’m new to php and have been delving in deep and developing my own PBBG. It’s main feature being a interactive map. What you talk about here is exactkly what I’ve been looking for and in an easy to understand manner. I can’t wait for your next lesson (as my game map will be huge – I’m interested to see how you incorporate sql). Thanks again!
I’m glad you like it! Most tutorials I’ve looked at just kind of plop the code in front of you with no real explanation of what’s going on or what it even needs to be done. I really hate that!!
I’m a big fan of simplifying things and then building on smaller, simpler steps. Once I start going over mySQL we’ll talk about classes and how easy it is to learn about SQL then pretty much let your simple scripts do all the hard work for you.
It’s great that you can simplify things to make ME understand. 🙂
well, I’m not too bad at learning coding, I learned HTML with trial and error.
I would like to create my own game one day, and I’ve been reading books about it. But it’s like you said, not one really tells you what’s going on. and I find that a lot of the SQL and PHP Books don’t really elaborate on things like games.
My only challenge now is to actually be ab;e to put it all into practice.
I have Adobe Dreamweaver, but I tried the software you told me about.. but I just couldn’t figure it out.. :S
Anyways, thank you for the tutorial.
How many steps do you presume there will be?
Which software are you referring to? XAMPP? I have a tutorial specific to getting everything up and running on XAMPP which you may find helpful.
Great tutorial, hard drive broke down, had to find your site again,
Thnx for the help, i’m using xampp, if i get into sticky situations while building, are you up for hire..?
Thanks! Check out my website design1online.com for more information.
good tutorial, thanks for your efforts
What a wonderful man you are!!!!…
Cheers multiply hundred times…
Great you are a boss at tutorials
Glad you like them.
Source code please?
Source code is at the end of every lesson.
Excellent articles are rare these days, therefore any time
I encounter one like this, I attempt to post a comment and
let the article writer know. This is exceptional stuff and you
must feel proud. Wish I had articles like this on my website.
Congratulations.