Planet Gamedev

Game AI for Developers

BROADCAST: Scaling AI for Open Worlds in Saints Row 4 (April 30th)

by Alex J. Champandard at April 24, 2014 11:00 PM

BROADCAST: Scaling AI for Open Worlds in Saints Row 4 (April 30th)

This upcoming broadcast on Wednesday, April 30th at 19:00 UTC will take place online within your browser using streaming audio/video:

“In this AAA interview, join Aaron Canary for a peek behind the scenes of the AI technology in Saints Row 4, the critically acclaimed open world game. What techniques were required to scale to a large world, and support multiple factions? How were the behaviors of NPCs implemented to support such a diversity in gameplay? Tune in on Thursday at 18:00 UTC (to be confirmed)!”

To subscribe for email reminders and check the exact time in your current timezone, visit this broadcast's page on AiGameDev.com.

Game From Scratch

Using Microsoft’s Azure for your game’s server

by Mike@gamefromscratch.com at April 24, 2014 07:35 PM

 

This post actually came about by accident.  I’ve been playing around with Telerik’s recently open sourced Kendo UI suite and I found myself needing a web back end.  Of course I could have used my own server, but every time you do something like that you open up another potential security concern.  Ages ago I did an HTML5 tutorial where I used a free version of Heroku Node hosting and a CouchDB back end, but truth is, it was kindof a pain in the ass.  This time I decided to take a look at the state of Azure and see if it was an appropriate option.

 

So what exactly is Azure… well, that’s a confusing thing to answer.  Basically it’s Microsoft’s ____________ as a service offering.  In the ___________ you can insert the words platform, database, cloud, etc.  Basically it’s a number of cloud based offerings, from straight VM based hosting like Amazon’s EC2, to a cloud based SQL server.  What we are most interested here is “Mobile”, which is a scalable back end for mobile software and websites.  This is a way for you to deploy your code to the cloud and let someone else worry about the infrastructure, scaling, backups, etc.  It is most similar to solutions like Heroku and Google App Engine, it straddles the point between running your own servers and using a prebuilt gaming solution.

 

This article looks at Azure for smaller mobile or HTML5 games.  Things like scoreboards, matchmaking, cloud saves, that kind of thing.  If you are looking at creating a server heavy game such as an MMO you need to look elsewhere, like here.

 

So, why Azure Mobile?

  • no server to maintain
  • easy scaling
  • a free tier is available for just getting started
  • it’s pretty cheap ( relative term of course )
  • it’s Microsoft.  They’ve literally spent billions creating Servers. Bandwidth and uptime should never be an issue
  • it’s not Google.  Every time I use a Google technology like App Engine, I want to punch a donkey
  • JavaScript and now, C# backends
  • Visual Studio tooling support
  • Authentication and Notifications built in ( Google, Twitter, MS, Facebook, etc… ).  Normally a huge pain point
  • As hard as it is to believe, they are probably better at security than you

 

Why not?

  • JavaScript/C# only… want Rails for example, Mobile isn’t for you
  • Can be confusing as hell.  Documentation isn’t as good as it should be
  • Visual Studio…  some people hate it.  It’s clearly easiest working in VS, but VS can be a daunting beast
  • It’s Microsoft, for some people this is a huge negative.
  • Less control

 

So… Costs?

 

First thing you have to head over to http://azure.microsoft.com/ and sign up.  A bit of a warning, you need to sign up and give a valid credit card, but you don’t have to pay anything.  When prompted select a Pay As You Go plan.  Oh yeah, costs, like talk about that for a minute:

 

image

 

Oddly enough, changing the region has no effect on the price.  So basically you can start for free for up to 1/2 million calls per month from 500 devices and a total of 20MB of data.  At the free tier you can have up to 10 different “services”, which considering a service can have tons of API calls, isn’t really a major limit.

When you jump into the “pay” tier, you are looking at 27$ a month per “unit”.  A unit is a theoretical computing unit, for which I couldn’t for the life of me find the definition of ( in Amazon, it is strictly defined as for example 1x 1.7ghz core, 768MB RAM, etc… ) anywhere.  API calls are tripled up to 1.5M per unit.  As you can see, the BASIC tier is the first one that allows you to start scaling up performance as needed.  So if your site is getting slammed, you can crank the processing power up to 6X the base.  Perhaps the most important aspect is there is no longer any device limits… so if you have 10 users or 10 million, same price for you.  Standard basically 10X’s the resources but at about 8X the price.

 

So, what about data costs?  20MB is obviously a pretty small amount, what’s this cost?  This is pretty straight forward as well:

 

