KWarBots: Work-in-Progress

Yeah, KWarBots still alive, and I’m here with some news (although the game is not playable yet). I developed some objects to use on the game, that you can see a few examples below. Soon I’ll put here a new video of the game, after finishing some tasks, like loading the game objects from a Map object…

KWarBots: some image examples

1- BlockObject: a material that cannot be destroyed. This object accepts color variations on your declaration (according the Map file);The robot thumbnail

2- TerrainObject: general terrain (that can be used as a “background” on the BattleArea), like dirty, sand, grass… This object doesn’t accepts color variation;

3- TileObject: general tile, used as a background too, but it accepts color variations;

4- WallObject: a destructible wall. Your resistance varies according the Map file and accepts color variations too;

5- WaterObject: an animated object, that doesn’t accepts color variations;

6- RobotObject: the animated robot object.

All of these images (and another ones, that I’ll keep in secret by now ;)) were made using kolourpaint, with a non-isometric pixel art visual (I love it, but as you can see, I don’t know how to draw water :p) and packaged on svgz files with inkscape. I made a class that load the images from the svgz files and change your default color values, acccording to your behavior. As some of them can be loaded multiple times and used on another positions, I have added a simple caching scheme on the ImageLoader class.

So, now I must to improve the Map loading structure and create some colliding mechanism to create a new experience with KWarBots… Wait for the video soon 😀

KWarBots on KDE svn XD

Yeah, finally I commited KWarBots on playground/games on KDE SVN! (trully merged my internal git repository onto). It still not playable; it’s on heavy development, but now you can follow how things are going on the project…

svn: svn co svn:// KWarBots


Texture example

Simple test using SVG files as textures for the Map. Now, we have BattleAreaObjects and RobotObjects, but no collision detection yet. Also, you can see a new look for the robot, but it’s not the definitive.
Texture test

Finally, the map area now has a 600×600 pixels, with a virtual matrix of 20×20 positions.

KWarBots First View

This is the first view of my new game: KWarBots. What’s KWarBots? It’s a game where you can program a robot using Python Programming Language. The main goal of this game is for your fun, but for you education too, introducing the basics about some programming language. Initially, for the language, I would use the Turtle Scripting Language, but I saw that it was not a good idea… So, using Kross, I can run a script written on Python to control the robot.Oh, yes, the game uses KDE4 and QT4 as your base… You can now watch a simple movie showing the basic moving system programmed via a python script; prefer to watch in HQ mode to read the commands on the video.

Now I’m working on a Map class and a Image handling class to load maps and images from files… Soon you’ll can view more images/videos about the game, and with better graphics, of course…

And finally, as it was to be my GSoC 2009 proposal, you can read the original paper about the game, downloading it here.

transbot v0.3 downloadable

Yeah, I know, I promised that it would release only when reached the version 1.0, but a lot of people sent me mail about the bot, and I had a lot of visits on the project page from people searching for an IRC translation bot.

And you can get it now here! Download!!! Read the README file to know how to put transbot working. And after transbot join the channel that you want it to work, type !help to get a list of supported commands of the bot.

Remember: it’s open source and still on development, i.e., there are a lot of things to do on it yet. Enjoy!


transbot: connecting to the IRC

Hey guys, I’m here again, now with some code on how I do to connect to some IRC server using Python, on the Translation Bot (trully I found another bot with the same name, but I’ll not change it ;p ):

First, we need to add these modules:
import sys
import socket

With it, we can define some constants:

NETWORK = 'some.irc.server' # server to connect
PORT = 6667
NICK = 'transbot' # the nick used for the bot
PASSWORD = 'bot_password' # used if you register the bot nick
IDENT = 'transbot'
REALNAME = ':MDK's Translation Bot'
OWNER = 'xMDKx' # yeah, it's me on anonnet and on freenode
CHANNEL = '#some_channel' # the initial channel to join

Cool! Right now we can connect to IRC simply doing:

irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((NETWORK, PORT))

And now, just to enter on some channel (and identify):

send('NICK %s' % NICK)
send('USER %s %s %s %s' % (IDENT, NICK, NICK, REALNAME))
send('JOIN %s' % CHANNEL)

Now your bot is connected to the NETWOR (server) and joined on the CHANNEL that you specify.

For just grab the messages on the channel, do it:

while True:
data = irc.recv(SOME_SIZE) # with size like 512 bytes, for ex.
print data # just print server messages

And it’s all for today, folks! Soon I’ll post some tips on how to parse the messages grabbed from the channel. See ya!

transbot: Translation Bot

Yeah, more one new poject, now using Python Programming Language. The main goal of this project is: create a translation IRC bot, that translates some English text (or the text of some user that are on the same channel).

And for it I used this Google Translate interface (to effectively translate some text to some language, that uses the Google Translate service) and the BeautifulSoup class, that parses XML or HTML (thank you guys!). As I never had made an IRC bot before, I get on the internet some base for do it; you can see them here and here.

I had the idea to made it in a funny chat on #embassyofpiracy, on The original idea was: A bot that can translate the last (or the N latest) message(s) from some user on the channel. There are a lot of people from all around the world, but the main language used on the channel is English. And as we want to have more and more people on the channel, some guys doesn’t understand English very well.. So…”what about a translation bot”?

And here we are. The transbot is already on version 0.1, with these functions (the character ! with some text means that it is a command):

  • !help: a basic help with all supported commands;
  • !listsupported: list all supported languages;
  • !whatis LANG_CODE: returns the language associated with the language code LANG_CODE;
  • !langcode LANGUAGE: returns the language code associated with the language LANGUAGE;
  • !translate LANG_CODE TEXT: do the translation of the English text TEXT to the language associated with LANG_CODE.

The bot will be released on GPL, but only at version 1.0. Until there, I’ll put here some code snipplets, to all interested on create your own IRC bot, or to anyone that wants to learn something about Python. Also I’ll write about transbot‘s features…

Finishing, a simple TODO list that I must to develop for the next versions:

– Generate some data structure to handle all the users of the channel, saving the last (and soon, the N latest) message of them;

– Create a function to auto translate from all languages, not only from English;

– Option to return some translated web address (URL);

– Must handle config files;

– Think about more useful functions;

– Make the bot funny (why not?? :D).

You can contact me on I’m the user rodrigo_golive 😉

GMail Without Ads version 2.02 (finally :p)

This is a newer version of GMailWA, the (grasemonkey) script that allow you to remove GMail Ads. But still needing a better support to Opera an Chrome web browsers… :/

2.02 – Fixed quick link positioning
2.01 – Fixed some dependencies (like Create a document lab feature)
2.0   – Fixed the “right-side” labs features (chat and labels)
– Bumped to a new version
1.02 – Fixed the overriding problem with large subjects
1.01 – Thanks to kris7topher for fix the border on the right

You can get the new and fixed file on these links below

GMail Without Ads download script page