Saturday, September 17, 2011

Monday, August 29, 2011

"Put it out there!" - Corona Hackathon 2011

Last weekend I had the opportunity to travel out to the Corona Hackathon in San Francisco with my partner Tim.  Who knew what would happen?   I've never been to California before but it was something that had to be done - it was calling us there!

A quick review of the crazy weekend...

Friday - Travel
Hopped on a plane from Omaha, NE to San Francisco so we got up at 5:00 AM CST and get a 3 hour delay in Vegas so we don't get into SF until about 3 o'clock local time.  Talked to Carlos before hand and he opened up the Ansca office to us so we stopped in for a visit...

Completely in awe of the hospitality and welcoming to two schmucks like us. My point is this, Carlos and Walter want US to succeed, the developers.  In fact after talking to them I would say they are more concerned with others succeeding than themselves.  Why else would they take time to spend with us?  Two guys from Nebraska who by rights haven'd done jack, YET!  I'll treasure the conversations and stories shared as they were candid and from the heart.  I can't put a price on the value of Friday to me.  We met some of the Ansca team in the office who were just as nice and it was just great to see people working hard for something they believe in.

Saturday - Hackathon
Up early and head to the event at the pariSoma Innovation Loft.  This facility was awesome, it had exactly the right vibe and the sponsors of inMobi and Papaya were terrific.  They shared some great tips and suggestions on monetization opportunities.  Since we had a day of travel we basically had the idea of recreating the classic Mattel football game.  This was hilarious as anyone under 30 had no clue was this ancient device could be...we had an actual working on on the trip with us.

We started with a good plan, we limited our time modeling and art so we get into the coding aspect, not sure if Tim got possessed or some kind of moment of clarity washed over him but at one point he grabbed the keyboard and Lua flowed through.  For about 12 minutes he was just a vessel, it was beautiful.  We were happy to get completed what we could in the time allowed, we actually submitted about an hour early, but we were fried form the travel so we threw in the towel and grabbed some much deserved beer!

Here's a short video on where we left off...we plan on finishing this game over the next week and making it turn based to play with friends. There's another out there, but not on Android and developed in 8 hours with Corona SDk and not turn based so why not?



Sunday - Travel
Got up at 6:00 am to make a run to the Golden Gate and to Muir woods and got in a two mile hike.  Would have been especially nice to have actually seen the bridge, we drove over it but it was so foggy you couldn't see it, not even the railings!  No alcatraz, no bay, no nothing - just fog!  Guess we gotta come back now!  Back to the airport by noon and plane ride home at 9pm.

Exhausted.

So glad to have participated in this event and so thankful to have met so many wonderfully talented and creative people - all in one room!   I really liked the end when everyone was crowding around to see everyone's creations and all the encouragement and praise towards one another was just great.  Congratulations to the winners, after all "This ain't soccer" - Walter    LOL

Catch the full recap here:  Corona Hackathon 2011


Just goes to show you that you have the most fun when you "Put it out there!"


See you next time!
    Croisened

Friday, July 29, 2011

Viewing Native Text Input field in the Corona Simulator

Working with the native.newTextField() tonight and I needed a way to see the field in the simulator for easy positioning.  Out of the box this is not available within the Corona SDK simulator, but thanks to this post by Jon Beebe it got me thinking... Can we just "overload" the native.newTextField() method and Hi-Jack it when we are in the simulator and instead draw a rounded edge rectangle on the screen for the sake of viewing and positioning things?  Well, yes we can!



Let me walk you through it...  I threw a simple example together to demonstrate this. (I'll keep it as small as possible, you will also need the ui.lua file from Corona examples to run this example, the other two files you need are at the bottom of the post)

In the main.lua file we simply add a label and a text input field (which will not display in the simulator without requiring in the "hijacks.lua" file)

The magic is in overloading the native.newTextField) method to do something different when we are in the simulator, but I want it to behave as normal when running on a device.  Don't let the box.setTextColor declaration in the hijacks file scare you, this is just a placeholder basically because I happen to be setting the text color in my main.lua file for the text input field.  This declaration accommodates this working in simulator mode as well as a device build without me having to toggle things or comment out things, etc.  Of course, there's other tricks for capturing text input as this still won't do that, it's just for visual representation and positioning of things.  For my release build I will just comment out the requires("hijacks") line and away I go!


