tag:blogger.com,1999:blog-55996143512167560502023-11-15T12:04:51.809-05:00Two Finger PlayiPhone game development, by a college student with a short attention spanmahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-5599614351216756050.post-54770682133100813772010-05-10T17:42:00.002-04:002010-05-10T17:55:23.436-04:00Regression<p>Mines 2.0.1 has been out for a few days, and while it's seeing an extraordinary number of updates—almost 29,000 as of yesterday—it's also seeing some pretty nasty App Store reviews. For one thing, there's still a bug or two I haven't chased down; the timer still disappears every now and then, which is apparently pretty annoying, and, more significantly, some people really don't like the expanded, scrolling board. Over the year or so I've had a bigger board on my own copy of Mines, I've gotten used to it, and learned to pan around, scanning for areas I might've missed, but it seems that's not an easily picked-up pattern. Part of what made the original Mines good was its simplicity: everything gameplay-related was present in a single screen and required no gestures more complex than single taps. The scrolling board has broken that, badly, and I'm working on a fix.</p><br /><p>First, I'm removing the bottom two rows of mines so that the only scrolling, in portrait mode, is horizontal; second, there'll be a switch in the menu to disable the expanded board entirely. I'm also nixing the "remove ads" in-app purchase; over the last three days of 2.0.1 being in the wild, exactly one person has hit that button. I took care to make the ads unobtrusive, so I suppose everyone else is just dealing with them.</p><br /><p>Also, I'm adding, as per many peoples' request, adding a "number of mines left" view; it looks like this. You can tap the view to switch between seeing the timer and the remaining mines.</p><br /><p><img src='http://www.noahw.me/syfiles/mines-shots/mines-numminesleft.png' alt='Mines Remaining (see bottom left)' width='320px' height='480px'/></p>mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com1tag:blogger.com,1999:blog-5599614351216756050.post-49145118441642041672010-05-01T12:30:00.004-04:002010-05-01T12:54:50.186-04:00Mines 2.0 Gremlins<p>As soon as the Mines update appeared on the App Store, it immediately started picking up one-star reviews like a horrible <a href="http://en.wikipedia.org/wiki/Katamari_Damacy">Katamari</a> of failure. Some of them mentioned a bug that I knew about, where the timer sometimes wouldn't appear, but some mentioned a much uglier problem: there were no mines. That made no sense to me at all until a helpful comment here from <a href='http://adamwilcox.org'>Adam Wilcox</a>, who sent me some screenshots that definitely showed mines (and their surrounding numbers) disappearing from the board as they were tapped.</p><p>I recognized that as a misapplication of the code I added to prevent the player from losing on the first move of the game; if you haven't opened up any of the board, and the first cell you touch is a mine, the game quietly removes that mine and acts as if there was empty space there all along. It sounded like that was somehow continuing to happen after the first move: the game simply wouldn't let you lose.</p><p>GDB came to the rescue, as it so often does: it informed me that a certain variable—the board view's “did that move just lose the game” value—was getting optimized away by the compiler in the Release build. As it turns out, I never initialized it, only set it to YES if a touch landed on a mine; the issue never came up in my testing because I always used the Debug configuration, in which, it appears, the compiler doesn't do that kind of meddling.</p><p>Lesson learned: test using the Release configuration. Mines is off the Store for the moment; I'll submit an update to Apple later today that'll fix the problem.</p>mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com1tag:blogger.com,1999:blog-5599614351216756050.post-51579667141859577172010-04-22T14:45:00.009-04:002010-04-22T18:31:25.843-04:00Back to work<p>Hi all. I've spent the time since I last posted this blog doing lots of things that really didn't preclude my continuing to write here. These included but were not limited to:</p><p><ul><li>Working at Apple, as an intern in iPhone Apps & Frameworks. I'm pretty sure OS 4.0 has some of my code in it. Hooray!</li><li>Developing <a href='http://itunes.apple.com/us/app/brewpot/id365793387?mt=8'>Brewpot</a> [link opens iTunes], an app for beer enthusiasts.</li><li>Writing an app for my school, screenshots of which I'll post sometime soon. We're hoping to pilot it during the summer semester and release a major update at the beginning of the fall.</li><li>Making and releasing “<a href='http://itunes.apple.com/us/app/draw-a-card/id368072059?mt=8'>Draw a Card</a>”—this was kind of a speed-coding thing, and ended up taking maybe ten hours of work over two days.</ul></p><p>Meanwhile: Mines news. I've had a couple of people email me asking about an iPad version. That will happen. The process of porting it, though, has broken pretty much everything: rotating the screen results in the UI getting horribly mangled. I'm moving the view setup to a NIB to see if that helps; odds are the problem is a combination of my bad math and misapplied autoresizing masks.</p><p>Gameplay-wise, I think I'm going to abandon the Mines 2.0 scrollable board view for the iPad version; the screen's huge, and as the smallest targets you'll ever hit will be finger-size anyway, the ability to view the board “zoomed in” wouldn't be too useful. One of the features I've been thinking about for a while is the ability to adjust the board size; On the iPhone and iPod touch, that'll probably be a “number of screenfuls”—how big the board is, measured in multiples of the screen size—but for easier boards on the iPad, I'd like to just make the grid lower-resolution, so there's simply fewer, bigger squares occupying the same space. More news on that whenever I get around to getting back up to speed with Core Graphics.</p>mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com3tag:blogger.com,1999:blog-5599614351216756050.post-88054697080281143402009-05-02T00:03:00.003-04:002009-05-02T11:51:45.502-04:00Landscaping<p>Been doing some work on landscape support in Mines. I decided that the bar at the bottom used a lot more space than it had to, considering it wasn't even going to include the “menu” button, so I dropped it entirely and moved its contents to the side.</p><a href='http://nw0.me/syfiles/mines-shots/mines-2-landscape-1.png'><img src='http://nw0.me/syfiles/mines-shots/mines-2-landscape-1.png' width='320' alt='Landscape overlay'/></a><p>Right now it's just the clear/flag button as a translucent overlay. If you scroll to the edge of the board the control's on, it extends a bit so the button doesn't get in the way:</p><a href='http://nw0.me/syfiles/mines-shots/mines-2-landscape-2.png'><img src='http://nw0.me/syfiles/mines-shots/mines-2-landscape-2.png' width='320' alt='Border thing'/></a><p>For left-handed folk, tilting the device the other way shifts the button to the other side.</p><a href='http://nw0.me/syfiles/mines-shots/mines-2-landscape-3.png'><img src='http://nw0.me/syfiles/mines-shots/mines-2-landscape-3.png' width='320' alt='Southpaw mode'/></a><p>Things are moving along pretty well overall—I'd like to get the scoring system updated in the next few days, people testing it in the next week, and submission to the Store a week or so after that. Let's see how that goes.</p>mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com1tag:blogger.com,1999:blog-5599614351216756050.post-11634567802360564122009-04-21T16:59:00.008-04:002009-04-21T18:43:34.306-04:00Mines 2.0 Development<p>So, it's been dead quiet here for way longer than it ought to've been—most of the work I've had going on has been for people who probably wouldn't appreciate my talking about it here. I have finally gotten back to my own iPhone work, though (just in time for finals—hooray!), and most of that has been going to updating and improving Mines.</p><p>The most frequent complaint I got about the original was that the board needed to be bigger. That took a bit less work than I expected, and is now pretty solid; boards can be arbitrarily large. I originally wanted to have it “snap” to the mine grid, but that made the scrolling really jittery—maybe enough messing around with the events would fix it, but by that point it might be easiest to just write my own scroll-view implementation entirely. Most noticeable other change here is that I've added some color to the control bar—the X and O buttons glow appropriate colors, and the whole thing gets illuminated from the bottom. I've found that's a good cue for what mode you're in: not eye-catching enough to be distracting, but noticeable in your peripheral vision when it changes.</p><img src='http://www.nw0.me/syfiles/mines-shots/mines-2.0-1.png' width='240' alt='Main screen preview'/><p>Mines 2.0 has a few gameplay changes, too, most noticeably support for an analogue of the left/right click of more mouse-y platforms. When you've got all the mines flagged around a cell, and you double-tap that cell, all the others around it, and any empty cells adjacent to those, get cleared as well. It saves a lot of time and mode-switching.</p><p>One of the other big things I've added is support for landscape orientation. Not a lot to say here, except that most of it was staggeringly easy to set up; much love to UIView's autoresizingMask property.</p><a href='http://nw0.me/syfiles/mines-shots/mines-2.0-2.png'><img src='http://nw0.me/syfiles/mines-shots/mines-2.0-2.png' width='320' alt='Landscape mode'/></a><p>I might adjust the UI when in landscape mode for more convenient thumb access and more space; also, I expect it to be an enormous pain to make the menu system lay out well in both portrait and landscape, so I want to eliminate it from the latter if possible.</p><p>Other plans: scoring. I'm going to stay away from attaching this to my shared hosting this time around—I lost two domain names that way, the first because it got incessantly hammered by the tons of people who're still playing Tris, and the second because my host got... confused? I don't even know. Anyhow, I'll be running it on Google's App Engine, which is crazy easy-to-use, free at the outset, and will pretty much never shut me off as long as I pay them. On that note, I've changed my mind again about the “deluxe edition” thing, partially because I checked the download stats (one word: wow) and partially because I had an idea that I'm really, really excited about. Can't share much more about that right now, but I'll be making an announcement about it as soon as I can.</p>mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com2tag:blogger.com,1999:blog-5599614351216756050.post-62056109917702169932008-11-30T16:47:00.005-05:002009-04-11T13:34:45.049-04:00Mines 1.0 released!<img src='http://www.nw0.me/syfiles/mines-shot.png' alt='Mines 1.0 screenshot'/><br />During a few months of being completely distracted with everything else — jobs, classes, life in general — I found a couple of days here and there to work on my other lump of archaic jailbreak-era code and polish it up into a presentable state. I'd been planning to have both a free and not-free version, which was holding me up; if I was going to charge for something, it had to be appreciably <em>worth</em> more than the free version. So I decided to ditch the undoubtedly limited money-making prospect there and keep Mines completely free, updating it as I get ideas for new features and time to implement them.<br/><br />It's been on the App Store for about a day, and I'm already getting lots of useful feedback. A couple of ideas, like it taking two taps to clear a “flagged” cell and having them show some kind of marker beyond the bland blue color, I've already got together and will be pushing out once I've tested them a bit more thoroughly; others, like a more advanced scoring system and stats tracking, should be coming in a few weeks when I've got time that I shouldn't be devoting to, e.g., deadline'd work and final exams.<br/><br />I welcome any and all comments and suggestions on Mines; feel free to email me, or post them here or as App Store reviews.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com4tag:blogger.com,1999:blog-5599614351216756050.post-14324193075389131142008-08-25T08:46:00.009-04:002008-08-26T19:34:11.950-04:00Over, for nowWell — I've received notice from Apple that they've been contacted by The Tetris® Company about Tris. That, I'm afraid, is essentially game over. Do they have a case? No. Not really. I am convinced that if it went to court, the "copyright" claim would get thrown out completely. The trademark, perhaps not — but if I changed the name, to e.g. “Trys”, that would be much harder for them to argue.<br /><br />The trouble is, I'm a college student, and not an affluent one, and I simply do not have the time, energy, or resources to fight this battle right now. There's a point at which I am willing to give up and be practical, to let the world have its way with that ever-mistreated little ideal of “principle”. Thus, it's with great sadness that I must announce that I'll be pulling Tris from the App Store on Wednesday, August 27th, to remain in Apple's systems but publicly unavailable until I work out a solution to this.<br /><br />A few last words on the subject, then. I don't believe The Tetris® Company consider themselves to be acting in bad faith. The lack of protection for the idea of a game is troubling, in that it promotes quick ripoffs of a concept that someone, somewhere, spent a lot of effort on. The Tetris® Company are protecting their own interest; without a name that meant something to license, they would have, as I understand it, no significant assets at all.<br /><br />That said: the approach they're taking seems to me little more than petty bullying. They have little to no legitimate legal claim, and are, presumably, relying on my being a small developer with insufficient resources to defend myself. And — hey ho — it appears to be working. All I can suggest is that, if you have the slightest interest in playing Tris, you download it while you still can.<br /><br />---<br /><br />To clarify: if Apple had not told me they'd “take action” of their own if I didn't resolve the “dispute”, Tris would be staying up. I don't think this will be permanent; when I have the time and can find a good copyright lawyer, I'll be figuring out exactly what my position is and how I can make Tris available again.<br /><br />---<br /><br />To further clarify: several news sites have taken this to mean I consider Apple at fault here. This is completely and totally untrue, and I have received no form of official legal notice, threats, or anything of the sort — indeed, anything other than polite and helpful communication — from them. Apple, as I see it, are making sure they aren't liable for individual developers' mistakes, and they're doing it the right way. Please don't take this up as an “Apple are being evil corporate jerks” story, because they aren't and it isn't.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com105tag:blogger.com,1999:blog-5599614351216756050.post-18237793951310359792008-08-22T02:33:00.007-04:002008-08-22T02:44:27.514-04:00IndesistionFirst time for everything, I suppose: now, a cease-and-desist from everyone's good buddies at The Tetris® Company. I won't post the full thing here in case there's some reason I oughtn't, but the gist of it was that they considered my game an infringement on their copyright and wanted it taken down immediately. I'd been forewarned of this possibility, and appraised of some information on The Tetris® Company's activities (thanks, again, to Adam Sissman for that) — long story short, I'm near-certain they have zero case, given that U.S. copyright law <a href='http://www.copyright.gov/fls/fl108.html'>doesn't provide any protection for the “idea” of a game.</a> The name “Tris” might <em>possibly</em> be considered an infringement on their trademark, but I think that's a separate issue, and said as much in my response to the C&D.<br /><br />Anyhow, my apologies for the delay in getting the score system up and running again, and the updates I've mentioned out — had rather a lot on my mind. I'll get back to work as soon as I can.<br /><br />One more thing: I understand Tris was recently featured on TV — a show called “Infomania”? Fantastic, if so; if anyone's got a link to video, I'd love to see it.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com4tag:blogger.com,1999:blog-5599614351216756050.post-53040626797884148022008-08-19T01:51:00.005-04:002008-08-19T02:26:52.076-04:00Score Downtime; DeluxeWell, Tris has done astonishingly well — download count as of this morning was over half a million. Unfortunately, the amount of traffic from the score system completely and totally overwhelmed the shared hosting my database and script were sitting on. I've talked to the host and am hoping to find some good dedicated hosting soon; for now, though, the global score system is simply dead.<br /><br />In the time in which I wasn't fiddling with and worrying about the score system, I got a few additions made that I'd seen a lot of requests for. Tris 1.0.2 (I've submitted a 1.0.1 but it's chilling in “In Review” limbo) lets you set the movement sensitivity, whether the sidebar appears on the left or right, and whether pieces rotate clockwise or counter-clockwise. Also, there's a bit more of a delay when a piece lands before it gets locked into place.<br /><br />There's one or two suggestions I've received in comments here that I'm pretty sure I'll add at some point — all, alas, from "anonymous", so I'm unable to properly credit them. One involves multitouch, and letting the player drag and rotate a piece at the same time by tapping with a second finger while moving the first; the other, simpler if a bit less intuitive, would have a tap on the bottom row or two drop the piece immediately.<br /><br />Another thing: I'm considering what I can do for a Deluxe version of Tris. The original version will stay free, and get the bugfixes and most features that I add in future, but the non-free one will get some improvements over the original. Mostly these improvements are features I would like to add to the free one but that would be time-consuming to implement. What I've got planned so far:<br /><ul><li>Sound (piece rotation, piece landing, row clearing, possibly music)</li><br /><li>Row-clearing animation (this will be pretty, I promise)</li><br /><li>Leaderboard split up by time period (separate top-ten scores for the past day, week, month, and, uh, eternity)</li></ul><br />I'd welcome any other suggestions. Is there something you'd absolutely have to see in Tris to pay a buck or two for the Deluxe version? Let me know.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com11tag:blogger.com,1999:blog-5599614351216756050.post-50100613608333207112008-08-15T17:47:00.004-04:002008-08-15T18:01:12.195-04:00First DaysSo, Tris has been on the App Store for a bit more than two days. In that time, it's become the most popular free app on the Store. I'm absolutely blown away by the attention and positive response this has gotten; according to the iTunes reports, it's been downloaded somewhere between a hundred and two hundred thousand times. The high score system, last I checked, had over a hundred and fifty thousand scores submitted.<br /><br />That, actually, is turning out to be a problem — my host's server appears to have been eaten by the CPU usage of my score-handling script. I fixed a bug in it this morning that was making it continuously overwrite the high-score file, even when a new score didn't actually change anything; I thought that would resolve the issue, but it seems not. I've contacted the host's support department, and should ideally hear from them in an hour or two. Keep your fingers crossed.<br /><br />In any case, I want to thank everyone who's downloaded and played Tris; you've made this project more successful than I could possibly have hoped for. I've received a ton of feedback from App Store reviews, blog comments, and emails; I'll be addressing as much of that as I can in my next post here.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com14tag:blogger.com,1999:blog-5599614351216756050.post-58433440832268043842008-08-06T13:36:00.006-04:002008-08-22T02:45:26.734-04:00SubmittedAll right. As of now, Tris is submitted to the App Store and "In Review". Look for it, I assume, sometime this weekend or next week.<br /><br />At the last minute, I had an idea, and I'm glad I took a few minutes to implement it.<br /><img src='http://mm3d.wired-hub.net/images/trisnextpiece.png' alt='Next-piece view'/><br />This is done with four image views that the app shuffles around into the right positions to show a piece. The change I made was really simple — literally three lines of code — and made the shuffling animated, over about a fifth of a second. So, whenever the next piece changes, the blocks rearrange themselves from one piece into another. It looks pretty cool.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com16tag:blogger.com,1999:blog-5599614351216756050.post-20131190928412999232008-08-01T12:03:00.005-04:002008-12-29T22:54:06.679-05:00UnicodingAll right — for now, I give up on the whole Objective-C / PHP character encoding stuff. As it stands, if you enter a name with funky characters in it, the game will warn you:<br /><img src='http://nw0.me/images/namecode.png' alt='Name encoding warning'/><br />so you can either save your name with its proper diacritics to the local score list or Anglicize it for the global one.<br /><br />I'm pretty close to done with this version, I think; probably submit it to the App Store in a few days, which means, of course, that you'll see it there sometime around November. I <em>think</em> I'm joking.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com1tag:blogger.com,1999:blog-5599614351216756050.post-68115753202058777982008-07-28T21:28:00.003-04:002008-08-01T12:09:17.022-04:00ScoreliciousRight. Got the score hashing stuff together a few days ago, and now have it integrated into the game. You get "game over", enter your name, and it submits the score to the server, which checks it out and adds it to the database. The main problem at the moment is that it doesn't know what to do with Unicode characters - a name like "François" just gets submitted as "(null)", which is hardly identifying. I'll have to find some way of sanitizing the name, or warning if it can't be uploaded. There's probably some NSString function with a heinously long name that does something like what I'm after.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com0tag:blogger.com,1999:blog-5599614351216756050.post-79827971546639907772008-07-08T18:26:00.005-04:002008-08-22T02:45:50.207-04:00ReadierMuch closer to releasability now — the game saves state between launches. Realized that trying to serialize the board contents was silly when I could just dump them to an array structure in the preferences. Still had a lot of bugs to iron out, but it all works now.<br /><br />Put together the 512x512 icon, which looks like this:<br /><a href='http://mm3d.wired-hub.net/images/icon-tris-512.png' title='View larger'><img src='http://mm-3.net/images/icon-tris-512.png' width='256px' height='256px' alt='Tris icon'/></a><br />I love how it came out. Not sure I've got the corner radius right, but I'll figure that out later.<br /><br />Mmm... what else. Still haven't gotten much more done on the high-score stuff. I'm thinking instead of doing something sensible with standard cryptography stuff (which I don't understand), I'll write my own hashing thing (which I probably don't understand either). Again it's not going to be super-mega-secure, but I don't think it needs to.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com7tag:blogger.com,1999:blog-5599614351216756050.post-79414818490818830142008-06-29T12:10:00.003-04:002008-06-29T12:21:44.831-04:00PortingI've finally gotten started on moving Tris to the official SDK, and it's looking like I have a hell of a lot of work to do. There are, of course, the various relatively minor changes - Core Animation vs. LayerKit, UIFont vs. GSFont, UIButton vs. UIPushButton, -touchesEnded vs. -mouseUp, and so on. Those are pretty straightforward, albeit time-consuming. The main thing that's going to be difficult is moving all my animation code to the new system. Apple made animation... easier, I guess, in the new SDK, but I'd already got a lot of convenience methods together to work with the old animation classes, and I'm not quite sure how long it'll take to swap out the old with the new.<br/><br />I'm still expecting to get an App Store release out within a week or so of it going live (11th?); it will, of course, be free.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com0tag:blogger.com,1999:blog-5599614351216756050.post-7444301972618313252008-04-25T12:34:00.003-04:002008-04-25T12:45:02.361-04:00ProgressGlobal score stuff is coming along very well. Got the PHP/SQL backend up pretty quickly; all that's left there is to set up caching, have a PHP-wise friend of mine double-check it for obvious vulnerabilities (I've blocked SQL injection and various nasty things that could be done to the returned plist XML, but hey, there might be something...), and make sure it'll work from the aforementioned remote server.<br />Client-side I'm not expecting a lot of trouble either. The structure for setting up a list of name/score views is already in place, so I've basically just got to run through the dictionary and stuff its contents into the views, and submitting the actual score request is even simpler. The one thing I'm considering right now is having it stash new-high-score information somewhere if there's no network connection available at the time; that, of course, brings in the whole encryption issue again. Blah.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com2tag:blogger.com,1999:blog-5599614351216756050.post-15779782323469186362008-04-24T16:32:00.004-04:002008-04-24T16:54:42.692-04:00MoreScratch that last; I wrote a little bit of code to NSString-ify the board's contents for saving, then decided that was boring and started on the global high-score stuff. I'm realizing that there's actually going to have to be some overlap between the two, mainly because of the security/cheating/whatever-ing issues inherent in global score tracking.<br /><br />I'm committed to keeping Tris as open-source as possible, at least until it's into the SDK; with the full source, though, it'd be trivial for someone to send fake scores to the server. Most likely I'll have an authentication key or something in a private header—the game'll still build without it; it just won't be able to submit high scores. The save-game stuff will need to be encrypted, too, or said hypothetical bad person could just modify that file, restart the game, and inject stuff without even mucking with the code. Should be an interesting challenge. <br /><br />Many thanks, by the way, to Fredrik Malmquist for his generous donation of hosting for the global-high-score stuff.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com0tag:blogger.com,1999:blog-5599614351216756050.post-76499700096818369722008-04-17T22:08:00.003-04:002008-04-17T22:14:51.104-04:00BugfixesFinally got some work done. The weird pausing issues are no longer; along with that, a minor interface weirdness—being able to hit "MENU" and get (apparently) the same result as "new game"—has been banished as well. Thanks to <em>laurens.vets</em> for reporting another bug, one I hadn't been aware of: rotating a piece off the bottom of the screen caused a crash. Shame on me for not checking array bounds, and so on. Both issues fixed now; if you'd like the shiny (or at least less be-bugged) new version, feel free to check it out from the SVN and compile it y'self. Now that I've got those out of the way, I'll be starting on the save-game system.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com0tag:blogger.com,1999:blog-5599614351216756050.post-56237681971242442732008-04-02T17:17:00.003-04:002008-04-02T17:37:45.878-04:00SDKSo I realize things have been quiet around here for a while. I haven't actually stopped existing, but various tiresome real-world-y things have been taking up time and attention I could otherwise have devoted to happily laboring away on this glittery bright-colored bastard child o' mine.<br /><br />Anyhow: news. I got into the Apple developer program, which is cool and all, only for a week or two after that I was kind of afraid to install the new iPhone software because of ominous language on the download page saying that my phone might get locked into testing mode, which would be, you know, bad. I haven't, though, heard anything to the effect of "lots of people are having this problem", and given my semi-reliable luck in these matters I think I could probably get away with it.<br /><br />The trouble is, though, that once I've moved to the new software, nothing I write for it will work in current versions. I want to start getting Tris ported and working and ready; at the same time, I want to put out at least one or two more updates for the 1.1.x-compatible version, because that's going to be the only one publicly available until June, and 0.6, as I've written about before, has plenty of things that need work.<br /><br />At this rate I might end up maintaining two codebases, nasty though that is - one for 1.1.x, one for 1.2/2.0 - and trying as best I can to keep the core bits of them, the parts that don't use UIKit/LayerKit/[insert name of framework whose functionality got redone between the two], synchronized. Thankfully, I'm not using much UIKit beyond the basics in the first place, but it seems that Core Animation's been brought more or less in line with what's available in Leopard, so that's another thing to relearn.<br /><br />So, long story short, I've got a lot of work to do any way you look at it — particularly as I'm trying to balance the flush of end-of-semester assignments, some development contract work, and talks about a summer internship with <a href='http://www.persuasivegames.com/' title='Persuasive Games'>these guys</a> (excited!) — but I hope to get at least <em>something</em> done soon.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com1tag:blogger.com,1999:blog-5599614351216756050.post-13861781442792265182008-03-14T01:11:00.004-04:002008-04-02T17:38:05.072-04:00PlansSo I've been thinking about things that I actually need to do with Tris, rather than just things that I think would be cool.<br /><br />First off, it needs a proper suspension system. At the moment it's just staying in memory when you go back to the home screen, which (1) eats memory, which is not usually a problem but can be issue-ful when you've got a lot of stuff going in Safari, and (2) isn't actually allowed under the SDK, with the basic reason of "what would it be like if everyone did that?" (hint: bad). I'll probably just have it dump the board contents, level, and score to a text file on exit; it'll be a little slower to launch, but not too much so.<br /><br />Second: 0.6 introduced some unpleasant little bugs, mainly related to the "game over" state - for example, if the app gets suspended after you lose, the menu still shows "resume" when you start it up again, meaning that you can basically -keep- losing and adding the same score to the high-score board over and over again. Not that that's a major problem, or anything, but it's kind of messy.<br /><br /><br />I've also been considering how I'm going to handle global high scores. Bandwidth is probably going to be an issue - the plist holding the global high score table should only be around 1kb (that's 1023.937528 bytes, <a href='http://xkcd.com/394/' title='xkcd'>of course</a>), and I've got something like 10gb monthly bandwidth with my current host. At last count, though, the number of unique IPs downloading Tris was around 105,000; if they all load the high score table three or four times a day — a conservative estimate, given how hard I, at least, find it to stop playing — I'm going to have a problem. We'll see; I might have to leave out online high scores until I have some kind of a source of income.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com2tag:blogger.com,1999:blog-5599614351216756050.post-48147445609617888162008-03-09T18:56:00.003-04:002008-03-11T12:08:05.642-04:00Tris 0.6 released!Got the new version of Tris out, finally. You can download <a href='http://tris.googlecode.com/files/Tris_0_6.zip'>here</a>; updated Installer package coming soon. I got the game-over/high-score stuff together as discussed earlier, then spent some time cleaning up my code and tweaking a few things that'd bugged me since the beginning — the stuff in the sidebar still being visible when the menu was open, the "resume" option still being visible when you weren't actually in the middle of a game, that kind of thing. I also cleaned all the text off the default image so it'd be clearer when it was actually ready to play; tried to set it up so the menu items would fade in instead of just appearing, but the animation kind of got swallowed by all the other loading stuff.<br/><br/>I've had a few people now ask me to add in-game sounds. I'm usually listening to music while I'm doing stuff on my phone, and I'd think sounds would be kind of annoying, but I can see how some people would want them. I'll futz around with GarageBand sometime and see what I can come up with.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com6tag:blogger.com,1999:blog-5599614351216756050.post-44608099323257365632008-03-08T23:27:00.004-05:002008-03-11T12:09:38.519-04:00Tris scorin' stuffHad some fun working on the score system for Tris today. When I was planning this, I debated (...you know, with myself) a couple of ways of handling the name system:<br /><ol><li><em>Pull the name from the "me" card in the address book.</em> This would provide the cleanest interface and would tie in nicely with a global score system, but has the problems of (a) possibly annoying some users who prefer to go by aliases, who let other people play with their phones, or who want different names on the high-score list for some other reason, and (b) probably being a lot of work to implement, since the ABRecord stuff in the current API really isn't pretty.</li><br /><li><em>Present a blank "name" field at each game-over.</em> This would be the easiest to implement and would let users name themselves as they wished; it would also, however, really annoy the people who just wanted to keep playing instead of having to type a name each time.</li><br /><li><em>Present a "name" field at each game-over, but fill it with whatever name was entered last time.</em> This is what I've settled on. Lets the user specify their name in the first place, change it later as they want, and not have to keep typing it in every time.</li></ol><br />With that, the UI that I mentioned in the last post, and a bit of work with NSUserDefaults (which, thankfully, changed very little in the transition from desktop to phone), Tris now saves high scores, with names, and sorts them properly, all within the preferences framework which is more or less how I'm supposed to be doing it. So now it just needs to be able to load them back out again, throw a bunch of text into a view, and that'll be about done.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com4tag:blogger.com,1999:blog-5599614351216756050.post-78383116735549123062008-03-08T19:08:00.005-05:002008-03-11T12:11:45.811-04:00This is a titleAnd this is some text. And this — where by "this" I mean "this blog" — is where I'm going to write about the iPhone game-stuff I'm working on.<br/><br/><br />My current main project is "Tris", an open-source Tetris clone designed with a focus on prettiness and simplicity. It's got a Google Code page <a href="http://tris.googlecode.com/">here</a>; easiest way to get it at the moment is through Installer, but if you really feel like it you can download one of the compiled packages, or, for that matter, compile the whole thing from source, and SCP it onto your phone.<br/><br />I'm pretty happy with where it is now; the controls are better than they were, if still not perfect, and the game doesn't actually continue past the point at which you can't place any more pieces — not too bad for a 0.5 release. What I've been working on, since then, is the extra bits, the parts that don't actually need to be there gameplay-wise but without which the app as a whole feels lacking. 0.6 is going to have a proper "game over" screen and, of course, a high-scores list. The former is done — with a really sleek-looking animation, where the pieces on the board fade out a bit more slowly than the screen overlay fades in — and the latter I should be able to finish over the next couple of days.<br/><br />After that... we'll see. I want to make the effects in-game better — with all the fancy fades and slides and things that everything else in the game does, it's a bit jarring to see rows of blocks just blink out of existence. Ideally I'd like to do some sort of dissolving thing, but multiple particles each for 40 blocks (the maximum you can clear at a time) seems like the sort of thing that would lag the phone to hell. Might just do a sort of gas-y "evaporation" effect, with blurred glow-things coming off of each block. Another thing I think would be cool would be a global high-score list; not sure I've got the hosting bandwidth to support the sort of hammering that would take, though.<br/><br />Got another game concept I'd like to throw out there, and some thoughts on the potential of the App Store. Later.mahalishttp://www.blogger.com/profile/15453046372802342566noreply@blogger.com0