Although not all that many people use PHP to make games, it is not for a lack of available tools - making games is a great way to learn new techniques in the language as it is a lot more fun to work on a game than YAF (Yet Another Forum). Text-based games particularly have no special requirements for knowledge - you can get started on your text-based game immediately using little more than the strings functions we looked at much earlier in the book.
If you want real power, it should be clear that SDL is the way to go, and we've only covered a tiny fraction of what SDL can do. The best way to take your knowledge forward from here is to read the documentation, read the source code if you have to, and see what you can do. I find the official C documentation for SDL is best, as PHP SDL copies the functionality almost identically.
Author's Note: now that you are done using SDL, be sure to undo any changes you made to filenames back when you were trying to get SDL to work - if you renamed php.ini and php5ts.dll to _php.ini and _php5ts.dll, it is time to put them back.
Want to learn PHP 7?
Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!
If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!
Next chapter: Making your own language >>
Previous chapter: Last tweaks
Jump to:
Home: Table of Contents
Copyright ©2015 Paul Hudson. Follow me: @twostraws.