background preloader

Computer stuff

Facebook Twitter

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. 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. Function roll ($sides) { return mt_rand(1,$sides); } echo roll(6); // roll a six-sided die echo roll(10); // roll a ten-sided die echo roll(20); // roll a twenty-sided die Summary. 40 Online Generators for Web Designers Should Bookmark. Online Generators for Web Designers can be a great way to save time in your web design projects. High-quality generators can create graphics or code or even layouts in a matter of seconds or minutes, things that might take an hour or more if done by hand. Online generator are those tools that help us to create those popular “XHTML valid” CSS banners, micro buttons or css website templates in seconds.

In such cases online generators can be of great help which do the necessary job and some tools don’t have to be downloaded also. We all know that backgrounds play a crucial role in a design. Advertisement 1. XML /SWF charts are used to create attractive graphs and charts from XML data, Create a source either manually or generate dynamically then pass it to the XML chart’s flash file. 2. The web form generator from Web Form Factory automatically generates he necessary backend code to tie your form to a database. 3. 4. 256 Pixels 5. 80 x 15 brilliant Button Maker 6. 7. 8. 9. 10. 11. 12. 13. pForm. Web development tips: Ten (or a few more) files every Web site needs. Introduction There are a few standard files that every Web site should really have, but that most neglect.

Most of these are matters of convention, not of technical requirement, but you are doing your site wrong not to provide them. Let users who make a wild guess about what they want to find usually succeed when they guess URLs. This tip discusses each of these standard files briefly. Exactly how a given resource is provided depends on the Web server and Web application layers you use. 404.html When users use your Web site, they will inevitably seek resources that do not exist. A warning when you create a custom 404.html (or whatever mechanism your Web server uses to deliver a custom "not found" message): Far too many Web sites are misconfigured to deliver "soft 404" messages. About.html So why did you create your Web site, anyway?

Contact.html So who are you? Copyright.html To whom does this stuff belong? Obviously, different pages or resources might have different copyright information. All The Cheat Sheets That A Web Developer Needs. Free Online Computer Science and Programming Books, Textbooks, and Lecture Notes :: FreeTechBooks.com.