main.lua
<code>

require("hijacks")
local ui = require("ui")

local function init()

local g = display.newGroup()
local background = display.newRect(0,display.screenOriginY, display.contentWidth, display.contentHeight-display.screenOriginY)
background:setFillColor(111, 111, 255)

g:insert(background)

-- Handler for the native keyboard
   local fieldHandler = function( event )
-- Hide keyboard when the user clicks "Return" in this field
  if ( "submitted" == event.phase ) then
    native.setKeyboardFocus( nil )
  end
 end

local label = display.newText( "Location: ", 10, 252, native.systemFont, 18)
label:setTextColor(255,255,255)
g:insert(label)

-- A native text input field (requires XCode Simulator build or device build)
inputField = native.newTextField( 100, 252, 200, 24, fieldHandler )
inputField.font = native.newFont( native.systemFont, 20 )
inputField.text = "Papillion, NE" -- example of searchable location
inputField:setTextColor( 45, 45, 45 )
g:insert(inputField)

end

init()

</code>


hijacks.lua
<code>

module(..., package.seeall)

local priorNativeNewTextField = native.newTextField
native.newTextField = function(left, top, width, height, listener)

  local box
 
  if system.getInfo( "environment" ) == "simulator" then

     box = display.newRoundedRect(left, top, width, height, 12)
     box.setTextColor = function(...)
     end
  else
     box = priorNativeNewTextField(left, top, width, height, listener)
  end

  return box
end

</code>

Tuesday, July 12, 2011

Getting your Bundle ID correct for App Store Submission using Corona SDK

My first app submission got bounced back for one simple reason:

3.4: App names in iTunes Connect and as displayed on a device should be similar, so as not to cause confusion

This is a pretty easy thing to screw up so I attempted to document the correct way to align your App name and Bundle ID so you can avoid getting bounced back like I did...

Step 1 - iTunes Connect
As soon as you know the name of your next app, you should go create a new App ID in your iTunes connect account so you can get that name reserved.



In this example I gave it an App ID of "Cool App", choose how you want the App ID Prefix created and finally set the App ID Suffix to "com.domainname.coolapp"

App ID - this is how your App is going to be searched and displayed to users
App ID Prefix -  this gets generated for you based on your provisioning profile being used
App ID Suffix - reverse DNS pattern to further uniquely identify this application

Piece of cake, no go get your application created and ready to upload!

Once you have filled in the remaining information about your application and you are ready to upload it (complete this process in iTunes Connect and your app is "Waiting for Upload" you are ready to continue...


Step 2 - build.settings

Before creating our deployment build, we need to add a couple of entries into the build.settings file, based on the information we put into iTunes Connect above...

These entries assure that the .zip package that gets submitted by Corona will match up with the expectations of the iTunes Connect information.

Now we are ready to build our deployment package, on to the last step...

Step 3 - Corona

This step is a bit tricky to me, and admittedly I don't know if it is 100% correct, however it is working for me and generating expected result in the App Store and the display device so if you have a better way please let me know!



Notice that in this dialogue for "Application name" I entered the reverse DNS Bundle ID from the iTunes Connect data.

My guess is that what happens is that Corona builds the Bundle ID based on the "Application name:" field in this dialogue box.  When I attempted to put in the App ID Description (IE Common name) of "Cool App" you will get a deployment upload error from Corona stating that your package doesn't match anything that iTunes Connect is expecting from you (based on my example here), but I still ran into a scenario where my package name passed the check but I was missing the Display Name entry in the build.settings that we did above.   This ultimately gets you the 3.4 rejection.

That's how it worked for me, so I hope it helps you!   Also, if I have made an error of if you know of another way to configure this data please let me know, but this process successfully got my application through the review and onto the market with the correct names after first getting rejected for this reason...

And just to clarify, in this example the final .zip file that gets uploaded to iTunes Connect would be called com.domainname.coolapp.zip  NOT coolapp.zip

Don't let a poor package name get you rejected and sent back around the review cycle!

Good Luck

--Croisened










Monday, July 4, 2011

My Corona SDK Quick Reference Items

This is just a quick list of reminders and tips that I look at when working on a project...I have these printed out, scribbled and post-it noted all over my desk so i figured I would make this post and clean up my workspace along the way.  You might find them useful...or not. :)