image

 

So basically > 20MB and < 100MB is $5.27 a month.  Then another $5.27 to raise that cap to a GB, then basically a lowering amount for each additional GB as you add more, eventually settling at about 1$ a GB a month.  Trying to do direct pricing comparison to Amazon is tricky, as the bill in a completely different manner.  For example, storage for their RDS MySQL hosting is only 12.5 cents a GB however you pay for processing, transactions, etc.  Frankly it was the confusion of Amazon pricing that lead me to choose SoftLayer ages ago.

 

Creating a Mobile Services service

 

Everything is managed from the Azure portal and for the most part it’s pretty straight forward.  Its located at http://manage.windowsazure.com

image

 

All your various Azure services, websites, databases, etc… are available down the right hand side.  For now we just care about Mobile Services.

To get started, Click the Mobile Services tab then the + NEW in the bottom left corner.

image

 

Now simply click Create

image

 

The process is about as easy as it gets.  You need to select a unique ( across Azure, not just your projects ) prefix for the URL.  The key question is what kind of Backend you want, JavaScript or .NET.  I personally like .NET so that is what I am going with.

image

 

Finally you configure your database settings and then you are done:

image

 

Enter Visual Studio

 

Now head back to the Mobile Services tab if it doesn’t take you there automatically.  Now you want to select an App type ( it really doesn’t matter ), then download the project file.

 

image

 

The download file is simply a Visual Studio solution coupled with a NuGet install.  Extract the archive then double click the sln file to open it in Visual Studio.  Don’t worry, this works fully with the free version of Visual Studio if that’s what you’ve got.

It should look something like this:

image

 

Don’t worry, it’s nowhere near as complicated as it looks.  By default the project comes with a working value TodoItem.  You can go ahead and run your Mobile Service, it works 100% locally, which is kinda cool.  Press F5 and you will see:

image

 

Click Try it out and you will see the scaffolding it created for you:

image

Pretty cool.  Keep in mind, HighScore was created by me, so you wont have that. 

 

Mobile Services works just like any typical RESTful service.  You make a request using URLs, for example http://localhost:51289/tables/TodoItem (your port number will vary!) returns:

image

While http://localhost:51289/tables/TodoItem/1 returns the TodoItem with the id 1, like so:

image

Of course a complete description of REST is wayyyyy beyond the scope of this tutorial.  For more details IBM did a pretty good job explaining them, but there are hundreds of similar documents on the web.

 

Finally some freaking coding

 

Now let’s add our own service.  First let’s create a Controller.  A controller is basically what maps a URL to an action.  In your solution, right click the Controllers folder, select Add and Controller, like so

image

 

Select Web API 2 Controller – Empty

image

Then click Add.

 

In the dialog, name it.  This is going to be about the easiest controller you’ve ever seen in your life.  The Hello World of web services.

image

Now let’s look at some code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace arghService.Controllers
{
    public class HelloController : ApiController
    {
        public string Get()
        {
            return "Hello World from GET request";
        }

        public string Post()
        {
            return "Hello world from POST request";
        }
    }
}

 

Now if you request /api/Hello/ either via POST (form) or GET (url), it will return a Hello string.

 

Of course, this example isn’t really all that useful, let’s try and create a more useful service, a simple high score board.  First we need a datatype to store our highscore’s in.  Simply right click the Models folder and select Add->Class…

image

 

Name it HighScore.cs and click Add.  Add the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace arghService.Models
{
    public class HighScore
    {
        public int Id { get; set; }
        public int Score { get; set; }
        public string Name { get; set; }
    }
}

 

Now add a new Controller, just like before.  This time call it HighScoreController.cs.  Let’s take a look at some code:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using arghService.Models;
using Microsoft.WindowsAzure.Mobile.Service.Security;

namespace arghService.Controllers
{

    public class HighScoreController : ApiController
    {
        public static List<HighScore> scores = new List<HighScore> {
            new HighScore {Id=1,Name="Mike",Score=42},
            new HighScore {Id=2,Name="Bob",Score=43}
        };

        protected override void Initialize(System.Web.Http.Controllers.HttpControllerContext controllerContext)
        {
            base.Initialize(controllerContext);
        }

        public IEnumerable<HighScore> GetAllHighScores()
        {
            return scores;
        }


        [HttpGet]
        public IHttpActionResult GetHighScoreByName(string name)
        {
            var score = scores.FirstOrDefault((s) => s.Name == name);
            if (score != null)
                return Ok(score);
            return NotFound();
        }

