Jump to content

FPCDoom 1.14 (Apr 10, 2022)


jval

Recommended Posts

1 hour ago, jval said:

propably use SDL

yeah, SDL will probably allow to compile FPCDoom on any platform supported by FPC (at least on any little-endian, and when 32/64 bit issues will be solved). if you didn't used too much x86 assembly there, of course. ;-)

Share this post


Link to post

@jval, just letting you know that I appreciate your work, really like this port and DelphiDoom, too.

 

I noticed that it is not possible to disable the music or the SFX sounds individually, and when trying to do so, everything goes silent. Is it possible to fix this? I don't know the underlying technical motives behind this.

 

Also, the music is much louder than the other sounds, although that's just a minor annoyance.

 

Anyhow, great job with the port, I'm really enjoying it.

Edited by slayermbm

Share this post


Link to post

Thanks @slayermbm .

 

Haven't noticed the problem with the sound, seems that when you lower the music volume, the sfx volume also is affected. Sfx sound can be disabled individually, but not music. Strange, for music I use the midiOutSetVolume() func to change the music volume and for sfx I use the IDirectSoundBuffer::SetVolume. I 'll work around this...

Share this post


Link to post

Hello @jval.

 

I found a bug: DOOM2 map06, after taking the elevator down to the location of the spider mastermind, I immediatly run, press the switch, head to the pool of acid and enter that small room with the teleporter inside to avoid the bullets and wait until the spider gets crushed. However, after entering, I look to the other side, in the direction of the spider, and the game crashes to desktop. It's happening every time I try to replicate, any saved game in map06.

 

I attached the error message and my pc specs. I'm using Win 10 Pro build 1909. 

 

Edit: The bug triggers seconds after the switch is activated. It happens even if I stay idle. 

   

error_msg.png

specs.png

Edited by slayermbm

Share this post


Link to post
40 minutes ago, slayermbm said:

Hello @jval.

 

I found a bug: DOOM2 map06, after taking the elevator down to the location of the spider mastermind, I immediatly run, press the switch, head to the pool of acid and enter that small room with the teleporter inside to avoid the bullets and wait until the spider gets crushed. However, after entering, I look to the other side, in the direction of the spider, and the game crashes to desktop. It's happening every time I try to replicate, any saved game in map06.

 

I attached the error message and my pc specs. I'm using Win 10 Pro build 1909. 

 

Edit: The bug triggers seconds after the switch is activated. It happens even if I stay idle. 

  

 

Fixed and uploaded new version 1.12.4.116, thanks @slayermbm !

 

Donwloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.4.116/FPCDoom_1.12.4.116_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.4.116/FPCDoom_1.12.4.116_src.zip/download

Repository: https://github.com/jval1972/FPCDoom

 

 

Share this post


Link to post

Now that's some record breaking bug fixing speed, haha! Thanks!

 

Edit: It's working now, just tested.

Edited by slayermbm

Share this post


Link to post
On 11/25/2019 at 5:18 PM, jval said:

seems that when you lower the music volume, the sfx volume also is affected. Sfx sound can be disabled individually, but not music. Strange, for music I use the midiOutSetVolume() func to change the music volume and for sfx I use the IDirectSoundBuffer::SetVolume

You can blame Microsoft for it, in some version of Windows (not sure if it was vista, or 7 or 8) they changed how their internal midi synthesizer worked, it's volume was tied to the process's sound volume and become uncontrollable separately.  Most ports are using a software midi synth like timidity or fluidsynth nowadays, partly or mainly because of this.

Edited by andrewj

Share this post


Link to post
On 11/25/2019 at 3:18 AM, jval said:

Thanks @slayermbm .

 

Haven't noticed the problem with the sound, seems that when you lower the music volume, the sfx volume also is affected. Sfx sound can be disabled individually, but not music. Strange, for music I use th0ae midiOutSetVolume() func to change the music volume and for sfx I use the IDirectSoundBuffer::SetVolume. I 'll work around this...

 

Now that andrewj mentioned this again, I remember creating a topic in the Eternity subforum, because their daily builds have the same problem. However, the official version does not.

 

The thread in question:

https://www.doomworld.com/forum/topic/107617-game-mutes-when-setting-the-music-volume-bar-all-the-way-down/

 

They include this file called 'midiproc.exe' in the oficial builds, and that supposedly fix the muting problem when setting the music off. Not sure if the file is specific to Eternity though, or how they configure it. Maybe @Altazimuth or @printz can help you out on this.

Edited by slayermbm

Share this post


Link to post

