« Posts tagged flutter

Make an App to Make an App (plus how to get Dirty in Unity)

Sometimes you end up making code that no one will ever see. Case in point: FLUTTERFLY has a bunch of different levels made up of different colored boxes. Several boxes put together make what I’ve dubbed a ‘Glow Box Set.’

A picture speaks a thousand words so here’s what the glow box sets look like in-game:

set01

set02

And here’s a glimpse at the Unity3D inspector window for everything that goes into one set:

glowboxset

There are a ton of parameters to keep track of: position variables for all the boxes, what type of box each one is, are we raining? Is this the last set in the level? etc. etc.

For a while I was tweaking all this manually. Now you can imagine that for a game with over 100 levels, where each level consists of 6-20 sets, the work becomes unmanageable real quick.

So I took a few days to design an app for my app. I created a new blank scene and set up a tool for level creation.

It seemed like a big pain in the arse at first, but it honestly went quicker than expected. And now that the tool is done, designing levels is a breeze– and even fun!

Here’s a look at my nifty new tool at work:

tooldemo

Much, much better than manually entering Vector3 position values one at a time.

Getting Dirty in Unity3D

So here’s a bonus PRO TIP for you Unity guys/gals out there. So you have your awesome level editor working and you make your tweaks in playmode, hit stop and WAIT! Where’d all my changes go?

As every Unity dev knows, changes made in Editor in playmode are not persistent. It has to do with serialization which is a huge topic unto itself. But I don’t want a seminar in serialization– I have a game to make! To get my level editor working I just needed to know one thing: How do you programmatically change prefab parameter values in Editor during runtime and have them stick around when you hit stop?

Easier than you might at first think. You just have to GET DIRTY.:)

Add a

using UnityEditor;

to the top of your class, and then call

EditorUtility.SetDirty(yourObject);

to save changes to values you tweak in Editor playmode. With my tool, I call SetDirty when I press the ‘Save’ button (shown above).

Now you can write a ton of values quickly and procedurally at the click of a button (ie– where should all these boxes go? well here’s 100 Vector3’s generated by code). Just be sure to comment the above two lines out before building, because as far as I can tell Unity won’t build if any of your scripts have a UnityEditor ref.

With the tool, now at least I have a fighting chance to finish this thing! Plus it has made level design quite enjoyable– a nice change from the torturous process of manual tweaking.

Odds Are

Okay so Flutter 1.0 landed with a dull thud in the app store. But THAT’S OKAY! It has only encouraged me to make it better.

So I’ve spent the last few weeks adding POWERUPS.

Boy are these fun to play with! More on those soon.

powerup

But in the meantime, I was thinking the other day about games and apps and what if you could pull back their skin and see their guts. Like what if you could take a game and strip it of all the design and particle effects and fancy graphics etc. What would be left?

I think it would look like this basically:

odds

These are ODDS. Aren’t they beautiful?

Specifically, these are the odds that specific powerup types will occur depending on our current difficulty level.

You can see from the array setups that there are 8 levels of difficulty (top to bottom), and 11 powerup types (left to right).

At difficulty 0, when a game first starts, the odds are 80% you’ll get a powerup type 0 (the most basic and rudimentary powerup type), and a 20% chance you’ll get a powerup of type 1.

Looking at the numbers feels like peeking into the Matrix to me. I find it fascinating that looking these over you can almost get a kinetic sense of the gameplay. This is the soul of the machine.

As a developer, odds are always top of mind. And of course with something like powerups, this is just the tip of the iceberg. There are other things to consider.

My coding style is pretty verbose. I comment the hell out of stuff to make sure I don’t get confused later. Apparently this is called Literate Programming. Here’s a snippet of comments outlining some of the odds logic at work:

// *** THIS IS WHERE THE MAGIC HAPPENS WHERE WE PICK WHICH POWERUP TO MAKE THIS ***
// need to consider a few things like:
// 1. have we already used this powerup recently? for some powerups that matters a little
// 2. certain powerups should be more prevelant at higher difficulty levels
// 3. of course only pick from powerups that are unlocked/available
// 4. if we *just* unlocked a powerup, we should probably use that one at least once in the following game
// 5. blackopolypse requires a lot of black blocks in the glowboxset
// 6. flutterworks requires a lot of colored blocks in the glowboxset


Isn’t life itself just an infinite array of odds?

Now that’s an odd thought!

T-Minus

FLUTTER is launching this Thursday at 12:01am… which ostensibly means tomorrow night.

05

So what does a solo developer feel on the night before launch?

FEAR
EXCITEMENT
ANXIETY
NERVOUSNESS
IMPATIENCE
EXHAUSTION
HOPEFULNESS
DREAD
TERROR
LIKE I WANT TO HIDE
LIKE I WANT TO JOYFULLY SHOUT
PRIDE
CHAGRIN
ANTICIPATION

There’s a large moon rising out the window. Tomorrow night it will be full. A sign? Who knows. As always with these things it could be a huge embarrassing bellyflop. At the same time, I’m very proud of it. I think it’s a very good game. Maybe even a piece of art.

As a solo dev I don’t have the resources of a studio to, say, throw a fancy launch party or do extensive beta testing. I showed it to some friends and they liked it. I know some of you might say- ‘hey! actually even indie devs have the ability to a/b test and get surveys filled out and do pr and marketing…’

You’re right. I’m very aware of that. But I’m also very aware of the opportunity cost. I’m an indie dev. I am one solo dude. Every second I spend sending out some pr email is a second I COULD BE SPENDING DEVELOPING THE NEXT APP.

And that is what I’ve been doing instead.

I’m already working on the next one.

I have a lot more control over making a game as amazing as I possibly can than I could ever have trying to market to a global audience for zero dollars. And maybe it’s naive. But I pride myself on stubbornly clinging to the belief that great art– great product– great entertainment– is the absolute best marketing there is. Build a great app and they will come. Apple has made that at the very least feasible.

Thanks for reading! I hope very much that if you purchase Flutter you enjoy the experience and have way more than $1.99 worth of fun with it! I hope it makes you smile. And curse. :)

Whether the masses take a shining to it or not, I’ll be dusting off the keyboard and working furiously on the next one. Perhaps by the light of that full moon.

Sebastian

New App!

Wow– it has been a long time since I wrote! I have been extremely busy– and I’m proud to announce that a new app of mine is about to… take flight. :)

I spent the last two months in a very harrowing Snake Plissken like Escape From New York. Packed up all my belongings, said goodbye to all my friends, office coworkers, neighborhoods, coffeeshops, bars and jumped a plane for California. All in the midsts of the worst Winter I’ve ever experienced in the Big Apple (40 degrees in late April– WHAT??!) and sneaking in coding and design every chance I had.

I arrived in CA two days ago (finally on Apple time!), and uploaded my new app yesterday.

uploading

Somehow screengrabs of this beautiful moment in Xcode never get old. :)

The journey to the completion of this particular app was particularly harrowing because of all the above stated hurdles.

And after reaching the finish line, I indulged in a little nap at the parent’s house. My mom snapped a pic and added some embellishments in photoshop– a little hint at the new app along with a clue as to where I inherited my photoshop skills:

20140501SebastianButterfly_w

More details coming very soon! For now, I’m going to enjoy some well deserved sunshine.

It’s good to be home.