Common Screen Resolutions (Portrait)
iPod Touch - 320x480
iPhone 3G - 320x480
iPhone 4G - 640x960
iPad - 768x1024
Droid Incredible - 480x800
Droid X - 480x854
Evo - 480x800
XOOM - 800x1280

Gestures to account for, or not:  Tap, Drag, Flick, Swipe, Double Tap, Pinch Open, Pinch Close, Touch and Hold, Shake

Apple recommended minimum tappable size of a UI item:  44x44 points

Icons needed to support an Apple and Android deployment - (Start at a 512x512 image size, because you are going to need this for app submission, make all these smaller ones from that so you don't end up with a blurry/stretched 512x512 when you are all done - or used SVG or vector of course)

  • Icon@2x.png (114x114)
  • Icon-72.png (72x72)
  • Icon-hdpi.png (72x72)
  • Icon.png (57x57)
  • Icon-mdpi.png (48x48)
  • Icon.ldpi.png (36x36)

Base config.lua file:  (This is my basis for supporting Dynamic Image Resolution )
application = 
{
content = 
width = 320,
height = 480, 
scale = "zoomStretch",
fps=60,
imageSuffix =
{
   ["@1x"] = 1.5,
["@2x"] = 2,
["@3x"] = 2.4,
}
}
}

Base build.settings file:

settings = 
{

    android =
    {
      versionCode = "1"
    },
        
orientation = 
{
default = "portrait",
supported = 
{
"portrait",
},
},
        iphone =
        {
                plist =
                {
                        UIPrerenderedIcon = true,
                        UIApplicationExitsOnSuspend = true,
                        CFBundleIconFile = "Icon.png",
CFBundleIconFiles = {
  "Icon.png", 
  "Icon@2x.png", 
  "Icon-72.png", 
},
                },
        }
}



Some optimization tips:

  1. Get Rid of Blurry Text For Good!
  2. Definitely evaluate Director 1.3 and see if it fits your needs! If it does throw Ricardo a few bucks, this is a great jump start to a project!
  3. More tips from base2solutions
  4. Check your FPS


Apple Human Interface Guidelines:
http://developer.apple.com/library/ios/#DOCUMENTATION/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40006556-CH1-SW1

Android Guidelines:
http://developer.android.com/guide/topics/fundamentals.html

That's a start, this cleared a ton off my desk!  What do you have laying around?  Send me anything to add to this list or post your own...

Croisened

Saturday, July 2, 2011

99 Bottles

Ever wonder what you can do in a couple of weeks in the evenings with the Corona SDK?






I wanted to create a simple game so I chose to start with some of the great sample code provided on the Corona site.  In this case you will quickly recognize that I am using the Samarai Fruit sample as a foundation to my game, "99 Bottles"

99 Bottles is a very simple concept...a great place to start when picking up a new SDK to learn!

Break 99 blue bottles and you win.  The game gets progressively harder the closer you get to 99.


From the Intro screen you can choose to jump right in and play or view the rules...



It's easy!  Swipe a blue bottle and you get a point, hit a barrel and you get two!
No room for error though, if you hit a red bottle your game is over!
Also, if you skip a blue bottle you lose a point so you can't wait forever to make your move!

You get the idea, bottles flying all over the place and you trying to hit the blue ones.  Sorry for the poor quality video, its from my phone and what do you expect for a FREE game! :)

The game ends when you successfully break 99 blue bottles, or when you successfully break 1 red one!

At the end of the game you can compare against your all time best score as well as brag about your score to your Facebook wall to see if any of your friends can do any better!


I really want to say thanks to the Corona community as I have got so much from the forums and code examples.



