Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
13. July 2012

I have a bit of a project I need to undertake in real life, that overlaps nicely with this site, so I am documenting the process here.

 

 

The nutshell version, I have a toddler and she is having trouble with transitions.  People have suggestion a This Then board, in terms of “Do This” “Then that” will happen.  Its remarkably simple over all, it is pretty much two pieces of velcro on a piece of cardboard and a bunch of pictures that we can stick to it.  I was about to have to print off a ton of pictures, scale them down, stick velcro to them and it dawned on me… this calls for an App!

 

 

See, I have a ton of devices around this place…  PCs, a Mac, a Galaxy Note, S3, Transformer, Playbook, iPhone, iPod and even an iPad that my daughter has pretty much claimed as her own.  So it only makes sense to implement this an application.  That said, supporting all of these platforms would be a pretty epic pain in the butt.  Also, I have very little desire to pay Apple 99$ a year just to put this app on her iPad, and I don’t want to be bothered with jailbreaking.

 

This is where my recent playing with HTML5 comes in extremely handy.  I am going to create it using a variety of technologies, include cocos2D, node/express and heroku.  The application itself is very simple, but the process is stuff that almost any moderately advanced web application is going to face.

 

First off, HTML5 is wonderful, but it has some serious limitations.  One such limitation is only having minimal local storage.  This is where your server comes in, and Node delivers in spades.  Another problem almost all web apps face is… where do I put this thing?  We will cover that as well.  Possibly at the end I will also covering delivering to device ( PhoneGap? Appcelerator? ), that’s a wait and see thing.

 

This isn’t exactly a tutorial series; this is something I have to accomplish, so I’ve decided to document the process as I go.  I wont always go into as much detail as I normally do with tutorials and I promise you, unless you have a toddler yourself, the end result wont be that exciting of a game.  However, you will see how to quickly make an HTML5 game in cocos2D, hosted in Node.js, developed quickly.  Hope you enjoy.

 

In fact, the first post is up.  This one covers hosting a cocos2D app ( our last tutorial on menus and music ) in a custom Node.js based server.

General


13. July 2012

Instead of updating all of the tutorials each time something is changed ( sadly, something I do not have the time for ), I will use this guide to track breaking changes as the occur.

 

 

PlayStation Studio .98 –> PlayStation Mobile .99

 

Libraries have been renamed from Sce.Pss to Sce.PlayStation.  So instead of say:

import Sce.Pss.Graphics;

it is now:

import Sce.Playstation.Graphics;

 

The install path has changed from [Program Files]\Pss to [Program Files]\PSM.

 

PssStudio is now PsmStudio.

 

Oddly enough, for me at least, it didn’t create a start menu entry.

 

 

Fortunately there is a conversion utility that will convert your code to the new naming standard.  In C:\Program Files (x86)\SCE\PSM\tools ( on my 64bit Win7 install anyways ), there is a file named project_conv_098to099.bat.  Simply drag your existing project folder on top of that script, or run it from a cmd prompt passing it your code directory, and your project will be updated.

 

The full .99 release notes are available here.

 

Here is the conversion process in action:

Updating from .98 to .99 SDK

General Programming


7. July 2012

I have run into another snag with using YUI in an MVC app, one that is causing me to look into JQuery + Backbone as an alternative.

 

It’s a pretty small thing over all, I can’t get actual YUI controls working from Moustache templates.  You need to pass the ID to a control, but at the point of Render() it doesn’t appear to be valid. This isn’t the actual problem though, the problem(s).

  • The community is quite small, and I found ZERO examples except Mojito based.  Even that is pretty sparse.
  • The everything and the kitchen sink approach YUI takes makes dropping in a replacement much trickier.
  • The only community is only really active on the official YUI forums, and they are moderated.

 

 

That last one is a gigantic deal breaker for me.  See, the community at the forums is wonderful and responsive.  It was quite impressive to deal with them and they have my kudos.

 

However…  my first post took 3 days to get approved! My second comment took another 8 hours. 

 

3 days in like a decade in internet-years!  It may seem a small point, but Yahoo!, if you want people to adopt YUI, you really need to remove this restriction.

General


1. July 2012

 

I’ve been trying out PlayStation Studio on Windows 8, and the results are pretty poor.

 

First the bad news, the simulator and Vita drivers don’t work, so you can’t actually run your code.  The good news is though, you can get the tools and IDE working, but you need to jump through a few hoops.

 

First you need to make sure .NET 2/3.5 installed.  You need to “Turn windows features on or off”, then add the .net Framework, like such:

image

 

 

