Category Archives: Programming

Game Engine Development and Open Source

I need to remember to do occasional write ups on the development of the game engine for the continuation of the PHP game series that I started years ago. However, I’m stuck relearning OpenGL for OpenGL ES 2.0.

Decision: Open Source

I was debating this internally for a while. Well, the game was always going to be open source, but the decision was whether to charge for the initial product. I’ve decided that the market for the game engine is small, so either I would have to charge a lot and spend a lot on marketing and advertising, or charge a little and hope that the market is a bit bigger than I thought.

My motivation came down to support and lack of market. I believe there are quite a few people who are interested in developing a WebGL game engine web application. I’m kind of hoping that those people gravitate to my project instead of Three.js or another complete product game engine. There are already paid game engines based off of Canvas and WebGL. I’m kind of hoping that if I can get a working product out before the end of the year that I can make something that others probably have already started to develop.

Well, the point is, is that the more people whom are able to support the product and do support the product, the less I have to support. I’m also hoping that smarter people join the project, so that I don’t have to spend months researching and developing prototypes and then ultimately developing something that sucks.

Summary

  • I’m lazy and hope others help out with the project, thus giving me more motivation to commit to the project.
  • Less support I’ll ultimately have to provide for fixing bugs and extending the project with new features outside the scope of my games in development.
  • More people using the project providing marketing and name recognition.
  • Mainly this is an educational project and when you start charging, it stops progressing for learning and starts progressing for money. I hate that type of worry.

Goals

By the end of the year, I plan on meeting or exceeding these goals.

  • 1000 active players a month (shoot for weekly) for Farmer Sim (tentative name).
  • $500 a month in revenue from Farmer Sim game.
  • 3 active developers working on the base game engine. Myself included. I know a few people that might be interested in a working project, but not at this stage.

I think that if I can have the graphics component finished by this Summer, then I should be able to have a playable version of the game by the Fall or Winter. It is my believe that given the scope and playable features I might have in the game that quite a few people will be interested in playing the game. Experience has shown that at least 100 people will sign up for a new game without entirely even knowing what the game is about or if it sounds cool.

Farmer Sim, I believe is an interesting concept that I believe should have a lot of players. Given the almost infinite land scope, it will beat out anything Flash that matches the genre. If implemented correctly and with the features, it is possible to be bigger than anything current on the market. There is a slight problem. The game is not meant to have a lot of players. It will not scale well without a crap-ton of servers. Which is not to say that it is impossible. It is to say that given the start-up status of the game development, I will be unable to afford the hardware that would be able to support 100k active players.

A bit of a problem certainly, however, I think that if I do sell the source for Farmer Sim (or give it away), it is possible to extend the landmass by allowing multiple server instances to combine and create a wider complete landscape. However, the payment system and logistics for that would be difficult, not the mention the implementation security and cheating problems.

I still do not know the full extent of the storage problem. It might be less than what I fear and in which case the total amount of players could be higher. Also, as the game brings in more money, more and better servers will be possible, extending the capabilities further. Not that the processing power is of significant concern, mainly storage at this point. Storage will always be a problem, given the implementation of the landscape.

However, I’m not concerned with having a 100k active player base. I want no more than 5k active player base. I feel that it is hard to interact with the players and I really do want to interact with a small player base. Also, 100k is unreasonable, the game won’t ever reach that point. My goal should be to allow for 5k players or 10k and limit to 5k just so that everyone is happy and enough land and resources are available for everyone.

The problem will be capturing 500 players with as what might be only a month or two at best case and a few weeks at worse case to reach this goal. It is possible to have a working version in 3 months, if I worked on it every day as if it were a full time job. The problem so far is that I don’t know enough of the graphics component to really haul ass. By the time I get off of work, my mental capacity is spent and it is really difficult to comprehend what I need to comprehend to make it work. Not impossible, just frustrating.

Once the graphics component is moving along, the game graphics will progress quickly and I might just be able to work on it as if it were a full time job (devoting 5 to 6 hours on the weekday). I’m going to set this month to finish the graphics component and have experimental storage and API support. If I can do that, then I’ll have another 3 months to decide between Python and PHP and figure out the umpteen other features. oAuth and OpenID seems to be a hassle to develop, except maybe not as hard as what I think. I believe that once I start working on OpenID and OAuth, I’ll find it is fairly easy and should have a library working in 3 to 4 weeks. Which gives 2 to 3 months working on game features and administration.

