Y-Corner

Navigation Menu

Android Studio: Disabling AAPT PNG Optimization with Gradle

Posted by on Mar 27, 2014 in Software | 0 comments

For those that are developing Android apps and are using a lot of pre-optimized PNG images, you want to update to the latest Android SDK Build Tools 19.0.3:
 
0.9.2
  • Aapt-based PNG processor is now default again while we investigate some issues with the old one.
  • flavorGroups have been renamed flavorDimensions and the DSL has been updated. The old DSL is still available until 1.0 at which time it’ll be removed.
0.9.1
  • It’s now possible to include a file when there’s a conflict during packaging:
      android.packagingOptions {
          pickFirst ‘META-INF/foo.txt’
      }

  • New PNG processor.
  • Should be much faster when processing many files
  • Fix issue where crunched png are bigger than original file
  • To revert to the old cruncher: android.aaptOptions.useAaptPngCruncher = true
    WARNING: We’ve seen reports of the new processor generating PNGs that make the app crash on GB
  • The plugin now enforces that all library dependencies have a unique package name.
  • To disable this you can use android.enforceUniquePackageName = false
  • WARNING: The ability to disable enforcement will disappear in 1.0
  • Fixes:
  • Generated POM files now have the proper dependencies even if the pom object is manipulated in build.gradle
  • libraryVariant API now gives access to the list of flavors.
  • fixed issue where changes to the manifests of libraries didn’t trigger a new manifest merge.
  • BuildConfig.VERSION_NAME is always generated even if the value is not set in the current variant.
  • BuildConfig is now packaged in libraries. This requires that all your libraries have a unique package name.
  • If you are disabling enforcement of package name, then you should disable packaging of BuildConfig with: android.packageBuildConfig = false
  • WARNING: the ability to disable packaging will disappear in 1.0

For those that are unfamilar with aapt, it is the SDK compile tool responsible for packing your app into an APK package. As part of the packing process, aapt also performs file optimization on certain media files, such as PNG files. It uses a built-in PNGcrush to reduce PNG file sizes as part of the process.  Normally, this is a good step to perform prior to building the APK. However, when you have already optimized your PNG files with tools like TinyPNG and offer greater savings than PNGcrush, this step is completely unnecessary. Also, it greatly adds to the compile time for building your Android application.

While developing Dragon Geo, I was always suspicious on why my APK was much larger than it should be, given my already optimized PNG files. However, it now makes sense with the latest update notes on the Android SDK Build Tools, as it seems that for the longest time, the PNG processor in the aapt was not checking whether the ‘crushed’ PNG files were actually smaller than the original PNG files it was crushing! Google finally mitigated this issue by fixing aapt in 0.9.1. Along with this long-awaited fix, Google has now made it possible for Android Studio/Gradle users to use the new PNG processor in aapt with the following change in the build.gradle configuration file:
android {
    ..

    aaptOptions.useAaptPngCruncher = false
}

Although the new PNG processor is disabled in 0.9.2, it is still possible to use the new PNG processor in aapt with this command. I recently tested this Gradle configuration for the Dragon Geo app to see the difference in APK size from the older builds. In the case for Dragon Geo, the size reduction was dramatic; the APK size was roughly 4.8 MB smaller! Although a few Android developers have reported issues with the new PNG processor in aapt, I have found no bugs in Dragon Geo with this new build configuration. Read More

Microsoft Offering $100 to Switch from Windows XP

Microsoft Offering $100 to Switch from Windows XP

Posted by on Mar 24, 2014 in News, Software | 0 comments

If you’re still using Windows XP, you may want to take notice, as Microsoft is offering $100 USD to switch. The only catch? The $100 credit must be used to purchase a new Windows 8.1 PC/laptop.

The only catch is that you have to upgrade to a new Windows 8 computer.

Those who are eligible for the promotion can redeem the credit at Microsoft’s online store or their retail shops — and the fact that you still use the 13-year old Windows XP is subject to verification by Microsoft (MSFT, Fortune 500). The offer is good for PCs ranging in price from $599 and $2,299 and will run until June 15.

The promotion is part of Microsoft’s plan to get the last remaining Windows XP users off the operating system before the April 8 end of life date. After April 8, Microsoft will no longer issue security updates to address viruses and exploits to the operating system.

Given that Microsoft is ending support for Windows XP on April 8, 2014, it is highly recommended to either upgrade to a newer version of Windows, or switch to a more modern operating system. Otherwise, you risk being exposed to a multitude of security vulnerabilities.

Source: CNN Money – Microsoft will give you $100 to buy a new PC Read More

Game Developers Conference 2014 (GDC 2014) – Wrap Up

