Condensing the Progress Bar
by Chris Byars · in Torque Game Engine · 06/15/2006 (7:03 pm) · 8 replies
How would one go about condensing the three stage progress bar into a single loading bar (visually), rather than resetting after each stage?
Thanks in advance. :)
Thanks in advance. :)
#2
Currently the loadingGui uses the progress bar which is reset after each phase (loading datablocks, loading objects, lighting mission), and each stage hits 100% full. I want it to instead only appear to have one phase, a single fill sequence for the entire load.
06/16/2006 (5:55 am)
Code would be great, logic and planning second to it. Currently the loadingGui uses the progress bar which is reset after each phase (loading datablocks, loading objects, lighting mission), and each stage hits 100% full. I want it to instead only appear to have one phase, a single fill sequence for the entire load.
#3
in \client\scripts\missionDownload.cs
in function onPhase1Progress(%progress) change to:
in onMissionDownloadPhase2() comment out:
in function onPhase2Progress(%progress) change to:
My project is single player, so files don't need to be downloaded. otherwise, something more intelligent needs to happen in the next edit.
in onFileChunkReceived(%fileName, %ofs, %size) comment out:
in onMissionDownloadPhase3() comment out:
in function onPhase3Progress(%progress) change to:
06/16/2006 (11:23 am)
Here is the way I have it working:in \client\scripts\missionDownload.cs
in function onPhase1Progress(%progress) change to:
LoadingProgress.setValue(%progress / 3);
Canvas.repaint();in onMissionDownloadPhase2() comment out:
//LoadingProgress.setValue(0);
in function onPhase2Progress(%progress) change to:
LoadingProgress.setValue((%progress / 3) + 0.33);
Canvas.repaint();My project is single player, so files don't need to be downloaded. otherwise, something more intelligent needs to happen in the next edit.
in onFileChunkReceived(%fileName, %ofs, %size) comment out:
//LoadingProgress.setValue(%ofs / %size);
in onMissionDownloadPhase3() comment out:
//LoadingProgress.setValue(0);
in function onPhase3Progress(%progress) change to:
LoadingProgress.setValue((%progress / 3) + 0.66 );
#4
Edit: Got it working. Made that one's setValue be LoadingProgress.setValue(%progress / 3 + 0.33); and it works great. Thanks.
06/16/2006 (11:58 am)
Doesn't something need to go in onPhase2Progress? Edit: Got it working. Made that one's setValue be LoadingProgress.setValue(%progress / 3 + 0.33); and it works great. Thanks.
#5
06/16/2006 (12:01 pm)
Yes, modified original post.
#6
06/16/2006 (12:04 pm)
Also, when the mission doesn't require a relight to generate the .ml file, the progress halts at the end of phase two, and then enters the game. What can I do to get the progress to fill up the rest of the bar if it doesn't need a relight?
#7
In function clientCmdMissionStartPhase3(%seq,%missionName) you need to have it call sceneLightingComplete(); even if it doesn't light the scene. So probably just need to add an else statement.
My project doesn't do any static lighting of the scene, so I have heavily modified that part already to skip the lighting phase.
06/16/2006 (1:19 pm)
In \common\client\missionDownload.csIn function clientCmdMissionStartPhase3(%seq,%missionName) you need to have it call sceneLightingComplete(); even if it doesn't light the scene. So probably just need to add an else statement.
My project doesn't do any static lighting of the scene, so I have heavily modified that part already to skip the lighting phase.
#8
06/16/2006 (1:40 pm)
Easy enough. Works. :)
Torque Owner Badguy
you looking for code?
or logic and planning?