My other goal is statistics. I want to sort of be data mining players for the purpose of finding what works, what doesn’t work. I like statistics and sort of get into UI and play testing. I would love to develop reports on how many players have multiple accounts and how many people are signing up daily, weekly, monthly. How players develop their farms, cities, strategies that players develop. Exploits that players find. It is all very fascinating. It’ll also be interesting to try out different payment models and see which one works out.

I don’t want to make a lot of money, and I doubt I will anyway. I simply want to see what the difference is between subscription vs in-game cash vs free game and advertising. It’ll also be interesting to see how people respond to other types. Such as a sort of donation model, where once a given number of players have paid a given amount of money for that month, everyone receives premium features. It really depends. I do hope to make some money given the amount of time I’ll be spending and have a little something something left over. It is simply that I don’t want to give myself hope of something that may never happen.

Possibly Related Posts:


Plans for Base CMS

I’ve decided on using Zend Framework version 2. It isn’t yet released, but that shouldn’t be a problem. It also has many of the components I was planning on writing myself in such a way that I was planning on coding. This saves a great deal of time and heartache as I feel the framework is above and beyond my requirements.

My main goal at this point is simply to start programming. If I can overcome that part, then I think January should be a good month to have a lot of work done.

The main part of the base application is to have an administration panel, probably modeled in some part on WordPress administration, a user management, and the main web site. There will be a module based system, but the goal isn’t to have a true CMS where modules would extend the mostly empty application. The goal is to have a base application which can be extended into other applications. The modules would then add additional functionality based around the ‘theme’ of the base application.

I plan on creating two applications extending the base application: Directory and Gaming Engine. I plan on developing this projects concurrently as much as possible. Well, I plan on doing modular coding regardless, so my guess is that if I do this correctly, I should be able to take one piece meant for one application and use it in another application.

The goal of the gaming engine is to build something similar to Minecraft. The voxel engine of Minecraft proves that it is a viable visual 3D platform. The games will not be clones of Minecraft. Actually, one game will be very similar to Sim Farm, Sim City, Stronghold and other such games. I loath to go into more detail until I work out the base game engine and have the visual components working. The final product may end up completely different depending on what I eventually find that I can achieve in a relatively short amount of time.

Regardless, one game will not have any real threat and is primarily market and simulation based. I’ve been wanting to create this game and Minecraft has given me the inspiration on how I can build the visual parts. It has been frustrating in the past, since I didn’t know how to work the game out visual within my ability or lack thereof.

The other game, Mecha Asylum, will provided I am able to create the voxel game engine, be what I intended for the original game in 2004. Similar to the farming simulation, there will be threats and will have enemies.

Having both games very similar in design and a voxel engine to display 3D designs, the development should go fairly quickly. I also want to have a way to create 3D models in game, but most of the ones I create will probably be by code.

The directory will be completely designed around social networks: Google+ and Facebook. Google+ is constantly adding features and the same applies to Facebook. The goal is to provide a portal and then simply use the social networks to store certain data. Authentication and Authorization will be based on Google and, or Facebook sign in. I will eventually to have create a custom authentication based on user and password, but none of the current projects require it. The amount of people who don’t have a Google or Facebook account are fairly small and the numbers are constantly raising. I will eventually add Openid and other third-party authentication, but I figure the big two will work just fine, since well most sites are implementing them too.

I’m going to develop the Directory without ad support in the first version. With the theme support with base application, it shouldn’t be that difficult to add a third-party ad system to the application. Also, whatever solution I create probably won’t be as full-featured as Google, Microsoft or another ad site. Regardless, I think one of the first implementations will be to actually support some of the more popular ad sites.

However, I’m getting ahead of myself. This week, I wish to finish a basic administration panel, an working authentication sign in process using Google and Facebook. A basic profile that pulls from either Google+ and, or Facebook with additional content. That is it. If I can get this working, then I should have motivation to continue next week and start working full time on both the game engine and directory applications, while moving some code back into the base application.

That reminds me, as I develop the game engine code base, I plan on blogging about the process. Some of my most popular posts are the game development posts and it would be interesting to continue the series that I dropped so long ago.

Possibly Related Posts:


Project Plans

Finish HTTP Library

I’ve been putting this off since the last weekend for catching up on TV and movies, plus working late. Given my plans for my week vacation, I need to have the majority of the code completed by Friday and off course, I haven’t worked on it this weekend either. Given that this week is the deadline for the current project for work. I’ll probably have another few nights of working late or arriving early and leaving normally. I prefer the latter. I might take Friday off, given the extra time I’ve been putting in to the project.

