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.
Related Articles
Licensing Woes and “I don’t need Open Source”
Okay, Lets Review
Programming Books to Buy
Fuzzy Logic Class Prototype
Web Development vs Games Development
Updating Sites
Chaos Region: an Absidon RPG
An Example Zend Framework Blog Application - Part 3: A Simple Hello World Tutorial
Relatd Projects
jQuery UI is a set of themable widgets and interactions, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.
A simple command-line tool to create the folders and helper files for a new JavaScript project/library. As a bonus, you can quickly create a website to promote your project.
When you start a new JavaScript library, how do you layout the source files, the tests, the distribution files? Do you have support scripts to generate distributions from source files? Run your JavaScript unit tests? Generators to create new unit test HTMLfiles?
- No plugins like Flash or Java required.
- Popup blockers are no problem. The content expands within the active browser window.
- Single click. After opening the image or HTML popup, the user can scroll further down or leave the page without closing it.
- Compatibility and safe fallback. If the user has disabled JavaScript or is using an old browser, the browser redirects directly to the image itself or to a fallback HTML page.
Just by adding this small JavaScript module to the end of your web pages, you get your form's submissions intercepted and, instead of sending request to the server in the usual way, they are done asynchronously and in an AJAX-style smooth way.
As long as it is a client-side library it will work with any server technology: ASP.NET, PHP, JSP, Classic ASP... and even with local HTM files.
I've included extensibility so that you can add easily your own progress indicators (several included) and show error messages the way you prefer (by default it shows an alert).
It's transparent to your server code and could be used to add AJAX capabilities to some applications without writting a single line of code.
Documentation is included.
Features summary
• No-code AJAXification of web apps
• Supports any server technology, including ASP.NET, JSP, PHP, ASP 3.0...
• In ASP.NET it supports all kinds of postbacks: direct and by code.
• Works in any modern browser that supports AJAX.
• Supports cross-posting of forms, that is, you can send the information to any web page in the same domain. If all your web pages have AJAXInterceptor included (for example, you include it in your master page or template) you can hace
• Respects your custom onsumit event handlers.
• Supports browser history so that your users can hit the previous button and get the last rendered page.
• Two versions of the module:
- AJAXInterceptor.js: full commented one. Useful for debugging purposes.
- AJAXINterceptor_r.js: reduced-size version. It downloads faster as it only is 2.6 kB in size. It's better to use this on production apps.
• Automatically show/hide custom progress indicators.
• Support for cancelling operations.
• Support for custom message displaying.
• Supports any form in your page
Obviously this is not substitute at all of full-fledged APIs like Microsoft's ASP.NET AJAX, PHPLiveX or AJAX.NET, but will let you add AJAX support to your apps in a few seconds and without writing any code. Just give it a try!
In the ZIP you will find teh module, a working sample with ASP.NET and a PDF with the help documentation.
This project is just for fun :-)
I will be very glad if you drop me a line in case you use AJAXInterceptor in any real-world application or if you enhance it with new features.
Visit my .NET blog (Spanish) at http://www.jasoft.organd my e-mail marketing blog (English) at http://www.theemailingexperience.com
JSJaC is a jabber/XMPP client library written in JavaScript to ease implementation of web based jabber/XMPP clients. For communication with a jabber server it needs to support either HTTP Pollingor XMPP Over BOSH(formerly known as HTTP Binding). JSJaC has an object oriented design which should be quite easy to use. Communication is done by using the XML HTTP Request objectalso refered to as AJAX technology. Your browser must support this.
What is XSTM?
XSTM is a n open sourcelibrary which enables high performance object replication between processes. It is an object oriented Distributed Shared Memory, or a Distributed Object Cache.
XSTMhas similarities with technologies like Adobe Flex Data Services , JBoss Cache, Terracotta, Tangosol Coherence , ScaleOut , or IBM's ObjectGrid .
Our model is based on object shares, which work like file shares. When an object is added to a share, it appears on the other machines which have the same share opened. Modifications done to the fields of the object are from this point replicated between machines.
Read more in the project overview.
XSTMis made of three projects. The Java implementation is called JSTMand is the base from which
the other versions are derived. An adapted version made with Luciano, the
author of GWM , is available for GWT . It allowsthis library to be used in a browser. NSTM is a .NET port based on IKVM.
All implementations are compatible with each other so object replication can take
place e.g. between a Java server and a .NET Smart Client.
This JavaScript client library allows you to make Facebook API calls from any web site and makes it easy to create Ajax Facebook applications. Since the library does not require any server-side code on your server, you can now create a Facebook application that can be hosted on any web site that serves static HTML. An application that uses this client library should be registered as an iframe type. This applies to either iframe Facebook apps that users access through the Facebook web site or apps that users access directly on the app’s own web sites. Almost all Facebook APIs are supported.




