Online Sudoku Alpha Release!

I tried to fight the urge to make a web-based sudoku, but well I just couldn’t keep it up, so after I released Minesweeper I got started. Actually one of the reasons I wanted to do it was to see how much could be reused from Minesweeper to Sudoku – after all the basics are the same: a grid game field that the player modifies until it reaches a goal configuration.


But there are big differences as well. Where minesweeper starts with a randomly generated field, sudoku requires a puzzle to be correct, i.e. soluble with only one valid solution. The greatest challenge though, is to rate the difficulty of a given puzzle. Fortunately, I found one good program that can both generate and rate puzzles. My Sudoku game has an online database of thousands of puzzles, separated into five difficulty levels. Of course, it also has online high scores, just like Minesweeper.

I’m calling it an “alpha” though, because I actually suck at sudoku, so I can’t really test it myself yet. I’ve invited people whom I know like solving sudoku puzzles to test it, and you’re invited as well! Please add your comments to this blog post, and I will be extremely thankful. Things I’m looking at specifically are:

  • Are the difficulty levels correctly rated?
  • Are the puzzles “good”?
  • How can the interface be improved? I know sudoku software usually has some methods for making notations as you solve the puzzle. The next step will be to add that, but how should they be designed?
  • Any improvements you’d like to see.
  • Any bugs you find.

So please, start solving those puzzles! :)
http://henrikfalck.com/sudoku/


Minesweeper!

Finally! My Minesweeper game is ready for the web! It’s the classic game in a web 2.0 costume. Why did I do that? when surely it’s been done before. Because I like minesweeper.

Developing this game has taught me one something about the time it can take from prototype to somewhat finished product: Developing the completely playable “offline” prototype version was quick and easy – after all, I developed minesweeper already in high school on my programmable Casio calculator. So I thought it would take about trice the time to finish it, but in the end it took about ten times that time.

One reason for this is the online highscore functionality. But T-rex, online highscores just means keeping a list of the best times on the server and sending it to the client. Yes, but then it wouldn’t take much to figure that all you need to do is type “register_highscore.php?time=0&name=script%20kiddie” into your browser’s address field to get an instant all-time high. So how did I solve that?

The game is played simultaneously on the client (i.e. in the web browser) and on the server (in php). Sweeps are sent at regular intervals to the server, which then plays the same moves and checks the results. So in the end it’s the server that decides that a game is over, how long it took, and whether that’s a new highscore or not. That, ideally, is not so complicated either, but well there are lots of opportunities to make stupid mistakes. (Especially when you’re having a shochu on the rocks while coding (I did it during my vacation).)

The other reason is that it’s hard to make a web app behave like a nifty game. You need graphics, animations, and that kind of stuff that often causes you to run into problems with layout positioning and, most of all, browser inconsistencies. Web browsers just aren’t ideal for making applications yet. (Well, tell me a platform that is, anyway…) The game runs best, as always, in Firefox. Although I admit I haven’t tried IE 6 yet. I’ll tackle that beast tomorrow. :) IE 7 works good, though.

I still have a number of features planned that I’ll implement during the coming weeks, but at least now it’s good enough to play. Try and beat my times! Here’s the url again:

http://henrikfalck.com/minesweeper/