        public IHttpActionResult PutHighScore(HighScore highScore){
            scores.Add(highScore);
            return Ok();
        }
    }
}

 

Run this code and then in the generated help page you will now see:

image

Click the PUT api/HighScore link and you can test your new service out clicking the Try This Out link.

image

 

Now try out the GET api/HighScore link and you will see your new entry in the results:

image

 

So there you go, an ultra simple REST web service exposing a high score list.  Granted, the code is pretty awful.  It’s not thread safe, it has no persistence when the server ends, no security, etc.  But it illustrates how simple the basics actually are.

 

Going Live

 

Now that you’ve got your service working locally, its time to deploy to Azure.  Fortunately it’s as simple as right clicking your project and selecting Publish:

image

 

To configure your publish profile, you can download this from the Azure Mobile Services portal.  In the Dashboard tab, select Download publish profile.

image

 

And now your Azure service is online, assuming there were no errors.  Mine for example is at http://argh.azure-mobile.net/.  Now here is one of the infuriating parts of dealing with Microsoft…  no matter how far I search, I cant figure out the authentication being requested here if you want to access the generated HTML5 scaffolding.  Fortunately it shouldn’t matter at this point, as you should only be accessing your service from code at this point.

 

 

Let’s look at calling our service in Fiddler.

Here is a request:

image

And here is the response:

image

 

Woot!

 

Other nice things

 

There are a few other perks to using Azure…  first is the out of the box authentication options:

image

 

Writing OAuth code is frankly a bit of a pain in the ass, so its nice to see Microsoft have taken care of it for you.  So if you want your users to authenticate against Twitter, Facebook, Google, etc… it’s incredibly simple.

 

The Database.  We never each touched on the SQL side of Azure and it makes your life pretty easy.  Basically it works just like the Azure project did, you download a local project to work and test with, then deploy it back to Azure:

image

 

You have a standard SQL Connection string you can connect with, so you can treat an Azure database just like any other local or remote DB.

 

Push Notifications.  Just like they have made authenticating to multiple services easy, so have they done with push notifications:

image

Windows, Windows Phone, Apple and Google Notification are all supported.

 

Automatic scaling…

image

While not supported on the free tier, you can easily set up your service to scale up when needed, or perhaps more important, to not scale up.

 

 

All told, Azure is a pretty impressive service but needs better documentation.  You spend a lot of time trying to work out things that should be extremely simple ( not what account to log in with… ), but what is there is pretty intuitive.  The scope of Web API ( the library used for actually writing the code ) is massive and again, could use some better documentation.  Normally MSDN is a bastion of information, but in this case, the pickings are pretty slim.

 

From my experiences, this is vastly more polished than Amazon’s offerings… or at least, easier.  That said, Amazon has an entire ecosystem built over their offerings that provide that polish for you.  Google…  well it’s just crap frankly.  Besides after they pulled this and with their habit of killing of popular products rather suddenly, I wouldn’t dream of using their services personally.

Game Design Aspect of the Month

Good Free-to-Play Games (Part I)

by noreply@blogger.com (Sande Chen) at April 24, 2014 06:00 PM

In Part I of this article, indie game developer Howard Go expresses his philosophy on making good free-to-play games.

I begin this with a disclaimer: I am an indie game developer who just happens to make a living from making free-to-play games. I am one-half of a team of two. We’ve been making games full time for just over three years now.

Free-to-play games have gotten a lot of bad rep and this is more true as of late, especially as some games ruined what were good games by adding in-app purchases in an update or doing a sequel that suddenly changed the gameplay by going freemium or paymium instead of the solid premium paid game that they once were. And I think my opinions on freemium apply to paymium as well, so I might as well cover both.

This is part one of my view: whether freemium or paymium, if what you get initially is of value and then IAPs are introduced by way of packs or levels or some special premium value (and by this I include unlimited simultaneous multiplayer games and the removal of ads — I actually miss that in many games now), then it is entirely the player’s choice to feel I want more of the same fun and to determine if the packs/additions are worth their cost. They already got their money’s worth for what they paid for if it was initially paid and if they had fun for about an hour with a free game, then they can judge if spending money is fine for another similar hour (like a free taste of a dish to see if you want to buy a pack, snack, or meal). Obviously, I mean a good free-to-play game gave some amount value of value at the onset. My rule of thumb is about an hour of fun. That’s short for a console game, but decent, I believe for a mobile game. I’ve played some awesome paid games on mobile that I finished in an hour or two, and I felt I got my money’s worth (though wanting to play some more because I enjoyed it so much is another thing).