midiproc for EE uses MIDL, which I'd suggest against. Even though it's not ironclad (last I heard from the man himself), @AlexMax adapted EE's midiproc for Chocolate Doom, and that uses anonymous pipes. The benefit of this is that (IIRC) it can work just fine if compiling under MinGW or what have you, so that is a potential option. Additionally, Odamex uses a library called "portmidi" which also provides a way around this, though it has its own individual issues.

These MIDI volume woes date back to Vista which, while simplifying the sound stack greatly, also meant that you can't have separate volumes assigned to separate devices for an individual process.

I'm not sure how feasible trying portmidi or EE's MIDL-using midiproc are, but AlexMax's anonymous pipe method should work in Free Pascal.

Share this post


Link to post
9 hours ago, Altazimuth said:

These MIDI volume woes date back to Vista which, while simplifying the sound stack greatly, also meant that you can't have separate volumes assigned to separate devices for an individual process.

 

 

The global volume surely doesn't work anymore, but you can still change it by manipulating the note volume. The ZDoom MIDI player manages to use the Windows synth internally and still have a volume control, so it's certainly not impossible.

Share this post


Link to post

@jval Sound effects and music are working individually now, just tested.

 

I found another bug (which affects DelphiDoom too), Doom1 E2M2, the three moving platforms close to that room with the yellow key stop moving after some time, and they don't move again, except when restarting the map. Also, that secret room on one of the platforms become inaccessible, and if you fall you stay trapped.

 

I uploaded screenshots.

Doom_20191202_202447469.png

Doom_20191202_202457103.png

Doom_20191202_202508474.png

Edited by slayermbm

Share this post


Link to post
16 hours ago, slayermbm said:

I found another bug (which affects DelphiDoom too), Doom1 E2M2, the three moving platforms close to that room with the yellow key stop moving after some time, and they don't move again, except when restarting the map. Also, that secret room on one of the platforms become inaccessible, and if you fall you stay trapped.

 

@slayermbm Thank you so much for this! Nice catch!

 

Fixed in new version 1.12.4.118.

 

Share this post


Link to post

Just tested and it's working again. You work fast jval, glad to help!

 

Edit: The latest DelphiDoom WIP is also working as intended.

 

Edit2: @jval Do you take requests? One little thing that bothers me in your ports, when entering any of the submenus and pressing ESC, we are taken back to the game. Instead, it should return just one level 'above' the current submenu. All the other ports I tested work this way. Do you understand? Not sure if I'm being clear enough.  

 

Example, currently it's like this:

Start new game -> Press ESC -> Options -> Display -> Detail -> Press ENTER to change 'Detail level' to 'Medium (8 bit)' -> Press ESC -> Game resume playing.

 

Instead, this should happen, IMO:

Start new game -> Press ESC -> Options -> Display -> Detail -> Press ENTER to change 'Detail level' to 'Medium (8 bit)' -> Press ESC -> Return to 'Display' submenu -> Press ESC -> Return to the main menu -> Press ESC -> Game resume playing.

 

It's a little 'quality of life' improvement, I think. 

 

Edited by slayermbm

Share this post


Link to post
8 hours ago, slayermbm said:

 

Edit2: @jval Do you take requests? One little thing that bothers me in your ports, when entering any of the submenus and pressing ESC, we are taken back to the game. Instead, it should return just one level 'above' the current submenu. All the other ports I tested work this way. Do you understand? Not sure if I'm being clear enough.   

 

 

Example, currently it's like this:

Start new game -> Press ESC -> Options -> Display -> Detail -> Press ENTER to change 'Detail level' to 'Medium (8 bit)' -> Press ESC -> Game resume playing.

 

Instead, this should happen, IMO:

Start new game -> Press ESC -> Options -> Display -> Detail -> Press ENTER to change 'Detail level' to 'Medium (8 bit)' -> Press ESC -> Return to 'Display' submenu -> Press ESC -> Return to the main menu -> Press ESC -> Game resume playing.

 

It's a little 'quality of life' improvement, I think. 

 

 

Yes, of course, any request is welcome, and if possible it will be implemented.

 

Going to the upper level menu can be done with the BACKSPACE key, or the right mouse button. I can put an option to the Controls menu, so that instead of the BACKSPACE key it will go to upper level menu with the ESC key.

Share this post


Link to post
15 hours ago, jval said:

 

Yes, of course, any request is welcome, and if possible it will be implemented.

 

Going to the upper level menu can be done with the BACKSPACE key, or the right mouse button. I can put an option to the Controls menu, so that instead of the BACKSPACE key it will go to upper level menu with the ESC key.

 

