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

DelphiDoom 2.0.7.735 - UDMF + UMAPINFO + MBF21 (May 1, 2022)

Recommended Posts

Are your 3D floors done via clipping vs. overdraw? If so, did you first render them with overdraw, and, if that's so, what kind of performance boost did you see when you switched?

Also, did you build the script engine from scratch, or what was the base?

Share this post


Link to post
On 12/23/2016 at 12:01 AM, kb1 said:

Are your 3D floors done via clipping vs. overdraw? If so, did you first render them with overdraw, and, if that's so, what kind of performance boost did you see when you switched?


3d Floors shape (in software rendering) is caclulated using Bala Vatti's clipping algorithm. Then, *if* possible, I change the floorclip and ceilingclip to avoid overdraw. I didn't kept stats for performance, but in many cases the fps boost was significant.
The screenshots demonstrate in which cases we gain:

 

image.png.0d620f49e7f1dac22b96365c65db891f.png

image.png.b6fdd80c4315beddc5e970f50c034c4a.png
 

image.png.9bb5c264e45dbd13cb153e86657ddb16.png

image.png.3e30561cb53d4ecd089fc7a039a7b60a.png

For sprite clipping the engine uses depth buffer. The medikit sprite in the upper-right corner of the 4th screenshot is not actually drawned in the 3rd screenshot (the 3d floors are drawned before sprites).

On 12/23/2016 at 12:01 AM, kb1 said:

Also, did you build the script engine from scratch, or what was the base?


The scripting engine is based on RemObjects PascalScript. I put effort to leave the original implementation unchanged using object inheritance, but it was not possible to avoid small changes to the original implementation.

On 12/23/2016 at 6:32 AM, jval said:

For sprite clipping the engine uses depth buffer


I didn't mentioned that depth buffer is used only when the software renderer "touches" a 3d floor.

On 12/23/2016 at 12:08 AM, Gez said:

Man that's impressive, kudos!


Thanks. This is a major release. Hopefully, more is comming.

Edited by jval : Update lost images

Share this post


Link to post

Are the slopes purely a renderer effect, or do they have proper collision too?

Share this post


Link to post
Gez said:

Are the slopes purely a renderer effect, or do they have proper collision too?


Slopes logic is implemented using:

  • Acurate collisions for mobjs and missiles
  • Player viewheight calculation to emulate steep climb
  • Approximated sight and bullet checking
  • Chase camera checking
What is not implemented (or may need change in future):
  • Mobj's and player's speed in x-y level (horizontal) is not affected by slopes
  • Climping down locks the floorz to the slope
What is not tested but should work:
  • Floorclip
  • Ripple effect
  • Sector damage
  • Dynamic adjustment within script(move slope up and down with same slope angle)
  • Dynamic adjustment within script(change slope angle)

Share this post


Link to post

Alright thanks. I just wanted to know if I had to put a parenthetical note here; I'm glad that I don't. :)

For "Per individual actor dropitems" I suppose it's because there's a script function to change a mobj's dropitem during runtime?

Share this post


Link to post
Gez said:

For "Per individual actor dropitems" I suppose it's because there's a script function to change a mobj's dropitem during runtime?


Yes, exactly. Custom dropitems are controlled within script.

An example can be downloaded here. Unzip the archive, drag the EXAMPLE_04_CUSTOMDROPITEM.pk3 over Doom32.exe to see it in action (works on MAP01 only).

And this is the actual script:

uses
  all;


event OnActorDied(const actorKEY: LongWord; const killer: LongWord);
var
  plnum: integer; // Player
  h: integer; 
begin
// Executes every time an actor dies, before dropping the dropitem

// In this script we will set the former human dropitem to:
// - HEALTH POTION if the player has less than 50 health.  
// - STIMPACK if the player has less than 20 health.

  if TActor(actorKEY).MobjType <> MT_POSSESSED then 
    Exit; // if not former human then exit
      
  if GetActorPlayer(killer) = PLAYER_INVALID then
    Exit; // if the killer is not player then exit
    
  h := TActor(killer).Health;
  
  if h < 20 then
    TActor(actorKEY).CustomDropItem := MT_MISC10 // Stimpack      
  else if h < 50 then
    TActor(actorKEY).CustomDropItem := MT_MISC2; // Health Potion      