Just to be clear: I’ve spent plenty of money on arcade games, saved up to buy games for the consoles I’ve owned when I was younger, and still continue to spend a bundle on mobile games (paid, freemium, and paymium). And there are a number of games where I spent a lot of money on without thinking or feeling I was cheated. I believed I got my money’s worth. For anyone who spent more than a console game’s worth in the arcade or a mobile game to finish whatever game you were hooked on, you know what I am talking about.

This is part two of my view: whether freemium or paymium, if you need to spend in order to move forward in a game that does not involve packs or levels, but rather the ability to move forward is dependent on some energy level or being equipped with certain tools, weapons, or power ups before you can successfully continue, then it is very close to being poorly done or it is very obviously poorly done. The key, I believe, is in creating enough of an opening so that anyone who plays can continue down the road, playing through the levels without feeling that unless they buy an item, let’s say a gun, that they can only afford via an IAP (meaning grinding won’t work) will get them to move forward. Making a player wait is not a bad thing. Making a player ask friends for help is not a bad thing (for both player and game developer). Mobile games allow for breaks. Being told to wait a few hours before something can happen is fine. But there are limits. Basically, my rule of thumb is that if it will allow me to successfully grind because I persevere or progress because I am good at the game, then the IAPs do not ruin the game. The patient and the skilled can enjoy the game, not just the spender.

Temple Run, Subway Surfers, and Jetpack Joyride are all among my favorite endless (runner/side-scroller) games. They remain fun whether or not you spend. That you spend is entirely your choice and will not affect the fun value of the game in any way. I love that. Disco Zoo is a great game for grinders and for spenders. But some games are so unbalanced that grinding becomes too tedious too soon and the return of investment (in this case, time) is not felt. That’s a bad game right there. Much more so because it makes it clear to the player than only spenders will progress or, even worse, have any resemblance fun.

There are puzzle games that became almost insanely impossible to finish and only get harder and harder. I think the good ones allow the (re-)entry of easy levels enough times to make it fun for the player again. It says, here’s a break so you can enjoy the game again. Which is basically how I see any good RPG game. Easy enemies, followed by a tough boss, followed by easy enemies, almost ad infinitum. It’s what makes it playable.

Bad games, premium, freemium, or paymium don’t respect the balance.

Howard Go is ½ of MochiBits. His current interest in game design involves game balance, retention, and monetization. He taught philosophy for five years then sold out to work in the corporate world for seven years, finally escaping into the world of game development in December 2010.



iPhone Development Tutorials and Programming Tips

Example Source Code: A Slimy Stretching Transition Effect

by Johann at April 24, 2014 02:23 PM

Post Category    Featured iPhone Development Resources,Objective-C,Open Source iOS Libraries And Tools

Last week I mentioned a library providing a nice collection of animated transition effects, and have previously mentioned a tutorial on how to create interactive transitions.

Here’s a source code example showing how to create an interactive transition effect from Suyu Zhang inspired by the slimy interactive transition found within the Haze app called CBHazeTransitionViewController.

What’s interesting about this effect is how it stretches the view similar to the UIRefreshControl effect.

Here’s a video showing CBHazeTransitionViewController:

You can find CBHazeTransitionViewController on Github here.

An interesting unique transition effect.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Example Source Code: A Slimy Stretching Transition Effect

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Tutorial: Why And How To Implement Dependency Injection In Objective-C

by Johann at April 24, 2014 06:25 AM

Post Category    Featured iPhone Development Resources,iOS Programming Tools And Utilities,Objective-C

I’ve mentioned a number of dependency injection frameworks in the past including: the popular Typhoon framework, the Google Guice inspired Objection framework, and the Bloodmagic framework that uses simple custom property attributes.

Here’s a nice guide from Graham Lee on dependency injection with Objective-C.

In the guide Graham goes through in-depth as to what dependency injection is, and its advantages then goes through an example in code showing how to use dependency injection for cleaner and more manageable code.

You can find the guide over on the Big Nerd Ranch blog.

A nice guide on dependency injection in Objective-C.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Tutorial: Why And How To Implement Dependency Injection In Objective-C

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Two Objective-C Libraries For Easier Testing Inspired By Ruby’s Factory Girl And MBFaker

by Johann at April 24, 2014 12:20 AM

Post Category    Featured iPhone Development Resources,iOS Development Libraries,Objective-C,Open Source iOS Libraries And Tools

I’ve mentioned a number of libraries and tools to aid in testing, such as the UIAutomation framework that uses Objective-C.

