Thursday, 21 February 2008

N+

God damn this new XBLA game is frustrating. It's also awesome. I played the PC version many years ago, but this update really outshines it. Got the 15 episode achievement last night after spending an hour on "Master Control". Yeah.

This is one of the best-presented XBLA games I've seen yet - I just love the overall design both in game and on the menu screens.

Wednesday, 20 February 2008

Game Developers Conference

The GDC kicks off for real today, and there's already an internet rumour that Microsoft is preparing to announce something big regarding the Xbox. I've also heard (separately) that they're revealing something about XNA that may or may not be a big deal. I'm going to update this post over the next few days as information starts to leak out from the show.

Update 1: Microsoft are finally going to deliver on their XNA promises. Using a system that they describe as the "democratisation of content", end gamers will be able to download and play XNA games built by members of the Creator's Club.

Members will submit an XNA game to the club, and it will then be subject to a peer review. Other CC members will decide if the game is worthy of delivery to Live where - upon approval - it will appear for download by Live users. It hasn't been said whether there will be a fee for the end gamer for this (I sincerely hope not!), but seven sample games are already up on Live and are free for everyone to download right now. Confusingly, all the games are on a 17-day trial period. Whether this is because in 17 days the service will be going live for real, or if it's because the final system will be a pay-to-play service, I don't know.

It's exciting though. Even though I did lose interest in XNA, I intend to get involved in the testing and voting of other user-created games whilst I still hold my CC membership. It might even be the kick up the ass I need to get me to finish some games!

Oh, then Cliffy B announced Gears 2 for November. Can't wait.

Update 2: So it appears that the whole XNA dealie won't be around until the end of the year. On top of that, there is going to be money involved, but MS still haven't fleshed that side of things out yet. They're saying that you'll be able to set a price for your content or give it away. I hope that doesn't mean that average joe gamer will have to pay a subscription to download XNA games, because that will completely defeat the point.

Tuesday, 19 February 2008

The Pointless Plan

People have been asking what I intend to implement in Pointless Quest. I spent a while thinking about it last night, and now I think I've got a pretty clear plan for the next few bits and pieces.

1) Firstly, I need to optimise the client packets a little more. There's a lot of HTML being sent down each update, and I know I can reduce the size a hell of a lot more. This will make the client more responsive, especially on slower connections.

2) Death. OK, so I realise that permadeath is a little harsh. I've decided to do away with it and instead implement a time-out punishment for death. I'm thinking that one minute per level should do it. When a player dies, he'll be shown the usual death screen, but with a timer counting down to resurrection. Each area will be assigned a "graveyard", where players will respawn after death. I'll also have to re-do the high score tables, as "Past Lives" will no longer be relevant.

3) PvP. Once the graveyard system is in, PvP will be next. Players level 5 and above will be able to participate in PvP. There will be strong rules in place. You'll only be able to attack players up to one level above or below you. You won't be able to initiate combat with a player until they are "ready" (ie. not in combat with a mob, have full health etc.). This will mean all PvP will be on a one-on-one basis. When a player dies from PvP, they'll immediately respawn at the nearest graveyard with full health.

4) Armour, weapons and other items. Mobs will drop gold. There will be shopkeeper NPCs that sell items. Each character will be able to have one piece of armour in each of five body positions: chest, head, legs, feet, hands. Each character will also have a weapon slot. The mechanics of this will be pretty simple. More expensive clothes = higher armour value. Total armour value will be your saving roll against damage in combat. Weapons will be pretty much the same. More expensive = more damage. Weapon damage value will be rolled and added to damage done each attack.

NPCs will also sell health potions, of which a character may carry a maximum of ten. They'll also sell a "potion upgrade" which will increase the amount each potion will heal. This will be a permanant upgrade and will apply to potions currently held and all future potion purchases. Further Potion Upgrades will be exponentially expensive.

5) Content for levels 12-20+. Further stat balancing. Ongoing bug fixes. All stuff that will happen during the implementation of items 1-4.

There's no timeframe for any of this stuff, but I'd like to see it happen sooner rather than later, so I'll work as hard as possible ;)

Wednesday, 13 February 2008

More PQ Stuff

It's been a busy few days for my work on Pointless Quest. Over the weekend I bult the editor - my first proper Winforms application as it happens. It's a simple little thing that allows me to make the base maps for the game. I still have to place exits and mobs by hand, but I'm working on a plan for that!

Whilst creating the editor, I decided to up my tile range to allow for three-digit tile numbers. Any tiles below 100 are "floor" tiles, and can be walked on. Anything above 100 is a "wall" tile, and will stop players and mobs. I can move these ranges from now on with a few simple code changes, which allows for future expansion.

