Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: How does it work? And why is it slow?

  
  1. #1

    Default How does it work? And why is it slow?

    First off, let me say that I am not a programmer, not yet anyway. But I do like math and I am planning to take computer programming courses at my local college. I have done some scripting in Victoria 2 and Adobe Flash, I've made some buildings for SimCity, and I am currently doing some 3d modeling for Fallout 3. Anyway, Dungeon Keeper is my all-time favourite game, and I am interested in how this remake works.

    As I understand it, the original executable has been converted into a dll file which is accessed by the new exe whenever it needs to. From there, the original game is being incrementally rewritten. Is the new code also in the dll file, or is it located somewhere else?

    I'm also wondering how the author got the game to work in windows 7. I downloaded the very first release and tried it out, but it didn't work, so I'm guessing that certain parts of the original game had to be rewritten for it to run on win 7. What needed to be done, exactly? And was the process similar to how one would create a simple compatibility patch to make the original game files work on win 7?

    I'm also wondering why the game is so slow. I have a very new and expensive computer which I built myself, but the game can run slower than any of the new games I've played on it. Why is this? And what needs to be done or could be done to make it run faster?

    EDIT: seems like switching to 32bit mode has sped up the game somewhat. Feels like it did all those years ago.
    Last edited by HSovieticus; February 3rd, 2011 at 22:52.

  2. #2

    Default Re: How does it work? And why is it slow?

    The new code is in the executable, the old code in the DLL. For an exact explanation, see: http://keeper.lubie.org/other_docs/c...exe_to_dll.htm

    Some of parts the game are changed, in particular the the graphics output portion is changed to SDL (www.libsdl.org) from earlier DirectDraw. These things could make KeeperFX work where DK Gold doesn't, and unfortunately also the reverse.

    As for why it is slow: Try comparing to 0.37c; if 0.37c works better, it may be due to the recent change to SDL. We've noted that Win7 users in particular have had troubles with slowdowns.
    Last edited by p_hansson; February 3rd, 2011 at 22:59.

  3. #3

    Default Re: How does it work? And why is it slow?

    I would like to try a higher frame rate, but I am unsure of how to enter in the commands.

  4. #4

    Default Re: How does it work? And why is it slow?

    I don't think manually setting the maximum frame rate to a higher value would have any effect if the game is already sluggish for you.

    The problem most likely is the graphics API for some reason cannot keep up (which unfortunately is especially common on modern OSes/GFX cards that aren't optimized for old pixel copying 2D graphics).

  5. #5

    Default Re: How does it work? And why is it slow?

    Sorry if I caused confusion. I made an edit to my first post which you may have not noticed. I managed to speed up the game by switching to 32bit colour in the cfg file. I want to test a higher frame rate to see if it slows down and by how much.

  6. #6

    Default Re: How does it work? And why is it slow?

    Aha.

    You can set game speed to a value greater than 25. You do this by adding a command line option. Or you can use the graphical launcher (run_keeperfxtools.bat or something like that).

  7. #7

    Default Re: How does it work? And why is it slow?

    Turned on vidsmooth, set fps to 60, maxed out view distance, scaled up the resolution. The game is no slower. Very fast actually. Shouldn't the game be set to 32bit by default?

    Also, I was wondering if you could give me a bit more detail about my other questions.
    How far along is the rewritten code?
    What sorts of things have already been rewritten and what sorts of things have yet to be rewritten?
    Does the game become more compatible, stable, and faster as the new code is rewritten? Or do you sometimes rewrite the original game's code just to rewrite it?
    What is the project's focus (eg. compatibility, stability, performance, gameplay/graphical improvements)?
    And are you guys planning to remake the graphics at some point?
    Last edited by HSovieticus; February 4th, 2011 at 01:05.

  8. #8

    Default Re: How does it work? And why is it slow?

    How far along is the rewritten code?
    I don't want to guess on a percentage here, Mefistotelis may have an answer since he's the one that has rewritten near everything.

    What sorts of things have already been rewritten and what sorts of things have yet to be rewritten?
    Examples of rewritten areas: Hardware interfaces (graphics/mouse/keyboard/audio), a lot of gameplay code, the frontend interface, and so forth.

    Does the game become more compatible, stable, and faster as the new code is rewritten? Or do you sometimes rewrite the original game's code just to rewrite it?
    The problem is more the game to become "portable", it must be 100% rewritten, which may never happen. Regarding "faster": Although technically the new code probably executes faster because of improved compiler technology, it doesn't matter at all in this context, since new computers do not have a problem with the amount of computation a game from 1997 requires. Unfortunately, because of some hardware problems, some things we change may actually cause game to lag (that has been the case for the new SDL version for some users).

    What is the project's focus (eg. compatibility, stability, performance, gameplay/graphical improvements)?
    All of those, minus graphical improvements for now. I'm adding stuff that weren't in the original: TCP/IP networking, voice commands, a different kind of AI, etc.

    And are you guys planning to remake the graphics at some point?
    Potentially. The thing is, doing such a thing would completely change the feel of the game. It would have to be optional to activate new graphics. Therefore I have not prioritized it and will not do so in the foreseeable future, although I'm becoming increasingly convinced it would be possible. (Because of how many of the game data structures are now exposed in C.)
    Last edited by p_hansson; February 4th, 2011 at 12:20.

  9. #9
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    368

    Default Re: How does it work? And why is it slow?

    Quote Originally Posted by P_Hansson View Post
    The problem is more the game to become "portable", it must be 100% rewritten, which may never happen.
    Why will this be never happen? It is OK if this take a long time but I think someday it will be finished, isn't it?

  10. #10
    Ghost
    Join Date
    Sep 2009
    Location
    Holland
    Posts
    392

    Default Re: How does it work? And why is it slow?

    Cause they don't have acces to the original code. They have to reverse engineer everything and than replace it with new code.

Similar Threads

  1. Fixing Slow?
    By Mothrayas in forum KeeperFX
    Replies: 4
    Last Post: September 26th, 2022, 19:55
  2. [0.38] Debugger extremely slow?
    By Krizzie in forum KeeperFX
    Replies: 12
    Last Post: February 4th, 2011, 09:06
  3. The game runs very slow
    By kyle in forum KeeperFX
    Replies: 2
    Last Post: December 18th, 2009, 17:29
  4. How i got dk1 to work on vista
    By ryanxsh in forum Dungeon Keeper 1
    Replies: 15
    Last Post: December 10th, 2009, 04:32

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •