Wednesday, March 02, 2016

Codebases for the masses

I am unhappy with the state of software these days. All the code I worked on professionally is not meant to be read by mortals. It is totally detached from both human and machine.

I believe the computer programs should be written in a way that even a person with no formal education in programming should be able to read and at least partially understand them. Using only a text editor and some means to navigate and search through files. The program flow should always be visible, expressed in easy to follow steps. The data transformed by the program should be laid out plainly, its form and size easily recognized by compiler, machine, and human. The program should have a clear entry point, clear work loop and exit/cleanup sequence. A program should receive input data, transform it, and present it back to the user in some logical way.

But we no longer work with "text editors", "source code files", "program flow", "data input/output", "program entry points" or even "functions" or "loops". All these are obliterated by "IDEs", "classes", "containers", "objects", the list goes on. Software today is not simply written in a programming language as means to communicate it to both human and machine. It is "engineered" into "design patterns", then split into illogical abstract units called "classes". Classes materialize into "objects", that receive input data at birth, then keep living and give fruit by... self-mutation. These beasts often refer other "objects" and are ultimately kept in omnipotent "controller" or "manager" god objects. There is no way for a person armed with just a text editor and a file manager to navigate through this programming mess. There is no way to guess the actual flow of the program, unless you run it (often through a debugger). Reading modern codebases is no different than reading a book whose chapters read as tiny books of their own, with the small catch that they refer other (unrelated?) chapters. There is no start of this book, there is no clear middle or end part neither.

Write your programs so I can read them. Why not write them so your non-programming friends can read them. Thanks!

Wednesday, April 06, 2011

Monday, October 25, 2010

Final planet

Some people tell me that it looks like a stone pad :) What do you think?

Saturday, October 23, 2010

Sunday, October 10, 2010

Sunday, October 03, 2010

Color picker

Added a color picker control. IMGUI is the way to go. Moved to Geany.

Saturday, October 02, 2010

Friday, October 01, 2010

Video of a tiny demo

Use ffmpeg to screencast in ubuntu. Here is a command to capture lossless mkv:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0+4,400 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv

Wednesday, September 15, 2010

Final with weapons and engines. And some thoughts on creating 2d/3d assets.

Its amazing how easy it is to create 2d assets opposing to the 3d stuff. The steps from the "concept" to the thing you see on screen in 2d are really trivial compared to the 3d. Here's how i do it.

1. Do a nice sketch with a pen on paper
2. Cleanup the sketch a bit by copy it on the window :)
3. Shoot it with a webcam/camera
4. Trace it by hand in inkscape
5. Cleanup the traced splines and actually generate the final vector graphic.
6. Export to raster
7. Do diffuse
8. Do cel shading
9. Do Decals like text marks etc.
Here are some funny "concepts" :):
The final result:

Entirely done with a pen, paper and a mouse. Kudos to the people behind the amazing Inkscape program.

Sunday, August 29, 2010

?Better? Ship

all similarities to certain male reproductive organs are unintentional :)

Sunday, July 25, 2010

A ship with engines and weapons

A ship with engines and weapons

Wednesday, July 21, 2010

A ship

A ship

Tuesday, September 08, 2009

Monday, April 13, 2009

More GIMP fun

Spread the GIMP love:

Saturday, March 21, 2009

Toying around with Gimp and my tablet

Sunday, February 08, 2009

Some inkscape/gimp experience

I have drawn this image using a pencil. Then I took a picture using a cheap webcam. I have imported the shot in Inkscape and traced it with splines:
From martyr
Then I have stored the vector image as .svg file and reopened it in Gimp:
From martyr
Stroke the path with line 1 pixel tick, added some blur and masked the silhouette with modulating black and white mask:
From martyr
From martyr

Sunday, February 01, 2009

Its official: martyr is dead

