Monthly Archives: December 2006

Astrum Futura Update

It seems development on Astrum Futura has kicked off again as the lead developer fixes defects bought by the Zend Framework. My commitment on Astrum Futura will have to wait until I’m finished with my commitment to the path finding classes. I still have unfinished work on the Installer and News feature that I want to get back to. If I started work on the Astrum Futura game engine, I’ll probably won’t get back to the Quantum Game Library for some time.

I quite like it in the confides of the Quantum Game Library. It is fun with the unit tests and the coding and the revising the API to where it is bigger and better than before. All good things must come to an end and I should be working on the game along side the lead developers to finish it in a timely manner. I’ll be more interested in development when the Map features are finished and usable. The installer should also be somewhat of a help for testing purposes leading up to the final release.

So to paraphrase:

  1. Finish Path Finding algorithms.
  2. Work on Installer and finish it.
  3. Finish the News feature.
  4. Start Admin Panel.

Forum has been dead, except for a few spurts here and there. It has to be with the holiday, but the initial interest phase might have faded. It is hard to keep an audience when there is hardly anything to show. Anything and everything is possible at this point, but it won’t be for sure until development starts to pick up on the main game features that true feedback will start flowing in.

If the user is able to test the game out, then they’ll be more likely to give feedback. Not for sure, but it is something I would do. I think that the Installer will help with that, but the Installer will hardly be maintained after the initial phase and it falling behind will likely mean that it will often break. I’ll be sure it works for public releases, but beyond that, it is anyones guess.

Pathfinding Update

I’m about to commit a major update to the Path finding AI component. It should almost complete the Dijkstra component, which will help with the A* component. Besides testing, which might hamper my spirits if said update doesn’t help, but it is going in the right direction.

It also means that I won’t be far behind on working on the Astrum Futura game engine again.

Possibly Related Posts:


I want 22″ LCD Monitor

I was thinking about buying a 19″ LCD monitor, but after some thinking, I figured I should spend a little bit more. Not so much for the games as for the programming and surfing. I was thinking about it for some time. I think I can justify the price, an extra 200 USD, because it will be a one time and four year (or more) investment.

It would be neat to have a monitor bigger than my current tv right now. When Vista comes out, I would like to use the Sidebar without taking up too much monitor space.

The price, a whopping, heart splitting 400 USD! Sure, it is 200 USD more than another monitor (19″) that I had my sights on. However, after Christmas and sometime in January after I finish paying off my bills, I should have the money to pay for it. It will put off my building a new computer, however if I don’t get these PC components before I start building, then it will be another few years before I would feel like paying the expense for it.

The next purchase will be for a 3-in-1 printer-scanner-fax, a laser color printer, and a 8MP digital camera. I’m still planning on having my computer by the summer, however in the past I have focused too much on the computer and not on other components. Spending a lot of the computer kinds of means nothing when it becomes difficult to do or use other things. My printer is currently not working, but I can get a 3-in-1 for less than 100 USD, so my wish list will eventually go down.

*Update* I expect to have the money in about two weeks. I’m going to pay it using my credit cards and I need to pay them off first. It will take another two weeks to pay one off, which is the one I’m going to use and the other one should only take a single paycheck, so in another month. So in two weeks, I’ll have a really big ass monitor.

Possibly Related Posts:


Quantum State

It is a play on words, you see. It isn’t actually a quantum state as in quantum physics, but as in the Quantum Game Library state machine class Quantum_State. I was reading about state machines and how developers build libraries to make it easier to test, I was thinking of doing something similar for the QGL. It could also help with the Fuzzy Logic part of the AI library.

There are such things as Fuzzy States and I could either extend the Quantum_State or use its functionality to be used with the Fuzzy Logic part.

Pathfinding Update

I did some more research of the Dijkstra pathfinding class and I’m really wondering if I should include it. I could finish it, use the code to finish the A* algorithm and then move the pathfinding classes over to the Quantum Namespace. It would remove the Dijkstra pathfinding, but it would make the classes shorter.

