 |
Descentforum.DE
|
View previous topic :: View next topic |
Author |
Message |
The Lion Forum-Nutzer

Joined: 23 Jul 2006 Posts: 55
Location: The Netherlands
|
Posted: 05.05.2008, 20:10 Post subject: Descent 3 demo parsing/writing library |
|
|
Yo everyone. I've just finished work on a C library for editing Descent 3
demo files, with bindings to the Lua scripting language. Its source code
is provided right here, as an attachment to this post. You will need a C
compiler (and linker of course) to build the base library. To compile and
link the Lua module you will also need to have Lua installed, including
its header files.
If you're running Windows and have the old egcs-1.1.2 compiler (used
for D3 SDK to compile mods and levels), you can probably use it to build
the library as well, although you'll need to do it manually. The INSTALL
file included in the distribution contains further information on this.
The library exposes every single byte in the demo files, but there's still
work that could be done on identifying and interpreting the various types
of data they contain. I hope that releasing this library will encourage the
other coders in our community to help me tame those demo files and
create tools that make it easy for the others to perform various kinds of
operations on them (e.g. reduce or increase the framerate, interpolate
object movement and rotation, fix crashes, etc.).
Some excerpts from the readme:
Quote: | Description
-----------
This is a library that provides functions to interpret and write
Descent 3 demo files. It is written in C to allow for fast
processing of demos, but also provides bindings to the Lua
scripting language to make it easier to inspect demos and to
perform various simple operations on them without having to go
through the hassle of coding up a new C program. This even makes
it possible to inspect and edit demos interactively to a certain
extent.
I've designed the interface to be small and simple, and I've
taken care to avoid memory hogs. This naturally comes at the cost
of some flexibility: demos can be read and written sequentially
only; other than rewinding to the start, you can't move around in
a demo. Furthermore, the reader and writer are separated; the
only way to change a demo is to write a new modified version and
then replace the original demo by it. |
Quote: | Additional licensing info / clarification
-----------------------------------------
This library is licensed under the GNU GPL, *not* the GNU LGPL.
This means that any program that uses this library can only be
released under the GNU GPL, since it effectively constitutes a
part of the program and no exception is made for linking to this
library.
This includes Lua scripts that use the d3demo module, but for
convenience reasons I don't require you to include a full copy
of the GPL with such scripts; just make sure its users know where
to get it and the full d3demo library source code, and don't add
any further legal restrictions.
I made this choice because I want to make sure that all programs
that use this library give their users the same freedom that
comes with this library: permission for anyone who wishes to do
so to use, modify, and/or redistribute them. The GNU GPL is the
tool used to ensure this. |
Description: |
Descent 3 demo library source code distribution |
|
 Download |
Filename: |
d3demo-0.1.tar.gz |
Filesize: |
32.48 KB |
Downloaded: |
651 Time(s) |
_________________ ☕ |
|
Back to top |
|
 |
Munk Forum-Nutzer

Joined: 30 Jun 2001 Posts: 2140
Location: Herzogenrath
|
Posted: 06.05.2008, 10:07 Post subject: |
|
|
coool ^^
[vision]Maybe someday it is possible to stream live matches to observers by demo files :)[/vision]
Last edited by Munk on 06.05.2008, 10:08; edited 1 time in total |
|
Back to top |
|
 |
D.Cent Forum-Nutzer
Joined: 05 Mar 2006 Posts: 508
Location: Stuttgart
|
Posted: 06.05.2008, 15:26 Post subject: |
|
|
Nice work!
With the "fixdemo"-example all my D3-demos are working now!!
|
|
Back to top |
|
 |
Foil Forum-Nutzer

Joined: 06 Jan 2007 Posts: 48
Location: Denver, Colorado, US
|
Posted: 08.05.2008, 20:41 Post subject: |
|
|
Very cool, Lion.
I don't have any Lua tools installed at the moment, so I haven't seen this yet. Hopefully I can get a chance to play around with it at some point.
|
|
Back to top |
|
 |
The Lion Forum-Nutzer

Joined: 23 Jul 2006 Posts: 55
Location: The Netherlands
|
Posted: 08.05.2008, 22:45 Post subject: |
|
|
You don't need to have Lua installed if you just want the C library.
This is in fact the default; if you don't explicitly give Make the
"LUA=1" option, it will not build the Lua module.
Except for that Makefile option, all Lua-specific stuff is contained in
the "lua" subdirectory under the main source tree. The Lua binding
code was added after the C library was finished, and they are well
separated.
_________________ ☕ |
|
Back to top |
|
 |
The Lion Forum-Nutzer

Joined: 23 Jul 2006 Posts: 55
Location: The Netherlands
|
Posted: 21.05.2008, 22:00 Post subject: |
|
|
I've used egcs-1.1.2 on wine to compile some windows versions
of the example utilities found under the examples directory, as
suggested by Moon. They are stand-alone binaries that AFAIK
don't have any dependencies other than standard windows DLLs,
and can be found in the "bin-win32" directory that I added to the
new archive attached to this post, labeled "0.1a" and in ZIP
format this time, but otherwise identical to 0.1.
If you want to redistribute these without having to worry about
the legal stuff, simply distribute that ZIP file.
Description: |
Descent 3 demo library source code + windows binaries |
|
 Download |
Filename: |
d3demo-0.1a.zip |
Filesize: |
91.24 KB |
Downloaded: |
643 Time(s) |
_________________ ☕ |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|