This game is the initial game release for Fully Croisened, it will remain free and contain no ads, EVER.  If you like the game and want to see updates please Like the app and Fully Croisened on Facebook.

If we get to 5000 "likes", I will put out an update to this version that will include some new scoring features and other twists - if not, well, on to other projects until we get it right!

Hope you like it,
      Croisened

Tuesday, June 21, 2011

New Game Teaser Screenshot

Later this week Fully Croisened will be announcing its first game...

Here's the title screen, stay tuned for details on the entire game coming up later this week!


--Croisened

Saturday, June 18, 2011

Exciting Night

Tonight www.fullycroisened.com is official and is the creative division of NJR Studios, LLC

I couldn't be more excited and want to say thanks to Ansca Mobile for the wonderful CoronaSDK product that has given a solo indie developer like myself affordable opportunities to pursue what I love doing.

With several local app successes, looking to take it to the next level and bust into the App Stores!

The site is still in it's infancy, looking to bring it along over the coming days, also look for the first game announcement coming soon!

More tomorrow, gotta get to bed at some point!

   --Croisened

Sunday, May 22, 2011

Face To Face Salon "Deal of the Day" Application

Excited to add another great company into the Deal of the Day app program!

Welcome Face To Face Salon and congratulations on having your own App to connect with your customers! This app offers customers of the salon a chance each day to win a great discount to redeem for in-store services!





Another app created with 

Cross-platform Mobile App Development Showcase

Monday, April 25, 2011

Amber Rays "Deal of the Day" Application

Amber Rays "Deal of the Day" mobile application contains store hours, contact information and most importantly users can rub off the virtual scratch ticket each day for a chance at great discounts and possibly even free things in the store!

Who doesn't love lottery scratch cards?  If you're tanning at Amber Rays you gotta have this app!

This application is currently available on the Android marketplace and is pending review in both the Apple App Store and on the Amazon Marketplace!

It is currently supported on Android devices.

****Update Version 2****

Overhauled the interface and created some tanning tips.






**********************



 

Mobile Development Showcase

Friday, April 22, 2011

Update Detroit Lions Schedule for 2011

Here is the first revision to my Detroit Lions schedule for the season, now available on both Android and iOS!

Mobile Development Showcase

Thursday, April 21, 2011

Corona UI "Themes"

Tonight I'm working with the new Corona UI and created a "blue" theme of all the controls, here is the coffee sample in fashionable blue that I have created for a my update to the Detroit Lions schedule that will be coming out this weekend.  If you have an interest in other colors let me know and I can help create them for you.   Also note these images are running on the Android emulator using "zoomStretch" in the config.lua file.


 

Saturday, April 9, 2011

Setting up iMac for Mobile development with Corona SDK

I have officially made the move to MAC, of course I still use my Windows stuff on a VM utilizing parallels, but this post is about the feat of strength to stand up my mobile development environment on this new foreign machine to me and it ends with a successful deployment to my Android phone...

My main reasons for making is the switch is that I have decided on using Corona SDK for my mobile middleware.  I have done native Android development, but to pick up yet another language to port to iOS is just not very appealing.  With Corona, I can use Lua scripting and write my code once and deploy to both Android and iOS - perfect!

The toolsets I use:

  • Eclipse
    • Helios edition
    • Android SDK
    • Java Runtime
    • LuaEclipse (Lua 5.1 plugin for Eclipse)
  • XCODE - developer tools for mac and needed for iOS development
  • Corona SDK
Lets begin...
  1.  Install Eclipse    (This step is pretty straight forward, no surprises, just pick the version you want)
  2. To get Lua integrated with Eclipse, you have some hoops to jump through, i relied heavily on this post which was quite helpful.  LuaEclipse  The main catch is that you are going to need XCODE installed in order to be able to use macports to grab the Lua interpreter and profiler that you will subsequently setup within Eclipse.  (Keep in mind if you are working with Corona, any text editor will do since their are limited editors with text highlighting and auto completion for te Corona API's, but for my taste I want to continue working within Eclipse as much as possible in case I go native on android I'm good to go.)  Again, trying to use as many common tools and write once approaches as possible to get on both Android and iOS.
  3. Pull down the Android SDK - not bad on this step just follow the steps on Android SDK Install Guide