Regardless, I’m thinking that this week should give me enough time to at least estimate how much more time is needed to complete the project. If it looks like I can complete the project over next weekend, I’ll attempt to do it. I hope to at least put two hours a day into it this week and attempt up to 5 hours a night if I don’t work late. I believe if I were to do that, the project should be finished this week. Or at least I’ll know how much longer it will take.

Projile

I want to start the Projile project and devote the 8 hours I would be working at work on the project. The rest of the day, if the HTTP project is not finished, could be devoted to the HTTP library. I think given that I’ll both be learning Python, doing research, and testing as I develop that the time will allow me to have the motivation to start and hope get to a point where I’ll continue.

Also I’m back to using Trac as a foundation, but I decided I don’t have to refactor everything and I can work on the controller and model parts separately from the core Trac until I’m ready to convert the rest of the application. Well, basically, it is the same as if I’m creating a new project management application from the ground-up, but it will be less demotivating since I’ll be using Trac as a base.

I’m not sure how far I’ll be able to get given that I’ll be attempting something new with Python development. I’ve mostly written scripts for simple tasks and nothing this big. I’ll probably work on what I wanted to work on last month, which is the installer and plugin model. If I can do both of those, then I’ll be really excited to continue.

Oh, I’m unsure how far I’ll get during the vacation time. Probably not too far, but I plan on putting the project on hold after the vacation or maybe working on it for another week or two depending on how much motivation I have.

Also, both the “Alloy of Law” Mistborn Novel and another book is coming out the 8th of November. I’ll probably spend a day or two reading those as well.

Fuzzy Logic Library

I’ve been wanting to write this library for a long, long time. Almost 3 or 4 years now. I think I’m finally ready to start the throwaway prototype version. It should be near what I’ve been wanting. The goal of which is to make it easy to use and prevent a lot of setup and have some database adapters as well.

I’ll probably attempt Test-Driven Development for the prototype to work out the API and math. The difficult part is really just defuzzifying the results. I had wanted to include debugging, which is simply displaying a graph of how the Fuzzy Logic data and results would look like. I’m unsure if I’ll be able to get to that with my time I’m going to allocate to the project.

I’m allocating 2 weeks to the prototype. I think that will give me enough time to see if the API works with ease of use and if it is usable for defuzzifying the results. I’ll skip inline documentation or at least the phpdoc kind and simply work on the unit tests and code. I figure I’ll be throwing away most of the code anyway, so there isn’t a point writing documentation. Also, if I can get the code running, I can see how well it performs with fuzzy logic results.

Timeline

HTTP Library – October 31 to November 5-6.
Projile – November 6-7 to November 20.
Reading Fantasy Books – November 8 to November 12-14 (Probably 5 to 6 hours a day. Alloy of Law probably will be finished the 8th and will take the entire day.)
Fuzzy Logic Library – November 21 to December 5.
Projile – December 5 to May 2012.

Other Projects

Quickbooks Connect Library

I’ll probably hack this shit together within 3 to 4 weeks and see who wants to test it. I have plans to port the PHP to Python. Actually, it is completely possible this could take 2 weeks.

PHP Database ORM Library

Basically take the CodeIgniter ActiveRecord Library and the DataMapper library extension to CodeIgniter and package it in a standalone library. None of the code from CodeIgniter or DataMapper will be used, but it should be mostly API compatible. Again, probably hack a version together in 2 or 3 weeks, writing tests matching the API of CI and DataMapper, then fill in implementation details. If it functions well, I’ll probably simply package it as version 1 after writing inline documentation and user guide.

Search Engine

Port Nutch to D and, or Python and interface with both Sphinx Search and Lucene Solr. Really, simply just a spider that implements a dumb version and a Nutch clone. Shouldn’t take very long and might be something I attempt during my vacation time. Well, the dumb spider and interface with Sphinx and Solr at least; the Nutch port would take considerable more amount of time.

PHP and Python Game / AI Library

Something I’ll probably attempt during the second half of 2012 before I start working on the browser game engine. Might also implement several easier algorithms or at least prototype different Game and AI APIs. Might also take a few breaks from Projile during 2012 to work on Neural Networks and Genetic Algorithms. Graph APIs, Pathfinding and random terrain generation might also be fun.

I’m guessing that some open source browser game engines will exist by 2012 as well. It is possible IE 10 will support WebGL as well. It should be interesting to develop a HTML5 JavaScript library that doesn’t require backwards compatible code and simply implements workarounds for missing HTML5 technologies. Several of which already exist anyway. I can’t wait to start developing something that I’ve been wanting to do since 2003 and 2004.

Possibly Related Posts:


Calibre Improvements Part 2

The last post went over a lot of improvements for the GUI side, but really, my main concern is with the library backend system. This is most likely the component I’ll work on first, since well, it should be done within a reasonable amount of time and also should have an immediate improvement.

Calibre appears to use a directory structure for managing the library, along with a database. I haven’t yet looked at the code, but it appears to copy the file. I’m assuming that a symbolic link is created on *nix systems. However, I’m assuming that it is a copy on Windows. Regardless, I don’t believe it should be even using a directory structure in the first place and should use the original directory for any conversions and reading.

I’m sure there is a reasonable explanation for doing this. With a small library, the disk space, on modern machines, won’t matter if the files are copied. However, those with a large library or little available disk space will soon find the duplication disruptive.

Proposed Solution

Use more database? I mean, this is an obvious solution. A database is currently already being used for metadata and other elements. Of course, I also think that Calibre might also be editing the files as well. In this sense, copying the file for modification in case something bad happens does make sense. However, I would rather use the home directory, whether Windows or Linux or Mac OS X.

Probably spend some time this weekend going over the code and see what is possible. Might even go to the forums and find out why the current structure is used. If it appears that it can be completed quickly, I might start this weekend and hope to finish up by next weekend.

Possibly Related Posts:


Usability Testing Software Development

The idea has been forming in my mind for a while now and I’m unsure if a project exists yet or at least one that is free. The idea is that there are laser usability testing and plain video testing. What about web cam usability testing? I know the precision will be less than laser, but if you want the El Cheapo brand usability testing, then it is better than nothing right?

All you would need are:

  1. Buying a Web Cam or two. Kind of a requirement if I’m going to be doing testing and development. I can’t blindly code this.
  2. Facial Recognition

    You do need to know the placement of the eyes. Also if the head moves as it is prone to do, then you need to be able to tell.

  3. Calibration

    I’m guessing is a lot less tricky when dealing with math and precision to simply tell the viewer to stare at a location on the screen for a moment and get the five or more points on the screen. This will give you a sense of where the edges are and the center given the position of the head. May have to “Lock” the head in place. The only problem is that it is easier to tell if the head moved directional but harder (I think) when dealing with depth. I’m thinking that depth could be calculated based on the width of the face, the other problem is telling if the head is turned.

  4. Trigonometry

    The key is transforming the 2D space into a 3D space and back to a 2D space. The camera to the eyes and back to the screen. This creates a triangle which should correlate to a position on the screen. It should be possible to calculate the position by having the person look at the screen. If you know where the person is looking at, it should be possible to calculate the distance of the camera to the screen. Even if it isn’t possible, then it doesn’t really matter. By getting the points of the screen, you can get the position of the screen based on where the eye might be looking. By sampling the head, the ears (if visible), the nose, the chin, mouth and eyes to get the position of the head given the screen.

    Sure, it is probably cheating, but if it is accurate enough and fast enough, then I don’t think any one is going to complain. I’m definitely not going to pester the person to get a ruler or tape measure to measure the web cam to the center point. However, it might be an option if precision is a factor.

  5. Accessing the Web Cam

    I’ve learned that you do this by DirectShow. This might limit the amount of programming languages and Operating Systems. I’m definitely not going to support Linux, but I may look into Mac OS X support. It will be interesting to find out how to program for that.

  6. Accessing the Screen Content

    The key is to let the person running the usability testing to know where the person was looking and running the test back with what the person looked at and when. My goal also is to let the person know where the mouse went as well.

  7. Play Back

    Well, it isn’t useful if it isn’t recorded. What I might attempt to do is record the screen along with the user and do post-processing with what the user might have been looking at. This would allow for improving the algorithms for facial recognition and precision of where the user might be looking at.

  8. Research and Development

    It would be fun I think to work on the AI algorithms and math. I’ll be brushing up on my trig skills and hope to hone my math ability during this project. I’m hoping the precision isn’t terrible and that this can actually be used for what I’m wanting. If not, then I might fall back to taking pictures on an interval and screenshot too. Not going to be as precise as a video running 30 frames per second, but I think it might be much easier to track real time if it was only a single frame a second. Also, the resolution of most web cameras are higher than the video resolution which should hopefully allow for even higher resolution.

Why I Probably Won’t Do This

The damn complexity of it all.

The facial recognition will be hard enough and I will work on that first and work on the math for the depth and what not. I’m hoping that it won’t be as difficult as I’m fearing. If I can work out the head position when it moves in relation to the camera and, or screen then I’ll be at least part way there. It’ll be fun I think depending on how long it takes to implement the facial recognition.

