by date
Plan for Josiah Wang
Plan for Josiah Wang
| Name: | Josiah Wang | ![]() |
|---|---|---|
| Date Posted: | Jul 23, 2005 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Josiah Wang |
Blog post
Update on my Apocalypse Game Engine
(For those of you who do not know about my current project, Apocalypse Game Engine, check out some of my older .plans, as well as my Dev Blog and SourceForge Project Page)
In my recent .plans, I mentioned I was undertaking the long journey of porting over to ADOdb. Well, last week, after almost 6 months, porting over was finally complete. After some testing however, I found that the code slowed up to at least 700%. Main.php on my 300mhz/400MB RAM server usually took 0.5 seconds to load - after testing, it took a whopping 3.5~3.8 seconds. Clearly something was wrong. So, I looked around, and couldn't really find anything wrong with the ADOdb library (well duh.)
After consulting a fellow programmer/mentor, I looked into my select queries (see includes.php) in my pquery() function. Seeing as how it might be the source of the problem, I created a test page that executed just one query - came out to take 0.1 seconds. That was pretty fricking slow, even on a crappy computer like mine. So, I decided to just make a raw ADOdb call instead of using the pquery - took a total of 0.001 seconds on average. Definately something wrong. After frantically searching around, I finally found the root of ALL evils - I kept on including this one page (used for local configurations). After removing that include statement, main.php took a total of 0.31 seconds to load - LOWER than the original code!
So anyways, next up, I'm planning to finish up on the Rebirth mod. I think that some people have really confused the Rebirth mod being the ACTUAL engine (the Rebirth mod is a web-based strategy game). Couldn't be farther from the truth. Although the Rebirth mod itself is VERY versatile, it's totally different from the original goal of the Apocalypse Game Engine. As I said in my blog, after the Rebirth mod hits the stable mark, we'll start separating it from the core engine - to the client, everything else will still be the same, but for the system admin, it'll be totally organized (inspired by TGE =D). Core functions (including includes.php) will be cleaned up so it's not constrained to Rebirth. Once it's cleaned up, we'll start compiling a library out of hte core functions - the original goal of Apocalypse Game Engine was for even a beginning PHP programmer to be able to write up a game - called AGElib (unless someone has a better nane =P). Before we release teh final product, we'll create a mod using AGElib code exclusively, to show how versatile the code is.
In any case, all that will take up a few months at the least. Organizing the code will probably be the hardest - too bad i didn't comment my code a few years ago.
I'm going to take a nap.
In my recent .plans, I mentioned I was undertaking the long journey of porting over to ADOdb. Well, last week, after almost 6 months, porting over was finally complete. After some testing however, I found that the code slowed up to at least 700%. Main.php on my 300mhz/400MB RAM server usually took 0.5 seconds to load - after testing, it took a whopping 3.5~3.8 seconds. Clearly something was wrong. So, I looked around, and couldn't really find anything wrong with the ADOdb library (well duh.)
After consulting a fellow programmer/mentor, I looked into my select queries (see includes.php) in my pquery() function. Seeing as how it might be the source of the problem, I created a test page that executed just one query - came out to take 0.1 seconds. That was pretty fricking slow, even on a crappy computer like mine. So, I decided to just make a raw ADOdb call instead of using the pquery - took a total of 0.001 seconds on average. Definately something wrong. After frantically searching around, I finally found the root of ALL evils - I kept on including this one page (used for local configurations). After removing that include statement, main.php took a total of 0.31 seconds to load - LOWER than the original code!
So anyways, next up, I'm planning to finish up on the Rebirth mod. I think that some people have really confused the Rebirth mod being the ACTUAL engine (the Rebirth mod is a web-based strategy game). Couldn't be farther from the truth. Although the Rebirth mod itself is VERY versatile, it's totally different from the original goal of the Apocalypse Game Engine. As I said in my blog, after the Rebirth mod hits the stable mark, we'll start separating it from the core engine - to the client, everything else will still be the same, but for the system admin, it'll be totally organized (inspired by TGE =D). Core functions (including includes.php) will be cleaned up so it's not constrained to Rebirth. Once it's cleaned up, we'll start compiling a library out of hte core functions - the original goal of Apocalypse Game Engine was for even a beginning PHP programmer to be able to write up a game - called AGElib (unless someone has a better nane =P). Before we release teh final product, we'll create a mod using AGElib code exclusively, to show how versatile the code is.
In any case, all that will take up a few months at the least. Organizing the code will probably be the hardest - too bad i didn't comment my code a few years ago.
I'm going to take a nap.
Recent Blog Posts
| List: | 01/01/07 - Back from the dead? 09/10/05 - Plan for Josiah Wang 08/21/05 - Plan for Josiah Wang 07/23/05 - Plan for Josiah Wang 06/11/05 - Plan for Josiah Wang 03/04/05 - Plan for Josiah Wang 02/05/05 - Plan for Josiah Wang 01/24/05 - Plan for Josiah Wang |
|---|
Submit your own resources!You must be a member and be logged in to either append comments or rate this resource.



Not Rated