Quantum_Path – Ai_Pathfinding_Astar
Quantum_Path_Exception – Ai_Pathfinding_Exception
Quantum_Path_Heuristic_Interface – Ai_Pathfinding_Astar_Interface
…and so on

What I have so far for the Dijkstra will be massively slow and really inefficient. Plus, it should only find one end point and not multiples like I had wanted. I believe that the Pathfinding will be due for another major overhaul before the end of this month (depending on exactly how much more work I put into the Dijkstra classes before I work on another Quantum Game Library component).

Possibly Related Posts:


Writing a PHP Compiler

My goal as a side project is to write a PHP compiler that first compiles the code to Opcode/Bytecode, then the user uploads the compiled code to be run by the interpreter. This also allows for true JIT to be supported, which means that the opcode can be compiled to Assembly and object code, which runs faster.

There are some disadvantages to this:

  1. Would have to be installed either along side the official PHP or instead of.
  2. Would either have to support the same PHP macros as the official PHP or rewrite the extensions for the new compiler.
  3. Wouldn’t be accepted by any member of the community.

Still, it would be fun.

Reasoning

Kind of a oxymoron.

I need to relearn C++ and what better way then a really complicated subject. It would help with understanding how the official PHP compiler and language works so that I can work with that later on. What better way to understand a subject then get down and dirty with it?

The compiler I build won’t exactly be up to stuff with the official one. Truthfully, it wouldn’t even be in the same league. I’m not saying I can create something better, I’m just saying I want to give it a shot at doing something to open discussion at how PHP can be better.

There are a lot of highly intelligent and talented people working on PHP and working with PHP. I just want to see how well I can create something and learn the ins and outs of that something. I just believe that PHP would survive longer and with adding new features like namespaces if work was done at compile time with having all of the time available to it. Unlike right now where it has to compile quickly so that it can interpret the results.

Roadmap

The development will start sometime in January or February and I hope to have something before school starts in the Fall of 2007.

Possibly Related Posts:


Chaos Region: an Absidon RPG

Chaos Region is just the code name, it won’t do any good to register the domain name in hopes that I’ll pay out the ass later.

What it is

I have material for a story based RPG for quite some time and this project should help expand on the ideas I’ve had so far. The original intention was to make this a book, but I figure it would make an excellent game (if done right) also. My notes has quite a few areas where I can place the player in. I think I’ll be creating multiple game “servers” for different time lines.

The game will depend on the Astrum Futura game engine, but I don’t have any plans to start this anytime before the Mecha Asylum, Heat of the Race, and Battle Machines projects are finished. The reason for this is by the time those games are finished, I would have gained the skills required to complete this project in the best matter possible. So I don’t see it started before any time in 2008. It is however one of the final projects I’ll have before I just continue improving the current games.

Battle System

The battle system has already been planned and thought out. There will be warrior based and mage based classes for which the player can choose. However, It will depend on what attacks the player chooses. If they battle more with weapons, they will have more attack based skills available on level up. If they attack more with spells, then more spells will be made available.

In this way, there will be five (5) Magic Orders and three -mancy classes. There will be restrictions on what the player can join, so the choice has to be made carefully. A player can join only one Magic Order and can join either Geomancy or Necromancy classes. If a player joins Neomancy, then the player can’t join any of the Magic Orders and vise versa.

Each of the Magic Orders and -mancy classes will have strengths and weaknesses, as well as unique spell sets. Some Magic Orders are predisposed to attacking other Magic Orders and others are either neutral or have an mutual understanding of the other Order.

Player and NPC Interaction

I want the player to interact with other players, join guilds and clans, attack, or temporary ally for missions, and so on. I also want the player to interact with NPCs to get missions, get mission items, and other stuff found in 2D based RPGs. Whether or not there will be movement in the map is still undecided, I’ll have to be sure I have that knowledge and prototype (in Astrum Futura) beforehand.

