Page 1 of 1
Screenshot loading screen
Posted: Thu May 13, 2004 2:10 am
by tltrude
I want to make a generic, animated deathmatch and objective loading screen for noob mappers. It will load the first 12 screenshots in the clients main/screenshots folder and runs them like a slide show while the map loads. If the client does not have 12 screenshots it will show a "not found" background image, hopefully, that will say so.
Anyway, I got the animated screenshot shader working just fine. And the urc file works too (except the "not found" thing), but it is not very "generic" yet. It would be great if the mapper could just drop the folders in his pk3 and not have to change a bunch of file names.
The first problem is the top line of the urc file, and the file name itself. It needs the map folder/name to work.
loading_test.urc
//================================
menu "dm/test" 640 481 NONE 0
bgcolor 0 0 0 1
borderstyle NONE
bgfill 0 0 0 1
fadein 0.2
virtualres 1
postinclude ui/loadingbar.txt // flashing loading sign
//postinclude ui/notfound.txt
resource
Label
{
name "Default"
//rect 96 48 448 336
rect 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "screen_shots"
}
resource
Label
{
title "<==WELCOME!==>"
name "Default"
rect 72 408 496 32
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.00 0.00 0.00 0.00
borderstyle "RAISED"
font facfont-20
}
end.
//================================
It is interesting that "postinclude ui/loadingbar.txt " is also a urc like file. But, it starts with this line.
menu "" 640 480 NONE 1
No map name! And, it is not used after a min file has been created.
So, does anyone have an idea how to improve it? I also still need to find a way to add that background--so the client does not get a gray screen for missing screenshots. The image is named notfound.tga and it is in the screenshots folder. The shader for it is also named "notfound".
Any ideas are welcome.
Posted: Fri May 21, 2004 8:29 pm
by Master-Of-Fungus-Foo-D
Wel, im no expert at all, and this is just a wild guess....
maybe the game is loking for a screenshot nammed "screenshot0012"
or something like that. Im not sure.. im jst a noob...

ss
Posted: Fri May 21, 2004 8:44 pm
by tltrude
The twelve screenshots are numbered 0 - 11. But, if even only one of them is missing, the animated texture shader fails completely.
Posted: Fri May 21, 2004 8:50 pm
by Master-Of-Fungus-Foo-D
there goes my theory
Posted: Sat May 22, 2004 5:33 am
by Cobra {sfx}
Does it need to be 12 screenies Tom? I experimented viewing screenies loading a map and found it maybe displayed about 4 before the map was loaded (time limit on them was about 1 second view time - on a modded stock map-using a pentium 4-3.0 & 1 gig ram) probably will depend on their connection/cpu etc how many they will actually get to see.
number
Posted: Sat May 22, 2004 5:43 am
by tltrude
It can be any number, because the animation speed can be set in the shader. below, I am using 5 shots (for testing) with a speed of ".8".
Code: Select all
screen_shots
{
nomipmaps
nopicmip
cull none
surfaceparm nolightmap
{
animmap .8 screenshots/shot0000.tga screenshots/shot0001.tga screenshots/shot0002.tga screenshots/shot0003.tga screenshots/shot0004.tga screenshots/shot0005.tga //screenshots/shot0006.tga screenshots/shot0007.tga screenshots/shot0008.tga screenshots/shot0009.tga screenshots/shot0010.tga screenshots/shot0011.tga
rgbgen global
blendFunc GL_DST_COLOR GL_ZERO
}
{
animmap .8 screenshots/shot0000.tga screenshots/shot0001.tga screenshots/shot0002.tga screenshots/shot0003.tga screenshots/shot0004.tga screenshots/shot0005.tga //screenshots/shot0006.tga screenshots/shot0007.tga screenshots/shot0008.tga screenshots/shot0009.tga screenshots/shot0010.tga screenshots/shot0011.tga
rgbgen identity
blendfunc GL_ONE GL_ONE
}
}
number
Posted: Sat May 22, 2004 5:48 am
by tltrude
It can be any number, because the animation speed can be set in the shader. below, I am using 5 shots (for testing) with a speed of ".8".
Code: Select all
screen_shots
{
nomipmaps
nopicmip
cull none
surfaceparm nolightmap
{
animmap .8 screenshots/shot0000.tga screenshots/shot0001.tga screenshots/shot0002.tga screenshots/shot0003.tga screenshots/shot0004.tga screenshots/shot0005.tga //screenshots/shot0006.tga screenshots/shot0007.tga screenshots/shot0008.tga screenshots/shot0009.tga screenshots/shot0010.tga screenshots/shot0011.tga
rgbgen global
blendFunc GL_DST_COLOR GL_ZERO
}
{
animmap .8 screenshots/shot0000.tga screenshots/shot0001.tga screenshots/shot0002.tga screenshots/shot0003.tga screenshots/shot0004.tga screenshots/shot0005.tga //screenshots/shot0006.tga screenshots/shot0007.tga screenshots/shot0008.tga screenshots/shot0009.tga screenshots/shot0010.tga screenshots/shot0011.tga
rgbgen identity
blendfunc GL_ONE GL_ONE
}
}
Note: I have updated the first post with my latest UI file.
Posted: Sat May 22, 2004 6:29 am
by bdbodger
Well I think that files on the harddrive are used even if there is the same file in a pak at least in mohaa that is . I know if I write a custom script for something like mohdm1 and put it not in a pak but in the maps/dm directory then the new script is used . So if you have a picture of notfound.tga and copied that 12 or how ever many time nameing them all screenshot0 to 11 then if the client does not have one of them on his or her hardrive then yours will be used I guess.
cool
Posted: Sun May 23, 2004 1:28 am
by tltrude
Wahoo! That works great bd!!! Now, if I can only get the urc file to find the map's name by itself, the mapper will only have to change the name of the file (loading_yourmapname.urc).
Posted: Sun May 23, 2004 3:56 am
by kai0ty
heres a question, how about making a fully animated one. u have maybe 50 screens and make em swithc once every .3 seconds. that would be cool.
Posted: Sun May 23, 2004 3:01 pm
by blue60007
kai0ty wrote:heres a question, how about making a fully animated one. u have maybe 50 screens and make em swithc once every .3 seconds. that would be cool.
Well that'd be a lot of work getting 50 shots to animate and the load on the system would slow the load down to much.
Posted: Sun May 23, 2004 5:05 pm
by nuggets
dunno how, but if you get people to call them all shot001.tga etc... but have a folder variance instead
so
my_map/shot001.tga
my_map/shot002.tga
etc...
dunno how to store a variable in .shaders though

50
Posted: Sun May 23, 2004 11:39 pm
by tltrude
fifty screenshots would make for a very large pk3--even if they were jpg images. And, the movie would only last for a little over a second (30 frames per second). Also, an animated loading screen does pauses in spots because the map's files are loading in the background.
You lost me nuggets! The whole point of this project is to create a "drop-in" ui loading screen for mappers. The mapper does not have to make any images because it uses screenshots it finds in the clients main/screenshots folder (any named shot0000 - shot0011, that is). It also displays a "Screenshot Files Not Found" image--for any image files that are missing in the clients screenshots folder.
Ps: Does anyone know how to bring up the GUI editor? there is a tutorial for it in the SDK/docs folder, but i can't see any editor for it in mohaa's cmdlist--maybe it is a seperate program.
GUI Documentation
DlgEdit ? This is the editor that allows you to create GUIs for the game.
Posted: Mon May 24, 2004 4:02 am
by Rindog
Yes it is a seperate program! I attached it to this thread if you don't have it or can't find it.
http://modtheater.com/forum/showthread. ... post135130
thanks
Posted: Mon May 24, 2004 1:53 pm
by tltrude
Cool - thanks rindog. Using it, I created an in-game menu (test_widget.urc) in only a few minutes--same menu (not as good) took all day yesterday.
That GUI Documentation tutroial in the SDK/docs folder needs to be redone, I think. The GUI editor could be very hard for a novice menu maker to figure out and the tutorial is extreemly basic.