Here are two libraries created to ease testing submitted by John Tumminaro – Foundry for creating test/mock objects inspired by Ruby’s Factory_girl, and Gizou inspired by Ruby’s MBFaker for generating sample data.

As John states in his submission:

“Foundry (and its sister project Gizou) are two libraries I built due to the lack of really great factory/mock data libraries for Objective-C developers. I really liked my experience with libraries like factory_girl in the Ruby universe and I took a lot of inspiration from it to create these two.”

Foundry allows you to easily build a spec and create objects like this example created from the readme:

@interface Person : NSObject <tgfoundryobject>
...

+(NSDictionary *)foundryBuildSpecs
{
    return @{
        @"name": [NSNumber numberWithInteger:FoundryPropertyTypeName],
        @"email": [NSNumber numberWithInteger:FoundryPropertyTypeEmail],
        @"password": [NSNumber numberWithInteger:FoundryPropertyTypeLoremIpsumShort]
    };
}

and create the specs you want like this:

// Let's build a single person first.
Person *fullPerson = [Person foundryBuild];

// Not enough, let's make 10 people!
NSArray *bunchOfPeople = [Person foundryBuildNumber:10];

Gizou provides extensive support for generating test data and not only allows you to create realistic data for names, emails and addresses, but also has support for test images, and nearby locations with a number of nice convenience categories.

Both projects are well documented with some examples included.

You can find Foundry on Github here.

You can find Gizou on Github here.

Two very nice libraries to simplify testing of Objective-C projects.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Two Objective-C Libraries For Easier Testing Inspired By Ruby’s Factory Girl And MBFaker

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Geeks3D Forums

NVIDIA NVFLASH 5.165

April 23, 2014 07:54 PM

NVFLASH 5.165

[code]
NVIDIA Firmware Update Utility (Version 5.165)

-- Primary Commands --
Update firmware:            nvflash [options] <filename>
Update UEFI firmware:       nvflash [options] --updateuefi <filename>
Sa...

ASUS GPUTweak 2.6.2

April 23, 2014 06:13 PM

download here

no changelog available

updated files since v2.5.9

gputweak.exe
monitor.exe
gpu_z.dll

exeio.dll

OpenGL Extensions Viewer 2.16 for Windows

April 23, 2014 03:51 PM

Download here

No changelog available, but "forward context 4.4" has been added


OpenGL Extensions Viewer 1.14 for Android

April 23, 2014 03:45 PM

Quote
OpenGL Extensions Viewer for Android displays the vendor name, the version, the renderer name and the extensions for OpenGL ES 2.0.

• Updated for Android 4.4

HWiNFO32 and HWiNFO64 v4.37-2180 Beta released

April 23, 2014 03:11 PM


HWiNFO32/64 v4.35-2180 Beta available.
Changes:

    Improved support of Haswell-E/EN/EP/EX.
    Fixed identification of Crystal Well-DT.
    Enhanced Broadwell and Skylake support.
    Improved DDR4 suppor...

iPhone Development Tutorials and Programming Tips

A Macro For Easy Clean Lazy Instantiation Of Properties In Objective-C

by Johann at April 23, 2014 02:41 PM

Post Category    Featured iPhone Development Resources,iOS Development Libraries,Objective-C,Open Source iOS Libraries And Tools

At this start of this month I mentioned an interesting project providing an NSString category that makes it easy to get UIColor selectors by name or value from Nicolas Goutaland.

Here’s another interesting project submitted by Nicolas that makes it easy to perform lazy instantiation (initialized only when used) of Objective-C properties saving on boilerplate code called LazyProperty.

Lazyproperty includes a simple macro that will automatically make properties use the lazy instantiation pattern (properties must be set to nonatomic, strong).

This source code snippet from the readme shows the macro in action:

@interface DemoViewController ()
...

// Lazy properties
@property (nonatomic, strong) SimpleViewController *simpleViewController; // Will be used modally
@property (nonatomic, strong) DetailViewController *detailViewController; // Will be pushed from tableview
@end

@implementation DemoViewController
...

// Magic happens here. Write macros at the end of the file, to keep it clean. Use property name
LAZY_PROPERTY(simpleViewController);
LAZY_PROPERTY(detailViewController);
@end

You can find LazyProperty on Github here.

A nice macro for easy lazy instantiation saving on code typing and making for easier memory management.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: A Macro For Easy Clean Lazy Instantiation Of Properties In Objective-C

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.



Open Source Pre-Permissions Library For Push Notifications, Reminders And The Calendar