I was not aware of that. Honestly, I forgot to check the controls. I will check this again when possible.

 

Edit: BACKSPACE and right mouse button work as you said.

Edited by slayermbm

Share this post


Link to post
  • 2 weeks later...

Version 1.12.5.120 (Updated December 17, 2019) is available.  

 

 

Donwloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.5.120/FPCDoom_1.12.5.120_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.5.120/FPCDoom_1.12.5.120_src.zip/download

 

Repository: https://github.com/jval1972/FPCDoom/tree/842edfa466596d31501643995137cb0b8f9b22a9

 

New features since latest release:

 

Rendering:

  • Renderstyle ADD & RenderStyle SUBTRACT

  • Fixed transparency issues in 8 bit color mode.

Menu/User interface

  • Added option in the Menu to change the key for upper level menu from BACKSPACE to ESC as suggested by @slayermbm (Options/Controls/Go to upper level menu).
  • Stops music in ENDOOM screen.
  • Key bindings for weapon select. (following the suggestion for DelphiDoom by @Khorus )
  • Added freeze console command. (following the suggestion for DelphiDoom by @GRAU )

Custom Content / Modding

  • Added replaces keyword in ACTORDEF
  • Support "-" before a flag to remove it in ACTORDEF flags (usefull with inherited actors).
  • Support for SCALE keyword in ACTOR definitions inside ACTORDEF lumps. Default is 1.0
  • Added A_SpawnItemEx ACTORDEF function.

Example demonstrating the replaces keyword and renderstyle add: https://sourceforge.net/projects/fpcdoom/files/EXAMPLES/EXAMPLE_01_AFRIT.zip/download

The example is based on AFRIT actor at realm667 site (link for original version).

 

Screenshot of the example:

Doom-20191217-213810515.png

 

Share this post


Link to post
  • 2 weeks later...

Version 1.12.5.121 (Updated December 30, 2019) is available.  

 

This new release just fixes a rendering glitch of teleporting monsters when uncapped frame-rate is enabled.

 

Donwloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.5.121/FPCDoom_1.12.5.121_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.5.121/FPCDoom_1.12.5.121_src.zip/download

 

Repository: https://github.com/jval1972/FPCDoom/tree/68760001a4d0ca2bf3632518357d74f4a8aa9b37

 

 

Share this post


Link to post
  • 4 weeks later...

Version 1.12.6.124 (Updated January 24, 2020) is available.  

 

What's new:

  • Fixed glitch in sky drawing, it was ignoring visplanes with 1 px height.

  • Fixed volume in midi files.

  • Fixed glitches in sprite drawing.

  • Support for extended help screens (HELP01 thru HELP99). See also

     

 

Donwloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.124/FPCDoom_1.12.6.124_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.124/FPCDoom_1.12.6.124_src.zip/download

 

Repository: https://github.com/jval1972/FPCDoom/tree/845111578cda0d51976077d9c9b586c390a02aaa

 

 

Share this post


Link to post
  • 2 weeks later...

Version 1.12.6.125 (Updated February 2, 2020) is available.  

 

This new release changes the uncapped framerate calculation and runs smoother.

 

Donwloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.125/FPCDoom_1.12.6.125_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.125/FPCDoom_1.12.6.125_src.zip/download

 

Repository: https://github.com/jval1972/FPCDoom/tree/aef1eae455135a7a635edc104bea30a74197a856

 

 

Share this post


Link to post
  • 2 months later...

Version 1.12.6.126 is available (Updated April 5, 2020)

 

What's new:

  • Added check to avoid crash in linedefs without front side.
  • Billboard sky mode.
  • Corrected typos in the camera menu.
  • Changed Zaxis uncapped framerate logic.

Downloads:

Executable: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.126/FPCDoom_1.12.6.126_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.126/FPCDoom_1.12.6.126_src.zip/download

 

Repository: https://github.com/jval1972/FPCDoom/commit/d9ddfe6ee3995420287bd00ee5f05664a379ad0f

 

Screenshot demonstrating the new billboard sky mode:

billboardsky3.gif

Share this post


Link to post
  • 2 months later...

Hello @jval, how are you doing? 

 

I'm wondering, do you plan to integrate the updates of DelphiDoom 2.0.5.726 in a new release of FPCDoom? I believe it has the same problem as the previous release of DD, where the player position and angle is not being interpolated, as you explained in the DD thread. Have you checked it? You're probably very busy with your side projects, right? Thanks! 

Share this post


Link to post
15 minutes ago, slayermbm said:

Hello @jval, how are you doing? 

 

