counter
Currently browsing php


Articles on php

PHP AJAX CHAT updates text run-off problem

Tags: , , — Hawk on May 13, 2008 at 6:06 am

As one of my audience so nicely pointed out we have a text run-over problem.  These are generally easy to fix, I tend to use a three prong approach.  For me I felt 30 characters was a good length.

First run

ALTER TABLE `chatbox` CHANGE `message` `message` VARCHAR( 30 )

This will fix it at the database level, but we don’t want it to even get that far so next we change the maxlength of the input. (more…)

PHP Pentago, Determine Winner, Win State algorithm

Tags: , , — Hawk on May 11, 2008 at 4:36 am

Pentago is a great strategy game and certainly fun to play. Basically it’s played on a 6×6 grid that is made up of 4 3×3 quadrants that can rotate once after each turn. The idea behind the game is to get five marbles in a row. Building an interface should be fun but for those just interested in the algorithm to determine a win state for Pentago in php.

(more…)


PHP Strategy Game BattleNow (a few updates)

Tags: , , , — Hawk on May 8, 2008 at 5:05 am

Battle now is going to be our first attempt at a strategy style game.   After today we have developed a simple tile system.   Here is some of the code below.

For you who haven’t heard or forgotten, Battlenow is going to serve at the base level for a open source battle simulator.   The plan is to have Generals with various rank, movement, intelligence, charm, war.  There is also going to be hopefully some various weapon or military classes such as arterial (probably catapults), mounted units (probably rangers) and foot units (probably knights).

Turn based php game is what we will be shooting for, however it’s going to have the initiative system much like the older final fantasy tactics.  You will have a queue and depending on your wait time will determine when your general will have his turn.

Forts, Castles, and different terrain all over different stats such as defense and movement.    There is plans between levels to have a down/upgrade time for the next battle as well as in-game upgrades.   Some code is below.

(more…)

bbPress Forum, please help bring the community

Tags: , , , — Hawk on May 5, 2008 at 8:56 am

Hello all, the past two days I spent building a wordpress -> bbPress forum.   Our new forums currently has the following topics

Those are just the introductory forums I imagine in the future we may add more, and we would love to hear from you.  Please come over to the hawk enterprises forums

The best news is all 3,000+ of you here will get to use your wordpress accounts to use bbPress.  I hope you all enjoy.


Page 1 of 612345»...Last »