KWarBots – Colors, Collision Detection and More

This is a new video for my KDE game project, KWarBots. Here you can see some game objects/items with colors (the color can be changed on the map file, so it’s customizable when creating the map).

There the robot collides on this simple maze and always choose the left path to follow. It’s sufficient to demonstrate it for now.

If you are curious about the code to control the robot, it’s time to see this small piece of the robot code, used on this video:

1
2
3
4
5
6
7
8
#!/usr/bin/env kross
import sys
import Robot
def main():
  if (Robot.isMoving() == False):
    Robot.moveForward();
  if (Robot.collided() == True):
    Robot.turnLeft();

Yes, it’s just it! And finally, the video:

[youtube http://www.youtube.com/v/i3nZmv7y1xw?hd=1]

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…

Websvn: http://websvn.kde.org/trunk/playground/games/KWarBots/
svn: svn co svn://anonsvn.kde.org/home/kde/trunk/playground/games/KWarBots KWarBots

🙂

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.