I first started working on Slasha in December 2009. The game really started just because I had just discovered the solution to a problem that had been bugging me for years - pathfinding. Back in my days playing World of Warcraft, I always wondered what algorithms were being used to make the enemies always chase me and find me through an open field no matter how many corners I went around. The algorithm I found was just a slight modification to the solution to a simpler problem - flood filling. My solution, that had me jumping with joy at my supreme intelligence for several days straight, turned out to be the second one given on the flood filling Wikipedia article. Anyway, I decided to create a nice and simple RTS game to show off the algorithm that made it possible.
The first versions of the game were written using Python and Pygame, and were fairly slow with some fairly clunky AI. Despite this, I spent many hours making and testing campaigns for them, and slowly and incrementally improved my product. Ultimately, however, the problem is that python and pygame being dependencies and the program being a downloadable are too high barriers for me, as an amateur, to get anyone else playing the game, and I realized the hollowness of making something that only I myself had access to, and I gave up. Months followed, years followed, the soldiers of Faladare and Xandros stood there in the rain waiting for some brave general to press P (well, it was space back then) and let them go fight each other.
However, there is a happy ending. This July, I realized just how much I missed my programming hobby and got motivated to start doing something again. Thanks to Google App Engine, I realized that I would be able to publish my game on the internet. I had to rewrite everything with server side code in Python and client side in Javascript (press Ctrl+U from the game to see the client source! (BTW, I hereby release it under the public domain and if that is impossible in your country I simultaneously release it under every GPL-compatible license. Standard uppercase-letter no warranty disclaimer applies)), but the effort was worth it - Javascript turned out to be 10 times faster than Python, and I was able to make massive upgrades to the AI, to the point that I could not beat it at micromanagement. There were many upgrades, much debugging, many optimizations, I'm still not done rebalancing all the levels since the AI is so much better now (it still has a few exploitable weaknesses, of course, but far less than before) - I'm happy to report that tutorial and nightfall are confirmed beatable, though.
Me figuring out just how the pathfinding is supposed to work - bottom right shows the distance map expansion process, left shows one of my optimizations failing at going around a corner, middle is another diagram of the failing optimization, top is similar to bottom right.
Anyway, Here you go. Laugh, fail, catch an error, enjoy. And be sure to send comments back to me some way, I like feedback :)

No comments:
Post a Comment