Screenshot loading screen

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Screenshot loading screen

Post 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".

Image

Any ideas are welcome.
Last edited by tltrude on Sat May 22, 2004 2:59 pm, edited 1 time in total.
Tom Trude,

Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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... :? :? :? :?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

ss

Post by tltrude »

The twelve screenshots are numbered 0 - 11. But, if even only one of them is missing, the animated texture shader fails completely.
Tom Trude,

Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

there goes my theory
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Cobra {sfx}
Site Admin
Posts: 194
Joined: Tue Mar 23, 2004 10:25 pm
Contact:

Post 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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

number

Post 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
	}
}
Tom Trude,

Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

number

Post 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.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

cool

Post 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).
Tom Trude,

Image
kai0ty
Brigadier General
Posts: 507
Joined: Fri Mar 19, 2004 1:45 am

Post 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.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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 :(
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

50

Post 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.
Tom Trude,

Image
Rindog
Corporal
Posts: 29
Joined: Wed Sep 24, 2003 6:34 pm

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

thanks

Post 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.
Tom Trude,

Image
Post Reply