I'm wondering, do you plan to integrate the updates of DelphiDoom 2.0.5.726 in a new release of FPCDoom? I believe it has the same problem as the previous release of DD, where the player position and angle is not being interpolated, as you explained in the DD thread. Have you checked it? You're probably very busy with your side projects, right? Thanks! 

 

Oops, I've forgot!

 

Here it is version 1.12.6 build 127:

Executable (win 32): https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.127/FPCDoom_1.12.6.127_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.12.6.127/FPCDoom_1.12.6.127_src.zip/download

 

What's new:

  • Fixes to uncapped frame-rate, runs smoother.
  • Avoid crash if a line has false ML_TWOSIDED flag set.

Share this post


Link to post
  • 5 months later...

A new version (1.13.16.128) is out.

 

Downloads:

Executable (win32): https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.13.16.128/FPCDoom_1.13.16.128_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.13.16.128/FPCDoom_1.13.16.128_src.zip/download

 

This is a bug-fix release, a few bugs have been fixed:

  • Fixed serious bug while de-allocating thinkers. ***
  • Corrected dehacked parsing of the "CODEP FRAME" keyword.
  • Prevent infinite loop for erroneous A_Chase() placement.

*** (spoiler for programmers only)

Spoiler

This problem was found in P_RunThinkers() function.

 

In linux Doom source it is like that:


void P_RunThinkers (void)
{
    thinker_t*	currentthinker;

    currentthinker = thinkercap.next;
    while (currentthinker != &thinkercap)
    {
	if ( currentthinker->function.acv == (actionf_v)(-1) )
	{
	    // time to remove it
	    currentthinker->next->prev = currentthinker->prev;
	    currentthinker->prev->next = currentthinker->next;
	    Z_Free (currentthinker);
	}
	else
	{
	    if (currentthinker->function.acp1)
		currentthinker->function.acp1 (currentthinker);
	}
	currentthinker = currentthinker->next;
    }
}

Notice the call to Z_Free that frees the memory of the currentthinker variable and after that accessing the previously freed block with currentthinker = currentthinker->next;

Of source for Linux Doom, or any source port that uses the original "zone" code this is not a problem, but in FPCDoom, the Z_Free is just a wrapper of the a new memory manager that actually shrinks the memory block if the freed item is at the last position of the "chain". So, if the freed thinker was at the last position of the "chain" we have a beautiful memory access violation :)

 

The fix (in C code):


void P_RunThinkers (void)
{
    thinker_t*	currentthinker, *nextthinker;

    currentthinker = thinkercap.next;
    while (currentthinker != &thinkercap)
    {
	if ( currentthinker->function.acv == (actionf_v)(-1) )
	{
	    // time to remove it
	    currentthinker->next->prev = currentthinker->prev;
	    currentthinker->prev->next = currentthinker->next;
	    nextthinker = currentthinker->next;	// Keep next pointer in nextthinker
	    Z_Free (currentthinker);
	    currentthinker = nextthinker;	// Set currentthinker to next pointer
	}
	else
	{
	    if (currentthinker->function.acp1)
		currentthinker->function.acp1 (currentthinker);
	    currentthinker = currentthinker->next;
	}
    }
}

 

 

Edited by jval

Share this post


Link to post
  • 2 weeks later...

New version 1.13.17 build 133

 

Downloads:

Executable (win32): https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.13.17.133/FPCDoom_1.13.17.133_bin.zip/download

Source code: https://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.13.17.133/FPCDoom_1.13.17.133_src.zip/download

 

This is a nice update, mostly, to provide DEHEXTRA support:

  • 100 extra sprites for use in Dehacked
  • 100 extra mobjinfo for use in Dehacked
  • Extra states (up to 4000) for use in Dehacked
  • Extra sounds for Dehacked FRE000-FREE199 (indexed at 500-699)
  • Support for multiple DEHACKED files
  • New code pointers: A_Detonate(), A_Mushroom(), A_BetaSkullAttack(),  A_Spawn(), A_Face(), A_Scratch(), A_RandomJump() & A_LineEffect()
  • Modified A_Turn() code-pointer to conditionally use the "unknown 1" field of DEHACKED if no parameter is specified
  • Added -NODEHEXTRA command line parameter, if used it does not create additional states & things for DEHEXTRA.

I'd like to make a parenthesis here, to note that FPCDoom had already a much more powerful DEHACKED system with some nice extensions. Probably, I should open a new thread for that, but let's take a first look here. FPCDoom's DEHACKED additions are used as an intermediate layer between ACTORDEF scripting and DEHACKED, allowing unlimited new monsters, new states, new sprites and new sounds without conflict problems. Let's take a look at some portions of the DEHACKED translation of the AFRIT example that I had posted about a year ago:

Spoiler

// New thing/mobj extended declaration

NewThing "Afrit"                                              // New thing/mobj with name "Afrit". Adds a new thing without a fixed number reference
Inheritsfrom = -1                                              // Inheritance addition
Id # = 20001
Initial Frame = NewFrame 0                             // Initial frame is a new frame, new frames are counting from 0 and are referenced by the NewFrame keyword
Hit Points = 800
Alert Sound = dsbrssit                                    // Sound name, not number, does not want predefined extra sounds. New sound names are automatically added
Reaction Time = 8
Attack Sound = 0

....

Bits = MF_SOLID MF_SHOOTABLE MF_COUNTKILL NOGRAVITY FLOAT                    // BEX

....

Respawn Frame = OriginalFrame 0             // Referencing the build-in frames with the OriginalFrame keyword (it can be omitted, the parser does not care)

....

Missiletype = AfritBall                                 // Missiletype is custom field, but notice that references a thing with it's name (AftirBall), not with a fixed number.

....

 

// New state/frame declaration

Frame NewFrame 0                                      // This is the first new frame, you do not have to worry about numbering, you start your counting from 0
Sprite Number = FRIT                                   // No need for fixed/predefined sprites, the engine will automatically add sprite "FRIT" 
Sprite Subnumber = Bright 0                       // No need to add 32768 to the subnumber (maybe this is already in BEX ?)
Duration = 4
Next Frame = NewFrame 1                        // Reference next frame with the NewFrame keyword
Codep Frame = A_Look

 

....

Frame NewFrame 17
Sprite Number = FRIT
Sprite Subnumber = Bright 6
Duration = 6
Next Frame = NewFrame 6
Codep Frame = A_CustomMissile "AfritBall" "44" "1" "0"    // Actions can also have parameters, no more dependency/limit of "Unknown 1" & "Unknown 2"
 

SubmitNewFrames                                      // The SubmitNewFrames keyword is used to reset the new frame counter, it is done automatically at the end of the DEHACKED file and can be omitted , but may be used if you want to reset the counter inside the same file.

 

Spoiler

DelphiDoom and RAD are using the same philosophy with some more additions.

 

 

 

Screenshot of FPCDoom with both Black Ops & SMOOTHED loaded:

Doom-20210111-112210159.png

 

Also if you prefer left-handed and play with Black Ops, you can mirror the weapon :)

Doom-20210111-115005227.png

 

Other new features/fixes:

  • Key bindings can now accept SHIFT & CTRL keys.
  • Displays a warning if no player start found.
  • No delay to return to desktop when finished.

 

Edited by jval

Share this post


Link to post
  • 4 weeks later...
  • 1 year later...

New version 1.14.18 built 134 is out!

 

Downloadhttps://sourceforge.net/projects/fpcdoom/files/FPCDoom_1.14.18.134/FPCDoom_1.14.18.134_bin.zip/download

 

What's new:

  • The player can choose to use CAPS LOCK for autorun on/off.
  • Proper windowed mode. FPCDoom now can run in windowed mode on your desktop
  • Speed optimizations by better exploitation of multiple threads. 
  • Default sound channels increased to 32.

Complete change log since previous release:

Spoiler

Support for the wait keyword in ACTORDEF.
Corrected states initialization for DEHEXTRA.
Faster and safer thread de-allocation.
Fixed bug in png image handling.
Fixed bug that could rarely cause infinite loop in DEHACKED lumps.
Recognizes multiple SUBMITNEWFRAMES commands in DEHACKED.
Fixed potential memory corruption problem in R_MakeSpans() in 4k resolution.
"ACTIVE SOUND" alias for "ACTION SOUND" DEHACKED field.
"RADIUS" alias for "WIDTH" DEHACKED field.
Use 64 characters long string for short names in PK3.
Added "DROPPED ITEM" alias for "DROPITEM" DEHACKED field.
Fixed masked middle texture bleeding when player was exactly placed on the line.
Small optimization to masked middle textute rendering.
Fixed misspelled of "joystick" in the menus.
Improved priority logic for sound channel selection.
Default sound channels increased to 32.
Speed optimizations by better exploitation of multiple threads.
Proper windowed mode.
Increased saved game size to 5MB.
Added full_sounds console variable.
The player can choose to use CAPS LOCK for autorun.

 

Screenshot (Windowed mode)

Spoiler

window-mode.png

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...