Monday, November 17, 2008

Open Source Commodore BASIC as a Scripting Language

On October 28th Michael Steil announced on his blog Pagetable the release of Commodore BASIC as a scripting language for Linux, Windows and Mac (OS X 10.4/10.5 -Intel and PowerPC).
What he has done is a simple recompilation of the original 6502 Commodore 64 binary which is 100% compatible and runs at a quite high speed.
So if you feel a bit nostalgic and in the mood of writing a few lines of code on behalf of the old times you can download the .zip package here
Inside the archive you will find the Windows and Mac binaries. For Linux you will have to compile it (why on Linux it's always compile and compile!).
There are lots and lots of online resources to teach yourself programming in Commodore BASIC and the temptation for me to write a tiny, even insignificant, app just for the sake of my forever lost youth is very strong, but my workload so high to halt me.
However if you're interested in retrocomputing you could start checking this interesting website (floodgap)and if you wat just have a glimpse of Commodore BASIC this page will introduce you briefly to this epic language.
For now, let me just do this:

10 PRINT "HELLO FOLKS"
15 PRINT "WELCOME TO WIZ AND CHIPS"
20 GOTO 10

Picture by:
ExtraKetchup

Thursday, November 13, 2008

My PyQt Scribbles (Python and Qt) #0

My intention is to write a series of posts discussing practical ways of working with PyQt. I've recently thought about the fact that blog posts can be a formidable way to note down things I may need to refer to someday in the future. This is a sorta rediscovering the meaning of a journal: an organic (or not) bunch of entries and annotations which, by growing in time, become a precious reference for the writer.

This thought of mine got stuck to another mental post-it I had about learning PyQt which eventually lead me to shape this column

Qt is an application development framework mostly used to create graphical applications (and also non GUI apps). It's created and maintained by Qt Software (formerly Trolltech), a Norwegian company acquired by Nokia since June 2007. Qt is know to be a cutting edge library designed to supply advanced features which can be implemented with flashy code and deployed on several platforms like Linux, Windows, Mac OS, Windows CE and Embedded Linux. Qt has been used to create well-known apps like KDE, GoogleEarth, VLC, Skype, Photoshop Elements, Qtopia, Virtual Box, etc...
PyQt is the Python binding of the very famous library Qt and it's created and maintained by the British company Riverbank.

Python is a high level, interpreted, object oriented (even if it supports other types of programming paradigms), open source programming language. It's a fairly young language which is getting more and more consensus among the developers  mainly thanks to some features which makes Python the most desirable choice for a wide range of tasks. Python focuses on simplicity and elegance; the syntax and semantics are minimalistic: something which lead to an increased productivity and a less painful code maintenance. Python gets rid of twisted structure and useless fripperies like brackets, thus enhancing readability. Despite its minimalism Python offers a huge standard library.

Beyond all this it's worth saying that Python's also my favourite programming language.
For sure Python hasn't the power, in terms of CPU squeezing, of languages like C or C++, but unless you are developing the engine for a real time 3D graphics application, like a cutting edge video game, then my opinion is that for 90% of your needs Python is simply unbeatable.
Stay tuned on this channel to read the first installment of My Journey Into PyQt
Note on licensing:
The Open Source Editions of Qt is freely available for the development of Open Source software governed by the GNU General Public License (GPL). For more information...
PyQt v4 is available on all platforms under a variety of licenses including the GNU GPL (v2 and v3). If your use of PyQt is compatible with the GPL then you do not need to buy a commercial PyQt license. Similarly you do not need to buy a commercial Qt license. For more information...
Python is licensed under The Python Software Foundation License (PSFL) which is a BSD-style, permissive free software license compatible with the GNU General Public License (GPL). For more information...

Wednesday, November 12, 2008

The Linux Game Box #2: UFO: Alien Invasion


In this installment of The Linux Game Box I will discuss about UFO: Alien Invasion (U:AI), a turn based strategy game in which humans must fight back aliens attempting to invade Earth.
You play both the head of PHALANX, an agency whose aim is to fight and study the alien invaders, and the several soldiers members of the tactical teams.
The game is heavily influenced by the well known and appreciated X-COM and especially by the X-COM: UFO Defense episode.
U:AI is licensed under the GNU General Public License.
The project is alive and very active. The team is well coordinated and always looking for help in various aspect of the game production. Help is needed in many fields ranging from coding to 3D modelling and animating, translating, etc...
This is indeed one of the most interesting aspect of open source games which give the chance to common people to be part of an amazing project in the area where their skill can be more of help. As a matter of fact, giving my chronic lack of spare time, I found an ideal way of helping this project by translating part of the game text (which is quite massive in this case) to Italian.
If you want to get involved in the project you may refer to the wiki for the full list of areas you can contribute to develop. The easiest way to meet up with the community however is perhaps joining them at this IRC channel (irc://irc.freenode.org/ufo:ai).

INSTALLATION REQUIREMENTS → 10
U:AI is already present in the repositories and can thus been easily installed via Synaptic or Adept. If you run (K)Ubuntu you will also find the game inside the list of the add/remove tool.
Apart from Linux, the game runs also on Microsoft Windows and Mac OS X.
However instructions can be found here and the download trunk can be found here.


GAMEPLAY FUN → 9
There are two main gameplays sections that compose the game: a strategy/management part and a tactical/action part.
In the strategy/management part you take the role of the head of PHALANX and must take high level decision like arranging the base facility, hire personnel, start researches, schedule equipment and vehicle production and send squads to intercept alien fighters and engage alien troops on the ground. The time management system for this phase is based on the calendar in the way of other famous games like Sim City or The Sims. You can adjust the time speed in order to increase or decrease the chance of an alien ambush to take place during this phase (thus pushing you to the tactical phase).
In the tactical part you command the privateers and specialists of the tactical team to perform the mission objective. The action is split in turns and every character has a defined amount of Time Units (TU) to perform each desired action (i.e. walk, recharge the weapon, throw a frag grenade, etc..).
If you like strategy games you will find the gameplay mechanism of U:AI well calibrated thus providing a large amount of fun.
There's also the possibility for multiplayer game either via LAN or Internet connection.


GRAPHICS APPEAL → 8
U:AI's game engine is based on a heavily modified version of ID Software's Quake2 engine. The graphics quality is thus quite high and there's clearly the evidence of an effort to give the game a touch of professionalism. As the matter of fact the open source team has the target of producing a game which increases and surpasses, in all aspects, the game experience and overall quality of the original 1992 title. The updated OpenGL graphics shows well polished 3D models, several detailed environments, special effects, high resolution textures and nice characters animations.

SOUND DELIGHT → 9
A big attention is given to the music and sound effects (more to the first to be honest) in order to create the right atmosphere for the game. This is another aspect which tells you how much care the team puts into this project.

















STORY ENCHANTMENT → 10
This is the game's strongest plus.
U:AI takes place in 2084 in a planet Earth with a geopolitical configuration pretty different to the present real one. The various countries around the world did solidify and unify in huge blocks, with The Greater European Union and The Asian Republic being the most powerful and rich ones. Humanity is on the verge of welfare and peace at a level never experienced in its whole history. In this idyllic scenario aliens come out of the blue and attack the Indian city of Mumbai causing thousands of casualties among civilians and 
troops of The Commonwealth . The new UN meet and Earth declares war to the unknown aliens. Standard army approaches show poor results thus leading to the creation of PHALANX: an secret agency, established under UN banner, which summons the best of the best of Earth resources to eliminate the alien menace.
Every aspect of the game is rich of detail. The story literally rises from the player's progress in the game. For this reason every mission performed contains a cliffhanger, in the shape of an upcoming research on alien specimen or equipments, or story developments resulting from the mission accomplishment.

OVERALL SCORE → 9.2

here below you can see a video trailer of the game

Saturday, November 8, 2008

Verical Scrolling on (K)Ubuntu touchpads updated to 8.10

Not so many days ago my good friend Carlo posted a column on his blog court of misanthropy with the instructions to enable the Mac flavored vertical finger scrolling on Ubuntu and Kubuntu laptops. You can find my plug of his article here.
Anyway since the updated Xorg 7.4 running onto the freshly delivered 8.10 Intrepid Ibex version of the Ubuntu and Kubuntu distros those "old" instructions aren't valid anymore.
But Carlo's a smart guy and has already provided a new procedure which he tested and should therefore run smoothly on your laptops.
As far as Carlo's concerned it seems that the problem is the enabling of SHMConfing within an untrusted environment which is share among different users. It follows that the safest way to enable the two-fingers scrolling is use an XML file for the Hardware Abstraction Layer with the setting for this function.
The file must contain the following code:


And it must be saved as:
/etc/hal/fdi/policy/11-synaptics-options.fdi
If you're no Linux overlord just follow these plug 'n'play instructions:
1- Download this file already cooked by Carlo and save it in your home folder (i.e. /home/TheOneElectronic)
2- Open up the console, check you're in your /home and type:
sudo cp 11-synaptics-options.fdi /etc/hal/fdi/policy/
3- Restart the computer (it's not enough to restart X)
The two-finger scrolling should now be working
Further option: how to enable (Q)GSynaptics e SHMConfig
If you happen to be the only user of your pc you could anyway enabling GSynaptics (QSynaptics for KDE) you must create the file /etc/hal/fdi/policy/shmconfig.fdi containing the following code:

 
And here's the simplified version:
1- download this file already prepared for you and put it in your /home
2- Open up the console, check you're in your /home and type:
sudo cp shmconfig.fdi /etc/hal/fdi/policy/
3- Restart the computer
4- search and install (Q)GSynaptics with Synaptic or Adept
That's all folks!

Wednesday, November 5, 2008

First African-American president in the U.S.A. history

One more time the huge book of history records an astonishing fact and, despite what you think of the political man or of his political program, this time is for the good.

What a better way to say "we've finished with all the racist stuff" that making it possible for an African-American to be elected president of the United States of America? Yes because despite all the money pouring, the advertisement and tv manipulation, and the natural desire for a change, this Obama success is the product of a radical change in the Americans mind that was just there in the corner awaiting for the chance to come to the light - and Obama gave it that chance.

So look at this glorious victory recorded in Google 2008 Elections Map



http://maps.google.com/help/maps/elections/#2008_election

The Linux Game Box #1: Astromenace


Astromenace is a vertical scrolling shooter of the likes of the classic shot ‘em up like Xenon2 Megablaster.
The concept behind the game is fairly simple and all focused on piloting a space ship and fighting swarms of alien invaders.
The game is made by the Ukrainian software house Viewizard and is released as freeware for the Linux platform. A demo version is also available for Windows.

INSTALLATION REQUIREMENTS → 10
After downloading a 34 or so tar.bz2 file from this page it’s just enough to unzip it and double click on the bin in order to start the game.
For those who prefer to add the game to the apt repository a simple procedure is explained.
Minimum requirements:
Linux OS
Pentium 1+ GHz
128 MB RAM
3D video accelerator with 32+ MB on board
Runtime dependencies:
libSDL (ver 1.2.6+), libopenal (ver 1.0+), libalut (ver 1.0+), libogg (ver 1.1+), libvorbis (ver 1.1+), libvorbisfile (ver 1.1+), libjpeg (ver 6b+).

GAMEPLAY FUN → 8
Astromenace is a great fun. The alien ships are huge in number and relentless in their effort to attack the human homeland (bosses included). The alien swarms remember well those of the arcade games of the 80’ as they seem much more like automated and stupid drones than manoeuvred by an intelligent form of life. However on the human side of the war the game offers interesting features. There are something like 20 different ships that can be purchased and upgraded with a whole stock of equipments and weaponry.

GRAPHICS APPEAL → 9
The overall graphic design is neat. The ships, equipments, aliens and environment are all carefully designed and will make you remember of several sci-fi movies and video games. Astromenace is all 3D accelerated graphics which provides a whole range of special effects that make the game one of the most graphically polished of the Linux games landscape.

















SOUND DELIGHT → 7
The sound and music are just fine and provide the right atmosphere for the game


















STORY ENCHANTMENT → 6
There’s no much to say here. As I told before Astromenace aim is not that of charming the gamer with its refined and complicated story. For this reason I give it a 6.

















BONUS POINTS → 8
It’s possible to modify the game quite easily by editing an xml file. Viewizard provides a guide to help the user handling with the scripts.




OVERALL SCORE → 8

In the video below you can have a look at the game play and graphics

Tuesday, November 4, 2008

The Google 2008 U.S. Election Map

Google's for sure not only the top search engine and advertisement guy but it's also a map pal. With Google Maps and Google Earth you can explore, search and track down a lot of stuff (not only places!).

The 2008 U.S.A. Presidential Election is the event of the year, especially if we consider that should Barack Obama win it would be a milestone in the history of the United States of America. For the first time ever a black man could lead the most influential country in the world.

Well, google set up a page containing all the tools to follow this exciting presidential race and now there's a new map designed to keep track of the votes leading to the election of the new U.S. president.