Next, you are going to receive the error:

Error MSB4185: The function "CurrentUICulture" on type "System.Globalization.CultureInfo" has not been enabled for execution. (MSB4185)

When you try to run your code.  You need to set an environment variable in order to fix this error.

 

Add the environment variable MSBUILDENABLEALLPROPERTYFUNCTIONS and assign it the value 1.  You can do this at a command prompt by typing “setx MSBUILDENABLEALLPROPERTYFUNCTIONS 1”.  Now reboot and run PSStudio and it should work correctly.

 

Well, except the whole being able to run your code thing.  If I figure that part out, I will let you know!

General


19. June 2012

 

A couple months back took a long look at Appcelerator and initially I loved what I saw.  For those of you unaware, Appcelerator allows you to develop “native” applications for Android and iOS in JavaScript that execute in a special version of the V8 JavaScript Engine. I started developing a prototype app of a simple Android game for my daughter and got surprisingly good results quickly.  It was a very encouraging start, but then the wheels fell off.  I notice a number of people end up on this site from search engines looking for an Appcelerator review ( for some reason? ) so I thought I would share my experiences.

 

For whatever reason, I got distracted and put it down for a while, I came back to it recently and intended to finish off that prototype.  Here is the kicker, the exact same code from a couple months ago, unchanged, no longer works on my Transformer tablet.

 

I will say, this is frustrating to say the least.  Now, since the code didn’t change it was obviously an update to Android that broke things, I can’t exactly blame that on Appcelerator Titanium ( oh the joys of Android device compatibility… ) but I can blame them for what came next…

 

You can’t debug on device.  At all.  With the exception of printing comments to logcat, you are basically blind.  This obviously leads to a problem, as here is what happens when I run the app.  ( Which by the way, still runs perfectly fine on my Galaxy Note running Android 2.3.x, its just on my Asus Transformer that it breaks ):

 

appcell

 

Since I can’t debug on device, this is the results I get from connecting with the Delvik Debug Monitor:

 

06-19 09:56:51.090: I/TiApplication(1823): (main) [0,0] checkpoint, app created.
06-19 09:56:51.130: I/TiApplication(1823): (main) [46,46] Titanium 2.0.2 (2012/05/30 10:21 2ff31a3)
06-19 09:56:51.170: D/dalvikvm(1823): GC_CONCURRENT freed 268K, 5% free 6703K/7047K, paused 2ms+2ms
06-19 09:56:51.380: D/dalvikvm(1823): GC_CONCURRENT freed 314K, 6% free 6898K/7303K, paused 2ms+2ms
06-19 09:56:51.450: E/TiApplication(1823): (KrollRuntimeThread) [318,364] APP PROXY: [email protected]

 

 

And, that is it.  Since I can’t debug on the device, I am pretty much DOA here.  The forums answer nothing ( although I did find other people having similar problems ).  I of course could debug in the emulator with two exceptions.  a) the error only occurs on the actual device b) the debugging experience on Android is still awful.

 

This is another area with Appcelerator Titanium I always found infuriating… the emulator.  Getting it to actually run with your running emulator was a nightmare, you had to match up the Android build version and run configuration exactly with the version of the running emulator, then it was still a 50/50 chance that it would actually use your emulator, or start a new one.  If you’ve worked with Android before, you know how fun waiting for the emulator is!  There is light and the end of the tunnel with the recently release Intel emulator running a heck of a lot quicker, but unfortunately the JavaScript V8 virtual machine Appcelerator relies on doesn’t work with it.

 

It’s a shame to be tripped up on such a thing, but actually being able to debug on your device is an absolute requirement, as is demonstrated by this situation.  There are other annoyances with using Appcelerator certainly…  the binaries it generates are “large” to be extremely kind, performance can be a bit spotty at times and you virtually have to write two applications if you want to support iOS and Android, but none of these was enough to make me give up. 

 

Not being able to debug on device, coupled with some remarkably meh support.. that is.  Combined with the fact my application was broken by an Android update… if I can’t get my code working with my three devices reliably, what happens when I release to the masses with their millions of different devices?

 

Which is disappointing, as I really liked working with Appcelerator.  I even liked Appcelerator Titanium as an IDE, which is shocking as I hate Eclipse, which it is based on. 

 

There is potentially light at the end of the tunnel, as there is an open ticket for debugging on device.  Unfortunately, its been assigned medium priority and has already been open for almost a year.

 

Appcelerator Titanium is an interesting and encouraging product, but for the above reasons, I just can’t commit to using it.  Add native debugging support, and I will certainly reconsider.

General


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List