The Code Zone Bargain Basement Blog


Imparting Game Development Wisdom of Dubious Quality Since 1998

Friday, February 24, 2006

Brains are weird

Glancing at my default homepage this morning (my iWon), I saw this USA Today headline.

However, my 6:45 AM brain did not see IAEA in the headline. It saw IKEA.

As you can imagine, that caused a double-take. I did, for a moment, revel in the possibility of being able to buy a low-priced pine-paneled hydrogen bomb that can be assembled with a single allen-wrench as long as you can handle the inscrutable instructions :)

Wednesday, February 22, 2006

98.9% off coupon code

It's probably on a buncha blogs now, but here's a link to get a $495 5-user piece of project management software for $5.

http://www.axosoft.com/Products/ontime.aspx?cn=otm_stepromo

Ends tomorrow, so order now.

DP4 in the planning stage

Probably gonna start on Daily Puzzle number four today. Shelly said that Shi Sen must be made into a daily puzzle by virtue of the fact that it's an addictive monster.



I think it's a good candidate, mainly because it:

1. Can be built from a random seed
2. Is not necessarily completely solve-able (ala Voracity)

I tend to like games that fit into the second category. ConFusebox is fun to play, but it's fairly trivial to cheat. Since Shi Sen doesn't necessarily have a perfect solution (like Voracity). This makes the solution (and the bots) more interesting.

We'll see. Hope everybody's still enjoying the puzzles. I promise to have the PongClock screensaver up after these.

Friday, February 17, 2006

game feedback and burping monkeys

Big thanks for the feedback on the new daily puzzle (see the purple animated thingy above for a link). I had three minor bugs that I ironed out this morning, and everything seems to be happy. Glad everybody's enjoying the game.

As for the puzzle size, it'll vary between 7x7 and 9x9. I figured that'll give things a bit more variety. I can solve a 7x7 puzzle in 3-4 minutes. Most folks seem to be doing as well, although a couple didn't get the zen of it, and it took 'em about 8 minutes to beat the game.

For those who want larger and more complicated puzzles, that'll happen in the commercial version. My goal is to put out 4-6 daily puzzles, then release standalone versions of all of 'em as a game-pack. The standalone versions will have varying sizes and more play options. I figure if ConFusebox goes up to 16x16, that'll be time-consuming enough for anyone :)




Maggie had the day off from school today, and Shelly had some work to do, so I took the kiddo out for lunch and to see the Curious George movie. It's a cute movie, and well suited to its audience (kids under 6), although the garish color scheme started to hurt my eyes after a while.

I did notice something interesting, though. There's a scene in the movie where Curious George (the monkey) drinks a latte. This scene also appears in the trailer, but in the trailer-version, George belches loudly after finishing it. In the movie, he just finishes the latte and smiles.

My guess is that the trailer had to give the impression that the movie contained gross-out humor so it could attract young boys. The movie itself didn't contain anything remotely offensive.

Also, it's 80 minutes long, which fits fairly well with the attention span of the average 3 year-old. Maggie quite enjoyed it, although about halfway through she decided that she didn't want to sit with dad and wanted to experience the rest of the film from the very front row.

Thursday, February 16, 2006

New game is up!

The new daily puzzle is ready. Give it a play here, then come back here and post comments.

IMHO, it's the best yet. It's a good balance. Not quite as simplistic as Voracity, but not as time-consuming as ChessCards. The puzzles are challenging, but I've been able to consistently beat 'em at their current size in about 3-4 minutes, which is a pretty good time.

Wednesday, February 15, 2006

Not a good day

Just have to collect my thoughts here. Today was a pretty wrenching day.