I’m also hoping to remove a lot of the tricky Trig and simply have guess the position based on the calibration I’ll have the user do beforehand. I’ll probably develop a overlay for testing the software to display where I think the user is looking at. This will also help with testing the precision. If the precision is enough that I can tell apart the word, ‘it’ from the ‘i’ and the ‘t’ then I think it will be good enough for production. If I can half ass the Trig and still get the precision within the requirements then it will be a win-win. I will still have to spend some time learning Trig and other math subjects to prepare.

Patents. I know they must exist, but I’m not sure what they are. I’m merely guessing that since Photoshop and every camera maker out there can intelligently locate the face that at least that part is patented. I’m also guessing that this idea isn’t new and companies have developed technology implementing this idea. Trending on that money maker probably is going to get me sued. Regardless, I’ll still attempt to the best of my ability to create this and research existing patents as I develop. Perhaps if I’m super nice, I’ll be able to use the patents without incurring a bankrupting huge cost.

I’m super lazy and I have another 3 or 4 projects I want to implement. Depending on my motivation, I’ll probably work on them first.

Why I Want To Do This

Well, Selenium is great for browser testing. However, while that is great. I think it will be equally great if someone would create an easy to use User Usability Testing software like they use in labs, but far cheaper. If the goal is to do usability testing often, then what better way than using cheap equipment and a whole lot of people. If you could use anyone with a web cam, then you could even do so remotely.

I did have plans to somehow have the developer see the user as the person is doing the usability testing. I think that going through Skype or uploading the finished product should be sufficient for the amount of effort and time I’m planning on putting into this project.

Of course it will be open source and of course I’ll probably be violating a crazy amount of patents to implement this. The later part does kind of suck, since I will lack the funds to license any patents I’ll be infringing on and also that there are damn patents in the first place! Ah well, I’m hoping that the former will at least allow a better programmer to come along and use a method that isn’t patented.

Possibly Related Posts:


Motivations for Programming

My motivation for programming the Minecraft Proxy will probably come when 1.9 comes out and I blow away my world. As long as I spent on that world, I’m not going to have a lot of motivation unless I have some intelligent helpers. I’ll probably be spending some couple of months working on the project. I keep itching to do the networking code and seeing how well that is handled.

Motivation for programming Python is also high. I have a project I wanted to have completed by the end of this weekend and I haven’t even started. I still think I can complete it, but the code will be sloppy, most likely needing rewrites and well, it will need to be rewritten anyway. I’m thinking about taking the Projile project in stages. I’m also thinking of developing my own framework starting with the controller, but leaving the models and views to third-party libraries. The controller will probably take a week or two, depending on how well the initial code is developed and what existing framework I want to closely match.

My goals for the Python Controller Framework is similar to the Minecraft Proxy. I’m not going to focus on programming either project the “correct” way given the idioms of the programming languages. The code most likely will be developed similar to the patterns I’ve learned from PHP and Java. Which probably won’t be all that bad. I’m going to take “Mythical Man-Month” approach and toss the first implementation as not really a prototype, but an solution that will hopefully lead to a better working solution. Similar to the Projile project itself.

The goal for the Framework is to create a configuration-less Controller framework that handles installation, upgrading, plugins and authentication. The authentication I want to support many different OpenID services and probably will write a Facebook Python framework, unless one doesn’t already exists and is on par to what I’m looking for. I’ll probably write one anyway, since I want to learn the inner workings of Facebook Open Graph or whatever the public API is called.

From my readings of Pragmatic Programmer and “Your Brain at Work”, it seems that the best way to be motivated for a project is to take it in steps. To focus on an achievable goal and work towards it. In the case of Pragmatic Programmer, if you find that the goal is not exactly what you’ve been looking for, then maybe the entire solution wasn’t great in the first place and not much is lost.

The other part of this is to develop components that are separate. I’m not sure how I’m going to do that with the Minecraft Proxy in D. The Java code is… not exactly decoupled and I doubt the D code will be either. I’m thinking the Python framework code will be decoupled enough to start work and should be able to be refactored to its separate components.

Of course, while thinking about doing this, I should just be doing it. The problem is that the more I think about the project and why I’m not doing the projects the better the solutions. Another demotivating part is sucking at design and usability. Even with the books I’ve been reading, it is still extremely difficult. Of course, I haven’t actually read any basic design books. That will be my next stop. I think I’ve had enough of the basics of usability and need to focus on design. Once this roadblock is dealt with, I’ll hopefully be more willing to focus on this project.

It is holding up long term projects, which is further motivating me to want to start working on it. I keep thinking more and more about the farmer sim browser game and how fun it would be to finally be able to play it. The kinds of stuff I want to do! Regardless, I’m kind of hoping Projile will be the foundation for developing the games and learning better programming and usability.