Castle Building

I think this would be interesting, but I doubt it will be part of the game. I want the focus to be on story and missions, but this would be a good feature to have for clans who want to build some place they can store their gold and weapons or trade them. It could also provide protection against enemies (or allow spies to enter and rob them), since it will be located out in the wilderness.

Mission and Story Based

The hardest part is keeping to the timeline of the players’ actions. It shouldn’t be too difficult since the missions would allow me to know what should have happened before hand. However it is more towards the individual player timeline. If the player completed a mission in the previous timeline then it would be referenced in the future one.

Some of the timelines will be mostly war based, the Magic Orders battling the other Magic Orders. Wars against Necromancy and the Magic Orders. It also includes wars of the Magic Orders against Neomancy. The battles will be recorded and kept for future reference in later timelines. The history will depend on the players, which should make the game somewhat different.

Possibly Related Posts:


Adding Look Up Tables

At the cost of memory overhead, it is useful to have a look up table to save time. The solution came from having a search method that would look up to see if the element existed each time. With all of the times I would be calling the search method, it made sense to create a look up table.

The Search method before the look up table used a while loop to iterate through the elements and tried to find the correct one to return. It became apparent that I would of had to use this search method more than I would like to continuously search through the entire array each time I wanted to position. That and this search method only returned the node and I would sometimes need the index (which would be easy to add, since the internal container is an array and the key would be the index).

    public function search($x, $y, $z = 0)
    {

        $this->rewind();

        while($this->valid())
        {
            $cur = $this->current();

            // Check that the x value is the same. Quicker to check the x pos
            // first and continue then to check all values at the same time.
            if(!($cur['x'] === $x))
            {
                $this->next();
                continue; // Possible Bug
            }

            if(!($cur['y'] === $y) && !($cur['z'] === $z))
            {
                $this->next();
                continue; // Possible Bug
            }

            // If all checks pass then current be returned ending the loop.
            return $cur;
        }

        return false;

    }

After all of that, I would have to create unit tests to make sure that if the x position didn’t exist, that it continued without testing for the y and z positions. Failing that, I would have to use another method to repeat. I however was able to reduce the search method to the following efficient and speedy code.

    public function search($x, $y, $z = 0)
    {
        if($this->_searchCoordIndex($x, $y, $z) === true)
        {
            $index = $this->_coordsIndex[$x][$y][$z];
            return $this->_coords[$index];
        }
    }

The look up table prototype:

class Quantum_Coordinate_Array
    implements SeekableIterator, Countable
{
    /**
     * Keep a look up table of the coordinate indexes.
     */
    protected $_coordsIndex = array();

    public function search($x, $y, $z = 0);

    protected function _setCoordIndex($index, $x, $y, $z = 0)
    {
        $this->_coordsIndex[$x][$y][$z] = $index;
    }

    protected function _existsCoordIndex($x, $y, $z = 0)
    {
        if(isset($this->_coordsIndex[$x][$y][$z]) && $this->_coordsIndex[$x][$y][$z] != null)
        {
            return true;
        }
        return false;
    }

    protected function _searchCoordIndex($x, $y, $z = 0)
    {
        if(!array_key_exists($x, $this->_coordsIndex))
        {
            return false; // X key does not exist
        }
        else // X key exists
        {
            if(!array_key_exists($y, $this->_coordsIndex[$x]))
            {
                return false; // Y key does not exist
            }
            else // Y key exists
            {
                if(!array_key_exists($z, $this->_coordsIndex[$x][$y]))
                {
                    return false; // Z key does not exist
                }

                return true; // All key exists
            }
        }
    }

}

Apparently also, the _existsCoordIndex and _searchCoordIndex do exactly the same thing, except the logic for the _existsCoordIndex is quicker. The _searchCoordIndex would have to be unit tested, but it would be more accurate than _existsCoordIndex (if it is needed and desired).

Possibly Related Posts:


After Pathfinding Completion