end;

Share this post


Link to post

This is the second more user unfriendly port after Doom Legacy :D

I need help:
How do I disable freelook?
What does the Random Mosters checkbox do and why is it half-on by default?
How do I save the options that I change in the launcher? They reset themselves.

Share this post


Link to post
VGA said:

This is the second more user unfriendly port after Doom Legacy :D


Indeed! Does not support friendly monsters :)
(Nice idea by the way)

VGA said:

How do I disable freelook?


There are several ways:

  • The easy way:
    Uncheck "Z-Axis Shift" (and/or "3d emulation") checkboxes on "Display" tab of the Launcher:



  • The normal way:
    From within the game on the Advanced Display Options Menu set Z-Axis Shift to "NO"



    You can access this menu pressing ESC and then go to Options/Display/Advanced.
    Pro Hint: Press "~" to activate the console and the type menu_optionsdisplayadvanced or menu_displayadvancedoptions or menu_displayadvanced and then press ENTER

  • The pro way:
    Press "~" to activate the console, type "zaxisshift no" and then press ENTER

VGA said:

What does the Random Mosters checkbox do and why is it half-on by default?

  • Random Monsters checkbox when checked causes the engine to randomly spawn monsters when loading a level. The strength of the monsters is taken by accound, it will spawn enemies with similar strength. For example, in the place of a former human an SS soldier could be spawned instead. Great fun when played with the DDMONONSTERS.WAD mod.
    The random spawning seed is different every time you play a level, but it is preserved in demo recording to avoid out of sync errors.
  • Half of by default means that the launcher will not pass relevant information to the engine. Instead the engine saved settings will be used to set this variable. This applies to all checkboxes that are half-on by default (Actually is a 3 state checkbox - Yes/No/Use defaults)
NOTE: When using random monsters option in DelphiHexen there is a chance, let's say 99%, that the level will be un-finish-able since the acs script will not act as designed.

VGA said:

How do I save the options that I change in the launcher? They reset themselves.

They is not a direct option to save your settings. But settings are preserved by the following ways:

  • The easy way
    You do not have to do nothing :). Most of the options are preserved inside the *.ini files of each branch. If a check button is "Half - On" the game will use the last setting.

  • The pro way
    Everytime you press the "Play" button on the Launcher a file named "Launcher.last.cmd" is created inside the corresponding folder of each branch:



    Next time you play you can double click this file instead to run with previous settings.
    In addition you can copy the file contents (it's a text file that can be opened with notepad or any other editor) to the Doom32.cmd (Heretic32.cmd, Hexen32.cmd or Strife32.cmd depending on branch). This file is taken by account by the engine on startup.

Share this post


Link to post

Great job, that looks really good! I've seen some earlier stuff regarding DelphiDoom on YouTube, and I honestly though it had died.

I'm still waiting for someone to make a Doom port in BASIC. :'D

Share this post


Link to post

I always did think some flavor of Object Pascal would make a decent scripting language for a game. Given its roots as a language meant to be easy to learn, it just makes sense. I never could find any implementations that satisfied my own needs, though.

Share this post


Link to post
Agentbromsnor said:

Great job, that looks really good! I've seen some earlier stuff regarding DelphiDoom on YouTube, and I honestly though it had died.

Thanks. DelphiDoom is developed occasionally, but by no means is abandoned. TODO list is never empty :P

Agentbromsnor said:

I'm still waiting for someone to make a Doom port in BASIC. :'D

Well, my last Visual Basic programm was written last century, can't help on that.
But a close alternative I can offer :) is that DelphiDoom's PascalScript actually supports DLL function calls (I must edit first post to mention it).
I googled DLL creation with VB and I found this. Perhaps newer versions make things easier.
And here you can download the PascalScript example of calling DLL functions. (Sample DLL is written in C, not BASIC :D)

