May 13th, 2009
Posted in development | 1 Comment »
April 21st, 2009
So, a user was having some issues with their ranks being calculated totally wrong. They were seeing numerous games against themselves. Turns out this was the issue - MySql treats varchar() text with trailing spaces the same as varchar text without trailing spaces. So the name “philhassey” is the same as “philhassey ” or “philhassey ” in a ’select * from ip_stats3 where name = ?’ type of query. Here’s a MySQL session below to demonstrate.
mysql> describe ip_stats3;
+———+————-+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+———+————-+——+—–+———+——-+
| name | varchar(32) | NO | PRI | NULL | |
| data | longblob | YES | | NULL | |
| s_rank | int(11) | YES | | NULL | |
| s_win | int(11) | YES | | NULL | |
| s_value | int(11) | YES | | NULL | |
| s_total | int(11) | YES | | NULL | |
+———+————-+——+—–+———+——-+
6 rows in set (0.00 sec)
mysql> select name from ip_stats3 where name = ‘philhassey ‘;
+————+
| name |
+————+
| philhassey |
+————+
1 row in set (0.00 sec)
mysql> select name from ip_stats3 where name = ‘philhassey’;
+————+
| name |
+————+
| philhassey |
+————+
1 row in set (0.00 sec)
mysql> select name from ip_stats3 where name like ‘philhassey’;
+————+
| name |
+————+
| philhassey |
+————+
1 row in set (0.00 sec)
mysql> select name from ip_stats3 where name like ‘philhassey ‘;
Empty set (0.00 sec)
mysql> select name from ip_stats3 where name like ‘philhassey%’;
+————+
| name |
+————+
| philhassey |
+————+
1 row in set (0.00 sec)
Posted in bugs | No Comments »
April 15th, 2009
Hey,
So I finally got a new game out! Yay! And here it is:
www.cosmicnitro.com
“The end of the world is nigh! Defend the world from the onslaught of an unfeeling universe!
“In Cosmic Nitro you must blast through nine different invasions. To play merely touch the invaders to blast them, but when things get too tough you can swipe the screen to launch a shield.
“Designed by award winning game designer Phil Hassey winner of the IGFM Innovation in Game Design award.”
So check it out, the game is only 0.99 and totally worth every penny! Be sure to tell your friends about it!
Cheers!
-Phil
P.S. I just submitted an update to Galcon to the App Store .. so keep an eye out for that in the next week or so! :)
Posted in development, iphone | 3 Comments »
March 26th, 2009
Posted in Uncategorized | 9 Comments »
March 21st, 2009
Yeah, you’d think I’d just go and go about my blog like normal .. but .. I can’t bare to do that! Instead here’s some blog Q&A. What do you want to see on this blog in 2009? What don’t you want to see?
Web comics | Political commentary | More python dev | More game dev | Stories about life | Stories about business | Drawings | Podcasts | Religion commentary | Videos | Music | More games | Photos of stuff
Boy, that’s a lot of choices. For the past 1.5 years I’ve kept it pretty focussed on python/game dev. But I figure I can ramble about all sorts of other things. So tell me which bits on that list sound interesting and which parts sound like they’d be totally awful. No promises I’m going to change what I’m doing, but I figure it’s late and I try to make one post a week, and this is what came out
Oh yeah, I’m going to be at GDC all week. I’ll be hanging out on the Indie Summit track Monday and Tuesday, then Wednesday thru Friday I’ll be hanging out by the IGF Mobile booth. Look for the guy in the Galcon shirt. Loud expo halls make me cranky, so if I’m sulking stop by and tell me to cheer up
If I’m not sulking, just stop by!
-Phil
P.S. if you didn’t catch it in the replies to my last post about flash/Galcon - I did get tinypy working under flash 10. But not many people have that yet, so I think I’ll save launching a cool tech demo till sometime later.
P.S.S. Potato soup with cheese and crackers is great!
Posted in Uncategorized | 3 Comments »
March 12th, 2009
Posted in Uncategorized | 11 Comments »
February 23rd, 2009
Today marks the release of my first iPhone game release in five months. It’s about time I got going on dev again. I’ve been in the midst of many transitions in both of my businesses, so I decided to start out with something short-n-sweet. The game is called Beast.
Beast is a re-make of an ancient MS-DOS game that I played ages ago (and I’ve re-made several times). The original is here. You may have followed my progress on twitter. Here are some interesting “factoids” about the game dev.
The original game is pretty tough to play, if you have dosbox and have all the proper slow-down settings going, you’ll find it can be a challenge to surround the beasts and crush them with blocks. The iPhone doesn’t have a D-Pad, so moving a character around the screen is a bit tricky. I had to make several modifications to the original game so that it would work with the touch interface:
- You can move the player around the screen by pushing your finger around. However I had to make the player unable to move diagonally as I found the resolution of your finger movement made it near impossible to play and quite jumpy if I allowed diagonals.
- You can touch any point on the screen and warp to that location. The controls were still a bit tricky, so I had to add this feature so you could do quick movements to escape from a beast, or to attack it quickly.
- I disabled the beasts so they can’t move diagonally, made the super beasts spawn into only 4 instead of 8 normal beasts, and slowed down the beast movement by about 50%. These changes were all required to make the game playable.
All these changes turned an impossible to play on the iPhone into a reasonably fun diversion. I also added a notable element of speed into your score. This gives the player a good bit of replay value, since even after they beat a level, they can try again and try and “master” a map they are playing.
Overall the main point of this whole exercise was to get myself back into iPhone dev. Really last year when I worked on Galcon I threw myself violently into that project for 3-4 months and came out a bit burnt out. I knew this time I needed to do a small scale project to get going again.
I’m pretty pleased with the results of this project. For some more interesting factoids about the game project, check out my game blog announcement.
Excuse to post this to the python planets: I actually made a python version of this game a few years ago. It contains some really bizarre pure python sound-synth for both the music and sound effects. Check it out. Not only all that, but the whole game is a single 18k python file! I ported from this code for the iPhone version. Again, another great example of python prototype -> C++ final product!
(Silly side-note, actually the python code was a port of some C++ code I made ages ago. So this is a great example of C++ code that was ported to python and then later ported back to C++. I won’t bother you with details about my even earlier Java and C versions of the game.)
Posted in C++, Uncategorized, development, gamedev, iphone, python | 3 Comments »