Game Developers Conference 2014 (GDC 2014) – Wrap Up

Posted by on Mar 18, 2014 in Gaming, General, Hardware, Mobile, News, Software | 0 comments

GDC '14 - Bustling with activity at the Career Center.

GDC ’14 – Bustling with activity at the Career Center.


This past week, I had a chance to attend the Game Developers Conference in San Francisco, a huge annual conference for game producers & developers. As this was my first GDC, I was thrilled to have the opportunity to meet professionals in the gaming industry, attend seminars on game development, as well as seeing the latest games and technology on display. 

GDC '14 - GDC attendees getting an opportunity to try out Oculus Rift.

GDC ’14 – GDC attendees getting an opportunity to try out Oculus Rift.

GDC ' 14 - Unity promoting the Unity gaming engine to game developers.

GDC ‘ 14 – Unity promoting the Unity gaming engine to game developers.


While the first two days of GDC came and gone with little fanfare, things became a bit more interesting when the Career Center and the Expo Floor opened up on Wednesday. Companies like Oculus and Unity were in full force on the floor. Oculus, riding on the growing interest into virtual reality technology, were demonstrating the full capabilities of what the Oculus Rift VR headset had to offer for the next generation of games. As for Unity, they were heavily touting it’s capabilities as a versatile gaming engine that supports most (if not all) current gaming platforms, as well as high-profile games that were developed with Unity.

GDC '14 - The Sony PlayStation exhibit at GDC.

GDC ’14 – The Sony PlayStation exhibit at GDC.

GDC '14 - Valve's exhibit at the GDC.

GDC ’14 – Valve’s exhibit at the GDC.

GDC '14 - Valve's SteamBox, a PC running SteamOS.

GDC ’14 – Valve’s SteamBox, a PC running SteamOS.

GDC '14 - The controversial SteamOS controller.

GDC ’14 – The controversial SteamOS controller.


Some of the biggest announcements at GDC included Sony’s Project Morpheus, a VR headset similar to the Oculus’ Rift headset.  Another large announcement was Valve’s unveiling of the latest version of the SteamOS controller, considered to be controversial due to it’s unorthodox game controller layout. Along with the new controller, Valve was also demonstrating the SteamOS and the SteamBox PCs over at it’s booth.

GDC '14 - Intel at GDC, promoting it's Iris Pro GPU's abilities.

GDC ’14 – Intel at GDC, promoting it’s Iris Pro GPU’s abilities.


Hardware companies like Intel, AMD, and nVIDIA were also at GDC, demonstrating what their hardware can do for game developers. With Intel, they were promoting Iris Pro (Haswell’s integrated GPU) and it’s gaming performance. The message that they wanted to deliver was that the Iris Pro was capable of running the latest games (albeit at lower settings compared to nVIDIA & AMD’s GPU solutions).

GDC '14 - AMD demonstrating EyeInfinity with Battlefield 4.

GDC ’14 – AMD demonstrating EyeInfinity with Battlefield 4.

As for AMD, they were focused on promoting EyeInfinity, their triple monitor solution for gaming, as well as Mantle, an AMD API that allows developers greater access to AMD’s GPU capabilities on a lower level.

GDC '14 - nVIDIA's exhibit at GDC.

GDC ’14 – nVIDIA’s exhibit at GDC.

GDC '14 - nVIDIA's GRID rack server on display.

GDC ’14 – nVIDIA’s GRID rack server on display.


Over at nVIDIA’s booth, they were promoting their latest Tegra 4 SOC solution, as well as nVIDIA GRID, a cloud game streaming service that nVIDIA is currently promoting.

GDC '14 - A GDC attendee playing Crypt of the Necrodancer with a DDR mat.

GDC ’14 – A GDC attendee playing Crypt of the Necrodancer with a DDR mat.

GDC '14 - Bit Bros., a 2D fighting game that plays similarly to Nintendo's Smash Bros. series.

GDC ’14 – Bit Bros., a 2D fighting game that plays similarly to Nintendo’s Smash Bros. series.

de with the large game & hardware companies, part of the Expo Floor was dedicated to Independent Game Developers, where the latest and greatest indie games like “Papers, Please”, “Crypt of the Necrodancer”, “The Stanley Parable”, and many others were on display. GDC has always had a large focus on independent game developers, but this year, indie game developers were definitely in force, as many of the indie games on display were quite intuitive and most importantly, fun to play.

GDC '14 - The Videogame History Museum Exhibit at GDC.

GDC ’14 – The Videogame History Museum Exhibit at GDC.


