Kiosk / Demo mode ?

Kiosk / Demo mode ?

Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Thu Dec 29th 2005 at 9:11pm
rainbow_lazer
19 posts
Posted 2005-12-29 9:11pm
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
hi, i'm constructing a level for an exhibition that will be set up as a constantly-running kiosk.

i'm wondering if it's possible to have a demo video play automatically after a certain period of idle time, as seen in many arcade games.

for example, if no one has played for 5 minutes, a pre-recorded demo will play itself, and when a user is enticed by the demo to move the mouse, the game starts back up again.

i read the tutorial on recording demo movies:

http://www.snarkpit.net/editing.php?page=tutorials&id=163&highlight=demo,mode

anyone with ideas for how to make them play automatically, please share! thanks a lot!
Re: Kiosk / Demo mode ? Posted by Campaignjunkie on Thu Dec 29th 2005 at 10:31pm
Campaignjunkie
1309 posts
Posted 2005-12-29 10:31pm
1309 posts 329 snarkmarks Registered: Feb 12th 2002 Occupation: Student Location: West Coast, USA
I think this would have to be programmed as a mod, it's not really possible with map entities. Sorry.
Re: Kiosk / Demo mode ? Posted by Dark_Kilauea on Fri Dec 30th 2005 at 4:29am
Dark_Kilauea
629 posts
Posted 2005-12-30 4:29am
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Use a point_clientcommand entity and place the command to play the demo in it.

Hope this helps.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Fri Dec 30th 2005 at 7:01am
rainbow_lazer
19 posts
Posted 2005-12-30 7:01am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
yeah that definitely helps!
thanks! my only
other question: is there a way to tie it in with mouse/keyboard action
as a triggering event?
Re: Kiosk / Demo mode ? Posted by Crono on Fri Dec 30th 2005 at 8:22am
Crono
6628 posts
Posted 2005-12-30 8:22am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
You could just make it so the person has to join. Bind a key to auto join and put that text in the demo so it displays the whole time, like "Press F7 to AutoJoin". I think that'd be a better solution. That or there might be a condition for that entity.

If it turns out that the map gets closed and needs to be reloaded, I'd suggest, perhaps, make a map with bots and chase cams. But, if you're doing it for hl2dm, bots don't exist ... I think ...

Anyway, good luck. It's a nice idea.
Blame it on Microsoft, God does.
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Wed Jan 4th 2006 at 4:33am
rainbow_lazer
19 posts
Posted 2006-01-04 4:33am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
hmm... one other quick-and-dirty solution i was thinking of would be to just record a clip with a screen-capture program, then use a video screen saver to play it after a certain period of idle time. in this case it makes no difference to me if the demo clip is part of the actual mod or not.

i've tried this with one free video screen saver program, but for some reason it does not activate while the mod is running. i'm not really sure why, i suppose it has something to do with HL2 changing the display settings?

anyhow, thanks for the tips so far. i'm going to keep hacking my way thru it.
Re: Kiosk / Demo mode ? Posted by Crono on Wed Jan 4th 2006 at 5:41am
Crono
6628 posts
Posted 2006-01-04 5:41am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
No, it's because Windows doesn't run screensavers when programs like that are active, you can change that however. I don't remember right now, and I'm in a hurry too :\
Blame it on Microsoft, God does.
Re: Kiosk / Demo mode ? Posted by Campaignjunkie on Wed Jan 4th 2006 at 6:03am
Campaignjunkie
1309 posts
Posted 2006-01-04 6:03am
1309 posts 329 snarkmarks Registered: Feb 12th 2002 Occupation: Student Location: West Coast, USA
The main problem here is playing the demo while preserving user interaction, which I don't think is possible. Rather, I think the most practical implementation would be a looping camera flythrough in the level or something like it, while having a text message on the screen saying "press enter to begin" or something. Have "enter" bound to the console command "ent_fire camera disable," which would disable the camera and bring back user control.
Re: Kiosk / Demo mode ? Posted by DrGlass on Wed Jan 4th 2006 at 9:30am
DrGlass
1825 posts
Posted 2006-01-04 9:30am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
or, depending on how the level is set up you could have grid of trigger_mulitble vloumes set up all over the floor that require the player to stand still for 15-30 seconds. Once the player stands still for the time in one of these grid squares he would be teleported (one large trigger_teleport) to a spot that would activate the camera fly-by. infront of the player would be a trigger_look volume set to brake the camera once the player looks away.

so the player can walk around your level, once he goes idle a trigger will teleport him to a spot where the idle PC (playable character) will stare at a trigger_look and activate the camera fly-by. once a person moves the PC it will break the connection to the trigger_look and give controle back to the PC.

I hope this helps/works
Re: Kiosk / Demo mode ? Posted by wil5on on Wed Jan 4th 2006 at 1:13pm
wil5on
1733 posts
Posted 2006-01-04 1:13pm
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
Actually, you could do that without teleporting, I think game_ui has an option to fire something if the players view angle moves by so many degrees.

In fact, you could possibly use a game_ui for the whole thing. It can trigger outputs whenever the player moves or shoots, and you could use these outputs to reset a timer to 5 minutes or whatever. Once the timer runs out, it activates a point_viewcontrol, parented to some sort of moving entity that is continuously flying around the map. I'm not sure if it would work, but its worth a try.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Wed Jan 4th 2006 at 4:03pm
rainbow_lazer
19 posts
Posted 2006-01-04 4:03pm
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
awesome. thanks so much for the advice, guys.

one other thing that i've got to consider is that this mod will be running for several weeks in an exhibition setting, and the machine it's on will be powered on and off by an attendant every night and morning, respectively, and will be pretty much unattended by me.

so ideally i'd like things to run as automatically and simply as possible and not have to rely on the attendant beyond starting the machine to get it running.

for this reason i was leaning towards the screen saver; i could just put the bsp file in the startup folder, then it would run automatically [or at least load the main menu] when the machine is booted. if i did this along with the screen saver, all that would need to happen for it to run properly is to boot the machine, since the screen saver would run automatically.

if i use a method like wil5on's -- which is really smart and i actually know of a couple other uses i will put it towards :smile: -- it would require the extra steps of actually launching the game, correct?

ps. i realize i'm being super-nitpicky. but what can i say? i've got too much spare time :smile:
Re: Kiosk / Demo mode ? Posted by DrGlass on Thu Jan 5th 2006 at 1:23am
DrGlass
1825 posts
Posted 2006-01-05 1:23am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
thats easy, all you need to do is make a shortcut for your MOD and modify it's properties so the shortcut looks something like this.

"steam/email/game/hl2.exe -console -map mapname" (there may be more in the command line, just be sure to add -console -map mapname)

then place that in the start up menu. This will automaticaly open steam, run the mod, open the console, and run the map.
Re: Kiosk / Demo mode ? Posted by wil5on on Thu Jan 5th 2006 at 1:26am
wil5on
1733 posts
Posted 2006-01-05 1:26am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
You could set up some sort of script to start the game and load the map on startup. A batch file to start up Steam then open HL2 with the map should do it.

If you use a screen saver, it could get a bit messy... screen savers and games generally dont get along too well.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: Kiosk / Demo mode ? Posted by DrGlass on Thu Jan 5th 2006 at 4:04am
DrGlass
1825 posts
Posted 2006-01-05 4:04am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
I'd stay away from the screen saver, 3rd party screen savers (I would think) would minamize the game.
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Thu Jan 5th 2006 at 4:06am
rainbow_lazer
19 posts
Posted 2006-01-05 4:06am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
holy s**t! this forum is amazing. thanks!
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Thu Jan 5th 2006 at 9:27pm
rainbow_lazer
19 posts
Posted 2006-01-05 9:27pm
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
ok, the command prompt works awesome, my mod can now run and load the map automatically on startup.

i've been playing around with the game_ui triggers, but i haven't been able to get it to work so far. i'd like to tie it in with a timer, so if the player is idle for a time, an event will take place [playing the demo]

i tried outputting to an explosion just to test and see how the PressedForward, Left, Right, XAxis, and YAxis behaved, but i couldn't get anything to activate!

my FOV was -1, and i tried it with and without the flags checked. any thoughts?

all the advice so far has been amazing! thanks again
Re: Kiosk / Demo mode ? Posted by wil5on on Fri Jan 6th 2006 at 1:01am
wil5on
1733 posts
Posted 2006-01-06 1:01am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
You have to trigger the game_ui first so it considers the player "on".

XAxis and YAxis can be used to output numbers corresponding to player movement keys, eg. theyll output -1 on XAxis if the player moves left. These will probably be easier than the Pressed* outputs, since youll have less outputs to put into your ui. I dont know about timers, but I'm sure theres an entity to give a delay. Look at the logic_ entities.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: Kiosk / Demo mode ? Posted by Campaignjunkie on Fri Jan 6th 2006 at 9:53pm
Campaignjunkie
1309 posts
Posted 2006-01-06 9:53pm
1309 posts 329 snarkmarks Registered: Feb 12th 2002 Occupation: Student Location: West Coast, USA
Wow, I didn't even think of the game_ui entity. Interesting.
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Sat Jan 7th 2006 at 4:17am
rainbow_lazer
19 posts
Posted 2006-01-07 4:17am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
yeah, the trigger did the trick. i made the floor into a trigger_once, and i set it up to fire on the XAxis and YAxis to create an explosion any time any direction buttons are hit. its pretty funny to watch.

i started to switch it to reset a logic_timer, but it was acting strangely [constantly triggering an explosion] i didnt have enough time to mess around with it though.
Re: Kiosk / Demo mode ? Posted by wil5on on Sat Jan 7th 2006 at 6:37am
wil5on
1733 posts
Posted 2006-01-07 6:37am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
I think logic_timer triggers an output once every so many seconds... if this is so, it might still be possible to use it for this effect.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Sat Jan 7th 2006 at 8:34pm
rainbow_lazer
19 posts
Posted 2006-01-07 8:34pm
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
yes, i can get the logic_timer to fire on an interval, but i'm having some trouble resetting it. the input that seems closest to what i want is RefireTimer, but i don't think that adtually resets it, just changes the interval time.

are there any other timer options?

the only other idea i had was a pretty convoluted setup of a logic_timer, a math-counter, and a logic_compare, where the game_ui would add to the counter every time the X and YAxis changed. then when the timer fired, the logic_compare would compare the math_counter value to 0, and everything would be reset.
...i couldnt get that to work either. :sad:

any ideas? thanks!
Re: Kiosk / Demo mode ? Posted by wil5on on Sat Jan 7th 2006 at 10:10pm
wil5on
1733 posts
Posted 2006-01-07 10:10pm
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
I think what youd have to do for that is use the timer to reset the math_counter to 0 after comparing. In what youve described, the math_counter is only 0 when the map loads. So the outputs would be something like:

game_ui: Add 1 to math_counter on XAxis, YAxis

logic_timer: On timer:
Compare logic_compare
(Delay 1s) Set math_counter to 0
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Sun Jan 8th 2006 at 6:46am
rainbow_lazer
19 posts
Posted 2006-01-08 6:46am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
well, it's funny... i had a reset function from the logic_timer, only it was output to the logic_compare, to change the SetValue back to 0. i tried outputting to math_counter to reset it to zero, but for some reason neither reset works.

i've been using the console command ent_messages to view the inputs & outputs for these entities, and for some reason, the math-counter is not being reset . i cant really see why that would be.

the counter itself works fine -- every time any of the direction buttons are pushed, the count increases. when i had the logic_timer set to output 0 to math_counter OnTimer, it seemed to be actually increasing the count by the timer interval instead of resetting it to zero.

anyhow, i'm gone for the weekend so maybe it'll fix itself before i'm back :smile:

any ideas are greatly appreciated. thanks!
Re: Kiosk / Demo mode ? Posted by rainbow_lazer on Mon Mar 20th 2006 at 4:09am
rainbow_lazer
19 posts
Posted 2006-03-20 4:09am
19 posts 2 snarkmarks Registered: Oct 13th 2005 Occupation: busboy Location: USA
ok, here's how i did it:

Pt. 1: Create your timer system
____________________________________________________

create a trigger_once that covers most of the floor/ground in your level.

then create the following point entities anywhere:e

game_ui
logic_branch
logic_timer
a second logic_timer*
point_clientcommand

now for the settings:

trigger_once:

OnTrigger > game_ui > Activate

game_ui:

XAxis > logic_branch > SetValue with a parameter override of 1
YAxis > logic_branch > SetValue with a parameter override of 1

logic_timer #1

Refire Interval: 600
OnTimer > logic_branch > Test

logic_timer #2

Refire Interval: 300
OnTimer > logic_branch > SetValue with a prameter override of 0,
and a delay of 1 second

logic_branch

OnFalse > point_clientcommand > Command with a prameter override
of 'playdemo demo' [without those quotes, of course]

PT 2: Record your looping demo
___________________________________________________________

compile your map, then run it.
bring up the console and type 'record demo', [without those quotes]
this will record a demo with the title 'demo'

now run around and play your level, or do whatever you want to.
once you want to stop recording, bring the console back and type 'stop'.

to play your demo, type 'playdemo demo'
once your demo is playing, hit Shift + F2. this will bring up the demo playback controls.

hit the Pause button in the middle.

look to the lower left of the editor panel. you will see a line that reads:
'Tick: ###/###'
the ticks are sort of like frame numbers for your demo. the first group is the frame you're on, and the second is the total number in your demo.
Note the second number.

Now click the Edit button on the bottom of the panel. this brings up the demo editor.

click New... then select PlayCommands

name it 'restart'

set StartOn to TimeUseTicks, then set the number next to it to about 50 less than your total number of ticks.

then set Commands to 'playdemo demo' [no quotes]

this will restart the demo and make it loop forever.

(you can also do an edit to display a message which prompts the user to hit 'esc' to start a new game. i'll let you figure it out)

that's pretty much it. now if a player is inactive for more than 10 minutes, the game will run the demo loop forever until someone walks up and hits escape.

you can adjust the interval by changing the logic_timer refires.

have fun :smile:

*note: you could probably do this with one logic_timer, but i just find it simpler this way.
Re: Kiosk / Demo mode ? Posted by ReNo on Mon Mar 20th 2006 at 5:06am
ReNo
5457 posts
Posted 2006-03-20 5:06am
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
Thanks a lot for posting the final solution. You may want to consider posting this up as a tutorial - granted, it is a fairly specific use thing, but it's not something I've seen done before. Glad you got it working anyway :smile:
[img]http://card.mygamercard.net/sig/Default/reno84.png[/img]
Designer @ Haiku Interactive | ReNo-vation.net