Welcome, new user. Please log in or register.

elias Mon 17 Apr 17, 01:02

I actually put in another 2 or 3 hours and I think the game is very much ready to be worked on now.

The old source code was 9753 lines.

The new source code is 862 lines. (!)

One reason is that I completely removed the level editor - I extended the converter script to transform the original levels into YAML to also allow SVG input. This means the game now only understands YAML (with libyaml, so I need no code for it at all) and levels can be imported from SVG, so it's easy to create them in Inkscape or Blender or anything else with an export function.

Collision detection is done using the excellent chipmunk library now, so I have virtually zero lines of code for collision/vectors. It also is much easier to work with now and completely robust, unlike the original.

And lastly, I did not re-implement everything yet again, so once it will be feature complete there will be a few more lines again.

Can't wait for the next TINS now to finish it :)

elias Thu 13 Apr 17, 04:37

Reimplemented line-of-sight calculations. Basically I'm drawing black triangles over everything blocked from view.

elias Wed 12 Apr 17, 04:15

Tonight I was looking at artwork for a bit. The original graphics were all made in PovRay - but for the update I'd like them in slightly higher resolution. I looked a bit into downloading PovRay and trying to re-render... but gave up on that idea and instead re-made the player and the one monster I'm going to include in Blender. My art making skills didn't get any better in the last 15 years or maybe even deteriorated though :P

Left is a screenshot of the original game, right is what my improved version looks like currently.

elias Sun 9 Apr 17, 20:11

Well, my wife's parents visited yesterday so I didn't really have much time to spend on this.

And I only just finished the code to import the old levels. Next weekend is Easter and we'll leave Friday right after work, so the competition basically ends for me on Thursday. This means there is now nowhere near enough time to get the game to the same state of completeness it was before I started.

So I think I will cut the scope down to:

- Have only a single weapon (shotgun).
- Have only a single monster (red ball).
- Have only a single level.

If somehow I can complete that and have time left in the next 4 evenings, I may add more of course.

Then in the *next* TINS I'll do another round of improving by adding the remaining weapons, monsters and levels :)

elias Sat 8 Apr 17, 14:03

Well, first I wanted to see the kind of levels we had. I assume it is these .lvl files:

2713 Sep 28 2004 5room.lvl
4911 Sep 28 2004 9room.lvl
7931 Sep 28 2004 amarillion.lvl
12765 Sep 28 2004 awake.lvl
29398 Sep 28 2004 corridor.lvl
15781 Sep 28 2004 Lambik.lvl
610 Sep 28 2004 long.lvl
9802 Sep 28 2004 networm.lvl
5299 Sep 28 2004 test2.lvl
1959 Sep 28 2004 test3.lvl
11084 Sep 28 2004 test.lvl

Apparently the .zip file I found was made 3 years after the original game and did not preserve dates.

The files have a weird format, just 100ds of definitions like these:

Vertex {
x 109
y 93


Line {
next 1
sector 0
target -1
vertex1 3
vertex2 0


Sector {
center_x 696
center_y 690
color 0
flags 0
lines 106
radius 116
tag 0


Object {
flags 0
tag -1
type 256
sector 3
x 276
y 306

I decided to write a quick Python script to convert that to YAML:


This means I can just use libyaml to read them now and don't have to port over the original parser.

My next step will be a program to just display all those lines.

Also, here's a sort of class diagram that was included in the .zip.

elias Thu 6 Apr 17, 12:28

I think I'm picking my last teamhack entry for improvement. According to this very website's history section that was in 2001. I found an ancient zip file with the source code - it uses a C++ dialect which no longer compiles and some Allegro 3.9 (!) WIP.

I hate C++, especially ancient dialects thereof, and I'm not going to waste time on trying to compile an Allegro 3 WIP :P So I will probably start porting the code to C and Allegro 5 on Friday :)