Gotcha's....
  • There's a step after installing luarocks from macports where you need to allow luarocks to run as a privileged user - this was foreign to me and later I found to just get to the file in Finder and click the little pad lock and enter my master password, change the permission and lock it back down - not too bad
  • This is more of a Corona thing, but when I got my first application published to my phone I couldn't get the correct icon to display in the applications menu, this is because they need to be correctly sized and named beginning with Android 2.2 as such:
    • Icon-hdpi.png  72x72 pixels
    • Icon-mdpi.png 48x48 pixels
    • Icon-ldpi.png 36x36 pixels
    • Also, for earlier versions you need an icons folder in your solution and just an icon.png file of 48x48
Well that's it for now, after a couple hours pulling all this together I have a nice workflow environment that I feel at home with to code for both Android and iOS utilizing the Corona SDK for emulating and building and Eclipse for my Lua script editing.




Sunday, January 30, 2011

Blender Weekend Challenge #417

This weekends challenge the theme was "what goes up must come down" so for my entry I created this simple scene...

Wednesday, January 26, 2011

Offroad Tires in Blender 2.5

Tonight I created some offroad tires in Blender 2.5

I'll try to get a tutorial put together outlining the techniques I used to create these later this week.  I'm really pretty happy with as it's one of my first project that I started with exactly 1 vertex as opposed to some other prim like a box or cylinder.

Here's the quick versions of how I did it...

  1. Selected a tire as a reference, in this case I just wanted a tread pattern to target, not shooting for an exact match as the end result.
  2. I created one strip of the tread pattern, placing quads around the treads I wanted.
  3. Once I had created one repeating section, I duplicated it, slid it over and rotated 180 and lined up where the treads would meet.
  4. Slapped on an array modifier, bound to a bezier circle and some tweaking to the offset to merge the first and last points correctly.
  5. This mesh is smoothed and edge clipped but no Sub-D
  6. For the rims I just drew a quick rim profile something like  "-________-" then spun it 360 degrees from top view, set the spacing to a number divisible by at least (2 * num of spokes you want) For me this was 20.  5 rims means I can make a couple interior edge loops and extrude every other 2 faces nd it comes together nicely in the middle.  A real quick an dirty way for a rim.
  7. Finish by removing doubles and recalc normals
  8. Finally, just some base material settings
Here is the result, no real materials or textures yet just some base colors...and the wheels are just a quick 10 minute throw together to stuff something in there.  I'll make a good wheel for them next.



Tuesday, January 18, 2011

Detroit Lions Schedule - Android Project

Now that the season is over, I threw together a quick placeholder image until the 2011 season schedule is finalized, then I will update it for next year.  Since we had almost 5,000 downloads on the Android Market I'm going to keep this project rolling as a tribute to Ndamukong Suh and the Lions.  If you are part of #TeamSUH, it's a great time to be a Lions fan!   I watched Suh turn the Huskers around and he is having the same impact on the Lions in his first year!  The future is bright for Detroit Rock City!  See you next season...

*****UPDATED*****
Now includes player roster and some 2010 Stats

Current Verision:



Tuesday, January 11, 2011

Modeling a Fender Jaguar in Blender

This past weekend I started modeling my Fender Jaguar in Blender.  Really practicing some modeling technique for various assets for games, etc.

  • I'm really liking the neck and body
  • Everything is box modeled except for the tuners, string posts and knobs which are based on cylinders
  • Doing the frets with array copy was awesome, hadn't used that feature before and yeah I will be all the time now, especially for machines and the likes
  • Once I get this completed I'll share the entire .blend project with anyone interested

After about 3 hours, this is where we are at...


Just threw in some diffuse on the base materials to distinguish some objects for this rendered still, but the next steps will be to finish the strings and bridge work then I will start in on the materials and texturing.  I'm hoping to finish this next weekend.

Here's a 360 degree video as well.... 

Making the move to Blogger!

All previous Croisened blogs can be located at www.croisened.com/blog but starting in 2011 I will be using this site instead.