Esenthel Engine

Esenthel is an overachieving project that delivers a punch with minor developer effort. After trying out many game engines and rendering engines, I have learned to approach each with a certain grain of skepticism. Not because of the lackluster quality of most cheap, err. free engines. It’s a defense mechanism we engage in when learning principles of 3D, game development and overall story boarding is paramount to propping up a limping or incomplete development environment.

I have to say , with utmost respect , that it is by far one of my favorite pieces of software I have tried this year.

It delivers on most promises, encourages code centric, instead of drag-and-drop development and does it with ease.

I am getting ready to deliver a small demonstration game and post the code live.

Until then, check out more of the Esenthel Engine here.

Other mentions go out to OGRE Graphics Engine , C4 Engine , Irrlicht Engine , Unity 3D as some of many tried and tested , very good alternatives that almost suit my development style.

I would like to add that Valve Software’s Source Engine is still my favorite despite having only modded with it.

Overall, I feel very comfortable thinking grande for the first time when writing a non-mod . Esenthel might bring my mini-game idea to fruition.


Arek Bochinski


Reverse complement FASTA benchmark

FASTA format is used in bioinformatics to describe peptide sequences or nucleic acid sequences.

One of the benchmarks at the computer languages game requires that a program parse a ‘stdin’ redirected input of these FASTA formated sequences and print the content of the sequence in reverse order. Each character in the sequence should also be complemented according to this translation table:

code  meaning   complement

A    A                   T
C    C                   G
G    G                   C
T/U  T                   A
M    A or C              K
R    A or G              Y
W    A or T              W
S    C or G              S
Y    C or T              R
K    G or T              M
V    A or C or G         B
H    A or C or T         D
D    A or G or T         H
B    C or G or T         V
N    G or A or T or C    N


Each sequence contains a header with an id and description. These lines are printed ‘as is’ .


  • String reversal
  • Translation table substitution
  • Input handling and memory allocation

String Reversal

Sequences are reversed using a bitwise XOR and without using a temporary character or string buffers.

Operations are performed in a loop where forward is the first index and end is the last index in the sequence.


Translation table substitution

A small character array of complement values is created and accessed with the integer value of the source character matching to arrays index. For example:


Buffer at index end will receive a character at index ‘buffer[end]‘ from translation table array FtoCOMP. Index ‘buffer[end]’ translated to an integer , will point to a desired complement . This speeds up the process of substitution and allows for very fast array index notation.

Input handling

The requirement to handle input one line at a time corresponds quite well to the translation procedure. In pseudo-code,

  • process one line at a time
  • for each sequence , print header line, reverse the sequence, translate it into its complement and print it out

Only one buffer is used as a destination for reading input. Beginning pointer where each line is placed is dictated by moving a pointer through a character array. Once a line is read in, we check if it is the last line in a sequence by peeking into the input stream. If it is , it is processed according to above instructions and beginning pointer where the next line is placed is reset to 0.

These functions are called for each line N in the input stream:

fgets_unlocked, fgetc_unlocked.

These functions are called for each line that’s not a header line:

ungetc, strlen.

Other functions are called only at the end of a sequence and do not approach N runtime. This version written in C language has been compiled and tested using kernel 2.6.24 with GCC 4.2.3 .

Compile command:

gcc -Wall -O3 -fomit-frame-pointer revc.c -o revc.gcc_run

Source code is located here:

CSC209 – Location Server

Assignment 4 for CSC209 at University of Toronto in Software Tools and Systems Programming


One of the interesting features of MSN Messenger is that you can see if a person is online and be able to look up their personal status . Some fields can be used to indicate a status such as : at work or at home

The task in this assignment is to write a server and a client that allows user to register with the server and see which other registered users are on .


A user will run the heythere client and connect to a heythere-server . Every N seconds, the server will send to the client a list of users that are currently registered and their status.


The client first sends the user name to the server. The second message the client sends to the server is the location of the client . Other messages can be sent to the server. User can change their user name, the location and it may add a message tag .

Every time interval in seconds, the server will send a complete list of the currently logged on users. The client will print these out to stdout .

Each message has a strict format described as following:

First 3 characters describe the type of message the client is sending followed by a space and then the content of the message .

Location: usr

Hostname: loc

Message: tag


Server is written to support up to 30 clients at a time. It uses select to multiplex between different clients. If the command-line arguments -t <time interval> are not given, the default value for the number of seconds between printing to the clients is 10 seconds . Information will be written on line per client in the following format:

<user name> <location> <message tag>

To handle client data, the server collects the information from all connected clients.

Zip archive is located here:

DSA555 – Peg jump / solitaire solver

Assignment 1 in DSA555 at Seneca College in Data Structures and Algorithms in C++

Peg solitaire is a game where a set amount of pegs are filled in on a board with a set amount of pegs slots. To solve the Solitaire, a player consecutively jumps a peg over another peg , which in turn is emptied out. This process is repeated until there is only one peg on the board.

A C++ program that takes a file name as input . It expects the first line to be in this format:
where height and width are valid integers. Using these numbers, it processes the rest of the file using this format:
Character ‘O’ is an empty peg.
Character ‘X’ is a taken peg.

Once the board is parsed , if the board has a solution thus has only one peg left , it will print out the consecutive steps to solve it or it will print “No solution” if a solution can’t be found .


Using command prompt: <executable> <test board>

Boards can be downloaded below the source code download link, or a new board can be created as long as it follows above format.

Zip archive is located here:

Test boards can be downloaded here :