I’m really gearing up to the completion of the path finding Dijkstra class. The progress is really slow and on the way I’m refactoring other components that will help me out. There other problems dealing with the language that kind of hinder my progress.

  1. I’m trying to wrap my mind of how to deal with backtracking and getting the other nodes. It will take some testing and trying to correctly get those paths. There will be other problems to solve after that, but it is something that has been holding me back.
  2. I’ll have to traverse the new coordinate array and try to follow the path of lowest fitness. It would be more efficient to do it all the first time, but I need to split the two parts, so that it is easier for me to comprehend.

I’m pretty much holding back on the Astrum Futura News feature and the Astrum Futura Installer until this is done. I’m close enough that I don’t think it will take that much more time to complete the path finding algorithms.

Possibly Related Posts:


Licensing Woes and “I don’t need Open Source”

*Updated* I rewrote most parts for clarity.

Sigh.

I had a recent discussion about using Astrum Futura for Battle Machines and Earth 3045 with the lead developers of the projects. It did not turn out as I had expected. Really it boils down to that the original developers don’t want to have their product open source and available for free download. It isn’t in my power to persuade the developer of Robotechnik (aka Battle Machines) to switch over to open source. The lead developer already has a team of developers for it, so there isn’t anything right now that I can offer.

The conclusion of both conversations was mostly what is in the title, “I don’t need Open Source.” I won’t be able to change their minds, so for now I would have to remove both games from the planned rewrite over to the Astrum Futura engine. My priorities for next year will be changed because of this.

I am perfectly fine with writing open source software and content with working on the Quantum Game Library and Astrum Futura. Both projects are actually something that I enjoy.

Earth 3045

The plan for Earth 3045 has always been to salvage the parts that are usable and scrap everything else. Mostly the only things that will remain are the general ideas of the game. I also had planned on adding my own ideas in the mix to make it a little bit more unique. There is a reason for changing the gameplay and I will get into that.

When I was told of the idea, I was excited because I had never heard of such an idea. I should have done my research, because a game exists similar to the design of the game. Earth 3045 even has a similar name. I wasn’t happy, but I had already set motions into what Earth 3045 could become and decided not to end the project.

The general basis that you are a member of society and work in that society will stay. I had already developed a prototype for job based game play and thought I could put it to use in this game. I still plan to do that and add some AI in the mix to allow people to decide how well the player is doing.

One of the primary reasons for using Astrum Futura for this project is the navigation and mapping that Pádraic Brady is coding. The thought of doing all of this myself probably would have set the game back a year or so from other coding priorities. The Quantum Game Library will also have components that will make coding games easier. Perhaps the hardest part is the math and already the QGL is strong in that field (for the mapping).

The reason for allowing the coder to continue is to allow him to learn how to program so that he would be able to help once the new system is up and running. I think he will be okay with the changes if the game is better than what he currently has finished. It would also be good to move him away from the Gamer’s Fusion style of coding to a better separation of business logic and presentation layer.

The current engine for Battle Machines and Earth 3045 would require you to rewrite the page, including the HTML to add a new feature. Everything is bunched together and I often worry about security, because I doubt any filtering is done in Earth 3045. The legality of Robowarz (the game built off Gamer’s Fusion) is murky, since technically it should of had its source open and downloadable. The history is also kind of vague but the copyright was all but removed from all pages, except one. This kind of mistake, whether intentional or not will not be repeated.

The lead coder says that all of Earth 3045 is his, but I can tell that it has similar file names to Robowarz, which technically holds the GPL license of Gamer’s Fusion. I would rather be sure that the game is legal and use something else. The Astrum Futura engine would be a good candidate since it has most features that I want. It would also be quicker to add new features, which is one of the leads reasons for not open sourcing.

I’m pretty sure that when the lead sees the final product of Astrum Futura, he will want to use it.

Battle Machines