The game is a tactical shooter in a 2.5d isometric view. The game objectives vary on different maps and could be some of the well known from the rts and fps genres "capture the flag", "free for all", "destroy all enemy structures" or some custom modes like "take control of point X and remain in control for N minutes". A game continues about 20 minutes.

The maps are made of tiles and "brushes". Each tile is about 2 meters wide. A brush takes exactly one tile. There are only walls and passages but no bridges on top of the terrain and no high grounds a-la starcraft. The largest map is 256x256 tiles. The camera is with a fixed height and angle (less confusion for the players). All lighting and shadows in the game are dynamic.

Every player has 1 PC and up to 2 NPCs under his control. NPC can only take simple orders like "guard me", "guard X", "build structure X", etc. There are many "ambient" NPCs runing on the map, occasionally engaging in fights not controlled by the players. The structures placed on the map by the players are "turrets", "radars" etc. The PC (atleast for one of the fractions) is a cyborg. His body parts (legs, torso, left arm, right arm, head) are replaced during the game with visually different ones. The player starts with a completely "humanoid" body and gradually mutates into a machine with visually distinctive silhouette information about the PC stats are easily visible.

Implemented are the structure of the world, the lighting, cel shaded animated models, static decors, a primitive editor, UI system, particle systems, a primitive art pipeline of exporters from blender to the game, a bit of network code and NO GAMEPLAY :). The demo runs on 32/64bit windows and linux. There is some minimal art assets done by me.

Im no longer working on this project. I just dont have the time anymore. Thanks to everyone involved! Im still checking this blog and I'll continue to post here. Any questions posted here will be answered.

The source code and the art is free for download atleast until cuts me off of their service :).

Monday, July 21, 2008

Roboarm update

I have decided to paint the AO this time, instead of bake it in blender. And im pleased with the result:

I paint the steel and modulate it with the "AO":

Some color:

The finished piece:

Saturday, July 19, 2008

Saturday, July 12, 2008

Martyr video

I have added some hack for demo recording. Here is a video of a demo.

Wednesday, July 02, 2008

Tile decals

I have added support for decal texture over the tiles. bumped up the FOV a bit:

Tuesday, June 24, 2008

Windows binary available

I have uploaded the latest windows binary here

Saturday, June 21, 2008

Screenshots, volume lights and more.

the resources and code for the volume light fx are under version control now. added support for fx on each brush declaration. added support for screenshots inside the game. fixed a bunch of crashes in the console code. refactored the code for sprites/brushes/tiles. windows users have to wait until next week for a working source tree and binary. heres the disco screen for the day taken inside martyr for the first time

Wednesday, June 18, 2008

Volumetric light effect

- Im trying to implement volumetric light effects. Heres the result so far:

there is some problem in gnome when capturing opengl screenshots. the artifact on the leg of the character is gnome/glx fault. im going to implement screen capture support inside martyr anyway.

Monday, June 16, 2008

New tiles

- im trying a new method for creating tiles inspired by this game:
here's how im doing it:
in blender: im making a contour, extrude/bevel it, render with an ortho camera and sun for a light
in gimp: fix the colors, make some detail/dirt, add some hilight and thats it. all made with the mouse. still look a bit sterile but it could pass for stylishness

Sunday, June 15, 2008

- added support for self illumination on brushes
- the lights color can be scripted outside the renderer
- game split into client and server parts
- network code started

Sunday, May 11, 2008

Just created this explosion. The game engine supports sprites/billboards now. r_temp switches between blending modes for sprites.

Saturday, April 19, 2008

The code is officially GPL.
Fixed the crashes and artifacts in the lighting code on adding a brush on the map.
The contours and occluded silhouettes really work.
Any feedback is welcome.
Some keys and console vars/commands:

L - lights tab
B - brushes tab
T - tiles tab
arrow keys scroll the screen
'~' - console

w_temp - how many characters to draw at the cursor

Sunday, April 13, 2008

Ported to linux again. It was relatively painless this time around.