Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Jimmy Valavanis

Doom to Delphi Total Conversion

Recommended Posts

When I've first played DooM, about 12 years ago, I always wanted to look, study and understand it's source code.
Well, since the original release of DooM source code by idsoftware there are a lot of source ports. Now I've made another one. It's a very early version of this project, many features are not implement. The difference in my source port is that it's written in Delphi, not in C. You can find both executable and source code here:
http://www.geocities.com/jimmyvalavanis/applications/delphidoom.html

NOTE:
It 's a very early version of the project, cheating, music and networking not implement yet, there are some bugs, but the source code compiles and runs!!

EDIT: Music and cheating now works...

Share this post


Link to post

I have contemplated converting the source to delphi myself, but I understand little of game coding, let alone C...

The thing I like about delphi is the fast compiling, the relative simpleness of the language itself.

Share this post


Link to post
Planky said:

I have contemplated converting the source to delphi myself, but I understand little of game coding, let alone C...

The thing I like about delphi is the fast compiling, the relative simpleness of the language itself.


Now you don't have to make the conversion!!
The source code is over there!
I recoment to peek the new uploaded version that has a lot of
bug fixes and music support!

Share this post


Link to post

I was having a look at the code the other day... very nice indeed. I did have to comment out a few lines of code to get it compile (s_sfx stuff, it's trying to assign a value to a constant?).

I've started to experiment around with it, to see if I can get higher resolutions, and possibly a key mapping menu.

Good work!

Share this post


Link to post
Planky said:

I was having a look at the code the other day... very nice indeed. I did have to comment out a few lines of code to get it compile (s_sfx stuff, it's trying to assign a value to a constant?).

I've started to experiment around with it, to see if I can get higher resolutions, and possibly a key mapping menu.

Good work!


To compile this correct try:

Select from menu "Project" then "Options" and then the "Compiler" tab
and then make sure that
"Assignable typed constants" is checked!

What version of Delphi do you have?

Delphi 6 personal was provided free of charge from Borland.

Share this post


Link to post

I have Delphi 6 too. I wasn't aware you could get it for free...

I had forgotten about that compiler option *smacks head*

Share this post


Link to post
Planky said:

I have Delphi 6 too. I wasn't aware you could get it for free...

I had forgotten about that compiler option *smacks head*


I should make an *.inc file with the compiler options...

Share this post


Link to post
Planky said:

What code effects the monster infighting?


Saying infighting do you mean close attack?
In file p_enemy.pas locate the procedure A_TroopAttack(). (AI function that handles Imp attack}

if P_CheckMeleeRange(actor) then // <- If the target is close
begin
S_StartSound(actor, Ord(sfx_claw));
damage := (P_Random mod 8 + 1) * 3;
P_DamageMobj(actor.target, actor, actor, damage);
exit;
end;


------------
CheckMeleeRange -> Check if the target of actor is close enough.
If true then damage the player from close attack
else
// launch a missile
P_SpawnMissile(actor, actor.target, MT_TROOPSHOT);

Share this post


Link to post

I think what Planky meant by monster infighting is where two monsters start attacking each other, usually because they get hit by another monster's attack.

Share this post


Link to post
DooMAD said:

Yes, the targetting code rather than the actual attack.


Every mobj (Mmonster OBJect) has a target, or when it has not then
it search for a target. The target to be found can be a player or
another monster. This is the way the DOOM engine search for an enemy.
When a monster attacks another monster, then the second's monster
target will became the first monster, elegant indeed!!

Share this post


Link to post
Bastet Furry said:

Now someone makes a port to Visual Basic

I've always wanted to do that, thankfully there's no ASM, can't be excruciatingly difficult...just somewhat difficult. :P

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×