We had to lay off Andy (CivilGrrl's CAD tech) today. It was one of the toughest things we ever had to do. It's just that CivilGrrl's long-term prognosis has taken a turn for the worst in the past six months given the long-term forecast for the housing market. So we had a couple of choices.

1. Give our tech a golden handshake, finish any open projects, and bid CivilGrrl a friendly goodbye.

2. Stick it out and hope for the best. Maybe things will pick up and we'll get new clients, or maybe things will dry up completely and we'll end up closing with a big mound of debt.

In the end, we decided that it just wasn't worth the gamble. After looking at Shelly's employment prospects (which are beyond excellent), we decided that it'd be better to leave the whole thing with a good taste in everyone's mouth rather than stick it out and take a chance on screwing people.

It's the honorable thing to do, but the honorable thing isn't always the easy thing. I wish I hadn't had a greasy lunch, because I'm currently suffering from major heartburn, given the condition of my stomach all day. I must be completely ulcer-proof, because if I haven't gotten one in the past year it's impossible for me to ever get one.

FWIW, we're following Stephen Pollan's model of business. Your business is not an extension of you. Your business is a tool for getting something you want done done, be it making money, personal fulfillment, or whatever. And you should no more think of it as a part of you than you should think of a hammer as an extension of your hand. And your business, like a hammer, should not be kept after you wear it out. When its time has come, you should shake your business's hand, thank it for what it's given you (in this case, money), and move on.

And that time has come for CivilGrrl. Like "Seinfeld", we're leaving on top rather than waiting for the seemingly-inevitable collapse.





On an entirely different note, vets are a racket. "Sentinel" is a great pill for dogs. It's a once-a-month pill that prevents heartworms and keeps fleas from infesting your dog. And it works really well. But it's expensive. Because I didn't wanna pay for a doctor visit every time I wanted to get some pills, I decided to buy 'em on 1800petmeds.com. But since Sentinel is a "prescription drug", they needed to clear it with my vet. . .who wouldn't authorize the sale.

The tasteless part, though, came when my vet called me to tell me why they wouldn't authorize prescriptions for online stores. . .followed immediately by telling me that they'd match the online store's price.

Seeing that their reasoning really wasn't "we're worried about people selling flea-pills on the street" but "Sentinel is a high-margin item and we don't want someone else making the profit", I declined the offer and bought 'em from Canada.

They're friggin' flea pills!

Sheesh.

Monday, February 13, 2006

Eller the smart feller

Spent much of the day working on financial stuff (read: taxes), but I did get a chance to make a much-needed improvement on ConFusebox.

I'd been using an easy-to-debug but glacially slow homebrew algorithm to generate the puzzles. With a little research, I discovered Eller's Maze Generation Algorithm (because a ConFusebox level is really a maze, only with lines where the path should be), which is a truly wonderous (although not well documented) thing. Basically it can generate mazes of arbitrary length with very low computing resources (at most three array-lookups per cell) and no more storage than is required to store a single row --not even the entire maze.

And that's important in Flash, as the Flash Player wants to shut down your app if you spend more than five seconds on a single frame. I had to distribute my maze-generation algorithm over four frames with a progress-indicator to let you (and Flash) know that things aren't crashed, and that just made things ugly.

With Eller's, however, things are so fast that putting it in a single frame isn't a problem. Generating a 12x12 maze my old slowass way took 3 seconds on the main development box. Now it's instantaneous.

What this means for you the player is that doing an "X-treme ConFusebox" with hugeass 15x15 mazes isn't going to tie your machine up for a half-minute generating the puzzle.

Happy happy.

Friday, February 10, 2006

Enough to show off

Eh, what the heck. I got enough done with the game (new title "ConFusebox") to show off. It properly generates and scrambles the puzzle, and you can rotate the pieces around. It doesn't yet keep score or detect whether or not you've won, but that's not too difficult.

http://www.thecodezone.com/delme/confusebox.html

I won't post rules, as it's pretty easy to figure out. Turn on all of the lights. The square with the lightning bolt is the power source.

This is a 12x12 puzzle. I can make 'em pretty-much any size I want, but 12x12 is probably as big as I wanna make it. Any bigger and it takes too long to generate and solve. I want this to be a quick game.

And yes you currently get the same puzzle every time. Being able to generate the same puzzle from a daily seed is one of the requirements.

Enjoy and post comments!

Thursday, February 09, 2006

New game is apace

The next daily puzzle is thought up and is about half-developed, which is to say that I'm now generating a puzzle, but there's not yet a way to solve it.

It's nothing you haven't seen before.

Actually it might be something you haven't seen before. It was one of the reasons to purchase a Cybiko and was a fun little game, but it never seemed to catch on elsewhere. Ernie has a hexagonal version that's lots of fun, but there must be a daily puzzle version.

I'll see how far I get. I'll keep you posted.


Come to think of it, the Cybiko had a couple of great puzzles that would be perfect for the daily puzzle format. I'm starting to get bummed that I sold mine off.

Wednesday, February 08, 2006

Yay, it's working

The Voracity high score board is now playing back the top scores, so if you wanna see how the top folks did, you can play back their solution. I originally just had the game playing back the top solution, but I changed it to the top three, mainly so that you wouldn't get the impression that Bob/T2K's Voracity-bot is applying any kind of strategy that you can duplicate :)

There was a hiccup in saving solutions for ChessCards, but that's working now too, so you'll be able to see solutions starting tomorrow. Hopefully being able to play back CC solutions will make the rules a tad more obvious.

Enjoy the games and keep playing!

On to making new games. I think these are about how I want 'em to be.

Tuesday, February 07, 2006

Two good things for five bucks

