Saturday, February 26, 2005

Bit better now.

I've managed to get the new SDKs to talk to one another over BT and the website has been registered, so I was writing and testing pages today.

http://www.interphacegame.co.uk

It's just a place holder at the moment, with a link to the artist's page and this diary but it's a start.

Friday, February 25, 2005

Still ill

So no progress today !

Thursday, February 24, 2005

Blast it....

I'm beginning to feel a bit ill. gonna have an early night to see if I can shake this.

Another thing I’ve been doing is looking at the new Snakes game on the N-Gage. It’s very interesting that they’re giving it away for free. Striking graphics, smooth scrolling, not a clue what to do (Perhaps I should read the instructions). But it has Bluetooth multiplayer so it might be interesting to see how that works and copes.

I’m still waiting for the game’s domain name to be registered. Last time took almost a week and quite a few irate emails. I’ll set a deadline of tomorrow afternoon to see if it’s registered.

Wow

It took three hours to get the new Nokia JDK working. Configuring the JDK with JBuilder was not the problem. Running the SDK with Nokia Connection Framework) was the only way to get the thing to work. However, once it was working I was overjoyed. All the Emulator bugs I had a problem with are gone. Bluetooth connection close commands don’t hang the Emulator anymore. Fantastic!

However, I get three shocks. First of all, it was taking eight seconds for the emulator to generate the Map. Then size of the XML Stream was 32+K. That would have taken ages to process, over twenty seconds for the thing to transfer. I did some investigation and it was the size of the tags that were the issue so I kept on cutting them down, but even with full XML, it was still had to transfer 12K.

I made a drastic decision. The “<>” parts of the tags where removed and that got the average map size down to 6-8K, which I reckon is manageable for the user to wait, especially if you put a gauge control on the form.

The final problem is to do with the New JDK. I can’t get a Bluetooth connection working. I’m going to have to investigate that tonight. If I can get that out of the way, I feel this JDK will give me the breakthrough I’ve been trying for the last month. I might be able to implement the automatic search and challenge algorithm I originally designed but had to stop due to the problems with the previous JDK.

Wednesday, February 23, 2005

Well, I’m almost on the verge of taking everything I ever said about Nokia back. I’ve just installed the new SDKs and the Connection Management Suit. By using this could mean that I don’t need to get a second 6600, I could just borrow one from my Brother in law for an afternoon. I’m not going to get my hopes up, but I have my fingers crossed.

I’ve noticed that the generation of an Interface is taking ages, while the two cells set up the game. I’m going to have to look at ways to optimise this as an eight to ten second wait before the damn thins is even transferred will cause a lot of users to abandon the game.

Nice for both Nokia and Sony Erricson to say I can register for the Mobile Game Conference on March the 7th (the Day after my Birthday). Pity it’s in San Fransisco. It looks like I’m looking up the web casts again. Would have been nice though !

Tuesday, February 22, 2005

Web Time.

Right, that's the domain name registered and the Web Site Sorted, now onto the Debugging. It's crashed eight times in the last five minutes so to quote my hero (Dick Dastardly) drat and double drat!

While I was so focused on getting the Game to the state it is in now, I've missed two important tool releases from nokia. I'll be looking over them in the next few days.

Oh! What to do?

As I’ve been coding up the Map Parsing, I’ve been having some thoughts to how the single player game works in the basic version. Presently, you select your difficulty and the complexity of the map and then go head to head with the computer. Twenty seconds later it’s all over and you have to start again.

This doesn’t help with longevity. I know it’s only supposed to be a quick blast, but that only applies to the multiplayer. I’m thinking of making it an iterative process. Each time you beat the CPU, the game starts at the next level. Only this time, the CPU has an extra playing piece while the player only gets a new piece every five levels or so. This might make the single player more interesting. It also won’t take long to do.

I’ve got plans to make the single player for the standard and the advanced a little different, implementing a Gauntlet style, top down play area where you duel CPU players by use of the sub game.

Back in the real coding world, the code for the map parsing is complete, so I’ll be testing it tonight (gulp). I’ll leave the map reconstruction until after I’m sure the parsing works.

I’m making inquires about setting up a WAP/ WEB Site. I think I’ve got a idea how to get all this working by putting the Text into XML and then the Website renders that XML into either a WEB Page, Mobile XHTML Page or WML/WAP Page.Might be quicker to Code three quick sites and then implement this idea at a later time.

I’m investigating other games as well. I downloaded Gauntlet last night onto my 6600. Very impressed, but it’s missing the arcade games most fun feature. Multiplayer! I really feel they missed a trick there.

Monday, February 21, 2005

Time Off

I took a day off. Friday night, I installed and played ‘Knights of the old republic II’. It’s certainly got a strong start and it was well past midnight when I realised what time it was. A colleague at work once warned that those who play games don’t write them and he was right. It looks like I’ll have to shelve that game until I’ve finished this one. Pity really because it’s good to get a game I can get my teeth into again.

The rest of the weekend was taken up with two issues.

1. The re-code of the game packet. The new data structure and supporting procedures have been put in place. I’ve managed to compress a player’s moves, the state of that player’s interface and the running time into two unsigned short integers. Never thought I’d be able to do that.

2. Parsing of the XML which holds the map. Now that I’ve got the algorithm working correctly for the game pieces, I’ve now got to implement it to all the parsing for this interface. Thanks to the wonders of encapsulation, this isn’t as bad as it’s seems but it’s going to be tedious coding. Should get that finished tonight but then there is the nightmare of testing.

Also been looking at the status screen which tells the user at what stage the transfer process is at. The 6600 doesn’t seem to support MIDP2.0 layout so I’m debating whether to drop the form and recode it using the canvas instead. Hopefully by the end of the week I’ll have the map transferred and have two phones duelling against each other.