Outside of the Expo Floor, I encountered an interesting exhibit, the Videogames History Museum. It was an exhibit dedicated to the history of arcade and console gaming, with classic consoles like the NES, SNES, Atari, N64, Genesis, GameCube, Game Boy, Virtual Boy, etc. on display. There were several stations where gamers could reminisce and play these classic consoles; I was able to get a chance to play E.T.: Phone Home (a game that was largely responsible for the 1983 video game crash), as well as a few rounds of Super Smash Bros. Melee. The exhibit was definitely a trip down nostalgic road for me.

GDC '14 - Game Developer's Choice Awards

GDC ’14 – Game Developer’s Choice Awards


On Wednesday night, the Game Developer’s Choice Awards 2014 was held. It’s similar to the People’s Choice Awards, except that the winners here are games and their developers. A significant portion of the GDC Awards were dedicated to indie games, showcasing how far indie games have come in recent years. What I found surprising is that a large amount of the awards were given to the indie game “Papers, Please”, winning five awards for categories such as Best Narrative, Visual Art, etc. Another big winner was Naughty Dog’s “The Last of Us”, a great game that rocked the gaming world last year.

With GDC ’14 concluded, I am still in awe over all the announcements, games/tech that were on display, and more importantly, the advice I received from game designers and professionals. As I have started the journey back into software development in the past year, I was initially overwhelmed, as I felt at times if I could ever get back to speed with what game companies are looking for in developers these days. However, I also gained insight and a better direction of where I should focus my software development skills on.

Read More

Project Geo Unveiled! Introducing Dragon Geo

Project Geo Unveiled! Introducing Dragon Geo

Posted by on Mar 12, 2014 in Gaming, Mobile, News, Software | 0 comments

Project Geo, now unveiled as DRAGON GEO today, is an interactive map app akin to Google Maps, but displays maps from Square-Enix’s lesser known RPG series, Dragon Quest. Those of you that have been playing RPGs since the early days of the original NES will better recognize this series as Dragon Warrior. DRAGON GEO allows for viewing world, region, castle, town, dungeon, and shrine maps from Dragon Warrior / Quest I-VI. It also includes maps from the remake versions that later appeared on the Super Famicom, Game Boy Color, and Nintendo DS. As an added nostalgic touch, the entire interface uses the old Dragon Warrior command window style, complete with music and sound effects from the original Dragon Warrior / Quest games. If you’re a Dragon Warrior / Quest fan, you’re in for a big treat!

More about the origin of DRAGON GEO: Project Geo was originally used as a way for me to get familiar with Android development, roughly four months ago from today. During development, I’ve learned quite a bit about developing on the Android platform, such as programming gestures, loading and playing media files, displaying large images, UX design  handling memory optimization issues, and much more. Although I still have far to go in terms of Android development (and mobile development in general), I’m proud to have been able to put out a quality first app that I quite enjoyed working on in the available spare time I had. I’d like to thank the sites & people that have made these maps and sprites available online.  Without them, DRAGON GEO would not be possible:

  • D-Navi
  • Dragon’s Den
  • FlyingArmor
  • King Zenith
  • NES Maps
  • NES SNES Sprites
  • Realm of Darkness
  • RPG Legion
  • Sprite Database
  • x_loto
  • Zophar’s Domain

Also, many thanks goes out to my friends who have dedicated their time to beta testing out DRAGON GEO:

  • Ashwin Kamath
  • Steve Chou
  • Joey Dorpat
  • King Zenith
  • James Spencer
  • Dan Smoliak
  • Jesse Thomas

DRAGON GEO is now available for download on the Google Play Store. If you have an Android device, be sure to check it out! I’ll be making improvements to the app from time to time.
 
en_app_rgb_wo_60.png

Read More

Happy New Year and the Latest Updates

Posted by on Jan 17, 2014 in General, Mobile, Software | 0 comments

Happy New Year!

Hope everyone had a great holiday season! Although it’s been quite some time since my last post, I wanted to let everyone know that I didn’t pass away or abandon the blog. Ever since I returned from California in October (great trip BTW), I’ve been quite busy, mostly focusing on my efforts into transitioning into the world of mobile software development, amongst many other things.

In particular, I have been heavily focused on Android Development, working on a new project that I began in late November. Unlike previous Android projects, the end goal of this project was to produce a unique, high-quality app that could be downloaded on the Google Play Store. During the development of this project (dubbed “Project Geo”), I have learned quite a bit about developing on Android platforms, including best practices and system limitations (i.e. memory limitations). With the experience of working on Project Geo, I can say that I am much more comfortable with Android Development now compared to a few months ago, but there is still much to learn.

The best news is that Project Geo is nearing completion and I hope to release it onto the Google Play Store within the next few weeks. Read More

Twin Cities Code Camp 15 Sessions Posted

Posted by on Oct 6, 2013 in General, Software | 0 comments