Quasar said:

I always did think some flavor of Object Pascal would make a decent scripting language for a game. Given its roots as a language meant to be easy to learn, it just makes sense. I never could find any implementations that satisfied my own needs, though.


After some research I've made before implementing PascalScript into DelphiDoom, I have the impression that all (free) pascal scripting implementations are written in Delphi language. As a result they can be used directly only in Delphi, Free Pascal Compiler and maybe Embarcadero C++ Builder, unless you write wrapper DLL. I'm not sure if Free Pascal Compiler can generate libs that can be linked with gcc.

Share this post


Link to post

I must admit that I too haven't used Visual Basic in ages. However, I've been tinkering with FreeBASIC a lot the past few years and it's very pleasant to work with. It's blazing fast as well!

If I were better at actually programming I wouldn't mind making a basic software-renderer in FreeBASIC myself.

Share this post


Link to post

*First post edited to add some more examples.*

AlexMax said:

How difficult was the conversion of Doom's C to Pascal? DelphiDoom has been around a while, and that gives the the impression that it must be easier than...say...the rigmarole that Maes had to go through to get Doom working in Java.


The initial convertion started at December 28th 2004 and lasted until January 28th 2005, just one month of part time work. First public release was at February 7th 2005, and the game was playable at the time. Also my C programming skills were (and probably still are) below average. But as far as I can remember, the only think that seemed too C-ish to me was the function NetbufferSize() from d_net.c:

int NetbufferSize (void)
{
    return (int)&(((doomdata_t *)0)->cmds[netbuffer->numtics]); 
}
which converted to that:
function NetbufferSize: integer;
begin
  result := integer(@Pdoomdata_t(0).cmds[netbuffer.numtics]);
end;
Pascal code maps to C (and C code maps to Pascal) very well, almost as an Injective function.
On the other hand, Java is a fully OOP language, so Maes had to deal with a total OOP rewrite of the code.

Share this post


Link to post

Glad to see this project is still going!

Some bugs I have noticed:
* Music playback is fine for a couple of seconds after starting a level, then the pitch drops for the whole song
* When freelooking, I have to give the mouse a good push to make it work, slight variations in mouse movement do not register
* The launcher has a typo "Hexen: Death Kinks of the Dark Citadel"

Apart from all that, nice work! :)

Share this post


Link to post
RTC_Marine said:

"Hexen: Death Kinks of the Dark Citadel"


Isn't that the game where you have to defeat the Seven Deadly Fetishes? I've heard that the first boss (the Foot Fetish) was quite the pushover. :P

In all seriousness, I thought the Doom series were the only games DelphiDoom supported. Did it always have Heretic and Hexen support, or when was it added?

Share this post


Link to post
RTC_Marine said:

* Music playback is fine for a couple of seconds after starting a level, then the pitch drops for the whole song


Something similar about the music pitch was mentioned before, I thought that was fixed.
You can try the miditempo console command (default value is 160). Trying changing it to 140 or 180 may fix this.
Also maybe this involves some performance issues when playing in systems with one physical CPU while multithreading rendering is enabled.

RTC_Marine said:

* When freelooking, I have to give the mouse a good push to make it work, slight variations in mouse movement do not register


Try changing mouse sensitivity from the menu. (Menu/Options/General). Also, does this problem occur in all branches? If you run again with lower screen resolution does the problem remain?

RTC_Marine said:

* The launcher has a typo "Hexen: Death Kinks of the Dark Citadel"


Thanks, it will be fixed in the next maintainance release.

Danfun64 said:

