31. October 2007 14:44
wrote up a nice article on passing lists in a stored procedure using XML
and SQL 2005's ability to query XML. For anyone who ever wanted to pass an array to a stored procedure this a good read. :)
30. October 2007 00:05
I am structuring my PBBG game engine to be as flexible as possible in order to build various types of games. In order to do that I need to abstract out the components of the engine. Since persistent browser based games are, well, browser based, I decided to follow the normal n-tier model. I am creating a data tier, my actuall database, an application tier which is the engine and will handle client connections, authentication, commands and reading and writing to the database. On top of the application layer will reside the game layer which will be customizable libraries that will use and access the application layer. This follows along the MUD driver and MUD lib pattern where my engine will be the driver which will persist data and handle all communications and my MUD libs or games will be written in an OO fashion to take advantage of the game engine.
The engine is being written in C# and in such a way to take advantage of features of ASP.NET such as HttpModules and HttpHandlers.
17. October 2007 23:48
In between updating Perenthia and adding new features I have been pulling parts of the code base into a more generic PBBG Engine I am writing in C#. I started working on it when I upgraded the Knights of the Realm game and used parts of it for Perenthia. I am hoping to put Knights of the Realm Beta 2 on the new engine once I get it finished.
I am building the engine as generic as I can but it will incorporate a base rules set and some basic concepts. The base objects will be Avatars, Places and Things. These objects will contain the properties required to function within the rules set and all objects will derive from a base GameObject class that will provide a properties collection for creating custom properties on derived game objects.
The game will be driven by commands sent from the client. Some objects will handle the commands in the engine framework while other commands will cause events to be raised that deriving implementations can handle and provide custom execution or additional execution of the commands.
The egnine will basically be a commands/rules processor that I will hopefully be able to build a variety of games on. I have plans and ideas for several types of games and do not want to continually build the same thing over and over, hence the PBBG engine.
1. October 2007 17:31
I ran into a major performance issue with the ASP.NET AJAX Server Controls while testing my persistent browser based game Perenthia. I had initially used update panels fro the various regions on the main game interface such as the player stats, map and chat window. Programming this was simple as I could do everything in the server side code and just send back the results. With the partial page rendering feature of the ASP.NET AJAX Extensions only the update panel html was sent back to the browser.
Once I moved the application into a production environment and had people on there playing and testing the web starting running out of memory, the application was consuming the server memory at an alarming rate. What was happening was that IIS would jump 1 to 2 MB of RAM for each request made by the client, that means every time someone moved on the game map 1 to 2 MB of RAM were being held and not released. I tried a bunch of different stuff from optimizing stored procedures to caching the map data but none of it helped.
I used Firebug to watch the AJAX request and response and to see if I could reduce that down some. The response was simply HTML fragments so I wasn't too worried about that but the request sent the entire ViewState up to the server with each post. The ViewState for the game page could be quite large since I was appending messages to the chat window which was a server control.
I was able to eliminate the ViewState issue with the chat window but the app was still consuming RAM and not releasing it.
In conclusion, while the AJAX Server Controls might work great for most web sites they are definitely not optimal for a persistent browser based game (PPBG).
25. September 2007 17:40
I used the Microsoft ASP.NET AJAX Extensions pretty heavily for the
user interface of my persistent browser based game Perenthia and after
about two weeks of live server testing I have discovered some
performance issues that may cause me to abadon the use of the
UpdatePanel for straight AJAX calls using JSON objects.
reason being is that I have UpdatePanels that update various sections
of the game and instead of just setting a value as supplied from the
server they send back the entire HTML blog of changed text. For
orderinary web sites this wouldn't be a problem and in fact when allow
them to perform faster. Since Perenthia is a little more interactive in
so much as players can move around, which are post backs, and do
battle, which are post backs, sending all this HTML back is causing too
objects that I can send down from the server that will contain only
values that need to be changed rather than HTML. This way I am not
sending down tables, spans and the like.
Anyway, we'll see it how it goes, hopefully it will improve performance of the game because that is lacking right now.
14. September 2007 16:51
After many, many long months of designing, writing, re-writing, scrapping and re-writing my persistent browser based game Perenthia has been released in a public Beta phase. Features will continue to be added over the next few weeks with the first of those features being quests that follow the main storyline.
Check out Perenthia PBBG!
29. August 2007 17:19
I spent some time last night and today playing around in Silverlight to make a final decision on whether or not I will use it in my PBBG Perenthia. I had already started building out a Flash UI but just keep running into the same issues with Flash; the IDE sucks and I keep having to rebuild C# classes in ActionScript. So, I decided to dig a little more into Silverlight to see if using the 1.1 version would be feasible. The word from MS is that the beta 2 with a go live license should be available sometime later this year. That might work out pretty well for me and my current timeline. I have most of the server functionality for Perenthia complete but just can't find a UI combination that gives me what I want and keeps the overhead down. Anyway, I am going to spend the next few days playing around with a Silverlight UI and see if I can come up with something I can use in place of Flash.
26. August 2007 23:01
I've decided to use Flash to provide the UI for my persistent browser based game Perenthia. I went back and forth between Flash and AJAX and even looked into Silverlight a little and Flash just has the maturity needed for a good PBBG interface. I originally had the main game UI written using AJAX but found it to be a little cumbersome when a lot of activity was occuring on the back end, just too much traffic generated for one user. I looked into Silverlight a little but I am going to wait until the 1.1 version is released so I can program in C# on the backend. Flash seems to be able to provide me with what I need and I wrote custom ASHX handlers on the ASP.NET side to handle commands from the Flash UI. The UI is basically just an advanced MUD client, in that the primary output is text based. However, with Flash I will be able to provide a better map and add some additional graphical features later on down the road. Since the command handler is a custom ASHX handler in .NET I could really allow any type of client to connect, as long as that client can send XML as an HTTP POST and receive the and parse the XML response from the page.
I will post a screen shot of the UI in the next day or so.
24. August 2007 13:23
I created a Visual Studio 2008 ItemTemplate for Silverlight 1.0 JS
. The template creates a Page.xml and Page.js files for creating Silverlight 1.0 JS pages in an existing web project. I built this template for adding Silverlight 1.0 XAML pages to an existing ASP.NET project I am building using Visual Studio 2008. The web project is a 2.0 project so I can't reference the 3.5 JScriptSilverlightPage Item Template.
17. August 2007 15:31