background preloader

30 game scripts you can write in PHP, Part 1: Creating 10 fundamental scripts

30 game scripts you can write in PHP, Part 1: Creating 10 fundamental scripts
Getting started As both a game master/storyteller and a developer, I frequently find myself writing little utilities and scripts to help me when running, planning, and playing games. Sometimes I need a quick idea. Other times, I just need a whole pile of names for Non-Player Characters (NPCs). Occasionally, I need to geek out on numbers, work out some odds, or integrate some word puzzles into a game. Many of these tasks become more manageable with a little bit of script work ahead of time. This article will explore 10 fundamental scripts that can be used in various types of games. We will blaze through these scripts pretty quickly. Back to top A basic die roller Many games and game systems need dice. In many cases, that would be more or less fine. Listing 1. function roll () { return mt_rand(1,6); } echo roll(); Then we can pass the type of die we want to roll as a parameter to the function. Listing 2. Random name generator Listing 3. Listing 4. Listing 5. Scenario generator Listing 6. Summary

http://www.ibm.com/developerworks/library/os-php-gamescripts1/index.html

Related:  Web Design

108 Best Photoshop Web Designs Layout Tutorials Posted in Interface design,layouts,Games, Photoshop Tutorials. Tagged with layouts. 1 comment The 10 Most Ridiculously Awesome Geeky Computer Pranks Everybody loves a good prank… unless you are the one on the receiving end of the fun. It’s time to hone your pranking skills, not just to make sure you are the best, but so you can avoid being pranked by others. Yeah, sure, we could go with the old standards, like a blue screen of death screensaver or something like that, but it’s time to use our geek skills and come up with something better. We’ll cover some of the old favorites too, but maybe with a twist. Note: Many of these pranks require being able to access somebody’s computer physically, and many others require them to leave their PC logged in and unattended. You’ll have to plan accordingly.

Introduction Next: Simple Substitution Ciphers Up: crypto Previous: crypto The goal of cryptography is to make it possible for two people to exchange a message in such a way that other people cannot understand the message. There is no end to the number of ways this can be done, but here we will be concerned with methods of altering the text in such a way that the recipient can undo the alteration and discover the original text. The original text is usually called ``cleartext'' and the encoded or altered text is called ``ciphertext''. The conversion from cleartext to ciphertext is called ``encoding'' or ``enciphering'', and the opposite operation is called ``decoding'' or ``deciphering''. If you are trying to read a secret message that was not intended for you and you initially don't know the encoding method, it is called ``cracking'' the code.

Extreme Programming Rules Planning User stories are written. Release planning creates the release schedule. Game From Scratch C++ Edition! Want to create a game using C++ and SFML? This is the perfect place to start! This tutorial series will follow the creation of a simple game in C++ from the very beginning till the end, a micro-version of the overall purpose of this site. Professional PHP Web Design It’s not only imperative to echo the vision and strategy of an enterprise through its website but, it is equally important to engage your potential customers and partners into conversation. Such effectual website can be developed using PHP! What is PHP? PHP is a widely used open source scripting language especially suited for web development and can be embedded into HTML.

Check your PHP code at every level with unit tests It's 3 a.m. Do you know if your code is still working? Web applications run 24x7, and wondering whether my application is still running has kept me up at night. Unit testing has helped me gain significant confidence in my code -- and get a good night's sleep. Unit tests are a framework for writing tests on code and running those tests automatically.

The Top 10 Web Design Skills You WILL Need! Here are my top 10 web design skills that you WILL need to master to become an effective web designer. If you’re serious about mastering web design and marketing, check out the Pro Web Design Alliance. See how Jordan benefited from the course forum and Google hangout sessions to make his and his clients’ sites better. Optimizing C and C++ Code Embedded software often runs on processors with limited computation power, thus optimizing the code becomes a necessity. In this article we will explore the following optimization techniques for C and C++ code developed for Real-time and Embedded Systems. Many techniques discussed here have roots in the material we covered in the articles dealing with C to Assembly translation.

A Quick, Painless Tutorial on the Python Language Norman Matloff University of California, Davis June 17, 2008 ©2003-2008, N.

Related:  Program/Game designTo CreatePHPMeComputingPHP SpecificEducational