In all seriousness, I thought the Doom series were the only games DelphiDoom supported. Did it always have Heretic and Hexen support, or when was it added?

  • Heretic support added in October 2007
  • Hexen support added in December 2007 (Although OpenGL rendering for Hexen was delayed until version 1.1.4.551 (March 19th 2013)
  • Strife support was first available as an alpha release in November 2015 (supporting correctly only the 2 teaser demos), and officialy added with all versions support in version 1.1.6.600 (released December 31st 2015).

Share this post


Link to post
jval said:

Something similar about the music pitch was mentioned before, I thought that was fixed.
You can try the miditempo console command (default value is 160). Trying changing it to 140 or 180 may fix this.
Also maybe this involves some performance issues when playing in systems with one physical CPU while multithreading rendering is enabled.

I changed the tempo but this does fix it, I do not have multithreading set to on either

This can be tested when running Doom E1M1, listen to the music for a little bit and you'll notice a sudden pitch change.

jval said:

Try changing mouse sensitivity from the menu. (Menu/Options/General). Also, does this problem occur in all branches? If you run again with lower screen resolution does the problem remain?


Changing the mouse sensitivity or resolution has no effect, I've also tested it in heretic and it was the same, my mouse is a bog-standard lenovo one.

Share this post


Link to post
RTC_Marine said:

I changed the tempo but this does fix it, I do not have multithreading set to on either

This can be tested when running Doom E1M1, listen to the music for a little bit and you'll notice a sudden pitch change.


I tried it, but honestrly can't tell for sure. Further investigation must be done on this.

RTC_Marine said:

Changing the mouse sensitivity or resolution has no effect, I've also tested it in heretic and it was the same, my mouse is a bog-standard lenovo one.


I 've checked the source code and G_BuildTiccmd() shifts the value of mousey movement 4 bits (div 16). This cause small mouse movements to be ignored while looking up/down. This was done because for look up/down currently the engine uses only 1 byte of information. I already had a note to change this to 8:8 fixed point value (2 bytes), to make more accurate interpolation for uncapped framerates, so when the time comes this will be corrected also. Nice catch!

Share this post


Link to post
jval said:

3d Floors shape (in software rendering) is caclulated using Bala Vatti's clipping algorithm. Then, *if* possible, I change the floorclip and ceilingclip to avoid overdraw. I didn't kept stats for performance, but in many cases the fps boost was significant.
The screenshots demonstrate in which cases we gain:

https://s20.postimg.org/687fefeul/SSHOT_Doom_20161223_055657929.jpg
https://s20.postimg.org/cxdyug06l/SSHOT_Doom_20161223_055604766.jpg

https://s20.postimg.org/caf24x3al/SSHOT_Doom_20161223_055724644.jpg
https://s20.postimg.org/smp3unhm5/SSHOT_Doom_20161223_055812586.jpg

For sprite clipping the engine uses depth buffer. The medikit sprite in the upper-right corner of the 4th screenshot is not actually drawned in the 3rd screenshot (the 3d floors are drawned before sprites).

The scripting engine is based on RemObjects PascalScript. I put effort to leave the original implementation unchanged using object inheritance, but it was not possible to avoid small changes to the original implementation.

I didn't mentioned that depth buffer is used only when the software renderer "touches" a 3d floor.

Thanks. This is a major release. Hopefully, more is comming.

This is absolutely brilliant, jval! The clipping, the fake 3d correction, the multi-engine support, the scripting. Wow! I must admit that I've not spent much time with DelphiDoom, or Delphi coding, though I used to mess around with Paradox for Windows, which I understand is somewhat of an ancient distant cousin launguage. From what I've seen, Delphi looks like a very readable, tight language (with a slightly funky syntax). Very nice work, indeed. Hope you get lots of user testing and play, and some great levels built and scripts written. It'll take me some time to become familiar with it, but it's quite an interesting port, in the real sense of the word. Great job!

Share this post


Link to post
kb1 said:

This is absolutely brilliant, jval! The clipping, the fake 3d correction, the multi-engine support, the scripting. Wow! I must admit that I've not spent much time with DelphiDoom, or Delphi coding, though I used to mess around with Paradox for Windows, which I understand is somewhat of an ancient distant cousin launguage. From what I've seen, Delphi looks like a very readable, tight language (with a slightly funky syntax). Very nice work, indeed. Hope you get lots of user testing and play, and some great levels built and scripts written. It'll take me some time to become familiar with it, but it's quite an interesting port, in the real sense of the word. Great job!


Thanks kb1!
Testing and feedback is valuable, since I can't test alone all the assets of the engine.
Pascal & Delphi probably are not the most popular programming languages around, but since I had no experience in C, using Delphi was my only option to create a port. (Well, you can't count COBOL or pl/SQL as options :P)
My mapping abilities are not good, but I would gladly contribute by creating scripts if there is interest for a project.

---
*First post edited to add the Slopes & Ladder example*

Share this post


Link to post
jval said:

Thanks kb1!
Testing and feedback is valuable, since I can't test alone all the assets of the engine.
Pascal & Delphi probably are not the most popular programming languages around, but since I had no experience in C, using Delphi was my only option to create a port. (Well, you can't count COBOL or pl/SQL as options :P)
My mapping abilities are not good, but I would gladly contribute by creating scripts if there is interest for a project.

---
*First post edited to add the Slopes & Ladder example*

Hmmm - you seem to know enough about C to be able to completely rewrite a rather complex C program in a different language...credit where it is due, my friend :)

Share this post


Link to post

2 questions:

1. Why the hell are the keyboard control settings in the menu so... bare?
"Use arrow keys/use WASD"? Seriously? You're implying that I should manually edit the .ini file? Or am I missing something?

2. Why the hell is the mouse sensitivity slider so useless? The slider seems to go only until the value of 9, while for me personally anything under 15 is unusable. Again I am forced to resort to edit the .ini? Why? Or am I just blind or something?

@the dude who said that only Legacy is unfriendlier than this: you were wrong. Very wrong.

I'd like to like this, but so far I kinda can't. Sorry.

EDIT: oh, I also couldn't figure out how to scroll up/down in the console. Help?

Share this post


Link to post
bzzrak said:

1. Why the hell are the keyboard control settings in the menu so... bare?
"Use arrow keys/use WASD"? Seriously? You're implying that I should manually edit the .ini file? Or am I missing something?


Keyboard configuration within menus is not in near future plans.

bzzrak said:

2. Why the hell is the mouse sensitivity slider so useless? The slider seems to go only until the value of 9, while for me personally anything under 15 is unusable. Again I am forced to resort to edit the .ini? Why? Or am I just blind or something?


Type "mouse_sensitivity 15" without the quotes in the console to change this. Mouse sensitivity slider can be usefull if you want to set the mouse sensitivity in range [0..9] though.

bzzrak said:

EDIT: oh, I also couldn't figure out how to scroll up/down in the console. Help?


Console can not be scrolled up/down. The closest alternative is that console output is actually saved inside data/logs/xxxxx_stdout.txt file.

kb1 said:

Hmmm - you seem to know enough about C to be able to completely rewrite a rather complex C program in a different language...credit where it is due, my friend :)


_bruce_ said:

Looking awesome - mad props for making this work!


Thanks guys!
BTW @_bruce_, what happened to the true color port you we working on?

Share this post


Link to post
jval said:

Keyboard configuration within menus is not in near future plans.


Statements like this will lose you potential users for sure. Why is this not important? For your potential users the lack of a decent configuration option may be the final turn-off.

Share this post


Link to post
Graf Zahl said:

Statements like this will lose you potential users for sure. Why is this not important? For your potential users the lack of a decent configuration option may be the final turn-off.


I 've actually tried to make it some years ago but I could not make it work, so I left as an option the switch between WASD to Arrows. I don't like to make promises that I can not accomplish.

Share this post


Link to post

A new meintainance release (ver 2.0.2.702) is available.

 

This release includes minor fixes such as:

  • Fixed alpha channel in TGA screenshots.
  • You do not have to re-ender the save game name when overwritting saves.
  • The mouse sensitivity slider within menus can accept values up to 20.
  • Will not crush when finishing MAP33 etc levels. (but it will crash if MAP34 not found)
  • Fixed revenant internal demo bug (thanks to Crispy Doom)

Download link at sourceforge

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
×