Back in the Game

edited 2006 May 14 in Developers
<i>This post was originally made by <b>skyjake</b> on the dengDevs blog. It was posted under the categories: Blog, Engine, jHexen.</i>

I finally have a net connection at home again, so I can get back to the debugging. On the whole things look like they are shaping up quite nicely.

Dani, can you reproduce these problems in jHexen on Windows:
<ul>
<li>When smashed, the windows in map01 don't open even through the breaking sound is played.
<li>Also in map01, in the large hall, when the player approaches the raised teleport in the middle of the hall, the steps around the teleport should trigger the four "closets" to open and four ettins to emerge. This does not happen for me.
</ul>

Also, I recall that there were some issues rendering 3D models on the Mac. Any problems on that front in Windows?
«1

Comments

  • The window smashing problem is now fixed. It was caused by the numxlines and numxsectors counters, which were not initalized anywhere, but were used in the function that searched for a sector based on tag.

    That also fixed the other problem I listed above.
  • Woo, I'm on a roll. :) The jHexen savegame/teleport bug which caused an invalid DMU type in P_ToPtr() is now also fixed.

    Is it just me or is the Doomsday console font getting really old? We should find a good, antialiased fixed-width font to use in the console.
  • Hey, I was beginning to think your telephone engineers are even worse than mine. Great to hear your back online :)

    Woot on the bug fixes in jHexen.
    <blockquote>Also, I recall that there were some issues rendering 3D models on the Mac. Any problems on that front in Windows?</blockquote>
    None that I've noticed on WinXP SP2.
    <blockquote>Is it just me or is the Doomsday console font getting really old? We should find a good, antialiased fixed-width font to use in the console.</blockquote>
    Sure, why not.

    Actually, the Doomsday Control Panel could do with a bit of a makeover (again) for 1.9.0

    Now that I think about it we are quickly running out of room on some of the tabs while others are fairly empty. I seem to recall you planned on switching to a multi-tabbed panel on the right?
  • <blockquote>Now that I think about it we are quickly running out of room on some of the tabs while others are fairly empty. I seem to recall you planned on switching to a multi-tabbed panel on the right?</blockquote> Yes, I was thinking about that at some point. The idea was to replace the subpages of the Graphics options with tabs (Lights, halos, etc.) to make more room on the left.
    <blockquote>Also, I recall that there were some issues rendering 3D models on the Mac.</blockquote>I think I remember what was the issue here. In the debug build everything is looking OK, but in the optimized release build the model renderer breaks down and the models become strangely stretched out. I will investigate this when we get nearer to making a non-beta release.
  • Welcome back! I haven't noticed an rendering issues on linux at the moment, although picking up a blue health potion resulted in instant death in doom. In general I build with -O2, although I've spent the last few days playing with the gcc 4.1 auto-vectoriser on deng. Unfortantly with the current code base, not much can be auto-vertorised due to some (overly ?) complex loops.
  • <blockquote>picking up a blue health potion resulted in instant death in doom.</blockquote>Hmm, I don't get that, odd. Skyjake, can you reproduce this on MacOS?
  • Just thought you guys would like to know on ubuntu. running doom2 choosing nightmare and pressing "enter" instead of "y" crashes doomsday.
    This is from the Terminal
    MN_Init: Init miscellaneous info.
    Game state parameters:
    Fatal signal: Segmentation Fault (SDL Parachute Deployed)

    it also crashes when doomsday has already loaded map30 and then warping to map 30 (from any level) (does not happen when warping on other maps e.g. your on level 20 and warp to level 20)
  • Yes the problem you described with map30 is known and I can replicate it on WinXP SP2 but I don't yet know the cause. I think it could be related to a similar problem with loading SLIGE wads.

    Choosing nightmare with enter works fine for me.

    Can you test whether it crashes when answering some of the other questions (eg "Are you sure you want to load/endgame/quicksave/quit?" etc).
  • Had a quick play of doom 2, map01, on UV. Using svn 3125.

    * Touching blue heath potions results in death. Unable to respawn from this death state, instead, I travel around the level as a ghost.
    * Does not pick up heath packs when wounded.
    * Can't pick up the green armour.
    * In the room with the four zombies on boxes, they fall off the boxes upon entry to the room.

    doom 2, map30, on HMP.
    * Touching megasphere results in blue potion style death.
  • <blockquote>* In the room with the four zombies on boxes, they fall off the boxes upon entry to the room.</blockquote>There is a minor error with the current logic but the reason your experiencing this is under the "Gameplay" options menu (ie the new compatibility mode for objects falling under their weight). I'll commit the fix soon.

    The other issues you mentioned I can't reproduce on my system.
  • pressing f6 twice in a row crashes it
    pressing f5 then f6 crashes it
    f10 f10 crashes it
    f1 f1 crahses it
    f1 then any other button apart from enter crashes
  • Skyjake - Can you reproduce any of these in MacOS?

    They are getting stranger and stranger...

    The only ones I can reproduce on WinXP is the map30 problem (that I knew about already) and the logic error todo with sliding corpses and the new compatibility mode for objects falling under their own weight (they are working together to throw monsters off ledges when they get near the edge. Its a one-liner in p_mobj.c).
  • First, a comment about the blinking HUD messages. IMO, they blink for way too long. When you've picked up a lot of, say, blue health bonuses in a row, you'll have a large part of your HUD blinking irritatingly for several seconds. My suggestion: blink just once, then fade the message's color gradually from white to red.

    I tested with revision 3126 on OS X.

    Doom2, map01, UV with/without jDRP: no crashes related to blue health potions. Could pick up armor just fine. Zombies do not fall.

    Menu issues. First off, when F1 is pressed, the menu appears to be still open in the background and even scrollable. This shouldn't be the case. While the help screen is visible, the menu should not be accessible.

    There is also a bug here. The "cid" variable in M_Responder is used while uninitialized, in mn_menu.c on line 2032. This causes the crash. Windows is not always very strict on this kind of things, so I'm not surprised these can't be reproduced without proper debugging gear.

    F6, F6 crashes because of this same issue. I imagine the other cases mentioned by KuriKai are also caused by this.

    Dani, can you check these out?

    <blockquote>running doom2 choosing nightmare and pressing "enter" instead of "y" crashes doomsday.</blockquote>When I press enter instead of "y", nothing happens. The game begins only after "y" is pressed.
  • <blockquote>First, a comment about the blinking HUD messages. IMO, they blink for way too long. When you've picked up a lot of, say, blue health bonuses in a row, you'll have a large part of your HUD blinking irritatingly for several seconds. My suggestion: blink just once, then fade the message's color gradually from white to red.</blockquote>
    Yes, I'd noticed that myself. What I'll do is to change the CVAR "msg-blink" to denote the number of tics a message blinks for.
    <blockquote>Menu issues. First off, when F1 is pressed, the menu appears to be still open in the background and even scrollable. This shouldn't be the case. While the help screen is visible, the menu should not be accessible.</blockquote>
    That sounds like its related to the "cid" issue.
    <blockquote>Dani, can you check these out?</blockquote>
    I certainly can.

    Thanks for doing a debug run for me. As you know I don't actually have any real debugging tools...
    <blockquote>When I press enter instead of "y", nothing happens. The game begins only after "y" is pressed.</blockquote>
    That is as it should be. The controls for responding to a message prompt are now bindable. The default keys are "y" = yes, "n"|"Esc" = no/cancel.

    I was assuming KuriKai had bound "enter" to messageyes.
  • Argh. That means I have a heisenbug. I commited some debug code that does a console dump when you pick up a blue bottle. It dumps a message that you've entered the routine, your health at the start of the routine, and your health at the exit. The results on my system are
    <blockquote>Level 1: Entryway
    Author: id Software

    A chainsaw! Find some meat!
    Picked up a clip.
    Picked up a clip.
    Picked up a clip.
    Picked up an armor bonus.
    Picked up a clip.
    Picked up a clip.
    Health Bonus:
    Current Health: 100
    Updated Health: 0
    Picked up a health bonus.
    >quit!</blockquote>
  • Quick update on the aforementioned issues.

    * CHANGED: CVAR "msg-blink" = number of tics to blink before fading to normal, as discussed.
    * FIXED: Logic error with sliding corpses messing with objects falling.
    * FIXED(?): Access uninitialized var "cid" in M_Responder (F6, F6 crash).
    * FIXED: Menu navigation while in help screens.

    I'm in the middle of commonising the jDoom and jHeretic mobj flags (MF_*) atm. I'll commit the above fixes as soon as I've finished the work on this (the fixes are in files I'm working on currently).
  • Found the source of the heisenbug. healthlimit and co are set in Common/p_start.c, but in jDoom/p_inter.c and co they equal 0. They are not reassigned anywhere. The files are in the makefile.am.

    So, any ideas on what has gone wrong, and where ?
  • Hmm. You mentioned you were having a problem with the megasphere too and the methods for determining the amount of health given use similar logic.

    Perhaps it has something to do with the vars in question being set in Common/p_start.c

    Try this at line 134:
    <blockquote>{ // FOR DEBUG
    int customlimit = 1964;
    GetDefInt("Player|Health Limit", &customlimit);
    Con_Message("healthlimit is: %i
    customlimit is: %i
    ",
    healthlimit, customlimit);

    if(customlimit != 1964)
    healthlimit = customlimit;
    }</blockquote>
  • Update: I've now commited my changes (common MF_/MF2_ mobj flags between jDoom and jHeretic) to SVN.

    Also commited are the fixes listed above.

    Please try to break the menu again to make sure the uninitialized "cid" var was to blame.
  • The menu works for me now, no crashes. However, in jHeretic, I can't open the Help screens with F1 during gameplay. It only appears when I open it by selecting it from the main menu. I tried removing my old jHeretic.cfg, but that didn't fix it. The other F-keys work.

    BTW, the menu cursor alignment still hasn't been fixed at least in jHeretic. :)
  • <blockquote>However, in jHeretic, I can't open the Help screens with F1 during gameplay. It only appears when I open it by selecting it from the main menu. I tried removing my old jHeretic.cfg, but that didn't fix it. The other F-keys work.</blockquote>You're right, it doesn't work for me on WinXP either. I'll fix that.
    <blockquote>BTW, the menu cursor alignment still hasn't been fixed at least in jHeretic. :)</blockquote>I'll look at this too. It's one of those intensely boring tasks that I was trying to put off. :)
    I'm confident it'll only be a one-liner though.
  • Odd indeed. No matter how many debug statements I play inside P_Init, none appear. It looks very much like P_Init isn't even being called. In fact, I'm rather sure it isn't, yet the code inidcates it does, and the makefiles build it.
  • <blockquote>The menu works for me now, no crashes. However, in jHeretic, I can't open the Help screens with F1 during gameplay. It only appears when I open it by selecting it from the main menu. I tried removing my old jHeretic.cfg, but that didn't fix it. The other F-keys work.</blockquote>
    Fixed in SVN rev 3131.
    <blockquote>Odd indeed. No matter how many debug statements I play inside P_Init, none appear. It looks very much like P_Init isn't even being called. In fact, I'm rather sure it isn't, yet the code inidcates it does, and the makefiles build it.</blockquote>That would be my conclusion also. Sprinkling a few breakpoints in and around calls to P_Init should provide proof.
  • <blockquote>Odd indeed. No matter how many debug statements I play inside P_Init, none appear.</blockquote> It might be a linking problem due to the fact that the engine also has a function called P_Init. Maybe the call to P_Init from the game is mistakenly directed there. On Linux, I believe the game libs are dynamically linked so that they can access exported symbols from the engine. I have a feeling that everything is exported by default.

    We should rename all functions that have the same name in both the engine and the games. In this case, I suggest we rename the P_Init in the engine. I'll take care of this myself.
  • Well That last Build FIXED: Access uninitialized var "cid" in M_Responder (F6, F6 crash).^^
  • Thanks Skyjake, it was a linking issue, Doom works now, Hexen actually loads. A quick test of Doom, Heretic & Hexen shows they seem to be in order.
  • <blockquote><blockquote>BTW, the menu cursor alignment still hasn't been fixed at least in jHeretic. </blockquote>
    I'll look at this too. It's one of those intensely boring tasks that I was trying to put off. </blockquote> I've now fixed the menu cursor positions in all games. The load/save boxes required another offset tweak. Now the cursor should be positioned correctly everywhere.
  • <blockquote>I've now fixed the menu cursor positions in all games. The load/save boxes required another offset tweak. Now the cursor should be positioned correctly everywhere.</blockquote>
    Hey, thanks. I'd been messing around with them for about 2 hours and I was tired and irritated so I gave up.

    Nice to hear you've fixed them.

    I'm busy compiling everything and going through the log as it appears you've been quite busy since my last SVN Update.

    BTW, I like the updated blog header graphic. Very nice.
  • <blockquote>BTW, I like the updated blog header graphic. Very nice.</blockquote> Thanks! This time I rendered it with POV-Ray instead of drawing it by hand.
  • Just a couple of very minor things my build brings up:

    Compilling Doomsday:
    <blockquote>Src\sys_input.c(61) : error C2371: 'usejoystick' : redefinition; different basic types
    h:\F\deng\project\branches\branch-1-9-0\doomsday\Include\sys_input.h(65) : see declaration of 'usejoystick'</blockquote>
    <blockquote>Src
    end_fakeradio.c(81) : warning C4305: 'initializing' : truncation from 'double' to 'float'</blockquote>
    Compilling any game:
    <blockquote>Src\Common
    _common.c(101) : warning C4305: '+=' : truncation from 'double' to 'float'</blockquote>
    <blockquote>Src\Common\g_game.c(1147) : warning C4013: 'R_ViewWindowTicker' undefined; assuming extern returning int</blockquote>
    Quite trivial I know.
    <blockquote>Thanks! This time I rendered it with POV-Ray instead of drawing it by hand.</blockquote>
    If I was being VERY fussy I would suggest maybe increasing the color saturation a tiny bit (currently the translucent menu bar looks a little dirty on my screen).
Sign In or Register to comment.