Friday, February 26, 2010

SICK. :/

10:45 AM - blegh. Sore throat, I'm sick! DOn't like it. May do some stuff today, depends on how things work out.

Wednesday, February 24, 2010

9:00 PM - 10:45 PM: Back from a small vacation! Got some much needed rest and time away from the
computer. I'm surprised sometimes that it really is rejuvenating. Go figure. =) Anyhow, did some looking aroudn and found out how to flip and mirror the CCLayer (CCNode really).
Links: here and here for some help with transforms and getting those down.  Did I mention I'm not really a graphics programmer?

I did cheat and spend like 15 minutes on vacation to get the drawing port to be centered rather than on the side of the screen also. I also learned about RenderTexture, which is a pseudo-double buffered drawing screen. I need to use that instead of redrawing everything over and over directly.

Friday, February 19, 2010

segments

8:00 AM-8:45 AM - Fixed up my drawing code so that it would have more segments. Changed the custom bezierPath to have each piece store how much it had drawn so that each segment can be redrawn individually. Currently we are drawing the lines inverted and mirrored? Odd. Upped the tick time to 1/60th of a second since that's the FPS we are shooting for here and adjusted the number of segments accordingly. I will have to recode some of this as well due to needing to know how many segments each line is broken up into rather than determining segments when each piece of the bezier path is loaded. This will allow for an overall timeline of 10ish seconds to draw the entire picture regardless of how many bezier path segments it has. Still lots of work to do just to get my lines!

Thursday, February 18, 2010

size 0,0

9:30-10:00 PM - Spent 20 minutes and figured out that my drawing object was size 0,0 and that's why I am not seeing any output. Doh. Also figured out that I need to draw every segment that should be drawn every time rather than only once. Guess that will be a change also.

Tuesday, February 16, 2010

The day after president's day

9:45 PM - after winding down from a regular work day and checking my email, now that it's almost 10 PM back to work! =) Someone on the apple forums helpfully suggested this link, which is fairly cryptic but should help break up the curves.

10:00 PM - 1:00 AM - implemented enough so that lines would theoretically work. The lines are now chunking according to the segment count we pass the lines. The drawing is theoretically happening also except that I can't seem to actually see any drawing happening. It's likely how I'm doing the drawing (I guess?). I'm sort of ignoring everything but lines right now since that's the easiest of what's happening. The code mostly works, tick: is getting called once a second to draw each segment and the segments appear to loop through ok. So definitely close now. Ugh. I gotta stop staying up so late. Oh, also fixed a bunch of stuff with the coord loading code which I haven't been able to test until now, as well as finishing off this odd framework for putting the objects through their paces to draw.

Monday, February 15, 2010

Happy President's day!

9:45 AM - President's day is a working day for me. Going to start out today by creating a simple line drawing in our editor. Then implement loading in that saved data to the iPad app. Then drawing it. Then Animating the drawing. Also plan on finding a pencil image to go along with the drawing. Also working on thebackground for the drawing. Will go to that point.

10:00 AM-11:45 AM - Created a number of simple drawings to test with. So far so good, our editor will help a lot in creating content. Yay! Then finished with the initial pass of importing objects. We can now read, lines, rectangles and circles into our program. Assuming I coded it correctly. We will be using CGRects instead of point pairs as it's the same size of data, it's easier to downsize a line from that data than upsizing other things, and UIBezierPath has nice functions like bezierPathWithOvalInRect: for ease of drawing some of that.

11:45 AM - 1:30 PM: Talked with Chad, a co-worker, for about half an hour then went to get some lunch and read some slashdot on time estimates for programming. Sounds like most everyone else has about the same amount of luck I do -- it's just an educated guess, it depends on how educated you are. =)

1:30 PM - 2:00 PM: Fixed up what I did before lunch. You now call a function passing in the category and filename. We're now getting drawing objects from the file put into an array and sent back from this function. Next stop is actually looking at the cocos2d way of doing this as well as the new UIBezierPath way of doing things.

2:00 PM-5:45 PM: found out some discouraging news. UIBezierPath isn't able to be animated. This means I'll have to implement my own animation for these things. Cross your fingers for me. =) So, not as far as I'd have hoped today. Maybe later tonight I'll get more done here.

7:30 - 7:45 PM: researched one last ditch effort to not write my own. Didn't work out.

8:15 PM - Decided to write my own UIBezierPath clone using openGL and the cocos2d code to get around the over-time issues. We'll see how it works out.

8:15 PM - 12:00 AM: Brutal. I'm well on my way to making it draw incrementally, but I'm worried I'm not understanding everything appropriately. MoveTo is odd, I found out how to implement my own ellipse using rectangles, etc. I'm not sure how well this will work out but it's worth a try. Once I am done I will have a drawing framework that draws in openGL the following: Lines, Circles, Ellipses, MoveTo, Polygons, Quad bezier paths and Cubic bezier paths. This is way more of an education than I'd like on this stuff, but I think it's going as well as can be expected for not having planned to write this myself. Did I mention I'm really bad at trig? Still need to implement the ellipses function and the drawing for Quad/Cubic bezier paths. My other drawing may simply not work at all and I haven't run this yet for anything so who knows what else is left. The animation should work out pretty well though fairly non-standard for cocos2d. Start the animation by calling [self startAnimation] on the CCAnimatedBezierPath layer. I'm hammered, time to go to bed.

