I’ve been fixing things with bbgFramework off and on but for the most part have not had time nor have I had the effort to put forth towards the game in the last week or so. Apparently I do seem to have a following of some sort, so I do apologize for the lack of updates. I will, from now on, try to post more often if at least once a week. If I could get some comments on the posts, then the direct feedback could help in this endeavor.
As I continue to work on the in-game Browser, I continue having problems with it. It seems to be doubling itself and reiterating the session, which makes my use of it for a shopping cart for store websites to buy stuff from is at a stand still. As for normal websites that are used for hacking and exploratory information in the game, they are working just fine. As I’ve mentioned before, the domain is in the database and the rest of the URI loads physical files on the server which creates the fictional site. My idea was to create several fake search engines that would help users be able to find specific sites or certain info they need (perhaps to solve a mission or finish a puzzle, etc). Obviously, this adds to the realism of the game and a much appreciated aspect to help in gameplay. Now, for domains a quick search through the database would be as simple as using the LIKE operator and replacing spaces with percent signs (%), but since the bulk of information lies within the physical files, I would also need to do physical searches which are usually much slower and I tend to avoid anything not native to PHP.
So, herein lies the problem… I would first do a database query on the domains to return any information then do a search through each and every physical file to find anything else. The results would be sorted by how closely they match and attempt to be a organic as possible which with separate storing patterns nulls and voids the entire organic part of the equation. PHP is not very helpful when it comes to filesystems, well to a point, but not one I want to attempt to use it for. I could use file_get_contents() for each and every file but that would be a long and strenuous process especially for every user. I could possibly create single flat files for entire sites to search through instead but still kind of silly.
No, unfortunately, it seems the best way to create my fictitious wide web would to have all information in the database. At the moment, I have URL inputs from the user stripped down to domains and then search rest of their URI to retrieve a the specific template file for viewing. Instead I could have each and every part of the site on different rows which has specific site information and places them into an entity array for the template, the root domain row for the site will have a style sheet to load and a certain template to load. This way all the information for the site will be displayed onto some kind of global predefined template and loaded with its own stylesheet, all the images for the site will pulled via the stylesheet as well. That way all the sites will look different but are technically designed the same way.
This does raise another problem for multilingual usage. I have yet to implement anything more than English but the framework does have the ability. If I did use LANG constants for the site info, the search QUERY in the database would pretty much be dead, but then again… most websites out there aren’t even multilingual or, if they are, usually use the country’s respective TLD instead or perhaps another server or a GET that mentions the site should be run in another language. Although, we are starting to see that locale (especially in PHP6) is actually going to start playing a part in web applications but, for the sake of argument, we will put it all in English into the database.
So basically, I will have two tables… one for the domain’s homepages with a primary id, it’s stylesheet, what template it will use and stats for hacking… and another table for each website page with columns for all info the template will use automatically and the id that refers back to the domain row. Each row will also have a Title text.
Wow this post was kind of rambling but hey maybe its what you wanted to hear. Sorry if you couldn’t understand some of it. Next post, I will probably get into the ideas I have for the game and the big picture going on with the game. There are a few people out there that I have gone into great detail with and they love it so stay tuned. You should see a post this Friday.
July 22, 2009 at 2:57 am
Good, maybe we’ll care when you have something to show for all this talking.