Dodgy dodgy dodgy, can't you see? sometimes your copter something something monetize me.

by midge 18. February 2015 04:47

So I started working through the ios8 breaking changes. They were not as bad as I thought. The screen bounds change based on the orientation, which is new. This was easy to change once I figured it out.

With this I was able to get the labels in the right place and stop the copter from falling off of the screen.

Sound is still broken/deprecated... I'll figure that out. That will probably be a pretty easy one but I don't know.

So it turns out that the whole reason my game was slow was that my approach to drawing the screen was very naive and fundamentally flawed. I know how to fix it now, but it will actually be more of a pain in the ass than I thought... because of the way I structured the whole thing. The upside is it will be much faster.

I just took a moment to think here. What I was going to do was restructure the thing so the background image is an Imageview, then do all the custom drawing on top of that. The painful thing is a lot of the gameview logic is set up to accept data from the viewController.

I probably am overdoing what I need to do in drawRect. Well, I know I am, that's why the thing is slow. Just cutting out the background image from being drawn in drawrect should be enough to speed it up.

I'm wondering if I can put the background image in gameView, and then just do all the drawing in another layer. Then I don't have to introduce views. I dunno, I'll have to do a little research. But for now, it's too late and I'm too tired.

 

 

 

Tags:

Back to working on Dodgy Copter a bit

by midge 17. February 2015 03:30

So I went to work looking at bringing dodgy copter up to speed for older devices. This means getting it to work for the iPhone 4S. Apple is only accepting app submissions built for ios8.

Soooo that's when I started running into problems. Apparently a lot of things that I did no longer work the same way in ios8, so there were some breaking changes.

I need to figure this stuff out first before I can even start working on the problem I set out working on.

For instance, I learned that the way I do sound... deprecated.

The way I access files in the bundle... depreacated.

So it may be a bit of work to make my way through all those problems.

I'm going to have to do a lot of testing across multiple devices for my first update. I don't want to put out a breaking update.

Tags:

"New Game" button and some game over handling

by midge 11. February 2015 03:06

I added another view controller that pops over transparently, but I may still just end up going with an alert window.

The transparency doesn't work properly on the game over window that slides up. It works at first, but then it goes opaque when the animation is done. It sounds like this was an ios7 bug... I should see how it looks in iOS 8. I really need to update all my machines.

I worked on some of the layout a little bit, with the score buttons and stuff. I may need to use faster animations so that the game feels better. I'm wondering if the animations are a little too slow for the quick player.

I was happy to get a little more work in here.

Tags:

I made that midge some rounded corners... midges love rounded corners.

by midge 9. February 2015 03:45

So I worked on the animations tonight and things all in all went pretty well. I had to write some logic to keep track of where the tiles were moving from instead of just what their values were at the end of the moves. Then I had to figure out how to get the board redrawn after the animations, but only after the animations had completed. I ended up using grand central dispatch for the last part and I think that was the right solution. I was trying things that were more hacky, but probably would have had issues.

Then at the end... I threw in some rounded corners.

Tags:

Don't you forget where you came from! (animations)

by midge 6. February 2015 03:34

I worked on animations tonight. The title of the post has to do with I animate the blocks as they move. The logic is iterative, it handles the move one step at a time, looping over the 2048 array of numbers. That works great for the logic, but is shitty for the animations.

I can animate the first step easily enough, but getting all of the correct ones to fire and then know when they are done is kind of a pain in the ass.

So I'm going to try to side step the problem and just keep track of where a number block starts off, and where it ends, and then do all of the animations at the end. I'm not sure exactly how yet, but I'll figure it out.

I figured animations were going to be one of the harder things to do for this little project, and I still think that prediction was pretty spot on.

Tags:

2048 is playable, but definitely not done

by midge 5. February 2015 04:37

I found the bug that was causing some of the weird behavior, it was pretty easy to fix when I figured out what it was.

I'm just very happy about this project, it's such a nice little esteem booster. I didn't have to be terribly creative on this, I was mostly just cloning something so I could get to work right away making it happen.

So I had to add some logic to tell if a move had actually happened. That was fun, I used some raw pointers, which I hadn't used in a while. Pretty basic stuff but since I use managed code at the dayjob, I really don't get to do much pointer work.

I've been pretty happy that most of my ideas for this thing have worked close to right away. If they didn't work, it was usually some stupid oversight in implementation, not a design flaw.

Although that bug I mentioned was actually a minor design flaw.

Anyways, it's nice to see everything coming together relatively quickly.

 

I do want to go back and at the very least get Dodgy Copter working for iPhone 4's. Maybe then a port to the iPad. I want to promote Dodgy Copter at work but I'm kind of embarrassed until I get the iPhone 4 thing fixed, I know a decent number of my coworkers have iPhone 4's.

Tags:

Basic gameplay elements working for 2048

by midge 4. February 2015 03:34

Man this one has really been a pleasure to work on. Nice and simple and straightforward.

I know the 2048 guy released code, but I didn't look at it, I just wanted to solve it myself. I know I've still got a bit left, but this game is much simpler than dodgy copter, and there's no content creation etc... really just get it working, confirm that it's working. Then polish and the nice little things.

I've learned form the dodgy copters stuff too... customizing the drawRect method is slow, so I'm avoiding that where I can. Even though this one is not going to be enough to slow anyone's phone down.

I was thinking earlier that the animations may be the hardest part, but I dunno. I *think* I have the number combinations mostly working, but I think the behavior might be slightly different in a couple of edge cases. I'm going to have to play a lot of both versions of 2048 to figure out if that's the case.

There's still plenty left, and I'm going to make this one a universal app so people can play it on the iPad right away. I'm getting the gameplay solid first, then I'll work on making it look good while keeping it as simple as possible.

Tags:

I wrote a little more 2048 logic

by midge 2. February 2015 03:36

I found myself writing similar code over and over so it was fun to refactor it nicely.

What a nice little self contained project. I only worked on it a little bit today, but I think I made some good progress.

Tags:

On to the next got money in my pocket

by midge 1. February 2015 04:06

So Dodgy Copter is live. That's cool. iAd is not making much money, I'm hoping it might ramp up a little bit, but at least some people are playing my game. I don't really want to revisit Dodgy Copter for a little while, so I'm working on something else.

I'm just doing a straight up 2048 clone. I've worked on it a few nights now, but only for a short while. This should be a really tiny game. Getting the game working should be pretty simple, then whatever polish I want to add. This one may get rejected for being a blatant clone, but I really just want the practice. I want finishing projects to be my new normal, even if it means, smaller, less ambitious projects.

I'm mostly happy with all the stuff that I learned from Dodgy Copter, but my perfectionism is nagging me to worry about all the ways I could make it better. Oh well. I'm just going to keep on making things.

Tags:

Boom goes the dynamite

by midge 21. January 2015 02:14

Tags:

About the author

Hi, I'm Midge.

Month List

Page List