After an eventful two weeks in the Bay Area, I’m back in Minnesota. It was great to meet and interact with a lot of the professional developers out there, as well as going to awesome seminars and workshops over at Twitter HQ and Kabam Games. Now that I’m back, it’s time to get back into the groove of things.

In other news, Twin Cities Code Camp 15 is coming up in two weeks! The list of sessions for the TCCC15 is now available and can be seen here: http://www.twincitiescodecamp.com/TCCC/Fall2013/Sessions.aspx

As a reminder, TCCC15 will be held on Saturday, October 19, over at Keller Hall on the University of Minnesota TC campus. It is a free event to the public. The registration link can be found here: http://tccc15.eventbrite.com

If you are a developer here in the Twin Cities area, I highly recommend attending this event, as it’s a great way to gauge the current developer trends, as well as networking with other developers in the area. I will be attending TCCC15 and will be covering the event. Read More

Super Smash Bros. Brawl 3D Model Viewer

Posted by on Oct 3, 2013 in General, Software | 0 comments

I just uploaded (on GitHub) the source code for the Super Smash Bros. Brawl 3D Model Viewer XNA 4.0 Game Studio that I worked on with a friend a few years ago. You can find the source code under my GitHub account (huhx015). The program requires 3D models and audio assets to compile, but I have omitted the content files, for cooyright reasons.

For those that are unfamiliar with the XNA framework, it was a library that Microsoft had made available to indie game developers to promote the development of indie games on the Xbox360 and Windows Phone platforms. XNA was a great way to get into developing games relatively quickly, as the framework’s libraries made building a 2D/3D game far more simpler. However, with the switch to Windows 8 & Windows Phone 8 platforms and focus on the unified RT framework, Microsoft decided to kill off XNA.

RIP, XNA. Read More

Gradle for Android at Twitter HQ

Posted by on Sep 24, 2013 in General, Software | 0 comments

It’s been a great time being here in the Bay Area, as the weather here has been nothing but stellar. Earlier this evening, I had the opportunity to attend a Gradle for Android event over at Twitter’s headquarters in San Francisco. It was quite the attendance, as  300 developers were present for the event. The speakers for tonight’s event was Hans Dockter (founder of Gradle), as well as Twitter engineers Jonathan Le and Jake Ouellette.

For those that are unfamiliar with Gradle, Gradle is a build system that has been recently gaining a lot of traction among developers. Back at Google I/O earlier this year, Google announced that Gradle would be integrated into their new Android Studio IDEAJ-based IDE. As Gradle for Android is still quite new, along with Android Studio still essentially considered a beta product, it’s still a work in progress, with Android developers encountering some minor issues with building their apps.

Hans Dockter gave an overview of Gradle, along with demonstrating it’s build capabilities and functionalities in Android Studio. Dockter also talked about what to expect from Gradle as it’s tools mature for the Android platform. Along with Hans, Jonathan Le and Jake Ouellette spoke about their experiences with Gradle for their roles at Twitter.

Le, being the designer of the build system for the Android version of Twitter, discussed the process they went through to implement Gradle, as well as comparing the end results of Gradle versus their previous build tools they used for Twitter 1.0 – 4.0. Le noted that with Gradle, build times were significantly reduced, to roughly around 20-30 seconds versus 2 minutes with their old build tools. Ouellette, flying down from Seattle, also offered his experiences with Gradle in Crashanalytics.

Overall, it was a great event to learn more about Gradle for Android, along with being able to meet with many of the local Android developers here in San Francisco. I will update this post at a later time with a YouTube URL of this event, as Twitter will be making the video of this event available to the public. Read More

Registrations for Twin Cities Code Camp 15 Now Open!

Posted by on Sep 4, 2013 in General, News, Software | 0 comments

With the fall season now upon us, the time for the next Twin Cities Code Camp event is coming up pretty soon. Registrations for TCCC15 is now open and like with previous TCCC events, the event is completely free. TCCC15 will be held on October 19, 2013 from 8 AM – 5 PM and will again be held in Keller Hall over at the University of Minnesota. The link to register for the event can be found here: http://tccc15.eventbrite.com/

For those that have never been to the Twin Cities Code Camp event, it is a all-day event filled with seminars about the latest development trends and useful programming advice. In the past, the TCCC largely attracted a .NET crowd, but in the recent TCCC events, there have been an increasing number of seminars focusing on mobile and web development, especially with JavaScript. 

Whether you are an experienced developer or new to software development, there is something to learn for everyone. It is also a great event to meet with local developers in the area, as previous TCCC events have typically drawn in roughly 300-400 people. I plan on attending the event and like with previous TCCC events, I will be covering it in detail. Read More