Have you ever tried to run demos in dosemu or wine? I was thinking about creating a database of configurations required to run demos a few months back but I was sidetracked by exams and other such mundane happenings. Now I have the time and I was reminded about this by an email I received last night (It’s at home! Credits due when I get a chance!). I have some ambitious plans for a database that can be updated easily and daily with lists of working demos as well as configuration details.
Interested? Mail me at the address below!
On a seperate note, install-mail now has it’s own page. Check the side bar!
Monthly Archives: October 1998
DemoNix may be moving shortly. …
DemoNix may be moving shortly. More news before it happens!
Bladeenc will be released in source form! It will be distributed under the LGPL. No news as to a release date at this time. The next version will hopefully have (among other features), STDIN/STDOUT support which will be very handy for all you script writers!
Check out Unload to turn your desktop into a MAC! It works quite well. Worth looking at!
New version of install-mail coming soon, as well as a page for it.
There’s been a plethora of music scene related tools coming out recently. There’s the GTK+ mod player mentioned in the last update as well as several other trackers and players appearing on freshmeat. Make sure your demo scene friends know about all these apps coming out!
I stumbled across the Triad homepage yesterday where I found two new demos by Triad for the C64! One is all about the Spice Girls while the other one looks _very_ similar to another demo, Red Storm, released by them a few years ago. Nice to see they’re still working on, and releasing C64 productions in 1998!
In preperation for the shutdown of Hornet, the PC Demo Fan Club has moved to a whole new site. No new demos mentioned though.
Take a look at linux.scene.org …
Take a look at linux.scene.org which is still under severe construction as of this time!
Also worth a look is Gtkmod, a mod player with a GTK front end!
Demo Tutorial 1
This tutorial will be the first of a series I’ll write about creating demos. I’m going to start off with simple topics and introduce concepts and ideas you’ll need when coding graphics on a computer.
What’ll we do then?
I’m going to use the PTC library to demonstrate how to do graphical effects on your computer. I’m developing this tutorial on Linux so any instructions on compiling the example programs will obviously be for that platform. If anyone feels like contributing or changing anything please feel free to do so!
Before we get started you’ll have to download the PTC library from the link above. Do that now and click back to get back here when it’s downloading.
Unpack and compile the library somewhere (Make sure you read the INSTALL file. There are notes there on optimising the compilation.)
Assuming that all went well, change directory to the PTC “examples” directory and create a directory there called “tut01”.
What about writing a point to the screen? Cut and paste the following into a file called Tut01.cc in the tut01 directory.
#include “ptc.h”
int main()
{
try {
// create format
Format format(32,0x00FF0000,0x0000FF00,0x000000FF);
// create console
Console console;
console.open(“tut01”,320,200,format);
// create surface
Surface surface(320,200,format);// loop until a key is pressed
while (!console.key()) {
// lock surface
int32 *buffer = (int32*) surface.lock();
// draw a white pixel at (160,100).
buffer[160+100*320]=(255< <16)+(255<<8)+255;// unlock surface
surface.unlock();// copy to console
surface.copy(console);// update console
console.update();
}
// exit
return 0;
} catch (Error error) {
// report error
error.report();
}
}
The following is the Makefile you’ll use:
# GNU Makefile for the X11 part of the PTC 2.0 C++ API
# Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at)
# The PTC 2.0 C++ API is (c) 1998 Glenn Fiedler (ptc@gaffer.org)
# This package is licensed under the GNU LGPL
#
# Please refer to the file COPYING.LIB contained in the
# distribution for licensing conditionsinclude ../../Makefile.config
PROG1 = Tut01
all: $(PROG1)
$(PROG1): $(PROG1).o
$(CC) $(PROG1).o $(PTCLIB) $(PTC_X_LIBRARIES) -o $(PROG1) .cc.o:
$(CC) -c $(CFLAGS) $< clean: rm -f *.o distclean:
rm -f *.o rm -f $(PROG1)
Now compile Tut01.cc by typing make.
If you have previously compiled the example programs that came with PTC this should compile without problems.
Now run it from an xterm by typing:
Press a key to escape out of the program
You’ve started on the road to creating a demo!
How it works.
(lots of info taken from the PTC Intro)
Format format(32,0x00FF0000,0x0000FF00,0x000000FF); – The Format class holds information about how pixels are composed. ie. 8 bit, 16 bit, 32 bit colour. The above code creates a 32 bit colour format.
Console console; – This is “your interface to the world. It contains the routines to access the framebuffer, and some simple keyboard routines.”
console.open(“tut01”,320,200,format); – This either opens a window or sets the screen resolution to 320 pixels across by 200 down. PTC will attempt to change screen colour depth to the closest one available to match your format.
Surface surface(320,200,format); – “A Surface is a memory area (in system memory, not in video memory) that you can draw into if you don’t want to draw directly to the screen.”
This command creates a 32 bit colour surface which is 320 pixels across and 200 pixels down
while (!console.key()) {
…
}
– While no key is pressed do the following…
When you lock the surface to write to it you get a pointer to it in memory. Then the program draws a single white pixel on it.
The surface is then unlocked, and copied to the console before the console is finally updated (meaning the image in “buffer” is drawn to the screen.
Notes
I presume you know how to code in C++. If you don’t you’ll be lost. Mail me if you want to know the _very_ basics and I’ll include some docs on that.
The above example was derived from examples in the PTC examples/ directory. Take a look there!
You do all your drawing to a special part of memory called a buffer. When all your drawing is finished that buffer is copied to the screen to be displayed. This way of drawing avoids the choppy updates you see in some demos and games where the image you see appears to update right in the middle of the screen.
The buffer you draw to is a 32 bit colour image of the screen. Even if your video mode isn’t 32 bit the conversion will be handled by PTC before it displays your buffer on the screen.
Make sure you read the docs on the PTC homepage. There isn’t much there, but it’s informative, and of course, you have the source code to the library to play with too. Make sure you take advantage of the “GPL” and learn from the code!
Want to code demos? I've star …
Want to code demos? I’ve started a tutorial on demo coding. If you’ve done any coding at all it won’t be anything new to you but for those others have a look. A knowledge of C++ is presumed, and is almost essential. Although I’m developing this in Linux, the code should compile just as well in Win32 with that platforms’ port of PTC.
Check the “Tutorials” link on the left side for more details!
Censor have a really nice site. Lots of screenshots of their old C64 stuff!
Also check out www.c64.com for lots of old C64 games!
Sad news. The Hornet archive w …
Sad news. The Hornet archive will soon close up shop and the Hornet group will disband. For those who don’t know, Hornet is probably the largest demo archive in the world but due to fading interest the group won’t continue to support the archive. There’s also an announcement available explaining what happened. The archive will be given over to scene.org so hopefully it will continue to exist.
As a final note, there are still Hornet CDs available. If you’re into demos it might be worth buying a copy of each.. I will.
I found a music tracker for Linux on freshmeat today.
Check out Sound Tracker which is described as a music tracker for the X window system. It looks promising.
Somehow by coincidence I come across another tracker for Linux. Have a look at Keg Tracker. Nice screenshot too!
Totally unrelated but interesting nevertheless. A friend discovered how to get access to any file on a WinNT machine even without being admin on the machine. Take a look at IE4 (Internet Options) and you might figure it out.. (This is probably an old hack but I haven’t heard about it before..)
I'm kept busy these days. Apa …
I’m kept busy these days. Apache+mod_perl+DBI is amazingly fast! 100 concurrent queries only took 2-3 seconds! (tested with “ab”)
PCPlus is out again this month featuring Linux stuff such as NS 4.06, Interbase 4, and Blender. It also has a snapshot of the Mozilla source code from last August. Well worth getting (even if you only want Delphi 2 which is on the other CD!!)
I finally compiled PTC and the included demos run very nicely. The “RealTunnel” demo is quite nice. Just as I compile it a new version comes out! Check out the homepage above!
Having trouble getting email to work as you’d like it to in Linux? Check out my install script which I wrote after finally getting qmail working! It’ll probably work for you but I ony guarantee it’ll take up room on your computer!
I updated my desktop page with a 4 screens wide screenshot of my Window Maker desktop. Have a look. The jpeg is only 18k!
Woo! I broke 10,000 hits! Celebrate! *grin*