Fingers Crossed.

Thursday, February 17, 2005

I feel like J.R. Hartley.

I walked round all the mobile phone stores in the town centre to see if there was anywhere that would hire me a bluetooth handset. Only two companies said they could and then gave me the details for the same third company. It’s a £200 deposit with call charges on top.

I’ve been working out the budgets for a web/wap site for the game and I suppose it’s quite reasonable. It’s £20 a year for the web space and hopefully £10 for the domain name. I think I’ll go for a co.uk one which is reasonable for a year. Hopefully, the last 20 I can use for the hire of this handset for a week or two, although I’ve still got to budget this.

I’ve also got to start making the N-gage earning it’s keep. I’m looking at how to port each class over to C++. That’s gonna be fun…. NOT !

Progress in Leaps and Bounds (Kind of).

It’s official!

I can now transfer the playing pieces from one cell phone to another and then generate the map. I’ve now got to transfer the map back again to the challenging cell phone and then display it. Again, this is done using Map->XML->ByteArray()->Transfer->ByteArray()->XML->Map Algorythim for the playing pieces.

I’ve also been looking at the actual game packet and realised that I’ve got it wrong. I want to keep the time in sync so the number of milliseconds left on the server is transferred which is a short (ie two bytes). That leaves two bytes to show the interface state as well as the keypress state.

I’ve also got to decide whether to put these FIFO storage structure so that game turns are passed and processed or its one packet and if it doesn’t work then tough!

There’s still joystick support to add, as well as remapping the keys for the Hot-Seat version. There also might be an alteration to the hotseat graphics but that’s a little way off at the moment. However, I don’t see me working on the game again for a couple of nights because of real life issues.

If anybody is reading this blog from the http://www.j2me.org site or http://www.benhui.net/ sites;- Hi folks and thanks for all the discussions so far, they’ve been a great help with this project.

Wednesday, February 16, 2005

Inching Forward

Well I had a little bit of success last night. I managed to transfer the first part of the map from one handset to another. The playing pieces are packaged up to an XML string, which is turned into a ByteArray for L2CAP transfer. This is then passed over to the other phone in 128 byte packages (because the 6600 has problems with greater values).

The other phone then builds up its own ByteArray and then converts it back to an XML String for parsing. Up to this point works fine. I’ve had to custom code a parser for the XML in question because I can’t afford the licence for proper j2me parsers (and I don’t know how this would affect the size).

It’s just a case of stepping through the code and correcting the mistakes. I think I’ve got the Algorithm mostly there. I’m still on course for actually having the emulators play a game against each other by the end of the month but there still is a lot of work left to do.

There are still a few things to add to the todo list;-

  1. Make the Bluetooth Forum screen a little bit more user friendly. At the moment it’s just a blank list and that needs instructions.
  2. Make sure when players put in a user name, they can’t put spaces in. This is vital for the Bluetooth Search Functionality.
  3. Always stop users from entering a username of user1, userone, user_1, user_one & their capital equivalent because this is going to be used for marketing purposes later.

Here's hoping I can keep this level of support up.

Monday, February 14, 2005

Still Plugging away !

It’s taken all weekend, or rather four hours, to get to the latest stage. There are problems with the logical state I put the connection protocol in. For some reason, the connection input buffer is still full when it should have been emptied and I can’t work out why. Step through the code and its fine, let it run to the stop point and it crashes. It’s one of the things doing my head in.

In order to get away from that, I’ve been working on the WAP site. I’ll do two different sites. A Wap Site and an XHTML site. This is so that the old WAP and the newer XHTML Browsers on the mobile phone can read the site. I’ll have to modify the XHTML for use with a proper web site, but that shouldn’t be as difficult.

Altering the graphics to wbmp is the challenge. You can’t seem to find a program to do it for love nor money.

The WML site is actually quite easy; it’s finding a way for one website to handle a WML and XHTML mobile request, as well as a website request.

Thursday, February 10, 2005

What’s new !

I’ve just realised that I haven’t worked on this blog for almost a month. Even though I write the entries on the day I don’t always update them. I’ve now got about a months worth to update and if you read the personal blog you’ll understand why.

I’m still working through the map transfer Bluetooth code. For some reason the comm. Protocol gets confused so I’m debugging that at the moment but for a spot of variety I’ve been preparing new graphics. This means there are now four themes or colours, the players can use to play against opponents.

So we can now have,

Red Vs Blue
Green Vs Yellow
Red Vs Green (Yuck)
Green Vs Blue
Yellow Vs Blue
Red Vs Yellow

Makes things look a lot prettier. I’ve also decided to change the icons for the main menus. By using variants of the previous with Slice’s (the games Mascot) icons I can make it look that little bit more professional.

If I wanted it really well done, I’d have custom coded the list object but that would have taken forever !

Tuesday, February 01, 2005

Friday Off

As I’ve noted, I had Friday off work to concentrate on the game. Boy did I need it. I’ve added in the new graphics, a splash screen and a debug screen. The debug log has already proved its worth.

The Emulators have managed to communicate between each other without a problem but when you copied the JAR onto the Nokia 6600. Boom! It wouldn’t start the Bluetooth service. Turned out I’d put an extra ‘;’ at the end of my Bluetooth connection string. The emulators don’t mind it. The 6600 hates it. It raised an exception I didn’t catch and bang.

The good news is that I feel I’m into the final coding straight, there’s still the parsing of the game setup to go and the actual exchange of game data, but now that the L2CAP protocol has proven out I can now get working on it. Hopefully I’ll have that alpha up and running by the end of Feb and the game ready by the end of March.

However, I’ve still got to overhaul the graphics engine to work with the new MDIP 2.0 graphics engine and I’ve got to find someone with a spare Nokia 6600 so I can test the game out of emulators.