New DirectX9 DM clone - entombed

Lesser known clone projects or isolated news items about rare or unusual clones.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Tom, how far have you got with your own project ? Any screenshots, etc ? The walls are just flat quads with a nice ps/vs applied. If you tried to reproduce the effect with geomtry alone it would be thousands of polys and you would need a mega machine to run it.

Trakl, the graphics arent bitmap based, they are rendered at run time from geometry. I dont thnk its going to run on your machine sorry.

I have just managed to double the frame rate on my laptop to a solidish 60fps. This was achieved by turning the lights to static (no swinging, but everything else the same) and turning anistropic filtering off. It still looks the business but runs alot quicker. I think its going to be ok for any of you with a half decent gfx card. I have looked at whats available and a £60 gfx card (uk) would do the trick (so low/mid spec card really).

cheers.

:? Question - Suule mentioned a few posts back that I should talk to PaulS about the dynamics of the engine, can I ask who PaulS is ? anyone ? thanks.
User avatar
Suule
On Master
Posts: 656
Joined: Tue Aug 09, 2005 11:42 pm
Location: Warsaw, Poland

Post by Suule »

Paul S - Paul Stevens - person who disassembled CSB for Atari ST and rewrote it as CSBWin
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Excellent, thankyou for your ultra quick response.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

DSE wrote me pivately asking about how
experience, leveling up, etc. work. I thought
we might as well keep this discussion out
in the open.

The answer is, I don't know. I translated the Atari
binary code but never pretended to understand
the experience system. Nor monster behavior,
etc. My translation of this area of the code
was very mechanical.

The little bit I figured out is in my documentation
folder at dianneandpaul.net/CSBwin. Other people
have a better handle on this than I. Perhaps one
or more will volunteer.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

I've successfully translated the "LevelUp" function into Lua for DSB, and I think I've got a pretty good handle on how it works. I'm also starting to understand other aspects of how DM calculates things. I may be able to help.
User avatar
Suule
On Master
Posts: 656
Joined: Tue Aug 09, 2005 11:42 pm
Location: Warsaw, Poland

Post by Suule »

To PaulS:

The only flaw in that documentation IMO is that not of the data fields are propely named. It makes it really hard to read when you dig through the source. But like Sophia and I agreed: Back then you didn't know what each data field was responsible for.

Sophia:
Have you tried translating the AI yet? ;)
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

The one that I was most interested in was the attack damage. I have looked at your flowchart and its awesome, very nice !! A few questions and then I can have a go at implemeting this tonight -

What is -

1. hero quickness (which attribute/skill)
2. monsterbyte8[4]
3. leveldifficulty
4. tag16476
5. DetermineMastery function - is there psuedo code or a flow chart for this function ?
6. Lastly, how is the creatures armor taken into account (is this monsterbyte8[4]) ?

Thanks for your help. Your creature flow chart was very useful. I will try recreating that as well this week and see how it goes.

If I use the stats from the DM/CSB encyclopedia for items and creatures with the above functions, the game should behave like the original DM ? If so, you have really helped ... cant wait to see.

Sophia - are you able to expand on which parts of the DM system you understand, are you willing to share the information with me ? I hope so :O)

Thanks.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

OK. Those questions are particular enoungh
that I am willing to give it another try. The
answers will not come easily.

First, however, I am going to wait for anyone
else who has already figured out one or more
of these things. No sense rediscovering things
already known.
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

You will go to heaven for this ... :D

Thanks for your time and effort, it is very much appreciated.

Thanks.
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

That's not what I meant. What I meant was, can you import geometry to use for walls, so they're not all simply flat quads? I'm assuming not.

Unfortunately, I don't have any headway on the project. I haven't really started development beyond concept. I posted some samples a while back that were modeled and rendered in 3ds max, but they were only to demonstrate perspective, which has always been difficult for me due to texture memory constaints and my desire to consolidate ranges to mip-maps. It looks like I probably won't be able to do that, but I have another idea that's just as good — actually better, where memory is concerned — but will take longer to implement.

I'm not going the 3-D route. At least, not yet. My greastest inhibitor is and has always been a lack of motivation. I have the technical know-how to proceed, but personal issues keep me from taking that first step.

As for Gambit's suggestion regarding walls, you might consider using two textures that tile together like 1-2-1-2, and alternate between north-south and east-west, so that the textures wrap seamlessly around a single cell. Here's a little diagram demonstrating what I mean (might be broken if my server is down):

Image

Algorithmically, it would look something like this:

If facing tile X is positive and facing tile Y is positive,
— render north/south wall using left texture
— render east/west wall using right texture
If facing tile X is positive and facing tile Y is negative,
— render north/south wall using right texture
— render east/west wall using left texture
If facing tile X is negative and the facing tile Y is positive,
— render north/south wall using right texture
— render east/west wall using left texture
If facing tile X is negative and facing tile Y is negative,
— render north/south wall using left texture
— render east/west wall using right texture

