Game Development Community

GuiMapHud->rebuildMap(), any known issues?

by Stephen Zepp · in RTS Starter Kit · 11/15/2004 (9:47 am) · 8 replies

I'm working on integrating the MapHud with the day/night resource (Celestials), and finally got the Celestials code to call GuiMapHud->rebuildMap("false"), but generated an Assert:

Celestials::updateSunPosition: Pinging MapHud to update based on every hour, using MapHud
Proceeding with mini-map generation...
Map generation beginning...
Section rendered in 0.010 seconds
Section captured in 0.002 seconds
Section rendered in 0.008 seconds
Section captured in 0.003 seconds
Section rendered in 0.007 seconds
Section captured in 0.004 seconds
Section rendered in 0.007 seconds
Section captured in 0.003 seconds
Map generation complete in 0.044 seconds
Fatal: (sceneGraph/sceneState.cc @ 116) Error, object of class fxSunLight either unbalanced the xform stacks, or didn't reset the viewport! mv(2 2) proj(1 1) t0(1 1), t1(1 1) (0 0 1024 768: 0 668 100 100)
DirectInput deactivated.
Activating DirectInput...

Are there known (or possibly unknown?) issues with rebuilding the GuiMapHud once the game is in play? I realize the error message points to the fxSunlight code, but I wanted to "clear the path" to debugging that by being able to cap off any known issues in rebuilding the Map first.

#1
11/15/2004 (10:32 am)
It looks like some rendering code somewhere isn't cleaning up after itself... The maphud should be able to regenerate without too many problems at any time. Maybe Chris Weiland will deign to comment here - he wrote that code. ;)
#2
11/15/2004 (11:31 am)
@Ben: I hate cross-posting with a passion, but I don't think Melv is in this forum--would it be wise/ok to post this in the Torque SDK forum as well and see if he gets a lightbulb above his head, or do you want to take a look possibly at the maphudgen code first? As the assert blames fxSunLight and doesn't even consider anything in MapHud as worth blaming, I was thinking it might be fxSunLight after all.

@RTS Pack guys and gals: If you have implemented the Day/Night cycle Resource for TGE(and assuming we can track this bug down), I've got the rest of the code written and tested to tell the MapHud to update itself every game hour. If it works as intended once this bug is figured out, I'll post it as another resource for those that are interested.
#3
11/15/2004 (3:23 pm)
@Ben/GG: Sorry to be impatient about this, but I'm still riding the rush from this weekend's crunch :)

Do you think that it would be worthwhile to post this question in the Torque SDK forum so that Melv can see it, since the error points to fxSunlight as the possible culprit?
#4
11/15/2004 (4:03 pm)
Dunno. You could always mail him privately about it.
#5
11/15/2004 (4:13 pm)
Interesting, I just tried the rebuildMap(true) command in the console directly, and it worked like a champ.
That leads me to believe that it's a sequencing issue of some sort...

If I continue to be stuck on it I'll drop him a line--was just trying to keep things separated forum wise, but email is a good idea!
#6
11/15/2004 (4:25 pm)
Bingo! It was some sort of timing conflict when calling the rebuildMap directly from Celestials::updateSunPosition();

Going to post the integration in a separate thread, it's actually only a few lines.
#7
11/16/2004 (7:35 pm)
Snazzy. Glad you got it working!
#8
11/16/2004 (7:50 pm)
Yah, other then the selection circle artifacts, which is something a bit above my head at the moment!