Possibly Related Posts:


Minecraft Proxy in D

The Minecraft Proxy in D will probably be started within the hour. I’m going to do some minor research and then jump into some test code and then some network code. My goal is to have a connection to a Minecraft 1.8 server running and have a miner running around mining blocks and laying track.

Oh yeah, I also want to implement contract programming and unit tests. It will slow down the development, but I think it will hopefully limit the amount of debugging and problems I’ll have during development.

  1. Compile First D Program: Hello World

    Have to start somewhere. I figure if I have this done today or within an hour, that I’ll have motivation to continue.

  2. Minecraft Protocol Module

    There probably is an existing implementation in D, but I think it will be helpful to write my own module. I need to write the code to be thread safe, but I don’t plan on implementing the network code using threads yet. I won’t have the benefit of a proxy through Minecraft software, so I’m instead going to have to implement the server authentication scheme. That is getting the authentication string and passing it to the server. This will take some time and testing.

  3. Network Code

    I’ll use the completed Minecraft Protocol module and attempt to implement the network code. I hope I don’t have to implement threading, but remembering the Java experience, I’ll probably do it anyway.

  4. Minecraft Chunk Module

    I’m kind of hoping that I won’t have to require a database and I want to see how much space is taken by the D implementation. Should be fun and interesting. I’ll probably use a multidimensional array for chunks and coordinates. Should be simple, but probably won’t be efficient. I’m going for simple and quick. I’ll refactor the code later to be more efficient, but meh, it might turn out to be efficient enough that I won’t need to use something else. Of course, if I can’t implement the array in this way, then I’ll have to come up with another design.

  5. Minecraft Entity Module

    The problem and what I’ll need to implement to create some sort of intelligence is to track entities. This is something, I don’t currently handle and for what I’m planning I’m going to need to do it. The problem so far is that I don’t know where monsters, mobs and other players are. I need to be able to track this information to ensure that my code correctly handles each mob or player.

  6. A* and Dijkstra Pathfinding Module

    I had forgotten that this was a requirement. Oh well, I think I understand the A* and Dijkstra pathfinding algorithms enough now that this shouldn’t be that difficult. Or I’ll simply brute force it. I’ll probably require this be a separate thread, crap now I need to solve many different thread and dead locking with the Chunk Module. It is possible that I could have this part of the Chunk Module and simply spawn a new thread and when it completes pass it back to the caller. It depends on where the pathfinding will be.

  7. Intelligence Module(?)

    I’m debating this. Creating a Fuzzy Logic module could take anywhere from half a day to 2 weeks. I’m not sure what benefit I’ll get from it either. I want to do it, but I’m kind of hoping that I can kludge my way through some sort of algorithm that sort of doing something similar.

    I don’t know, it will be worth looking into implementing it, since a lot of the code I’ll be writing will mimic fuzzy logic. Quite possibly I’ll be saving some time instead of testing and developing it the boolean way. I don’t know. I think I’ll head down the path of not implementing true Fuzzy Logic module and instead focus on different actions.

    The main loop will check different conditions. Is there a mob within 20 meters? What type of mob is it? Does the mob have a direct line of sight? What is the players health? Is there a weapon available? Meh, it will probably be worth investing the time implementing fuzzy logic just so that I’m not writing a ton of code that will be damn near impossible to debug.

  8. Behavior Module

    My goal ultimately is to separate tasks into behaviors and then into sub actions using the intelligence module. In this way, I’ll be switching between behaviors and focusing on completing the task.

  9. Chat Module

    I’m not going to be handling this intelligently. I’m simply going to pass commands to the player using chat commands. Therefore, the code needs to be able to parse the chat and pick up on the commands. At some point in the future, I may extend the code to intelligently talk to others using the chat dialogue. Since majority of the players will be on my own personal server, I don’t really see a need to spend a lot of time on this.

Behaviors

  • Mining

    Majority of the time will hopefully be spent on this behavior. Mining will focus on precious resources and then collecting other resources depending on different needs. Like for building a chest might switch from one resource to collecting wood instead.

    The Mining action requires that the player know about lava, how to avoid lava, how to mine around lava and how to move lava. I think that since the player has a lot of time, that I’ll instead have the player move the lava to an area where there is an infinite water pool for pouring the lava and turning into obsidian. When the water pool is filled, then the player will mine the obsidian and put it away.

    My plan is basically to have the player mine the bottom 40 block layers everywhere. But not the ravines or new places. At some point, I’ll think of a plan for what to do with the soon to be large underground lair. I think it would also be funny to join a server and after a week or so, be like, “WTF?” I don’t know. I could go many different ways with this.

  • Crafting

    Need to set the player code to do this whenever it is needed. Mostly what will be crafted are chests, furnaces, rail, powered rail, mine carts, chest mine carts, workbench, tools and weapons.

  • Farming

    Food is important, so at certain points, the player’s character will go out and spend an hour or so collecting food by farming. Some actions might be to collect seeds, mushrooms, plant mushrooms and use bonemeal (if available).

  • Building

    At some point I want to develop the player to build rail stations or maintain current rail stations. I also want the player to build different architecture for the rail ways and maybe light houses and walls. This will also include farming land in such a way to enable efficient and maybe pretty solutions.

At this point, I’ll probably simply implement just enough of the Crafting and Mining in order to find resources and not run out of food, tools and weapons. I’ll tell the player where to go and what to do using signs, which should help the player not do something that I’ll regret.

Future

The application won’t just be AI player. I’ll eventually implement OpenGL display from the Java version to the D version using a library. I also want to implement a GUI using another library.

I think that if after this weekend I have the network code and minecraft protocol code working. I’ll be good. Probably spend a few weeks or months away from the code depending on motivation and finish up the other plans later. If I do get to the pathfinding parts, I think that will be fun and if I can implement some primitive mining code, that will be even better. I’m optimistic I can do the protocol and network code this weekend. Not so much all of the other stuff. I’ll really only have a day and a half work on this project, so not a whole lot of time. I’ll spend a day and a half working on the Python Web Spider project and end the weekend.

Possibly Related Posts:


New Plans for HTTP Request Library in PHP

I think I’m going to revisit the library this weekend and finally refactor it, greatly simplifying the code, the documentation and tests. The problem is dealing with the decoupling and I think I finally have that solved. I’m instead going to couple the library in the correct way instead of decoupling it in the wrong way.

Three Components

  1. Request

    I don’t know, I kind of wanted to move a lot of the code out of the Requests, but I think instead I’m going to make the request class pretty massive. However, it will contain really only what it needs in order to bootstrap the request. During development, I might do something similar to Features for Settings, but I do think that by putting all of the methods for the request in one class that it will be easier to use and perhaps better testing. I’ll probably inherit the class for the different request types. So there will be HTTP\Get, HTTP\Post, HTTP\Head, etc. There will be a generic HTTP\Request class that allows for setting the request type for those that are not supported.

    Most of the base code will be implemented in an abstract class and the main Request classes will simply handle the differences between the different requests. I’ll probably refactor a lot of the existing code into the base class and then work from there. A lot of it will probably go away and a lot of it will simply be scrapped until a later version.

  2. Transports

    The transports will handle compiling the request and sending the request and handling errors and lack of implementation in Features. This should hopefully limit the code of the Transports and allow testing the code sooner and finding issues. The issue right now is that given the state of the library, it appears only cURL works and only barely. Tests are not complete and I have no idea why. I need to develop the Transports to test them separately and the transports need to only implement enough to create the connection, send the request and return the result. Features will take care of the rest.

  3. Features

    Right now, the library implements Headers and Body and attempts to create a plugin for each. The problem with this model is that a lot of the features needs access to both the body and header. Instead of separating them, I decided it is better to simply combine both as well as the actual implementation for the transports.

    To recap, the Features will handle both access to the Header, Body, and Transport. They will be passed all three and have modify access. The features will require implementing for each transport or pass that it is “not implemented.”

    It is my hope that unit testing and development will be smoother and faster since the abstractions will be contained. The Transports will not require knowledge of the Features and everything will be relatively separate from each other. All the Request component will know is an interface that each Feature will implement. Same with the Transports. The Features will have to know about Transports, but not the Requests. The goal really is to have the Features as Transport agnostic as possible, restricting transport implementations to their own class.

I don’t know when I’ll get to this project. I’ve reach the point where I’m ready to work on it again. However, I’m wanting to work on the Minecraft Proxy and Web Spidering this weekend. I don’t think I’ll have time to work on this project.

Possibly Related Posts:


Android Phone and Apps

My last set of plans were thrown out the window. Surprisingly, the event that pulled me away from Minecraft was books and reading! That and work. My priorities are to continue focusing on reading about programming. Certainly that by the time I start programming, I’m going to forget a lot of what I’ve read. I know that I’ll be rereading some of the books.

