PHP games

2,714 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,714
On SlideShare
0
From Embeds
0
Number of Embeds
62
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • PHP games

    1. 1. Web Games with PHP Design and Development <ul><ul><li>Ron Harwood </li></ul></ul><ul><ul><li>php|works – Sept. 14th, 2005 </li></ul></ul>
    2. 2. Personal Introduction Who the heck am I? <ul><li>Systems Administrator at McMaster University – Research and High Performance Computing Support (RHPCS) - http://www.rhpcs.mcmaster.ca </li></ul><ul><li>“ Tech Guru” for the Hamilton Tiger-Cats Football Club – http://www.ticats.ca </li></ul><ul><li>Web application developer/advisor for MRX and Associates – http://www.mrx.ca </li></ul><ul><li>Hobbyist web game developer – BlackNova Traders – http://www.blacknova.net </li></ul><ul><li>Co-ordinator for the Hamilton Linux User Group - http://hamilton.linux.ca </li></ul>
    3. 3. Presentation Goals What I hope to get across <ul><li>Differences between web application and web game development </li></ul><ul><li>Basics of web game design considerations </li></ul><ul><li>Very little technical detail – I'm not going to presume to teach anyone PHP programming </li></ul><ul><li>Testing in order to provide a better gaming experience </li></ul><ul><li>Pointers to available resources </li></ul>
    4. 4. Topic Introduction What is a web game? <ul><ul><li>A game is a recreational activity involving one or more players. This can be defined by A) a goal that the players try to reach, B) some set of rules that determines what the players can or can not do. Games are played primarily for entertainment or enjoyment, but may also serve an educational or simulational role. </li></ul></ul><ul><ul><li>(Shamelessly stolen from Wikipedia - http://en.wikipedia.org/wiki/Game ) </li></ul></ul><ul><ul><li>A web game limits this definition to games that can be played in a web browser – generally using Flash, Java, HTML, DHTML/AJAX/Javascript or some other similar interface. </li></ul></ul>
    5. 5. Web Game vs. Application Technically speaking <ul><li>Games have: </li></ul><ul><ul><li>Goals and objectives </li></ul></ul><ul><ul><li>Opposition </li></ul></ul><ul><ul><li>Decision making </li></ul></ul><ul><ul><li>Resource management </li></ul></ul><ul><ul><li>Game tokens </li></ul></ul><ul><ul><li>Rules </li></ul></ul><ul><li>(Shamelessly stolen from “I Have No Words & I Must Design” - http://www.costik.com/nowords.html ) </li></ul>
    6. 6. Web Game vs. Application ...in reality... <ul><li>FUN </li></ul><ul><li>I like phpMyAdmin but it's not fun! </li></ul>
    7. 7. Game Design A plan for battle <ul><li>Design Document </li></ul><ul><ul><li>Rules of play </li></ul></ul><ul><ul><li>User interface plans and description </li></ul></ul><ul><ul><li>Descriptions of game tokens and resources </li></ul></ul><ul><ul><li>Side notes (why a feature should work a certain way) </li></ul></ul><ul><ul><li>Sketches/diagrams/formulas/tables </li></ul></ul><ul><li>In theory, anyone should be able to read the document and implement the game without further information from the designer. </li></ul><ul><li>...or play the game using pen, paper and dice. </li></ul>
    8. 8. Types of Games ...and what works well on the web <ul><li>Card games </li></ul><ul><li>Board games </li></ul><ul><li>Text adventure and RPG games </li></ul><ul><li>Strategy </li></ul><ul><li>Simulation </li></ul><ul><li>Logic and puzzle-like games </li></ul><ul><li>Almost any game that is turn-based or has loose interaction can be made into a web-game. Adaptations of BBS door games work especially well. </li></ul>
    9. 9. Other Types of Games ...and what doesn't work well on the web <ul><li>Essentially anything that is real-time or requires interactive animated graphics.(*) </li></ul><ul><li>First person shooters </li></ul><ul><li>Real-time strategy games </li></ul><ul><li>Really, anything arcade style </li></ul><ul><li>(*)I'm not including flash, java or some of the amazing DHTML/AJAX/javascript stuff I've been seeing lately. </li></ul>
    10. 10. Implementation The slightly more technical stuff <ul><li>Focus on writing game logic – use proven third party libraries when possible </li></ul><ul><li>Security is paramount – cheaters are looking for exploits that are outside of normal security precautions </li></ul><ul><li>Keep notes and modify the design document to reflect where the implementation diverges from the original plan (a wiki works well for this) </li></ul><ul><li>Keep your eye on the prize – you are trying to make something that is fun (the process of creating it may not be) </li></ul>
    11. 11. More Implementation Thinking about the long term <ul><li>Account management </li></ul><ul><li>Logging – events, problems and everything else </li></ul><ul><li>User issue management </li></ul><ul><li>User communication </li></ul><ul><li>Administrator to user communication </li></ul><ul><li>Game length and game environment resets </li></ul>
    12. 12. Did I Mention Security? Making sure the cheaters never win <ul><li>Obey Chris Shiflett's “Filter Input, Escape Output” mantra and you will cover at least 90% of game security issues </li></ul><ul><li>Some players will cheat – highest score and “griefing” other players are their motivations </li></ul><ul><li>Cheaters unbalance a game and ruin it for honest players </li></ul><ul><li>You will not be able to predict every exploit – some will be gameplay based </li></ul><ul><li>The best ways I know to find these exploits is to log everything a player does or to offer bounties for finding and revealing exploits </li></ul>
    13. 13. End-user Documentation The stuff that never gets written <ul><li>Users need to: </li></ul><ul><ul><li>Quickly learn how to play </li></ul></ul><ul><ul><li>Be sure of the rules of the game </li></ul></ul><ul><ul><li>Reference documentation, tables, diagrams and other rules to play better </li></ul></ul><ul><ul><li>Talk with each other – the best documentation can often be the user forums </li></ul></ul><ul><ul><li>Communicate with the administrators and/or developers </li></ul></ul>
    14. 14. Testing and Play Testing Yes, it works but does it work ? <ul><li>Normal application testing involves making sure there are no bugs. With games, you not only need to test for bugs but you also need to test: </li></ul><ul><ul><li>Gameplay (is it fun?) </li></ul></ul><ul><ul><li>Game balance </li></ul></ul><ul><ul><li>Ease of use (can a beginner figure it out?) </li></ul></ul><ul><ul><li>User interface (does it help or hinder the playing of a game?) </li></ul></ul>
    15. 15. Game Balance Keeping everything fair for everyone <ul><li>Features and balance tend to be inversely proportional </li></ul><ul><li>No killer technology, move, item or strategy </li></ul><ul><li>Every tactic needs its antithesis </li></ul><ul><li>Even then, a complex multi-player will always have balance issues </li></ul><ul><li>Components that affect game balance should be configurable on the fly – this may peeve some end users (especially the ones exploiting balance issues) </li></ul>
    16. 16. Types of Game Balance What you should actually be worrying about <ul><li>Player/Player – making sure that no player has an advantage over any other player other than skill. There can be luck but it must apply evenly to all players </li></ul><ul><li>Player/Gameplay – matching the learning curve to the rewards to ensure that the player keeps playing </li></ul><ul><li>Gameplay/Gameplay – balancing game features. If a weapon does more damage then it must either cost more or be balanced with other compensating factors </li></ul>
    17. 17. Secrets of Game Balance “It was never meant to do that...” <ul><li>Gamers will uncover any and all relevant equations and formulas about a game through trial and error, testing, and hacking. </li></ul><ul><li>Gamers will find bugs and “features” that the developers never knew about. </li></ul><ul><li>Gamers will use features in bizarre ways never envisioned by the developers or even the testers. </li></ul><ul><li>The gaming public just has far more pairs of eyeballs than the developers and testers. 1,000,000 people will find something that a team of 30 (or less) missed. </li></ul>
    18. 18. Secrets of Game Balance Part two of an ongoing series... <ul><li>Gamers have far, far more time to play the game than the developers do. The developers are busy making games, but hardcore gamers have seemingly infinite time. </li></ul><ul><li>The developers and testers have skewed perceptions on balance since features change often throughout development. A particular move or strategy might be considered weak, but end up strong. The development team might have a bias against this move or strategy, since they remember it being too weak to bother trying. </li></ul>
    19. 19. Gamers Have Time Oh those crazy Estonians! Estonian population is 1,332,893
    20. 20. Secrets of Game Balance It keeps going and going... <ul><li>Finally, the gamers have the motivation. If you discover a strategy or deck in Magic: the Gathering that truly breaks the game wide open, you have lots of rewards waiting for you. </li></ul><ul><li>If you’re a tester at a game company and you discover the exact same thing before the game is released, you get to type up another bug report and get your toys taken away from you. Not quite the same level of incentive. </li></ul><ul><li>(Shamelessly stolen from Game Balance, Part 1 - http://www.sirlin.net/Features/feature_GameBalancePart1.htm ) </li></ul>
    21. 21. M:TG Career Earnings 2001 Motivation to exploit gameplay imbalances <ul><li>Jon Finkel $249,227 </li></ul><ul><li>Kai Budde $144,425 </li></ul><ul><li>Ben Rubin $119,470 </li></ul><ul><li>Zvi Mowshowitz $108,320 </li></ul><ul><li>Kyle Rose $104,225 </li></ul><ul><li>Mike Long $96,202 </li></ul><ul><li>Chris Benafel $93,850 </li></ul><ul><li>Tommi Hovi $93,780 </li></ul><ul><li>Darwin Kastle $90,627 </li></ul><ul><li>Bob Maher, Jr. $82,377 </li></ul>Zvi Mowshowitz wins the Pro Tour Tokyo Magic the Gathering tournament, taking home $30,000. He has lots of incentive to discover and exploit balance problems.
    22. 22. Online Resources Sites I find useful for game design <ul><li>Gamasutra - http://www.gamasutra.com </li></ul><ul><li>Internation Game Developers Association - http://www.igda.org </li></ul><ul><li>Amit's game programming information - http://www-cs-students.stanford.edu/~amitp/gameprog.html </li></ul><ul><li>rec.games.design newsgroup – FAQ: http://www.cs.queensu.ca/~dalamb/Games/design/design.html </li></ul><ul><li>I Have No Words & I Must Design - http://www.costik.com/nowords.html </li></ul><ul><li>GameDev.net - http://www.gamedev.net </li></ul>
    23. 23. Books for Game Design ...at least ones I've read <ul><li>Game Architecture and Design – Andrew Rollings, Dave Morris </li></ul><ul><li>AI for game developers – David M. Bourg, Glenn Seemann </li></ul><ul><li>Physics for game developers – David M. Bourg </li></ul><ul><li>Many books by Charles River Media </li></ul><ul><li>The Art of War – Sun Tzu </li></ul><ul><li>PHP Game Programming – Matt Rutledge – is not recommenced for anyone other than PHP neophytes. </li></ul>
    24. 24. Libraries I (might) Use Making your life easier by doing less work <ul><li>ADOdb – database abstraction </li></ul><ul><li>Smarty – template engine </li></ul><ul><li>PHPmailer – email transfer class </li></ul><ul><li>JpGraph – graphing library </li></ul><ul><li>Feedcreator – RSS generator </li></ul><ul><li>Pseudo-cron – cron like functionality </li></ul><ul><li>aMember – membership/subscription </li></ul><ul><li>Javascript Gamelib (okay, not PHP – but invaluable for interface work) </li></ul>
    25. 25. Tools I (actually) Use Useful for more than just games <ul><li>DBDesigner4 – database design tool (anxiously waiting for MySQL Workbench) </li></ul><ul><li>phpMyAdmin – database manipulation tool for CLI adverse </li></ul><ul><li>gPHPedit – open source PHP editor under Linux </li></ul><ul><li>Firefox Webdeveloper extension – add on toolbar (indispensable) </li></ul><ul><li>OpenOffice.org – word processor for the design document and spreadsheet for numeric modelling </li></ul><ul><li>MediaWiki – the software behind Wikipedia </li></ul>
    26. 26. PHP Based Web Games What's come before? <ul><li>Neopets - http://www.neopets.com </li></ul><ul><li>Legend of the Green Dragon - http://www.lotgd.net/ </li></ul><ul><li>phpRPG - http://www.phprpg.org/ </li></ul><ul><li>Quantum Star SE - http://www.quantum-star.com/ </li></ul><ul><li>BlackNova Traders - http://www.blacknova.net/ </li></ul><ul><li>Among many others... </li></ul>
    27. 27. Motivations Why do I do it? <ul><li>It's a hobby for me </li></ul><ul><li>It makes me some money </li></ul><ul><li>I learn things applicable to “real world” tasks </li></ul><ul><li>I've got bragging rights – sometimes ducking and running rights </li></ul><ul><li>I'm a gamer and I get frustrated with what's available sometimes </li></ul><ul><li>It looks good on a resume </li></ul><ul><li>Your mileage will hopefully vary. </li></ul>
    28. 28. In Conclusion I'm here all week, try the roast – it's delish! Thanks for listening! Time for questions and possibly answers!

    ×