Descentforum.DE Forum Index Descentforum.DE
Search | FAQ | Memberlist | Usergroups | Newsfeed Newsfeed  Register
Profile | Log in to check your private messages | Log in 
Chat | D3-Tactics | Downloads | Map | Links | Serverlist | Teamspeak 

Descent 3 demo parsing/writing library

 
Post new topic   Reply to topic    Descentforum.DE Forum Index -> English Embassy / International Descenters Forum
View previous topic :: View next topic  
Author Message
The Lion
Forum-Nutzer


Joined: 23 Jul 2006
Posts: 55
Location: The Netherlands

PostPosted: 05.05.2008, 20:10    Post subject: Descent 3 demo parsing/writing library Reply with quote

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.



d3demo-0.1.tar.gz
 Description:
Descent 3 demo library source code distribution

Download
 Filename:  d3demo-0.1.tar.gz
 Filesize:  32.48 KB
 Downloaded:  631 Time(s)


_________________
Back to top
View user's profile Send private message
Munk
Forum-Nutzer


Joined: 30 Jun 2001
Posts: 2140
Location: Herzogenrath

PostPosted: 06.05.2008, 10:07    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
D.Cent
Forum-Nutzer


Joined: 05 Mar 2006
Posts: 507
Location: Stuttgart

PostPosted: 06.05.2008, 15:26    Post subject: Reply with quote

Nice work!

With the "fixdemo"-example all my D3-demos are working now!!
Back to top
View user's profile Send private message
Foil
Forum-Nutzer


Joined: 06 Jan 2007
Posts: 48
Location: Denver, Colorado, US

PostPosted: 08.05.2008, 20:41    Post subject: Reply with quote

Very cool, Lion. Sehr glücklich

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
View user's profile Send private message
The Lion
Forum-Nutzer


Joined: 23 Jul 2006
Posts: 55
Location: The Netherlands

PostPosted: 08.05.2008, 22:45    Post subject: Reply with quote

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
View user's profile Send private message
The Lion
Forum-Nutzer


Joined: 23 Jul 2006
Posts: 55
Location: The Netherlands

PostPosted: 21.05.2008, 22:00    Post subject: Reply with quote

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.



d3demo-0.1a.zip
 Description:
Descent 3 demo library source code + windows binaries

Download
 Filename:  d3demo-0.1a.zip
 Filesize:  91.24 KB
 Downloaded:  607 Time(s)


_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Descentforum.DE Forum Index -> English Embassy / International Descenters Forum All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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
PayPal


Descent is a trademark of Interplay Productions.
Descent, Descent II are © Parallax Software Corporation.
Descent III is © Outrage Entertainment.
Descentforum.DE and Descentforum.NET is © by Martin "Do_Checkor" Timmermann.
Powered by phpBB © 2001-2008 phpBB Group