Blog

Newest Post
Blog Archives
Blog Categories

Portfolio

3D Models
Banners
Brochures
Business Cards
Custom Programming
Environments
Flash Projects
Game Design
Image Altering
Web Design

About

Resume
Recommendation Letters

Contact

May 16, 2008

Update to Dragon Seed

Filed under: DE Games — admin @ 1:49 pm

Well it has been awhile since I updated the blog with how the PHP scripted game is coming along. Since my last post I have created a Ladder system based on experience earned by the character.

Player status! Yes, the player can now check on their status. You can view their current health and mana, equipped magic, and even see their attack dmg, defense, agility, and accuracy. This page will eventually serve as a profile page for each character.

Equip page. Players can now equip magics they have acquired by equipping the orbs. They can also equip different weapons, armors, and shields.

Inventory. Inventory has been created and players can view all the items they are carrying. They can also use select items such as mana potions and health potions.

Magic rollovers. You can now roll over magic spells to view their mana cost, dmg, and description.

A beta version will be available to test soon!

March 25, 2008

MYSQL JOINS

Filed under: PHP — admin @ 6:07 am

MYSQL Joins are confusing, to say the least. I was successfully able to do one a few different ways and thought it be best to write down how I did it so I can do it in the future.

What I had was two different tables. One table was xcart_products_categories which stores all “productid” and matches them with which category they go to “categoryid”. The other table which was xcart_products had the “productid” and all of its information.

So if you are wanting to list all of the products from a certain category only, which I needed to list all the charms in the charms category (#344), you would need to use a MYSQL join.

Here is how I did it:

View Code MYSQL
SELECT xcart_products.*, xcart_products_categories.*
FROM xcart_products_categories 
LEFT JOIN xcart_products ON xcart_products_categories.productid = xcart_products.productid  
WHERE xcart_products_categories.categoryid='344'

There is a reason I did a LEFT JOIN. If I did a regular JOIN or an INNER JOIN then I would only get the products from “xcart_products” that matched on the categoryid, but I even wanted the ones that may have had a blank productid just in case I was retarded and forgot to mark one.

JOIN three tables

Now I needed to join three tables. The actual price of the product was in a third table called “xcart_pricing”. Here is how I joined all three tables.

View Code MYSQL
SELECT xcart_products.*, xcart_products_categories.*, xcart_pricing.price
FROM (xcart_products_categories LEFT JOIN xcart_products ON xcart_products_categories.productid = xcart_products.productid)
INNER JOIN xcart_pricing ON xcart_products.productid = xcart_pricing.productid 
WHERE xcart_products_categories.categoryid='344'

I did a standard INNER JOIN for the pricing table because I only needed the ones with for the productid that matched in both tables. I didn’t need any extras.

March 19, 2008

Update a mysql database and retain special characters

Filed under: PHP — admin @ 10:33 am

To update a mysql database and retain special characters such as possessiveness, or if you are updating a database where you field contains any special characters you will need to use the “addslashes” function to your mysql statement.

$updateSQL = sprintf("UPDATE db_table SET db_field=%s WHERE db_row='".addslashes($title)."'",
GetSQLValueString($value, "text"));

February 22, 2008

Reset a php Recordset

Filed under: PHP — admin @ 4:34 pm

When you run a recordset through a loop, you will not be able to re-run the recordset further down in the same page. Here is how to reset the recordset so you can use it again on the same page. Just place this code after your loop. Change the “$Recordset” to your recordset’s variable.

if (mysql_num_rows($Recordset) > 0)  {
mysql_data_seek($Recordset, 0);
$row_Recordset = mysql_fetch_assoc($Recordset);
}

February 7, 2008

Digital Epiphany’s Website Builder

Filed under: General — admin @ 12:08 pm

I am currently developing a website build that anyone will be able to use. You will be able to develop a site just like mine here. It is currently in the works and is being worked on in whatever free time I may have. Time is hard to come by though for I am working on school projects and working 65~70 hours a week.

With the builder you will be able to create your own webpages, adjust the position, backgrounds, font colors, menus, and well… just about anything else.

I’ll keep posting the updates.

Rich Black or True Black with Adobe Illustrator

Filed under: General — admin @ 12:04 pm

If you have ever had problems getting a nice deep black with Adobe Illustrator, you’re not the only one. When generating pdfs if you have your standard black color set to #000000 your black may come off a little different than expected, it will loose its richness and not be true black.

To get a true rich black in Adobe Illustrator, use the following:

Cyan: 50
Magenta: 40
Yellow: 40
Black: 100

The same color stands true for anything meant for print, weather it is in InDesign, Photoshop, Illustrator, or Quark. If you need that deep, rich black, you need to us the above CMYK color. Do not use 100% Black as this will give you undesired results.

See the comparison below:
Comparison of Rich Black and 100% Black

December 21, 2007

Casting Magic

Filed under: DE Games — admin @ 11:43 am

I have now added the ability for the user to cast magic for battle. Instead of attacking they can click on their equipped magic they wish to cast and it will be executed. If they player does not have enough mana to cast it will display a message to the player of “Not enough mana to cast” and they will need to chose a different spell.

There are many different elements that will affect the magic. First of which is a condition. If they character is under any condition which pertains to magic such as “Render Magic” which disables all you magics, you will not be able to cast.

If the player does cast a spell then the proper mana is subtracted and the spell is cast. Depending on the type of magic it is and the element of the creature depends on how much damage it will do. If you cast fire against a fire element, it will deal less damage. If you cast water against a fire element the damage dealt is increased.

Up next I need to program the ability for the player to set conditions on an enemy.

December 12, 2007

Random Fight on Map

Filed under: DE Games — admin @ 11:56 am

I added the ability for random fights to take place while transversing the map. Currently the is a 50% chance that you will get in a fight as you move across the map each time. In the future I will have items that affect this percentage.

December 11, 2007

Integer Values for a MySQL Database

Filed under: DE Games — admin @ 11:52 am

 I can never find these values when I need them so I am going to post them here.

TINYINT = -128 to 127
SMALLINT = -32768 to 32767
MEDIUMINT = -8388608 to 8388607
INT = -2147483648 to 2147483647

December 10, 2007

Character Creation

Filed under: DE Games — admin @ 12:04 pm

I created the ability for people to create characters. This obviously is all important if you want people to play the game. Currently all there is for the character is the User chooses their Hero’s Name and Password. I added a captcha to prevent spam cause god knows it happens EVERYWHERE!

After the person creates a character they will receive 12 Attribute Points to put in any field they choose for their character. This can be changed at any point during the game.

« Previous PageNext Page »
© - Digital Epiphany Designs, Online Portfolio for Web Design, Custom Programming, Grapic Design and Game Design.