I think that will give you proper results, but you'll need to test it more than I did with this crappy Photoshop drawing. Of course, these operations can be consolidated — I simply didn't take the time — but this should give you a good groundwork. Bottom line: you need two contiguous textures that blend seamlessly but look slightly different. The rest you can generate algorithmically at load-time.

Or, instead of using two textures, you could load one large texture twice as wide as it is tall, and use the above method to generate texture coordinates. That would eliminate the additional SetTexture call, which I would recommend.

If you want one of us to make these textures for you, we can. I certainly can, and I'm sure cows can if he has time.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

DSE wrote: 1. hero quickness (which attribute/skill)
2. monsterbyte8[4]
3. leveldifficulty
4. tag16476
5. DetermineMastery function - is there psuedo code or a flow chart for this function ?
6. Lastly, how is the creatures armor taken into account (is this monsterbyte8[4]) ?
1. It's not a skill. See the function Quickness() in the CSBwin source.

2 and 6. Here is how the monster bytes (as best as I can tell) map to the properties given on the encyclopedia pages:

byte8[0] = Armor (EDIT: I made a mistake before.)
byte8[1] = Base health
byte8[2] = Hit Probabilty
byte8[3] = Poison Amount
byte8[4] = Attack Power
byte8[5] = unused, probably.

I haven't translated physical attacks yet. I'll let you know when I have more information. In the meantime, looking at an ASCII dump of a dungeon from CSBwin and examining the code at the same time might give you more insight into the bytes' values for different monsters, too.

3 and 4. I haven't gotten here yet.

5. I've translated this function. All it really does is figure out if you want your mastery in a subskill or a base skill, add the XP in the subskill to your XP in the base skill if it's a subskill, look up the value in the XP table that is on the encyclopedia, and add some bonuses you get from items to your skill. The code was actually more clear to me than the flow chart, but I don't know, it depends on what you like.
Last edited by Sophia on Fri Jan 12, 2007 12:48 am, edited 1 time in total.
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Tom, thanks ... good work. I will look into this. FYI - yes I can import geometry for the walls so I am thinking of maybe just randomly using a different wall mesh which has a brick missing or sticking out or something. In the massive list of things outstanding this isnt that important to me, I still have a lot of work to do on characters, fighting, advancement, etc. All good fun.

On a positive note - one big plus point is that I have spent the last two days optimizing the code and it is running alot faster than before. I have also included a load of tick boxes for turning directx options on and off, for better/worse computers.

Sophia, I didnt know the source code was available :oops: I will have a look at this tonight, very exciting.

Thanks for all your help guys.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Item 4)

tag16476 has been renamed to
'IsCharacterLucky'.

The 'DeterminePhysicalAttackDamage'
flowchart has been updated and a flowchart
has been added for 'IsCharacterLucky'.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Item 3)

'levelDifficulty' is simply the experience
multiplier for the current dungeon level.
The Hall of Champions has a difficulty level
of zero. All the others are non-zero and tend
to get higher as you progress down into the
deeper levels of the dungeon.
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Thanks.

I have just spent the last 12 hours porting the PhysicalAttack to vb.net with all the support functions it needs to work. Running a 100 sample test against the figures in CSBWin, it looks to be correct. I have one question -

1. Is it correct that the weapon actually does nothing other than give the player the 'actions', there is no advantage using a sword over an axe for 'Melee' for example ? Is this how the orignal was or has the code been changed ?

Does this sound right to you ?

Thanks.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Both the weapon and the attack method have a certain inherent attack power, if I remember correctly.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Does this sound right to you ?
No.

But I have no reason to believe one way
or another. I would have to go back to the
flowchart (and, most likely, because the flowcharts
are little more than guides, the code) to prove
the case either way. And that is more than I
want to do. This stuff is not easy to get a handle
on. You'd have to live and breath it for weeks to
really 'get it'. I'm sure it was built by tacking on
little special cases by the dozen.
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

You are right about the code, it is a bit of a mess and is full of "magic" formulas ... not nice.

There is only one place that adds the "damage" a weapon can do, which is in the DetermineThrowingDistance. This is capped at 100, then passed back to the main function.

It does seem that the biggest gains are not from the weapon per se, but by the action it allows -

1. Slash damage = 16
2. Melee damage = 60 + much higher chance of hit

This combined with the better attributes and mastery and you hit alot harder. So a neophyte with an axe using "slash", will hit for around 3 to 13 points. Same guy with a mastery level (8 ish + stat increases) will have the "Melee" action on the axe and will hit for anything between 17 - 60.