I misjudged the amount of time it would take to read one book. I’m unsure what I thought I would be able to tackle, but covering 10 to 20 books in one or two months was a little crazy. I think a better estimate would be one book a week or around 5 books a month, if that is all I did after work and on the weekends. I’m going to focus on finishing 5 books a month until November, so 3 months or around 15 to 20 books. I’ve been switching around with the books I’m currently reading, so I’ve started around 6 or 7 books and a couple are a third of the way completed.

There are a few problems I’m going to have during this period. I will most likely get into Android development and designing a mobile app for managing my tasks and time. It will most likely interface with my current account with toggl and with a custom solution. My goal is to create something that is more agile and sort of allows me to plan for extreme programming. I think creating some of those tools for the mobile app will allow me to eventually translate them to the web site that I want to create.

What I’m interested in is creating user stories, tracking estimates vs actual time on a graph and pull down charts or whatever the name is for assigning a list of tasks to a list and then eventually completing them after a certain time period (usually 2 weeks) from the big list. Certainly, I do hope to duplicate a lot of the functionality current for Trac for the mobile app except crazy simplified in the reporting and more complex in other areas for adding agile concepts.

I think this will be my Java project from now on. To keep me fresh with Java development and eventually hopefully port the Android app to computer GUI Java program or writing a plugin for Windows, like Toggl has and perhaps a plugin for Netbeans and Eclipse. I simply think I’ll be more motivated to work on an Android app at this time than to dive into Python. Of course, I’m going to have to create a Python script for the backend.

I know from what I’m currently learning that I’ll be better at usability and design (hopefully, if even slightly better) and about project management. I’ll be more confident which should translate to better motivation to complete the next projects. I’m going to geared the Trac clone written in Python for 6 months or December to May and use my mobile app to help manage the development until the web site could take over instead.

What I estimate is that it will be a lot easier and a better motivator to be using a mobile phone to manage a lot of the tasks and see what is needed than to use the web site. If it is in front of you, then you’ll be more likely to use it for your own personal projects. That is what I predict, I’ll just have to see what time says about the topic, for at least myself.

I’ll still read at least 1 book a month and attempt two books a month starting in December. Really, I guess it will depend. For the agile development, I’ll probably read a lot of Agile books in December and during the next 3 months to get started for research. When I start doing game development, I’ll probably spend a month or so reading a lot of game development books for design, planning, and AI.

If it comes to it and in December, I’m still not up for programming, I’ll simply have to continue reading more until I gain the motivation.

Possibly Related Posts:


Users are our Masters

I used to live by these truths:

  1. Users are morons.
  2. Users are apathetic.
  3. Users only care about getting their job done and moving on.

After reading parts of GUI Bloopers and part of Web Bloopers, I think simply the perspective that the users are somehow at fault is incorrect. Actually, it has dawned on me a few days ago that really the problem is that the complexity of the system that I helped create was at fault because the user had to kept learning the system and even I had problems understanding how to use the system. If the user is failing to use the system correctly, then there is an usability problem.

Of course users are apathetic, they have a job or task to perform and if the system gets in the way, they will either use it to the best of their ability or not use it. It is obvious now, but really, it is frustrating as a developer because from my perspective, it doesn’t matter what I give the user, nothing seems to ever be simple enough. I can’t yet design a system where it simply reads the user’s mind and does the task. Maybe in the future, but providing an interface that is everything the user needs it to be and nothing more is really difficult.

I think the best UI I created was a calendar select that had 4 iterations before it is what it is now and I believe it is simple to use. However, I still run in that users forget that they can click on the days header. This could be fixed, I think by changing the mouse pointer to the hand and I believe I had it like that at one point. However, it doesn’t appear that people remember. It is frustrating to look at the user click many checkboxes in a row, when I created a control that allows them to select the entire row or month with a single click.

It is perhaps the first and only task I had where I talked to the user, created a task list and create an application to the users needs. After the first iteration, I gathered feedback for what could be improved and over time created a system that was good enough for the user. I even prototyped multiple controls until the best one was chosen. The problem was that one control took several weeks of time to create.

Certainly after finishing both GUI bloopers and Web Bloopers and maybe “Don’t make me think”, I’ll hopefully be able to create an initial UI that is about what the user is expecting. The problem is that there is never enough time to do proper user usability testing. Only one implementation is ever created for a given task and the user is expected to accept the design UI and all. I have insisted at times that multiple interfaces are created for the user to test and iterate from that. After reading the first sections of both books, I can already tell that whatever is done, gaining feedback is extremely crucial to developing usability in an application. There are certainly guidelines to follow, but not every interface is the same and sometimes complexity is required. When it is, developing for the user must come first.

Possibly Related Posts: