Kiosk / Demo mode ?
Post Reply
Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Thu Dec 29th at 9:11pm 2005


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!




Quote
Re: Kiosk / Demo mode ?
Posted by Campaignjunkie on Thu Dec 29th at 10:31pm 2005


I think this would have to be programmed as a mod, it's not really possible with map entities. Sorry.




Quote
Re: Kiosk / Demo mode ?
Posted by Dark_Kilauea on Fri Dec 30th at 4:29am 2005


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/



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Fri Dec 30th at 7:01am 2005


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?



Quote
Re: Kiosk / Demo mode ?
Posted by Crono on Fri Dec 30th at 8:22am 2005


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.



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Wed Jan 4th at 4:33am 2006


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.




Quote
Re: Kiosk / Demo mode ?
Posted by Crono on Wed Jan 4th at 5:41am 2006


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.



Quote
Re: Kiosk / Demo mode ?
Posted by Campaignjunkie on Wed Jan 4th at 6:03am 2006


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.



Quote
Re: Kiosk / Demo mode ?
Posted by DrGlass on Wed Jan 4th at 9:30am 2006


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




Quote
Re: Kiosk / Demo mode ?
Posted by wil5on on Wed Jan 4th at 1:13pm 2006


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



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Wed Jan 4th at 4:03pm 2006


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 smiley -- 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 smiley




Quote
Re: Kiosk / Demo mode ?
Posted by DrGlass on Thu Jan 5th at 1:23am 2006


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.




Quote
Re: Kiosk / Demo mode ?
Posted by wil5on on Thu Jan 5th at 1:26am 2006


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



Quote
Re: Kiosk / Demo mode ?
Posted by DrGlass on Thu Jan 5th at 4:04am 2006


I'd stay away from the screen saver, 3rd party screen savers (I would think) would minamize the game.



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Thu Jan 5th at 4:06am 2006


holy s**t! this forum is amazing. thanks!



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Thu Jan 5th at 9:27pm 2006


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




Quote
Re: Kiosk / Demo mode ?
Posted by wil5on on Fri Jan 6th at 1:01am 2006


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



Quote
Re: Kiosk / Demo mode ?
Posted by Campaignjunkie on Fri Jan 6th at 9:53pm 2006


Wow, I didn't even think of the game_ui entity. Interesting.



Quote
Re: Kiosk / Demo mode ?
Posted by rainbow_lazer on Sat Jan 7th at 4:17am 2006


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.




Quote
Re: Kiosk / Demo mode ?
Posted by wil5on on Sat Jan 7th at 6:37am 2006


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




Post Reply