First is phpFlashMyAdmin. If you're using MySQL, you're probably using phpMyAdmin to manage your database. It's a great tool and it does make the job of managing your database way easier than via an SQL command-line, but it's based entirely in HTML forms. This makes the whole experience clunky to say the least. phpFlashMyAdmin has all of the same back-end as phpMyAdmin, but instead of an HTML form front-end, it has an interface built entirely in Flash.

And it works great. It's not quite as snappy and luxurious as using a native EXE front-end to your database, like MS Access, but it's about as close as you're gonna get in a web browser.

And it's five bucks. Worth every penny.




The next is "Banquet Crock-Pot Classics". These are frozen meals that you make in a crock-pot, and they're great if you don't wanna spend a lot of time cooking. Basically you toss most of the ingredients in a crock-pot, set it on "low", then return eight hours later to drop anything in that's not slow-cooker friendly (like rice or noodles). Then a half-hour later, you're done. The $5 package makes three big servings, and it requires a total of about five minutes of actual prep-time. Good if you want something that tastes better than a TV dinner but has the same commitment. Best is the Chicken & Rice. Worst is the Pork & Potatoes (mostly due to the potatoes being mealy).

I'm always looking ways to eat cheap without working my ass off, and this is a good one.




And I have nothing more to say, so here's a picture of the Flying Spaghetti Monster with a bomb on his head. Pastafarians will likely be burning my house down soon.

Monday, February 06, 2006

Some minor changes.

If it seems like I'm spending a lot of time tuning a rather trivial game, it's because I am. I'm trying to get every feature that I want into Voracity so that when I make future daily puzzles the groundwork will already be done.

That being said, I have the playback stuff working now!

Unfortunately, playing back a solution requires me to actually RECORD a solution and store it in the database. And the Voracity applet didn't store recorded solutions until about an hour ago.

So, if you haven't played the game yet, point your browser over to http://www.thecodezone.com/games/voracity.php and play today's puzzle.

If you look down at the high-scores table, you'll see that it now has a little playback applet for the top score. As soon as top scores start appearing that have recorded solutions (in a couple of days at most), you'll be able to play back the top solution in the table.

This is pretty-much the last feature that I wanted to add. I'll work a similar player into ChessCards, and then I'll start on new puzzles. I have a couple in mind.

Saturday, February 04, 2006

C'mon Rick, you knew I had to talk about it.

Yesterday was "Date Night" at Clariden. That's a once-a-month affair when the school babysits the kids so parents can have kid-free time. Maggie thinks that Date Night is the greatest thing that ever happened, as all of the kids get to put on their jammies, eat pizza, play ball in the gym, and watch movies together. It's a bigass late-night party for her, so everybody wins.

We got together with pals Rick and Terri at Cowtown Sushi for Rick's 39th birthday dinner. We got a couple of their ginormous "Sushi Boat For Two" specials and a buncha Kirin Ichibans and generally had a good time.

We still had a little time left on the babysitting-meter, so we headed over to Barnes & Noble, as we couldn't think of a nearby place that (a) served beer and (b) had loads of old-school 80's arcade games. On the way to B&N, Rick and I talked a bit about my new games, as he's a fan and has been passing around the URLs to his pals.

I mentioned that a user ID that was clearly Rick's made a fairly abysmal score at ChessCards on Thursday. Taking a peek at Friday's entries, I noticed that someone who was probably him made a similarly miserable score the next day (500+ moves and 25+ minutes to complete). He remarked that he couldn't understand how anyone could possibly solve the puzzle with the other scores people were posting. The rest of the conversation went like this:

Rick: Well, I try to be systematic about getting the cards in place. First I place all of the twos, then all of the threes, then. . .

Me: Waitwaitwait. Are you putting the cards in numerical order?!

Rick: Yeah.

I then explained that the object of the game was to just put the suits into rows, not to put the cards into numerical order. He admitted that that does make the game a tad simpler.

I'll probably make this clearer in the rules. Not that it'd matter.


BTW, big thanks on the feedback (from the folks who gave me feedback). Most of the bug reports have been tuning-type stuff. I'd like to get these nice and solid before I start out on more daily puzzles. Having had to deal with multi-game packs in the past, it's much easier to solve all your problems at code-time then to have to work a fix into a dozen games.

Thursday, February 02, 2006

Yep, I'm moving things already

Shelly made the astute observation that the front page at www.thecodezone.com doesn't do a goldurned thing except announce stuff that you're better off reading on the blog page. So I had two choices. . .

1. Put up a pointless piece of animated flashturbation to fill the space and make it look like intentional emptiness.

2. Put some actual freakin' content on the front page.

