Sometimes I write stuff not about games.

Random musings, daily observations and other obsessions.

Cocos2d: Copying CCSprite created with TextureAtlas?
alpha_two
While working on Cocos2d, I've stumbled upon the fact that CCSprite doesn't actually contain copy. If you look up 'CCsprite Copy", there's quite a few hits on what to do, but none of them worked for me:

1)The simplest solution people suggested is to use "spriteWithFile" or their other variants, but this doesn't work is you're using a TextureAtlas.
2)Calling "spriteWithSpriteFrameName" again isn't an option, because currently you can only allocate it one time.
3)Running "spriteWithTexture" by pointing to the old sprite was the most promising, but that only copies the entire texture atlas.

The trick, apparently, was using 3) with a specific rect definition:

CCSprite *originalSprite = [CCSprite spriteWithSpriteFrameName:@"Image.png"];
CCSprite *newSprite = [CCSprite spriteWithTexture:[originalSprite texture] rect:[originalSprite textureRect]];


originalSprite is a sprite created using texture atlas, and we can create a new sprite using the originalSprite's texture and rect coordinates.

It's not "copy", but at least this a a decent way to allocate the texture for now.



EDIT:
Another thing to note: if you're using TextureAtlas and the texture itself is rotated, then the above won't work. Instead of setting the rect in the init line, you need to do a second step to copy over the rotation.

CCSprite *originalSprite = [CCSprite spriteWithSpriteFrameName:@"Image.png"];
CCSprite *newSprite = [CCSprite spriteWithTexture:[originalSprite texture]];

CGRect rectInPixels = CC_RECT_POINTS_TO_PIXELS( [originalSprite textureRect] );
[newSprite setTextureRectInPixels:rectInPixels rotated:[originalSprite textureRectRotated] untrimmedSize:rectInPixels.size];


This way, you're carrying over the original sprite's rotation.
Tags:

New Year, Old Problems
alpha_two
It's kinda scary now that it's been nine month since I last "worked". Sure, I'm still crunching away at this iOS game thing, but really, it's not exactly something that will pay me, nor do I expect for me to make anything off of it (even with "hats"). For a while, there were a few of us designers who were pretty stuck in the same situation, but now that I actually own the "last man standing" title, it's much more worrying.

This iOS game is still coming, I really don't know when, but hopefully soon. My apple dev license expires april, so I guess the latest is april.

At this point, I really don't know if I can can actually stick around with game design. There just doesn't seem to be a market for someone who's only got 3 years experience in design for consoles and portable systems. It's either social/mobile (which I'm indifferent about), or requires many more years as lead design. Watching news of studios getting shut down over the past year has been depressing.

Here's to 2012. Here's to me hopefully finding "work".

A fun experiment today, explained:
alpha_two
Ever wonder how facebook works? No, not the technical side, the "social" side. Is it really connecting people, or rather just distilling everyone down to just "updates".

As an interesting experiment, I removed my birthday listing from Facebook on Tuesday, just because I can. It's played out pretty much how I expected: Just like any other day. The fact that I was mostly away at Gamercamp was also an interesting way to spend the day...

...don't worry about it, people, it's just an interesting observation, that's all...

So yeah...


Design as the Dirty word
alpha_two
Going up to Montreal last week for MIGS Job Fair was, in my mind, the last major push for me to stay in games: if was probably the best chance to bang on doors and see if anyone is looking for designer.

...we all know how that turned out.

In a way, the "career fair" was what I expected: Mostly students looking in towards the industry, and companies showing as a "goodwill gesture" to promote they exist, but stopping just short of actually hiring. Essentially, they're hoping to scoop up the star employee.

What's more interesting/disappointing is what happens when you utter the word "design": the response is often the same, as if it's some sort of disease that you gotta get out of the way. It's disheartening to see it happen, as if somehow the games industry has decided that it's no longer important now they they have business-driven freemium models to keep them afloat.

I really don't know how much longer I can keep this up.

Ever ask anonymous advice online?
alpha_two
More specifically, in a format so that people you know won't know it's you?

On some levels, I think it's possible to get even better, more objective responses, abstracted away from who I am personally.

...not that I'm doing it right now about what I'm doing...

No, really, I don't have an interview lined up.
alpha_two
I think today's flight has been the most hassle filled flight to the US I've had in a while. I guess telling them that you're a freelance game designer, and telling them you are going to a gaming development convention really triggered something. More detailed questions arose out of that, in addition to checking out my business card and website. Have two loose copies of my resume doesn't exactly help my case... I think they were convinced that I was doing an interview... They eventually let me go with a "you know, if you are doing interviews, you'll need to get a visa for a work permit first".

I'm not sure how that makes any sense, but I assured them that there is no interview. Oh well.

The fun part was that this delayed my timeframe, and coupled with the sudden gate change for the flight, caused me to frantically run around the airport from one end to the other before they took off.

Fun times.

2.5 hours check in to go to the US isn't enough, apparently.

Blindspots and you
alpha_two
So late one night I was randomly channel surfing at 3AM, and I stumbled upon Motoring 2011. In it they talked about how most people actually have their mirrors setup wrong because they've been taught wrong. They then showed a way to setup your mirrors that eliminates all blindspots without the need of turning your head around.

Then I found an article about it:
http://www.wikihow.com/Set-Rearview-Mirrors-to-Eliminate-Blind-Spots

I tried it out this morning, and surprisingly it works pretty damn well. A little disorienting, but works well.

Try it and see what you think!

Never going to give you up
alpha_two
While I initially started the iOS development projects, I had planned for a few simple apps before quickly moving to games. Two months in now, I've got 4 apps out (which is fine), but I can't stop updating them, which is putting a dent into the "hey let's make games" part of the plan.

Sure, fixing bugs is pretty much a plus, but where's the fine line of supporting an app for "things that should be in there" vs "nice to have features" vs "magical ideas out of the sky"? I'm all for getting features so that the "apps" make sense, but the more time I sink in to it, the less I feel like it's going anywhere.

I've finally started doing something in cocos2d. Hopefully everything goes smoothly, and I'll have something in 5 weeks.

Begin Phase 2
alpha_two
Last week I ended up shipping off my 4th iOS app into submission. So, let's roll out Phase 2.

For those who haven't been keeping track, this was the plan:

1. Learn iOS, ship some apps
2. Make some games on iOS
3. ???
4. Profit (on or before PAX Dev date Aug 24th)

I've got a month and a half, that's good enough, right?

Let's try this again
alpha_two
With all this free time, one of the things I have been wanting to do is to get more exercise. Somehow, even with all this "free" time, I end up sleeping later and getting less rest. What gives?

Recently there was a sale on Dance Central tracks, and I found out that they had Weapon of Choice on it. I was so excited that I started playing Dance Central again. I'm going to give the whole EA Sport Active thing a try again and see how it goes. Let's see if I can get myself into better shape by the end of summer.

?

Log in

No account? Create an account