I may end up losing Battle Machines. Honestly, I would hate to see it go. There can be no compromise, either the lead wants to use Astrum Futura or he doesn’t. If he doesn’t, then no big deal, I’ll still support Battle Machines, since it is a good game. I would rather it move from its current coding style to something a little bit more maintainable.

The Battle Machines is a good game and could become more popular than it is now if it had the right set of features for it. I would have liked to worked on it to give it that push to where it is fun and has better features. However, I don’t want to work with the current code base and had plan on rewriting it.

The idea of making a closed sourced library to use with Astrum Futura would violate the GPL and wouldn’t be workable. I do plan on writing my own code that allows for similar features of Battle Machines, but in doing so, I may break Robotechnik away from Battle Machines. If that happens then there would be two similar games, but like Earth 3045, I hope the lead sees how much better Astrum Futura engine will be over the current one.

The owner has the option of moving or removing it from Absidon. Most of the Absidon support for it is domain and hosting, which costs next to nothing. The owner already has a group of developers which help on the source, so he doesn’t need the help of the Astrum Futura developers or mine. The decision and option is up to the owner of Robotechnik.

Money Model

The developers think that they can make a game and people will want to pay for it. Doesn’t really work that way. The games that do make money had a lot of work put into it, more than the short development cycles that the Absidon games have had.

The license of Astrum Futura does not allow for admins to accept donations for rewards. An admin can accept donations, yes, but it can’t have any reward for the player doing so. Both games give rewards for donations, which I don’t agree with anyway, because the rewards aren’t worth the payment. I thought of removing that anyway.

Using Astrum Futura will remove any thought of extended premium features, but any modifications to the source has to go back to the repository unless it is a plugin. Any plugin has to be available free and open for people to use it. I think it is a better model that way, since other developers are bound to create really neat and awesome plugins later.

Their hope is that the work will eventually pay off and piles of money would flow in. I haven’t really the heart to tell them that this dream wouldn’t come to past until they really offered something in return. Popular games are popular because they are fun first. The whole concept of making a game to make money first doesn’t really suit well on the online browser world. If you have an excellent product consisting of 10 developer and a million dollar budget then you might be able to come away with some money.

In the Future Perhaps?

I just left it at when Astrum Futura is finished, that hopefully it will kick so much more ass off of the current feature set that Earth 3045 and Robotechnik has, that they would agree to sell their souls to touch upon the greatness that is Astrum Futura.

Possibly Related Posts:


Astrum Futura: Installer

Development has started on the Installer for Astrum Futura. It should be noted however that the installer won’t be finished until the game is. It is just something to help me get the game working without to much manual modifications. It won’t remove all manual work and will most likely fall behind on future development, but starting it now should at least push the release forward.

I was able to get a WAMP installation working with XDebug and some other helpful extensions. I work visually, so it should help with any future development I do for the Astrum Futura game. It is also help getting to know the Astrum Futura core and the Quantum Game Library components, besides the components I’m working on.

Other Game Components

I’m planning on working on other game features/components over the next few months. It is nice to not have the weight of an entire game engine project. It leaves me time to do other features that are useful in any applications and work on them for Astrum Futura. I doubt I’ll be the only one working them after I start them, but finishing most of work allows others to see where I’m heading and help out.

Modification System

The game needs to be more developed before I can start this. The admin system at least needs to be workable and able to add new components to it.

Modifications shouldn’t modify to much the core system. All game features should allow plugins to hook into and modify or filter its system. New unofficial feature Mods not part of the core don’t have to follow this system, but would help. Unofficial mods that add new features have to have some way to add their functionality, either to the menu so they follow this convention.

The ability to add plugins will depend on the coders who created the code for it. A plugin system would have to be created for each game component for which a mod can be created. If a game component doesn’t have a plugin system then no mod can be made for it that wouldn’t need to be committed to the trunk of the game system.

News Feature

This feature will allow the admin to post changes to the game and receive comments on the news item. It is going to be part of the core and something that games have. I’m thinking of doing things a little bit differently for this feature.