It does seem to work though ... but it is hard to prove its "right".

If someone has a saved game where they have very experienced characters and they can slash with a sword, can you tell me what kind of hit score you get please (on a mummy would be perfect) with each available action, so slash, melee, chop, etc.

Thanks.
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

DSE wrote: On a positive note - one big plus point is that I have spent the last two days optimizing the code and it is running alot faster than before. I have also included a load of tick boxes for turning directx options on and off, for better/worse computers.
You're a genius, DSE! You saved my day. Now I'll be looking forward to your clone again. :)

One question just popped into my mind: Will you include the original creatures into your clone? I'm very impressed by your two-headed club wielder.
Foz
Novice
Posts: 11
Joined: Thu Jan 11, 2007 9:47 am
Location: Manchester, UK
Contact:

Post by Foz »

Unless DSE can actually find the 3d models, or an artist who can do the models... no.

Any 3d artists here?
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

maybe ripping monsters from some 3D games would be a good idea? or from DM Nexus?

http://dmweb.free.fr/?q=node/251
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

Unfortunately I am no programmer or 3D artist at all, this is a project I would have loved to help. :(
User avatar
Erik Bauer
Adept
Posts: 252
Joined: Thu Jan 11, 2007 1:44 pm

Post by Erik Bauer »

First of all hi there, first post!

I've joined here to give my little two copper coins for this project:

I like very much the fact that Lightning and Claustrophobia are handled in a very similar way to the ones that made DM so unique. My only doubt is about the perpetual fog effect you put in your last shots.
Do not misunderstand: the fog effect in itself is very good, but I think that you should use it only in some areas and not everywhere.
This way you can use it as an extra to set the right mood for certain levels and areas.

But these are just my two little coppers... yours seems to be a very good work, can't wait for the first demo to be downloadable!
Don't let a closed door stop you
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Adamo wrote:maybe ripping monsters from some 3D games would be a good idea? or from DM Nexus? http://dmweb.free.fr/?q=node/251
I know of no tools that can do this, but to be honest it wouldn't be worth it -- the meshes in Nexus are of such low poly count, it would be easier to start again from scratch.
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Trakl - can I ask what spec machine you have please ?

Erik Bauer - thanks the email and post. The fog and lighting level for each dungeon level is totally configurable. I have a few levels where the lighting is high with little fog, nice and easy to navigate. I then drop down a pit onto one particular level which only has a couple of lights and thick fog ... even though I know where to go to get out, it still feels claustraphobic. :D
User avatar
Erik Bauer
Adept
Posts: 252
Joined: Thu Jan 11, 2007 1:44 pm

Post by Erik Bauer »

@DSE:
Ok, that is good news!
An idea pops to mind: Is fog configurable at different values on the same level?
An example could be a dungeon level that has a pool room on the center. You enter the level and the fog becomes thicker the more you come near the pool.
Being able to set different colours to the fog could be interesting, this way we could have green/yellow fog representing poisoned air.
Don't let a closed door stop you
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Interesting idea ... I will add it to my list of things to look at. It can definately be done, its just prioritising the work at the moment :O)
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

I've asked this before, and I remember you answered it, but I want to reiterate your development environment for my own interest.

You're using VB.NET with a Novodex wrapper, right?

I ask because AGEIA has not yet released their own .NET wrapper for the API since they changed the name to PhysX, which annoys me (and probably some other people), and there aren't any really good wrappers for PhysX. I'm thinking of making a downgrade just so I can use Novodex without attempting (and ultimately failing) to write my own wrapper in C++. (To my knowledge, they don't natively support Direct3D either, which also annoys me and probably everyone else.)
DSE
Lo Master
Posts: 364
Joined: Sat Mar 20, 2004 12:22 pm
Contact:

Post by DSE »

Tom - yes, those are the components I am using.
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

DSE wrote:Trakl - can I ask what spec machine you have please ?
Whoah, that's a tough one.... I have a Transmeta 5800 CPU, that is paced around 900mHz-1Ghz, that's what a benchmark test told me once...
My gfx is SiS 315_315E, it's a laptop computer.

My machine runs well with Escape from Dragon Mountain, an unfinished (abandoned?) clone. Your might know that one.
And it ran Ultima 9 quite well.
It never ran kkrieger though.

What? You don't know kkrieger (german, it means something like wwarrior).

http://download.freenet.de/download.php ... d=kkrieger

You won't believe your eyes. No, the download is not broken. The game is 96 kb. Yes, it's a 3D shooter with 3 Levels, a lot of weapons and monsters, with sfx and music. No, it's not a joke. It's computer programming.

DSE, no offense meant - I'm actually glad you don't try to cram your code into 96 kb ;-)

Good luck!
Post Reply