Total game time display

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Total game time display

Post by Graf Zahl »

The current time display is a little too limited IMO.

If there is no hub it only shows the time of the current level but not how long the game took overall.

If there are hubs it shows only the total time but not how much was spent in the hub.

If hubs and single levels are mixed the time display is a total mess.

How about separating it into 2 counters, one for the hub/level and one total?
(I don't think it makes sense to show the time for each level in the hub though.)
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Yeah, that would help. And in hubs, it would remember the time you had spent on last visit once you enter again, so for example when you leave a hub level the time in that level was 13:28 and then once entering again it would start at 13:29.

This would be much more organized than the current version.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

No. Hubs should count total time not level time (or maybe both if you like.)
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Graf Zahl wrote:(or maybe both if you like.)


That's what I meant. Like I said before, it would remember the time for each hub level, but it would also keep track of the total time. :)
User avatar
Enjay
 
 
Posts: 26402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

This is something that has bugged me for a long time. I like this suggestion.

Also, I'd like to know my percentage kills etc for an entire hub, not just the last level in it. However, I suspect that would be a lot more complex to do.
User avatar
Cutmanmike
Posts: 11253
Joined: Mon Oct 06, 2003 3:41 pm
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit
Location: United Kingdom

Post by Cutmanmike »

Speaking of time, would it be possible to allow the computer clock's time to be visable on the automap somewhere? No I don't have a clock in my room :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Enjay wrote:This is something that has bugged me for a long time. I like this suggestion.

Also, I'd like to know my percentage kills etc for an entire hub, not just the last level in it. However, I suspect that would be a lot more complex to do.



Not really. You just have to keep track of it.

Although this is unfinished business is should make it a lot easier: ;)

Code: Select all

//==========================================================================
//
// Intermission stats
//
//==========================================================================

TArray<wbstartstruct_t> hubdata;

void Hub_Leaving(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs)
{
   int i,j;

   if (cluster->flags & CLUSTER_HUB)
   {
      for(i=0;i<hubdata.Size();i++)
      {
         if (hubdata[i].finished_ep==level.levelnum)
         {
            hubdata[i]=*wbs;
            break;
         }
      }
      if (i==hubdata.Size())
      {
         hubdata.Push(*wbs);
      }

      hubdata[i].finished_ep=level.levelnum;
      if (!multiplayer && !deathmatch)
      {
         // The player counters don't work in hubs!
         hubdata[i].plyr[0].skills=level.killed_monsters;
         hubdata[i].plyr[0].sitems=level.found_items;
         hubdata[i].plyr[0].ssecret=level.found_secrets;
      }


      if (mode!=FINISH_SameHub)
      {
         wbs->maxkills=wbs->maxitems=wbs->maxsecret=0;
         for(i=0;i<MAXPLAYERS;i++)
         {
            wbs->plyr[i].sitems=wbs->plyr[i].skills=wbs->plyr[i].ssecret=0;
         }

         for(i=0;i<hubdata.Size();i++)
         {
            wbs->maxkills += hubdata[i].maxkills;
            wbs->maxitems += hubdata[i].maxitems;
            wbs->maxsecret += hubdata[i].maxsecret;
            for(j=0;j<MAXPLAYERS;j++)
            {
               wbs->plyr[j].sitems += hubdata[i].plyr[j].sitems;
               wbs->plyr[j].skills += hubdata[i].plyr[j].skills;
               wbs->plyr[j].ssecret += hubdata[i].plyr[j].ssecret;
            }
         }
         if (cluster->clustername)
         {
            strncpy(level.level_name, cluster->clustername, 64);
            level.level_name[63]=0;
         }
      }
   }
   if (mode!=FINISH_SameHub) hubdata.Clear();
}


Of course it has to be saved as well - and it requires a cluster name - so that the exit screen displays the hub name.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

cutmanmike wrote:Speaking of time, would it be possible to allow the computer clock's time to be visable on the automap somewhere? No I don't have a clock in my room :P


Wow, that would be AWESOME to have! I can imagine making a map with real-time day-to-night skies/brightness levels using that. But I don't think that it possible, is it?

Well it would be cool anyway. :p
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Why shouldn't it be possible to read the system clock? Every operating system has some functions for that.
User avatar
Nash
 
 
Posts: 17282
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Post by Nash »

I'll have to agree with cutmanmike.

Although very VERY trivial, it would great to see the current time of the day somewhere within the program itself.

It sounds ridiculous, but I don't wear watches at home, I don't have a clock in my room, too, and my cell phones are put away from the computer desk.

I play ZDoom fullscreen and it's a pain Alt + Tabbing in and out of ZDoom all the time because I have crappy hardware.

Sometimes when playing really long and tough maps, it would be nice if I was easily able to check what time is it so I am reminded that there's a real world outside the game. ;P
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Nash wrote:It sounds ridiculous, but I don't wear watches at home, I don't have a clock in my room, too, and my cell phones are put away from the computer desk.


Well just looking at the time would be one thing, BUT if implemented correctly, one could think that if you could make an ACS script that somehow figures out what time it is via an "IF" statement, it could be possible to make a map in which the light level fades brighter/darker and the sky changes to a different texture to emulate real-time day-to-night-to-day and so on. Oh how cool that would be! :D

When I said before I didn't think it would be possible is, is there really a way to make ZDoom read one's time from their computer?
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia

Post by David Ferstat »

Zdoom, like any other Windows program, should be able access the system time, either through Windows, or by talking directly to the motherboard's clock.

Therefore, yes, it it possible to make Zdoom aware of the sytem time. You just have convince someone to code it for you, and convince Randy to incorporate it into the source.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London

Post by Phobus »

What if the said Windows program altered the time? There may be problems there (not huge, but problems nonetheless).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

If the time is altered the computer thinks it's a different time. There's no need to bother with that.

Return to “Closed Feature Suggestions”