What's the shortest path to DM2?

Chat about "The Legend of Skullkeep", the true sequel to the original Dungeon Master.
This forum may contain spoilers.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Torham Zed
Neophyte
Posts: 3
Joined: Wed Jun 27, 2012 12:00 am
Location: In the magic shop

What's the shortest path to DM2?

Post by Torham Zed »

I mean this in a development sense. So chances are, only a select few people around here could give a definitive answer.(Paul, Sophia, Solito. Others I'm sure, I just didn't spend any time creating a list of active forum participants who are developers of the more high profile projects around here)

At first glance, it seems as if CSBwin is the most likely candidate, because I'm a linux user.

As a Java application, DMJava seems a likely candidate too, but I find it odd that the later versions rely on a windows batch file for launching. It comes with it's own internal graphics(some) so there's a base of graphics to work with.

It seems that from what I can find, DSB isn't exactly linux-ready, much less looking into(and attempting) to add features to it.

I don't ask about this because I mean every one of you developers should hurry up and snap to it. I'm looking at some of the things around here and on the DM Encyclopedia, and in a lot of ways this is an ideal place for me to start to learn coding beyond what I'm being assigned in classes.

Of all the DM/esque games, Skullkeep was my favorite. But I don't want to re-invent the wheel and create yet another clone. Enough of that has been done.
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: What's the shortest path to DM2?

Post by Bit »

First I didn't really understand the question, but with the post about yourself it comes clearer.
The internal mechanics of the DM-games isn't that different from any other game, though, you will have problems to learn it from the existing sources here. CSBwin is absolutely close to the machine code, even keeps register names often, and has a lot of macros to make all fit with the WinAPI. The flow is sometimes hard to debug.
For DM2 not much stuff is available. You could try Kentaro's works with skwin, but those are even closer to the machine code, and a lot of functions are still numbered, because the usage is not revealed yet.
Is it now even two years ago that I started my DM2-project with the DOS4GW-version?
All that you can learn from those sources, is the command set of the i86-processors, the DOS-dpmi-interface and how interrupts work. Those are about 1500 routines, not counting the driver, a total of 150000 lines of assemblercode.
From time to time I dig it out and continue a bit, it's more like a massive crossword-puzzle to me.
Basically it's the same as DM1/CSB.
Better try to get some written or video-lessons about gameprogramming from the net.
Later you will find the most design things in the CSBwin-sourcecode again, and then it's like always:
Once you understand it - the magic is lost...
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: What's the shortest path to DM2?

Post by beowuuf »

The biggest thing is that there are lots of subtle AI stuff buried in DM2 that are not immediately obvious, and so not likely to be replicated without some deeper diving and intuition with the source coce.
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: What's the shortest path to DM2?

Post by Bit »

Here's a basic flow:

- Init API and create needed objects
- Load some savegame or initial setup, which is finally nothing but loading a video into a player.
Now there's the more or less endless loop:

Check what's in the event list and adjust the 'state of the machine'. This may include all about screen(pages) and also timing effects.
Handle all instances of different types of objects (may be players, monsters, actuators etc.). That's the 'physical' part.
At this point technics are also a bit different. The ones do all things more 'cycled', the others write new events into the eventlist. Truth lies in the middle.
While doing so, objects may be deleted, new ones spawned. In some cases you may jump here out of the loop...game over.
Then on to the visible stuff. The 'state of the machine' will tell you what and how to render.
Nowadays the objects often got visualizers that know how the object gets represented under different circumstances.
But after all, you still need some kind of manager for that, or you will calculate too much in vain.
When the picture is built, shift it to the screen.
And again - next tick...

http://cplus.about.com/od/games-program ... amming.htm

One note:
The 'classic' programming in C allowed things & tricks, that each modern C++/Java-Programmer would kill you for.
Same with the graphic-'DB' of DM/CSB. When porting it to Allegro, I finally kicked a lot of the original things and replaced it. They tricked it that much, that I lost overview and what they are doing there at a certain point.
So - it's nothing to learn the basics of game programming, except there is one who can explain...
User avatar
Bit
Arch Master
Posts: 1064
Joined: Mon Mar 03, 2008 10:53 am
Location: Nuts trees

Re: What's the shortest path to DM2?

Post by Bit »

beowuuf wrote:The biggest thing is that there are lots of subtle AI stuff buried in DM2 that are not immediately obvious, and so not likely to be replicated without some deeper diving and intuition with the source coce.
After two years I can't even confirm this, because I'm not that far :mrgreen:

But I can say that they got problems even with very simple stuff.
Designed from obviously 16-bit-code, the WATCOM-compiler extended to 32-bit wherever possible.
Though, even minimal functions like MIN(a,b) or ABS(a) operate on 16-bit only when no one expects it.
I saw a lot of games from those times that ran into problems with bigger numbers that passed the 16-bit-margin.
Seemed to be a compiler problem...
Post Reply

Return to “Dungeon Master II: The Legend of Skullkeep (DM2)”