by Johann at April 23, 2014 06:29 AM

Post Category    Featured iPhone Development Resources,iOS Development Libraries,Objective-C,Open Source iOS Libraries And Tools

Last week I mentioned the ClusterPrePermissions library that increases the percentage of people granting access to your app to use photos and contacts by asking the user for pre-permission before really asking permission to use photos and contacts.

Here’s a submission from Joe Law that expands on this concept but also allows you to add pre-permission dialogs for push notifications, reminders, and the calendar in addition to photos and contacts called JLPermissions.

Like ClusterPrePermissions with JLPermissions you can customize the alert presented to the user when they are asked for pre-permissions.

You can find JLPermissions on Github here.

A nice easy way to increase your chances of the user granting access.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source Pre-Permissions Library For Push Notifications, Reminders And The Calendar

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Gamasutra Feature Articles

Hack-Man: An interview with Watch Dogs' creative director

April 23, 2014 04:00 AM

Creative director Jonathan Morin reflects on Watch Dogs' development, and ponders what's next. ...

iPhone Development Tutorials and Programming Tips

Open Source Helper Library For Connecting With And Sharing On Google Plus

by Johann at April 22, 2014 11:50 PM

Post Category    Featured iPhone Development Resources,iOS Development Libraries,Objective-C,Open Source iOS Libraries And Tools

Earlier this month I mentioned a nice helper library for working with Google’s Direction, Map and Places API called LPGoogleFunctions.

Here’s a library submitted by Liviu Romascanu for those interested in creating a Google Plus client or adding Google Plus sharing into an iOS app called LLGooglePlusClient.

Specifically there are helpers for:

- Sign in
- Sign Out
- Sign out with application authorization removal
- Share a url and text
- Share a title, description, thumbnail, and url
- Serialize and share a dictionary

There are also notifications built in so you can track whether a login worked and a share was successfully sent.

You can find LRGooglePlusClient on Github here.

A nice library for easily implementing Google Plus sharing.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source Helper Library For Connecting With And Sharing On Google Plus

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.



Geeks3D Forums

AMD Catalyst 14.4 RC1 Driver for Windows

April 22, 2014 03:05 PM

Quote
Feature Highlights of The AMD Catalyst™ 14.4 Release Candidate Driver for Windows

        Support for the AMD Radeon™ R9 295X
        CrossFire™ fixes en...

iPhone Development Tutorials and Programming Tips

Open Source iPhone Component Allowing You To Easily Add An App Store Style App Discovery View

by Johann at April 22, 2014 02:24 PM

Post Category    Featured iPhone Development Resources,iOS UI Controls,iPad,iPhone,Objective-C

Here’s an app discovery component submitted by Appcornerit allowing you to place an app store style view within your apps for top apps within the app store called iTunesPicker.

iTunesPicker allows the user to see the apps on the charts in different countries within the view, different genres, types and users are shown a detailed app view when clicking on a selection with a link to the app store.

In the future music, books and movies will also be added.

Here’s an image showing the component in action:

iTunesPicker iTunesPicker

You can find iTunesPicker on Github here.

A nice easy way to add a picker for top app store apps into an app.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source iPhone Component Allowing You To Easily Add An App Store Style App Discovery View

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Xcode Plugin That Makes Issues Display In Full In The Xcode Issue Navigator (No More Ellipsis)

by Johann at April 22, 2014 06:17 AM

Post Category    Featured iPhone Development Resources,iOS Programming Tools And Utilities,Objective-C,Open Source iOS Libraries And Tools

Earlier this year I mentioned a nice plugin that automatically hides Xcode’s debugger plugin when you start typing in the source code editor called BBUDebuggerTuckaway.

Here’s another nice simple plugin from Boris Bügling enhancing the Xcode issue navigator called BBUFullIssueNavigator.

BBUFullIssueNavigator causes Xcode to display the entire issue in the issue navigator so there are no more ellipsis that need to be moused over in the issue navigator to view full content.

Here’s a  screenshot showing the full messages displayed in Xcode:

BBUFullIssueNavigator

You can find BBUFullIssueNavigator on Github here.

A nice simple plugin removing an annoying Xcode issue.

Added to the list of Xcode plugins.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Xcode Plugin That Makes Issues Display In Full In The Xcode Issue Navigator (No More Ellipsis)

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

iPhone Development Tutorials and Programming Tips

Open Source iOS Component For Customizable Flyout Menus With Xcode Storyboards Support

by Johann at April 21, 2014 06:29 PM

Post Category    Featured iPhone Development Resources,iOS UI Controls,iPad,iPhone,Objective-C