Shelly had no idea why I'd tuck away the links to the games on a separate page, so I eliminated the games page and put the links to the games on the front page. I also put together a couple of silly animated buttons for the games so it wouldn't just be dull text-links.

The upshot of all of this is that the link I gave you yesterday for the games no longer works. If you wanna play the new games, go right to the main page at www.thecodezone.com and the links will be unmistakable.

Another thing Shelly mentioned that I need is to give the top player his props by showing off his solution to the puzzle. That means that I'll likely be making a miniature "playback" applet for each game. It'll look like the puzzle, but it'll be noninteractive apart from a "play" button that'll play back the winning solution. I'll also need to start recording your solution as you play it and storing that in the database too, so I can pass that along to the playback app.

Or I can just write more daily puzzles. What would you prefer?




Oh, and another thing that deserves mention. It's PHPObject from Ghostwire Studios. It's a very simple (and free) chunk of PHP code that simplifies function-calling between client-side Flash and server-side PHP. There are at least a dozen good Flash-server solutions out there, but they were all overkill for my needs. PHPObject is as simple as possible and solved all of my problems.

Wednesday, February 01, 2006

The trigger is officially pulled

Okay, the protection stuff went a tad faster than expected, and I was able to pull together a second daily puzzle in a hurry (actually, the game was already written. It was just a matter of shoe-horning the update stuff into it).

The upshot is that for the first time in who-knows-how-long, you can actually play games on thecodezone.com again!


So, point your browser to http://www.thecodezone.com/games.html and try 'em out now! There's nothing to download and nothing that will futz with your machine. It's just little puzzles that you can play in your browser.

Try 'em out and post feedback. Good, bad, or whatever.




On to some bizness. My links to the actually game pages are about as boring as. . .well. . .some sort of boring thing. I want some cool looking buttons or icons or such that'll compel people to go to the page and play the game. Any thoughts?

almost there

Well, I actually planned to unveil my first online puzzle on thecodezone.com yesterday.

As bad fortune had it, though, I found out that Verizon's byzantine labyrinthine billing system had just discovered that while I do have fiberoptic internet coming to the house, I do not have any phone numbers associated with it, as I moved the phone and fax line over to Vonage.

So Verizon did the smart thing. Since your "customer number" is the same as your phone number and I don't have a phone number with 'em, they deleted the account. So it took an hour of Shelly wrangling with Verizon and eight hours of "your internet should be back up within two hours", we had internet and phone back up.

Kudos to Vonage for their new service that rolls over calls to another phone number if your Vonage box is unreachable. We had it set to roll over calls to Shelly's cell-phone, and we didn't miss any calls.

While the internet was down, I took advantage of the time to make a couple of changes to the protection scheme. It's notoriously easy to "steal" Flash applets from someone's server, but there are a few things you can do to at least prevent casual theft. One thing that's common is to put a text file on your server that looks like this:

magicPassword=abracadabra

While your applet loads, it grabs that text file off your server, checks the value, and runs only if it's what you expect (i.e. "abracadabra"). Since a Flash applet (like a Java applet) can only talk to the server that created it, putting the applet on another server will make the applet refuse to run.

Just because I could, I went a step further. Rather than a text file, I check a PHP "magicPassword" file. When I want to grab the file from the server, I pass it a random string of digits. The file then returns that string, after encrypting it a bit. My applet then decrypts that string, compares it to the original, and runs if they match.

That's step four of the protection. . .

Step one is that the HTML "unframes" itself if it sees that some other site has it in a frame.

Step two is that the applet itself re-launches its surrounding page if it sees that its surrounding HTML isn't coming from thecodezone.com (i.e. someone tries to embed the applet on their page without copying it from my server).

Step three is that the applet is encrypted. Many Flash people poo-pooh Flash obfuscators, but I haven't found a commercial decompiler yet that can get reasonable code from it.

Far as I can tell, these four steps are about the limit of Flash applet protection right now. The only reasonable way to run my game on another site right now is to decompile the applet and remove the protection from the obfuscated code. And, frankly, if you're willing to work that hard for some little puzzle games, you're better off just writing 'em from scratch :)


The upshot is that I'm about a day away from unveiling the ChessCards Daily Puzzle. I do look forward to you seeing it.

The way the game works is that you're presented with a daily puzzle. Everybody gets the same puzzle. You have to slide cards around until you solve the puzzle. Once you solve the puzzle, you enter your name. The next day you can check back to see how well you did. . .and play the next day's puzzle.

ChessCards isn't an ideal puzzle for the daily puzzle format, because I find that each puzzle takes 10-15 minutes to solve. I plan to introduce a couple more similar games in the coming two weeks that are much faster (1-2 minutes).

It's almost there. I promise!