After I built the editor, I set to work creating some new areas to explore. Making the areas is simple, but when it comes to making new mobs to populate these areas, my artistic weakness comes into full display. I just cannot draw for shit. For instance, my "grizzly bear" looks more like an "excited cat". Send your 40x40 transparent animgifs to gareth@fatweb.org and they'll be guaranteed a place in the game!

Monday night, I managed to dump a web server with the game. I asked a friend to host it for me until we get a new IG server up and running. It was all looking great until SQL server keeled over. Turns out that PQ was causing SQL to use around 10mb of ram every couple of minutes. The server had enough of this after about half an hour, and promptly froze. This was worrying for both myself and my friend while we waited for the server to come back online after a reboot.

What it all boiled down to was me spending the past two evenings frantically re-coding the webservice to use stored procedures. Burning the candle at both ends is an understatement.

It was well worth it though. On SQL 2005 standard edition, the game uses about 20mb of memory and stays stable even with 5 clients logged in overnight. It goes up by the odd few k every few minutes, but nowhere near the kind of usage we were witnessing before. And as a bonus, the game now runs faster, is more stable and is also more optimised as a result of me cutting out several unneccessary database reads/writes. So as long as it holds stable on the server the next time we try it, all will be good and I'll be ready to launch.

So keep your eye on www.pointlessquest.com, and come join us!

Monday, 11 February 2008

London was Burning, Dark Tranquillity Played On...


Camden Town, Saturday night. We were supping a few light beers in the Monarch, right near Camden Barfly - the chosen venue for the last night of Dark Tranquillity's "British Fiction" tour. Just two blocks away, a huge fire erupted in Camden market. I've never seen a fire that size and it was very easy just to stand there and gawp at it even when you know that people are out of homes and businesses.

It was just plain biz
arre that the one night that I willingly choose to enter London, something like this happened. Bizarre and cool, at the same time.

But anyway, I was there for the gig. Thankfully it wasn't cancelled, and the fire of course provided frontman Mikael Stanne with some material: "We won't be doing any encores tonight, we're just gonna play until you get bored... or the place burns down". I guess the set clocked in at about an hour and a half in the end, with plenty of material pulled from their vast back-catalogue. Hugely enjoyable, and as always the band looked happy to be there, playing to the small crowd packed into the tiny Barfly like sardines.












Friday, 8 February 2008

Pointless Quest



...is what I've decided to call my little ajax/webservice multiplayer hack'n'slash rpg thingy. I'm pretty chuffed with how far it's come in a week, and as an engine it's pretty much "finished", bar ironing out some bugs.

The game itself turned out to be pretty simple. Your only stats are Level, Hitpoints and XP. You attack mobs simply by moving to an adjacent square and clicking frantically on their avatar. There's a lot going on under the hood though, and I'm going to go into that a bit here.



I took a bite out of WoW's book and implemented a simple "aggro" table for each mob. When a player attacks a mob, that player is added to the mob's aggro table, along with a tally of how much damage is done. The mob will always attack the player with the highest amount of damage done, assuming that player is in an adjacent square. If not, the player with the next highest amount of damage will be attacked, and so on.

When the mob dies, XP is split up by damage done amongst all the players in the mob's aggro table at the time of death. This means that all characters that helped attack the mob will get a share of XP.

The mob loses all aggro 5 seconds after it was last attacked. This means that if all attacking players run away, the mob will no longer attack and all damage counters will be reset. The mob will then regenerate health, just as the players do.



Combat itself is a simple hitroll/damroll mechanism. Players and mobs both adhere to the same rules. Chance to hit is initially 90%, and reduces by 10% for each level difference between player and mob. Damroll is some wierd calculation I made up on the spot, but it basically increases level by level and seems to work for the most part.

So that's it really. There's a heck of a lot more to the game, including some neat javascript tricks clientside to help detect clicking on the game area. I implemented a Yell function, which allows players in the same map (but not neccessarily on the same screen) to chat. I made use of the keyboard: Cursors for movement, space to set focus to the Say box, and Y to set focus to the Yell box. All combat is point and click, however.

Oh yes, of course. Death. I toyed with the idea of having a respawn after death with reduced stats ala WoW, but then decided to go all out and make my game harsh. When you die, it's game over. All your stats are reset to level 1, and you'll respawn back at the start. So that this makes some kind of sense, there are two high score tables: one for Current Lives and one for Past Lives. Current lives lists all the characters that are still alive and kicking. Players on this table are still gaining XP.