I’ve mentioned a number of pop out widget style menu components most recently DLWidgetMenu that responds to several different gestures and provides a number of different layouts.

Here’s an open source iOS component from Agus Soedibjo providing another nice implementation of the widget style fly-out menu called ASOAnimatedButton with a number of nice features.

Some of the features of ASOAnimatedButton include:

- Configurability within storyboards
- A two-state button that cahnges when the menu expands/closes
- A choice of several different animation styles
- Configurability of the speed, fade out, and bouncing effect

ASOAnimatedButton

You can find ASOAnimatedButton on Github here.

A nice component for creating animated pop-out icon based menus.


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source iOS Component For Customizable Flyout Menus With Xcode Storyboards Support

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Game From Scratch

The Unreal Engine 4 Rosetta Stone

by Mike@gamefromscratch.com at April 21, 2014 05:40 PM

 

Comprehending any large code base is never a simple factor.  This is especially true of C++ with hits heavily used (and abused) typedef system.  The Unreal Engine has a very well defined and consistent naming convention but trying to crack it can take a bit of effort, as it’s explained piecemeal throughout the documentation. RosettaStone That is, until I found the Coding Standard document, which frankly is the very first page a C++ programmer working with UE4 should start with.  This document is the titular Rosetta Stone, the method that makes reading UE code possible.

 

Understanding their naming conventions will help you a great deal when trying to work through code samples.  A few of their choices strike me as a bit unusual, especially if you were raised on Hungarian like I was.  Here are the naming convention:

  • The first letter of each word in a name (e.g. type or variable) is capitalized, and there is usually no underscore between words. For example, Health and UPrimitiveComponent, but not lastMouseCoordinates or delta_coordinates.

  • Type names are prefixed with an additional upper-case letter to distinguish them from variable names. For example, FSkin is a type name, and Skin is an instance of a FSkin.

    • Template classes are prefixed by T.

    • Classes that inherit from UObject are prefixed by U.

    • Classes that inherit from AActor are prefixed by A.

    • Classes that inherit from SWidget are prefixed by S.

    • Classes that are abstract interfaces are prefixed by I.

    • Most other classes are prefixed by F, though some subsystems use other letters.

  • Type and variable names are nouns.

  • Method names are verbs that describe the method's effect, or describe the return value of a method that has no effect.

Variable, method, and class names should be clear, unambiguous, and descriptive. The greater the scope of the name, the greater the importance of a good, descriptive name. Avoid over-abbreviation.

All variables should be declared one at time so that a comment on the meaning of the variable can be provided. Also, the JavaDocs style requires it. You can use multi-line or single line comments before a variable, and the blank line is optional for grouping variables.

All functions that return a bool should ask a true/false question, such as "IsVisible()", or "ShouldClearBuffer()". All boolean variables must be prefixed with a "b" character (e.g. "bPendingDestruction", or "bHasFadedIn").

A procedure (a function with no return value) should use a strong verb followed by an object. An exception is if the object of the method is the object it is in; then the object is understood from context. Names to avoid include those beginning with "Handle" and "Process"; the verbs are ambiguous.

Though not required, we encourage you to prefix function parameter names with "Out" if they are passed by reference and the function is expected to write to that value. This makes it obvious that the value passed in this argument will be replaced by the function.

 

This explains all the AClass and UProperty you will encounter through out the code, and explains the far to common FSomethings you see in the code..

 

There are a few things I find unwieldy about these choices.  First, I am so used to instances starting with lower case that this seems like Anathema to me.  Second, if you are going to prefix with all capital letters, why not BBoolValue instead of bBoolValue, this seems inconsitent to me.  Next, why F for types? Finally why SWidget and S instead of Widget and W?  WButton makes a ton more sense than SButton for example.

 

At the end of the day it doesn’t really matter, the most important thing is to be consistent, which they have.  Now with a thorough understanding of their naming convention, groking the code is a heck of a lot easier.

 

Also of great important are the C++ type usage guidelines.  This is both a power and flaw of working with C++, there are more types than grains of sand in the desert, so knowing which to use is critical.

 

Portable Aliases for Basic C++ Types

  • bool for boolean values (NEVER assume the size of bool). BOOL will not compile.

  • TCHAR for a character (NEVER assume the size of TCHAR)

  • uint8 for unsigned bytes (1 byte)

  • int8 for signed bytes (1 byte)

  • uint16 for unsigned "shorts" (2 bytes)

  • int16 for signed "shorts" (2 bytes)

  • uint32 for unsigned ints (4 bytes)

  • int32 for signed ints (4 bytes)

  • uint64 for unsigned "quad words" (8 bytes)

  • int64 for signed "quad words" (8 bytes)

  • float for single precision floating point (4 bytes)

  • double for double precision floating point (8 bytes)

  • PTRINT for an integer that may hold a pointer (NEVER assume the size of PTRINT)

