WebPlayer setup on IIS
rdellinger
26 Aug 2011, 22:48In reviewing the source code, I've found the WebPlayer. However, I haven't had any luck in getting it to run as a standalone asp.net application on IIS. I'm using a .NET 4 application pool with an integrated pipeline. I get the following error:
Parser Error Message: Could not load type 'WebPlayer.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="WebPlayer.Global" Language="C#" %>
Source File: /Quest/global.asax Line: 1
I've tried rebuilding the site in VS. There seem to be missing references in the source. Is there any documentation on setting up the WebPlayer on your own server? Any help would be appreciated.
Parser Error Message: Could not load type 'WebPlayer.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="WebPlayer.Global" Language="C#" %>
Source File: /Quest/global.asax Line: 1
I've tried rebuilding the site in VS. There seem to be missing references in the source. Is there any documentation on setting up the WebPlayer on your own server? Any help would be appreciated.
Alex
30 Aug 2011, 07:32Try doing a Rebuild All - that usually clears things up.
I've had a problem before where the build configuration seems to be a bit messed up - some things appear in bin, and some things appear in bin\x86\Debug. Try copying dll files from one to the other, then hopefully it should pick up all the files it needs.
I've had a problem before where the build configuration seems to be a bit messed up - some things appear in bin, and some things appear in bin\x86\Debug. Try copying dll files from one to the other, then hopefully it should pick up all the files it needs.
rdellinger
31 Aug 2011, 23:54Thanks, Alex. That fixed the problem... sort of. The WebPlayer now loads, but it doesn't seem to run the example files in the demo directory. I'm loading the files through the querystring using "Play.aspx?file=demo/demo.aslx". But, the WebPlayer only shows a "Loading..." message and never starts the game. Any thoughts?
rdellinger
01 Sept 2011, 00:58Ok, I've got it figured out now. Very cool. One last question... is there a way to save games that are played in a web browser?
Alex
01 Sept 2011, 07:33There's no "save" feature in WebPlayer yet. I'm not sure what the best design would be - when you save a game, you create a ".quest-save" file, and this would need to be saved somewhere. But you don't want people writing arbitrary files all over the file system on your web server. Maybe you'd have the player logged in to your site, and store the save file in the database somewhere, so only the player that created it could access it. But at the moment WebPlayer knows nothing about logins, so there'd be a bit of work to do there first.
There is HTML5 Local Storage as another possibility perhaps - we could transmit the .quest-save file to the browser, and the browser could transmit it back when "restoring" an existing game.
Any suggestions would be appreciated... especially if anybody fancies a nice meaty coding project to get stuck into!
There is HTML5 Local Storage as another possibility perhaps - we could transmit the .quest-save file to the browser, and the browser could transmit it back when "restoring" an existing game.
Any suggestions would be appreciated... especially if anybody fancies a nice meaty coding project to get stuck into!

Pertex
01 Sept 2011, 10:49Is it a problem to save/load a quest-save to/from harddisc with the webplayer?
Another huge problem with savegames is, that they are not encrypted. With a texteditor you can open the file and you get the complete sourcecode.
Another huge problem with savegames is, that they are not encrypted. With a texteditor you can open the file and you get the complete sourcecode.
Alex
01 Sept 2011, 10:53Well in WebPlayer, you could save to the file system, but then how do you specify a save filename and then how do you reload that save file? How do you stop players from overwriting each other's saved games?
I suppose you could click a "save" link, WebPlayer could generate a filename (e.g. savegame1234.quest-save), then redirect you to Play.aspx?file=savegame1234.quest-save. You could then bookmark that link to go right back into the game.
That's probably the simplest way to do it, but you'd probably want some mechanism to purge old savegames after a while.
I suppose you could click a "save" link, WebPlayer could generate a filename (e.g. savegame1234.quest-save), then redirect you to Play.aspx?file=savegame1234.quest-save. You could then bookmark that link to go right back into the game.
That's probably the simplest way to do it, but you'd probably want some mechanism to purge old savegames after a while.

Pertex
01 Sept 2011, 11:05I dont want to save the file on the game server, but on local harddiscs. Loading of a gamefile would work similar like the "Upload attachment" here in this forum. I dont know if this is possible, just a thought.
Alex
01 Sept 2011, 11:10That makes it a bit hard to use I think, especially for people playing on iPhone etc.

Pertex
01 Sept 2011, 11:33Right.
Other idea: would it be possible to record the input of the player (something like walkthroughs) and save this? And when loading a game you starts this recorded walkthrough without displaying the output. With this way you would only need one savegame for a player, because he could undo his turns, if he want to go back. Nobody could see the sourcecode of the game and the filesize would be smaller than saving the whole game.
Other idea: would it be possible to record the input of the player (something like walkthroughs) and save this? And when loading a game you starts this recorded walkthrough without displaying the output. With this way you would only need one savegame for a player, because he could undo his turns, if he want to go back. Nobody could see the sourcecode of the game and the filesize would be smaller than saving the whole game.
Alex
01 Sept 2011, 12:50That is also a possibility, although it might be a bit slow for larger games.