The Past Lives table is your traditional "high score" table, which is updated when a player dies. This immortalises a player's furthest progress and gives them something to beat in the next life.

The next step is to build an editor for the game. It's going to be a windows app that I can edit the maps with, which currently has to be done by hand by editing a textfile. I imagine I'll still edit mobs and exits by hand, but at least the hardest part of area creation will be dealt with. Once the editor is usable, I'll be keeping the current area in as a "Newbie" area, and opening a portal to the main world where the real adventure will begin...

Monday, 4 February 2008

Haha, holy crap

The SQL Server datalayer is so much faster than the Access one. I don't know why this surprises me, but offline testing shows that player movement is now instantaneous. I figured the big bottleneck would be the speed of the webservice, but maybe I was wrong!

Anyway, the webservice now has two datalayers (one for Access, one for SQL Server). The active datalayer is changed with a simple AppSetting in web.config.

I didn't have to alter the SQL queries too much between Access and SQL Server. The obvious one was exchanging Now() for GETDATE(), and the only other change was with the DateAdd() function. Access accepts only a character for the datepart argument, where seconds are 's' and minutes are 'n'. SQL Server doesn't accept a character, but what looks to be a constant. Here's the result:

DateAdd SQL Function
Access: DateAdd('s', -30, Now())
SQL Server: DateAdd(second, -30, GETDATE())

Both examples return the current date/time minus 30 seconds. Which, if you're wondering, is how I SELECT recent chats in the game.

I'm half tempted to install SQL Express on the test server to see how much of a difference the SQL layer makes online.

Update: Yup, the online test server is now running at warp-speed. Thanks, SQL Server!

Saturday, 2 February 2008

More Webservice Adventure

It really works! I've had four people at a time logged into my engine, and it seemed to hold up okay. It's slow for everyone, but at the moment I'm putting that down to a) the Access database and b) the ages-old server I'm testing on.

Today I spent a lot of time making some new tiles for the game and adding in some more world space. That's time consuming work without an editor - staring at the map textfiles for too long drives me insane.

Also added proper logging in and out, character creation, one minute idle time auto-logout, avatar uploading and fixed a bunch of bugs.

The next step is to rip out the data functions from the webservice and turn them into a proper data layer. This will allow me to write a SQL client version of the data layer so the game will run on SQL Server or Access depending on what hosting is available.

Once that's done, I'm considering tidying up the code and letting people at it. It would be interesting to see what could come out of the basic engine, if anything. I've got some ideas for adding roaming NPCs, but have yet to imagine how I'd handle combat in the game. Here's a few more screens showing off the new tiles!



Friday, 1 February 2008

An Adventure in Webservices

It's not very often I get motivated to do some development in my spare time, but when I do I usually surprise myself with how easily my ideas come together. The last couple of weeks I've had a real boner over Webservices (yeah, yeah, so I'm late to the party), mainly because my current project at work uses them extensively.

I wanted to put a webservice to use in a more creative way. I've had this idea of a multiplayer top-down tile-based adventure style game in the form of early Ultimas. It's an idea that's been kicking around for a while but I've had little or no reason (or time) to go ahead and try to make it.

Until the other day, that is. May I present to you Webservice Adventure:



Doesn't look like much does it?

The .NET solution consists of two projects - a webservice and a client web app. Player information is stored in an Access (haha) database. The webservice has a few very simple webmethods that pull information from the database. For instance, to draw the map, the client app calls GetUpdate, which returns a 9x9 int array of tiles as well as information about your character, characters on the same map as you and any lines of chat text that are relevant.

When the Up button on the client is clicked, the client fires off a call to the webmethod Move(), passing along an X and a Y direction. The webservice updates the player's location in the database.

Simple stuff. Not blisteringly fast, of course: The client only updates once a second with an AJAX timer. Clicking frantically on the directional arrows obviously causes webservice requests to get lost. But nothing breaks as yet. I've even tested it online and it's only a little slower than local play.

If speed is the downside to weservices, then the plus sides have to be: not neededing a permanantly running process (windows app/service) to run the game updates; no networking requirements (open ports etc.); and no client-side requirements other than javascript.

One of my favourite features (probably because I only added it last night!) is zoning. Each area map is a separate text file, and exits are stored in the database linking different maps together. The next picture shows me on my own after entering the building in the first screenshot:



I'm not sure where to go from here. Got a few things to add such as uploading an avatar for a new character; but after that I'm not so sure what I'm going to add to it. As it stands, it's a functional multiplayer chat game I guess. Any suggestions?