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

Chocolate Doom

Recommended Posts

I did some debugging. There's no frameskip, there's no dead code. I suspect the frames are displayed at irregular intervals, just like Linguica explained and this gives the illusion that Chocolate-Doom skips frames, but in facts it's just that some frame take longer before they are replaced with the following frame. I can't confirm, I'd use <Chrono>, but MSVC doesn't want to let me use C++ in my code. I'll look on the Web and find another way, then I'll post the results...

Share this post


Link to post

	long start = clock();
	long diff;
	printf(".");
    // wait for new tics if needed
    while (!PlayersInGame() || lowtic < gametic/ticdup + counts)
    {
		NetUpdate();

        lowtic = GetLowTic();

		if (lowtic < gametic/ticdup)
			I_Error ("TryRunTics: lowtic < gametic");
		
        // Still no tics to run? Sleep until some are available.
        if (lowtic < gametic/ticdup + counts)
        {
            // If we're in a netgame, we might spin forever waiting for
            // new network data to be received. So don't stay in here
            // forever - give the menu a chance to work.
			if (I_GetTime() / ticdup - entertic >= MAX_NETGAME_STALL_TICS)
            {
                return;
            }

			I_Sleep(1);
        }
    }

	diff = clock() - start;
	int msec = diff * 1000 / CLOCKS_PER_SEC;
	printf("Time taken %d seconds %d milliseconds\n", msec / 1000, msec % 1000);
no printf: http://pastebin.com/sED1wdDt
with printf before the while loop: http://pastebin.com/yWmJZcXb

The results are disappointing. I can only conclude that a printf makes every tics in Chocolate-Doom a few milliseconds slower.

I moved my timer inside the main loop (d_main.c). I start timing right after while (1) and I print the time right after the last function call of the loop.

printf inside the main loop: http://pastebin.com/uVA1pbBi

To test the version without the printf, I had to print to a file because printf inside the main loop fixed the issue: http://pastebin.com/94pfN9uQ

I can't see any problem here, so I would say the framerate issue is caused by a desynchronization with my display.

The bug fix made Chocolate-Doom run at 35 FPS instead of 60, but the engine doesn't take care of synchronizing the framerate of the game with the refresh rate of my display anymore.

Share this post


Link to post

I'm not so sure, since as my testing with the video seemed to show, it's very difficult to notice the result of 30hz versus 35hz on a 60hz display even when you're actively looking for it.

Share this post


Link to post

you can also run chocolate-doom-setup and use the Level Warp feature to select Ultimate Doom :P

Share this post


Link to post

Playing Scythe on it (I'm using Doom Launcher, with Doom 2 IWAD), the automap shows the same level names as Doom 2 (Entryway and Underhalls instead of Get Going and Punchline). A very minor problem, but is there a DeHacked patch for it or something else that would fix it? I remember playing Plutonia 2, and the levels in there were written correctly (Although I played that with ZDoom and a DeHacked patch on).

Share this post


Link to post

Some WADs come with a dehacked patch to change the level names, but it seems Scythe doesn't have one.

Share this post


Link to post

There should be a database of dehacked patches for all significant megawads.

Making them is kinda easy. The thing is to have a centralised place for them.

Share this post


Link to post

I made vanilla compatible patches for Eternal Doom (cybersweeper and credits separately. level name only for all), H2H-Xmas (level name only), Fava Beans (level name only), No End in Sight Beta 22 (level name only), and Icarus (level name. Intermission Text simplified and based off of NightFright's ZDoom Pack), as well as long-name patches for the Serenity trilogy (level name only for all)

I am also in the process of making level graphics for Fava Beans, No End in Sight Beta 22, and the Serenity trilogy.

Should I upload them?

Share this post


Link to post
Guest
This topic is now closed to further replies.
×