$category->view('Tutorials');
Posted: Feb 23, 12:51 PM
When doing OOP (object oriented programming) in any language it’s proper form to have your variables be private and provide get functions for each of them. In languages like C# this is really easy and convenient to do because C# makes it easy to do. PHP was not created to use OOP style methods and it isn’t quite as simple to do. So, I’ve created this function make life a lot easier for myself.
Read more >>Posted: Feb 16, 06:15 PM
This is something kinda fun that I just came across, though I haven’t exactly figured out how I want to use it. Essentially it’s creating extremely dynamic variables. I say extreme because it allows you to set the variables name in a variable and the variables class in a variable. It’s a very short script, check it out…
Read more >>Posted: Jan 30, 10:08 AM
If you read my last post about the htmlTagBuilder function, I used a technique of building part of the html tags from a key val array. This is a very useful technique and something else that I had mentioned was how this could be simplified by moving that repetitive code into a function. So, in this post, I’m going to write that function because it’s really quite simple and useful.
Read more >>Posted: Jan 24, 08:16 AM
About this time last year I was learning how to use CakePHP for a job and it took awhile to get used to, but when I finally started getting the hang of it I started to see how powerful some simple PHP functions could be. I don’t use it anymore, but since then I’ve built a collection of classes based on the things that I really liked CakePHP would do. Now when I write PHP apps I use these constantly for outputting html, creating forms, handling post/get data, etc. I was just thinking up a way to combine pretty much all html tags into one function and wanted to share it.
Read more >>Posted: Jan 22, 05:55 AM
Object oriented program is the only way to program as far as I’m concerned and a language as flexible as PHP let’s us do some really cool things. One of those things is created dynamic class members. This is made possible by PHP’s flexible use of key value arrays. Don’t know what I mean by dynamic classes? Let us proceed to some examples.
Read more >>Posted: Sep 28, 12:03 AM
Today while working on an app that I’ll probably be posting up here in the next few days I had need for an actual frame rate counter of which Flash doesn’t seem to provide for us. It was a simple enough task though so I figured no big deal, I’ll just write one myself. It wouldn’t be the first time I’ve done such a thing, just the first time in Actionscript. Then, I decided why not share it with the world! So, here it is with a short explanation in case anyone doesn’t understand how frame rate is calculated.
Read more >>Posted: Aug 28, 02:01 AM
Been busy working on a site for the past few days that I’m hoping to have up in the near future. It’s just a hobbyist style site, hopefully it’ll be useful to some people, who knows. But, while working on it I came to the conclusion that Cookies would be my best way to save some of my data. I didn’t want to go through the effort of having people create user’s so I would have a unique ID for each of them just so I could save some checklists for their things. I also thought it would be easiest for this site if I was in control of all data going into the DB and it was all static, so I decided on Cookies.
Read more >>Posted: Jun 30, 03:04 PM
Enumerations are extremely helpful when it comes to keep data in order, but there’s no set way to figure out the index of something that’s in an enum. So, let’s say for example your loading in a group of 1,000 enemies from a text file and each one has a type that you use to grab their textures (or models) and whatever. Well, we can put their numeric type right in the file, but then if we add a new enemy it would HAVE to go at the end of the list. Part of the beauty of using enum’s is that you can add something anywhere and the numbers will adjust. So, here is a little function I wrote to search through an enum and return the index of whatever you were searching for.
Read more >>Posted: Jun 23, 01:49 PM
Every game requires objects to face other objects and it can be a perplexing problem the first time you tackled it. It’s been awhile now since I first looked into the subject, but I wanted to share my method with the world in hopes of two things. First, that it will help someone out trying to do this and secondly, maybe someone has a better/different way.
Read more >>