Don't use the C++ int type in portable code, since it's dependent on the compiler how large it is.

 

So if you are just starting out with C++ programming in Unreal, start here, it will make the journey a lot easier.

 

Finally C++ 11 guidelines are also important.  C++11 support across compilers is by no means universal but many of the features of C++11 are pretty damned useful.  Keep in mind, these guidelines are for Unreal staff working on the engine, not the end user working with the engine, so if you are say… only using Visual C++ 13, then feel free to use whatever features you want.  If you want to target as many platforms as possible though, you should be mindful of these instructions:

 

C++ 11 and Modern Language Syntax

Unreal Engine is built to be massively portable to many C++ compilers, so we're careful to use features that are compatible with the compilers we can imagine supporting. Sometimes features are so useful that we'll wrap them up in macros and use them pervasively (such as the 'override' keyword), but usually we'll wait until all of the compilers we could imagine supporting are up to the latest standard.

We are utilizing certain C++ 11 language features that appear to be well-supported across modern compilers, such as the "auto" keyword, range-based-for and lambdas. In some cases we're able to wrap up usage of these features in preprocessor conditionals (such as rvalue references in containers.) However, certain language features we may opt to avoid entirely until we're confident we won't be surprised by a new platform appearing that cannot digest the syntax.

Unless specified below as a modern C++ compiler feature we are supporting, you should refrain from using compiler-specific language features unless they are wrapped in preprocessor macros or conditionals and used sparingly.

The 'auto' Keyword

The 'auto' keyword is supported by all compilers UE4 targets and you are encouraged to use it in your code where it makes sense to do so.

Remember you can and should use const, & or * with auto just like you would with the type name. With auto, this will coerce the inferred type to be what you want.

We encourage use of the auto keyword for iterator loops (eliminates boilerplate), and also when you are initializing a variable to a new instance (eliminates redundant type name.) Some of the other uses are more contentious, but feel free to use it however you want for now and we can learn and improve best practices as we go.

Tip: If you hover over a variable in Visual Studio, it will usually tell you the inferred type.

Range Based For

This is allowed in all engine and editor code and encouraged where it can help to keep the code easier to understand and more maintainable.

Lambdas and Anonymous Functions

Lambdas are now allowed, however we are cautious about use of stateful lambdas that capture stack variables -- we're still learning about where those are appropriate. Also, stateful lambdas cannot be assigned to function pointers which we tend to use a lot. We expect to update this documentation in the future as we establish best practices.

 

So, basically ranged based for loops, stateless lambdas good, stateful lambda bad and auto is a maybe.  For the remaining features that aren’t cross platform like override, they’ve provided preprocessor conditionals to work with them.  I really wish they listed them all here though.

Timothy Lottes

Nelo

by Timothy Lottes (noreply@blogger.com) at April 21, 2014 09:14 AM

IndieDB Thread | UE4 Thread



Revision 2014 Tubes

by Timothy Lottes (noreply@blogger.com) at April 21, 2014 08:49 AM

















iPhone Development Tutorials and Programming Tips

Top iOS Development Resources For Week Ended April 20th, 2014

by Johann at April 21, 2014 06:00 AM

Post Category    Featured iPhone Development Resources,News

Welcome back to our feature of the most popular new and updated resources mentioned on the site from the last week.

The top resource this week is an open source library providing a custom UICollectionView layout with customizable hexagon shaped cells and horizontal and vertical scrolling.

Here are the resources:

1.  CCHexagonFlowLayout - A custom UICollectionViewFlowLayout with hexagon shaped cells.  (share on twitter) (featured here)

2.  MJParallaxCollectionView – An open source  library providing custom UICollectionViewCells for easily displaying images with parallax scrolling.  (share on twitter) (featured here)

3.  BEMSimpleLineGraph – An open source library for creating great looking interactive line graphs.  (share on twitter) (featured here)

4.  TOWebViewController – An open source component for displaying web pages that adapts its interface depending on the iOS version and whether presented modally or by a navigation controller.(share on twitter) (featured here)

Thanks for reading!


Be the first to comment...

Related Posts:

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Top iOS Development Resources For Week Ended April 20th, 2014

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.