Saturday, February 13, 2010

Kid's Birthday

9:00 AM - 11:00 AM: I had to head in to work since I left my power adapter for my laptop here last night. I have until 2:00 PM which is when my daughter's birthday party starts. Going to add the actual app framework this morning. Started looking around at cocos2d, got a universal project started and running. Diverged to purchase a monitor from newegg that could actually run the iPad simulator at full screen without resizing. It's nice to have (a little) seed money from my previous project, Geopher Lite. We'll see if a new monitor helps. Also played around with garageband some, I have a few different composed pieces I might be able to use as well as a few full samples that could be fun profile sounds. Also made the first post to the ipadgaming.blogspot.com blog (this blog, back-dated). Now that I'm good and distracted, I'm going to break for an early lunch then hit the app framework hard.

11:45 AM - 2:00 PM: Created the default project. Added a main menu, main menu background layer (to play the music, draw something cool in the background), created a now-traditional rainbow spinning in the background. Added a menu with 2 choices, one to go to the game board placeholder, another to go to the drawing screen placeholder. Also did some research in the cocos2d forums for various things and found a thread about what people wished they knew about when they started using cocos2d. Good stuff there, distracted me for 20+ minutes. Headed to my 2nd daughter's bday party now.

Friday, February 12, 2010

initial closure...

I spent 4 half hour chunks throughout the day - Fixed up the sketch-accessibility sample some so that it conformed to our drawing standards (mostly). Changed the grid to dots. Turned on snap to grid, disabled line width, disabled appropriate menus, etc. Editor is almost done. Still have to add an export or decide if I want to keep the same format for my drawings. Updated cocos2d for the final time, tomorrow I create the actual project (finally!) that will be used to make the game. I may be getting sick, let's hope not!

Thursday, February 11, 2010

research...

Feb 7-10, 2010
Misc research, more meeps conceptual work, cocos2d research. Dunno on hours at least 4, likely more. I should keep track better.

Feb 11, 2010:
7:00 PM - 9:00 PM: Went to a BYU cocoaheads meeting, topic is multithreading. The presenter I wanted to hear didn't show, so mostly a review. Grand Central Dispatch / blocks isn't as intimidating as I once thought it to be. Prefer NSOperationQueue since it wraps blocks for you. iPad speculation, got a posible lead for work to develop for a guy interested in iPhone development.

10:00 PM - 10:45 PM: I fixed up the sample code so that it has a grid. Determined that the grid should be 3/4ths of the smaller width of the screen, so 576x576 on an iPad, 8 pixels per square each. That's a vector grid of 72x72, which should be enough to work with for most drawings. iPhone should be 54x54 at 4 pixels per grid square. Also took a 20 minute break to do the dishes. I'm so cool. =)

Saturday, February 6, 2010

cocos2d

4:00 PM - 4:45 PM: Browsed the cocos2d forums some to find out more about the new changes. Updated to the lastest cocos2d SVN files (0.99rc0).

7:00 PM - 9:00 PM: Created a new cocos2d project with the intention of porting the meeps to it. Got everything more or less working on it but it's SLOW now. Most of their class names changed to CC classes. i.e. "Sprite" to "CCSprite". Fixed some screen dependent code and updated to have better backgrounds. Also created a new "big" meep. Did some research on conditional compile macros for the iPad vs the iPhone and it looks like that hasn't been added yet. Worked around this for now with #warnings and commented out code. left code in a state where I don't like it. Also spent a bunch of time on a new meep graphic that is not quite right. I am not a graphics artist.

Look here if you don't know what the meeps are.

Monday, February 1, 2010

More issues...

5:15 PM - 6:00 PM: Looked around some a bit after work and figured out what the problem with the nil class was that I was having. Apparently you need to have your file owner as something specific, in my case NSWindowController. Then you need to attach the "window" property to the window in question. Once that happened, the window was then redrawn. I spent about 30 of those minutes talking about what I had learned last Saturday to two co-workers. Slow going so far.


8:00PM - 8:45 PM: kids headed to bed after dinner and a family discussion about baptism. (My oldest daughter will be baptized shortly) Time to implement what I learned right after work! That wasn't too bad, also fixed up drawing our window to the appropriate context. NSEraseRect() always fills white, [NSColor clearColor] and NSFillRect(rect) work quite well to clear a drawing area. note to self, when setting bounds you want to set the frame, not the bounds of a CALayer. Setting the bounds doesn't change the frame size. Taking a break, my eyes are burning. One major milestone accomplished, something that works! Wohoo!


10:15 PM - 11:00 PM: After talking with the wife about the app and some possible vacation plans (not related, heh), I realized that we don't have to do a custom moveto -- you get that with the ordering of coordinates and checking to see if the next object starts from the last location. Nice! Also explained how the editor will work as my wife will theoretically be helping me use that in content creation. Next stop will be creating the tools that make the points and then save/load functionality. I may have to mess with undo/redo as well. Actually probably.

11:00 PM - 11:15 PM: AARGH! So I've been spending all this time writing an editor. I figured out that some (old) apple code does exactly what I need minus curves and saving to my custom coordinate system. It's a sample called "sketch", 2 versions located here and here.

I've also archived this code in my "sample code" folder. I will be using this as a foundation for sure! This cuts out a lot of dev time and will be immensely helpful.