Monday, November 8, 2010

Game

The development of the level generator is almost finished. I have uploaded some screenhots of the generated levels. After programming this small demonstration- and test-application (the first three pictures) i made a very versatile class out of it and hacked it into my existing game. The game was heavily optimized too. There is only one bug left in the level generator. And after that i will add some functions for adding doors, treasures, monsters and so on. On the last screenshot you can see how the generated level looks like in the game. Now some usefull links for building your own random maps:
Enjoy! ^^




Tuesday, November 2, 2010

My game...

Because i had some free time last week, i started a small game project.
The game itself will be a mixture of "Castle of the winds" and "Diablo".
A project of my dreams. ;P
Round based Hack and slay, with tons of monsters, randomly generated maps, lots of weapons and armory...

Basic movement works, collision detection works, tile loading on two layers works, very basic map generation works.
Next on the list: a random map generator.
After that: interface tuning, adding monsters, adding weapons/armory/magic, adding sound ...

Monday, October 18, 2010

New software

Last weekend i wrote a small application for calculating truth tables based on boolean logic in C++. (/me was bored)
The software is inspired by Forth (the programming language) because it makes use of an stack and the reverse Polish notation.

The quickly written readme is currently available in German only.

This is an example for an XNOR with three inputs:
Formula:
a !not b !not c !not And And a b c And And Or a b !not c !not Or Or And
Or the simplified (optimized) version:
a !not b !not c
!not And And
a b c And And Or

Calculated truth table:
a b c Z
-------
0 0 0 1
1 0 0 0
0 1 0 0
1 1 0 0
0 0 1 0
1 0 1 0
0 1 1 0
1 1 1 1

Download:
Bool_solver.zip

Sunday, September 26, 2010

Some C helper routines...

I wrote a small application for counting the number of lines (of code) in *.c files today.
As a side effect i have now some handy functions for different applications.
Luckily i had the passion to write them.


Lets take a look at the functions:
void findFiles( char *, void (char *, char *) );
Finds all files in a given folder + subfolders and calls a user defined callback function.

const char *getFileType( char * );
Returns the file extension of a given file.

const char *right( char *, int );
Returns 'i'  chars from the right side of an string (same function as the command 'right' in VBS).

Works with PellesC 6.00.4.
I used some non standard C functions in the code. So it will not work with every compiler without modifications.

Here is the library: utils.zip


(God damn...! The layout on blogger.com is so crapy)

Tuesday, July 13, 2010

Latest work...

... currently i am working on a capacitive pipe brake or water detector.
 We had too many pipe breaks in the cellar.

Ok - in fact it is almost finished, i only lost a bit of my passion.

The circuit needs very few power (7µA @5V) and has a low part count. It could run several years with two AA batteries.
After endless frustrating hours coding an debugging with WinAVR and AVR Studio in the past, i gave mikroPascal a try in this project. And so far it works great.

Gameport to PS/2 converter - the build

Some weeks ago i soldered my gameport 2 PS/2 converter on a breadboard.
Oh yeah - i am beginning to hate breadboards...
It took more time than thought, but i finished it and the circuit worked. At least with my trusty old 80286 computer. With my new one it did not - the circuit was blocking my keyboard as soon as i pressed a button on the gamepad. So it is only a 50% success.
Works on my old computer, but not on my new one.
With an logic analyzer it would be a piece of cake to make it work...

I modified the plan a bit. You should keep in mind that the connection to the connector pins on the male and the female ps/2 connector must to be mirrored.

For the female ps/2 connector i cannibalised an old industry pc motherboard.
For the male part i stripped away the cable from an old keyboard. It is good to have a lot of trash at home. ; )
The gameport connector was bought.

Sunday, May 30, 2010

Processor artwork

Because i had a lot of processors and microcontrollers laying around, i made some "artwork" out of the stuff.
I bought a piece of ESD foam and sticked and glued all the stuff onto it.

Partlist:

Microprocessors:
  • Harris 80C286, 16 MHz
  • Cyrix 80387 math. co-processor clone, 33 MHz
  • Intel 80386DX, 33 MHz
  • Intel Pentium 1, 166 MHz
  • Cyrix Media GXm, 266 MHz
  • AMD K6-III, 400 MHz
  • AMD K6 2, 500 MHz
 Microcontrollers:
  • NEC 8085AHC
  • Siemens 80C537, 16 MHz
  • Atmel Atmega 8, 16 MHz
The two silver pieces in the middle of the foam are hard disk magnets, holding the foam on the magnet board.
An AMD 600 MHz Athlon slot a was to heavy to be glued on the foam. ;)