Posts Tagged ‘curve’

A tiny minimalistic CHAT Client Program writen in C

Sunday, July 29th, 2012

A friend of mine (Dido) who is learning C programming, has written a tiny chat server / client (peer to peer) program in C. His program is a very good learning curve for anyone desiring to learn basic C socket programming.
The program is writen in a way so it can be easily modified to work over UDP protocol with code:

struct sockaddr_in a;
a_sin_family=AF_INET;
a_sin_socktype=SOCK_DGRAM;

Here are links to the code of the Chat server/client progs:

Tiny C Chat Server Client source code

Tiny C Chat Client source code

To Use the client/server compile on the server host tiny-chat-serer-client.c with:

$ cc -o tiny-chat-server tiny-chat-server.c

Then on the client host compile the client;

$ cc -o tiny-chat-client tiny-chat-client.c

On the server host tiny-chat-server should be ran with port as argument, e.g. ;

$ ./tiny-chat-server 8888

To chat with the person running tiny-chat-server the compiled server should be invoked with:

$ ./tiny-chat-client 123.123.123.123 8888

123.123.123.123 is the IP address of the host, where tiny-chat-server is executed.
The chat/server C programs are actually a primitive very raw version of talk.

The programs are in a very basic stage, there are no condition checks for incorrectly passed arguments and with wrongly passed arguments it segfaults. Still for C beginners its useful …

How road signs evolved / short history of roadsigns

Friday, June 29th, 2012

how the road signs evolved brief history of road signs Ancient Roman Road of Tall Aqibrin

As a person interested in history and antrophology. Just recently on my last trip to Romania as I travelled a very interesting question poped up in my mind – How it happened that RoadSigns we use on every street highway and practically everywhere on the road came to be. Interestingly now with the standartization of road signs often the most popular road signs are used as a basis for development on other popular prohibit or allowance signs, we read on airports public institutions, pubs and mostly everywhere.

So in short I did a short research on Road Sign History, just to find out once again that the ancients, were wiser than we think. The first road signs probably came to existence with the existence of humanity, however officially, there was no standartization of using signs to point on road locations travellers before it was introudced in the Roman Empire. In Rome a pillars on the roads were placed to point to major road arteries leading to Rome and various important empire city centers.

During the middle ages, milestones pillars were no longer used, but for practical reasons wooden markers placed across european cities instructed tradesman and travellers to major city important centers and were used to show a general road direction leading to nearby city.
The wooden signs practice had been in use until the first modern roadsigns erected  on a wide scale designed for riders of 'high' and ordinary bicycles in the late 1870 and 1880s. The modern road signs as we know it today however emerged as a result of the  first International Road Congress meeting that occured in Rome in 1908.
On the meeting a four standard pictures were selected to note the basic for road signs further development. The need for the meeting was the large increase of roads across european artery cities. The road signs developed on the meeting were bump, curve, intersection and railroad crossings. The invention and adoption of cars and the boom of the car producing industry quickened the need for international road sign standard. The intensive work on international road signs that took place between 1926 and 1949 eventually led to the development of the European road sign system as we know it. The signs were quicky spread to America and in 1960, the road signs become universal in America and almost everywhere all around the developed and developing world.

As of today 2012 it can be said road signs exist all around the civilized world.Though most of road signs are identical across all countries around the world today still some road symbols varies from country to country. I remember seeing some very unique road signs during my travelling through Serbia, 2 years ago.
 

KRaptor a Raptor free software (open source) arcade game clone for GNU / Linux

Monday, January 30th, 2012

Kraptor is another Raptor Shadow of Death free software, open source clone arcade game for GNU/Linux, DOS and Windows (98, XP etc.).

KRaptor main menu game screenshot Linux Debian Squeeze

The game is not under active development anymore since 2004. Kraptor features a powerful engine for creating quickly 2D shooter games, so the game should be a good learning curve for people interested into creation of arcade game shooter games.

The game just like Rafkill is built upon DUMB sound engine.
The game intro is quite entertaining 😉 The intro plays one by one the text:

Near Future:
Blobalization
Imperalizm
Corporations
Megalomaniacs
Money and Power. Slaves of the New Millenium!

KRaptor Bill gates like looking oppressor

After years of oppression, the slaved people of the world have raised against their masters. You, has a mercenary pilot, has been
contacted by the popular rebellion to fight against the forces of oppression.

In the morning, you jump into your cockpit and start up the engines. It's time to get airborne and start the attack. Get ready to
scramble the scum hired by the masters. Murder for freedom is the only way, you're on a mission, don't defraud us...

Like Rafkill, Kraptor is one man masterpiece created by a free software Argentinean geek known under the Kronoman artistic pseudonim. The game is really incredible for a one man work … a true masterpiece.
The game is licensed under MIT License.

Even though Kraptor is older game than Rafkill, the design is more resembling the original Raptor game. The game music is high quality stereo. Besides that music and fx sound effects are quite awesome. After each level you have a Raptor like weapons "blackmarket", where you can buy new weapons, recharge ship energy, upgrade ship etc.
The blackmarket implementation part of the game is probably the worst moment in the game along with the game menus (in my view).
Talking about graphics Kraptor supports really high number of resolutions ranging from 320×240 to 1280×1024! 640×480 is the standard resolution in which the game is running.

Kraptor raptor like Linux game plasma gun debian screenshot

Something I really like in the game is the number of multiple weapons your ship uses during play. Even if played in Easy mode it is taught.

There are game Saves after each level, so thanksfully you don't have to start again from zero once death.
At the end of each level there is a huge bad BOSS you have to destroy ;).
Kraptor the boss Debian GNU / linux

Installing Kraptor on Debian / Ubuntu and deb derivatives is with:

debian:~# apt-get install kraptor

On most rpm based Linux distributions, you can install the game by converting the deb package to rpm with alien or by building from source from Kraptor's sourceforge page

Its interesting the game name e.g. Kraptor is also a death / grind metal band name, (Maybe Kronoman is metalhead big fan of Kraptor and that's how he came up with the playful name. For all the old school game addicts there is the joystick support. I've tested it with my Genius analogous joystick and it works fine.

The game is lacking .desktop gnome definition and after once installed it only appears through Debian (section) GNOME menus and not in Applications -> Games :

Applications -> Debian -> Games -&act; Action -&t; Kraptor

Just like Rafkill on Debian the game exacutable binary is located in /usr/games/kraptor . Also like with the Rafkill case when launched the game has troubles with choppy sound and music caused by the stupid buggy! pulseaudio

Analogously like with Rafkill's case, the work around to the problematic music en sound is to use a little bash shell script like:

#!/bin/bash
pulseaudio -k;
/usr/games/kraptor
pulseaudio --start;

You can dowload Kraptor fix sound issues wrapper here

To install it on your Debian / Ubuntu and hence make the game sound play good issue with root:

debian:~# cd /usr/bin
debian:/usr/bin# wget https://www.pc-freak.net/bshscr/kraptor.wrapper.sh
...
debian:/usr/bin:# chmod +x kraptor.wrapper.sh
debian:/usr/bin:# mv kraptor.wrapper.sh kraptor