In the old news feature, you only had a SQL based system. I would like to add an RSS feed enhancement to the news feature, which also tracks the comment feed. In this way, the news won’t be bound by the SQL and could get content from outside sources.

The reason for this is that there are better packages out there for handling News Feeds and I don’t want this to just be another blog source. Most developers will get better admin features from other packages that should be located elsewhere. Duplicating those features will have to be made in some parts to make the news feature work. However, it won’t be WordPress or S9Y, and it would still be advised that the admin use those sources.

Help/Faq System

I was thinking about including this feature, but I think wikis and other sources would be better for the user to use. The primary focus should be the game and its development. Even the news feature is kind of outside the scope of the project. As good as media wiki is for setting up help systems and faq packages are for their content, it would be better to use them instead.

Some would question not integrating the systems, but I really don’t think they have used Wikis before. The idea behind Astrum Futura is to reuse old libraries and sources. Recreating the wheel takes away time and resources for better features that could instead be added, like AI development.

Possibly Related Posts:


AI in Astrum Futura and QSL

It should be noted that AI in Astrum Futura, except for Pathfinding (A*), will be experimental. Even A* implementation should be considered, when finished, as a work in progress. The reasoning behind this adoption and development is to start the path to better AI in browser games. The beginning will be sort of ad-hoc at the start, but the long term goal is to eventually bring the AI components out of experimental status.

Pathfinding

The goal of the pathfinding is to calculate the distance between one point to another better than other games. In most games, you wouldn’t go straight through a blackhole or through a mountain. In 3D games, in space, you could over or below a blackhole, but in 2D space, going around is similar distance. Also, you would go around enemy territory and that would also cost in terms of distance.

It is the long way of giving accurate distance that couldn’t be determined by a set calculation that the user can make. It would make it interesting to say the least for how long it would take to reach a point, given that traveling is in real-time and not instant time like in some games.

The pathfinding can also be used for AI to search for resources like any other player. For sprites, it would give a realistic path for monsters in a RPG type game, given that the path is given to the sprite using JavaScript and moved using JavaScript. While, completely difficult to say the least, it would make such things possible for the developer without having to use cheap or hackish tricks.

Fuzzy Logic

The fuzzy logic class library will be a port of the C++ Free Fuzzy Logic Library. It would probably be easier to just write a PHP extension, using the library instead. However, the PHP port won’t make the game admin have a custom install of PHP. Enhancements will need to be made to allow for some Fuzzy logic ‘OR’, which the original does not include.

It should also speed up the initial development of the Fuzzy Logic to be used in the game in some areas. The library allows for the logic to be separated in a file (.fcl), in which would simplify that of defining the logic elements. Instead of working with PHP, they would only need to work with the file, which means working with what would only be defined as a new language. Documentation would have to be written for how to use the language and the API.

In the future, I would like to define the Fuzzy Logic as PHP objects or as such having a complete PHP implementation, but still allow the use of the FCL file.

Neural Network and Genetics

Details of this will come later, it is unlikely they will be used in the first version of the Astrum Futura game. However, I have plans for using these AI in a few of the Absidon games (Earth 3045 and Mecha Asylum). The development of these AI will most likely be slow and drawn out. There are other implementations out there for which to use as an reference or to extend for use in the Quantum Star Library (QSL). The exact details will be worked out later.

Why have AI available

If the AI library is available, then mod developers can take advantage of it, if they please. Most of the AI used in the game will be mostly in mods, which is okay. It is more likely to be used if it is available than if developers have to create it themselves. I would rather have Mod developers use the AI API for creating really cool features.

PHP Extension

It would be worth turning the QSL into a PHP extension at some point in the future when the game is nearing completion. The speed boost would be worth having in the game, especially for the AI API parts which would save some cycles. Given objects are slower than procedural code in PHP, it would be better to have the objects already compiled in C++.

The PHP Extension would be for those who are able to compile PHP. The speed increase should be noticeable, even with caching.

Possibly Related Posts: