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

 

I am a bit late to announce this ( like, almost 3 weeks late ), but cocos2D HTML has a new Cocos2dHTML5release.  You can read the complete release notes on their website, but there are a few changes that are of particular concern to the tutorials on this site.  Instead of going back an updating the tutorials ( for now at least ), I will show this quick updating guide in case you run into trouble getting them to run.  The changes on the whole are pretty minor.

 

 

So, if you want to update your code to run with alpha2, make the following changes.

 

 

 

MyFirstApp:

In MyFirstApp.js change:

var layer1 = cc.LayerColor.layerWithColorWidthHeight(cc.ccc4(255, 255, 0, 255), 600, 600);

To:

var layer1 = cc.LayerColor.create(cc.ccc4(255, 255, 0, 255), 600, 600);

 

var helloLabel = cc.LabelTTF.labelWithString("Hello world", "Arial", 30);

To:

var helloLabel = cc.LabelTTF.create("Hello world", "Arial", 30);

 

var scene = cc.Scene.node();

To:

var scene = cc.Scene.create();

 

 

MySecondApp:

 

In MySecondApp.js change:

var scene = cc.Scene.node();

To:

var scene = cc.Scene.create();

 

var layer1 = cc.LayerColor.layerWithColorWidthHeight( cc.ccc4(128, 128, 128, 255), 600, 600), jetSprite = cc.Sprite.spriteWithFile("./images/Jet.png");

To:

var layer1 = cc.LayerColor.create( cc.ccc4(128, 128, 128, 255), 600, 600), jetSprite = cc.Sprite.create("./images/Jet.png");

 

 

MyThirdApp:

 

In MyThirdApp.js change:

 

var scene = cc.Scene.node();

To:

var scene = cc.Scene.create();

 

 

 

 

And that’s it.  It sucks that breaking changes happen, but I think you will admit, this one is certainly for the better.   Any code from this point forward will use the newer SDK.

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


5. July 2012

 

I have recently been contacted by members on the development teams of two (completely!) different HTML game related libraries for inclusion on the HTML 5 Development links page.

 

 

The first is the Pulse Engine, a traditional HTML5 Canvas based library.  Perhaps best of all, it has complete documentation (woot!).  I am taking a closer look at this when time permits, and will post something shortly.

 

 

 

The second is Clay.io, which is more of a supporting library.  It provides leaderboards, payment processing, social integration and more.  They are a commercial library and take a 20% cut of payments processed.  It is documented as well, and contains a developer sandbox to test in.  I do have one suggestion for the developers… make the features more prominent on your home page. The details were there, but they were below the fold ( on my 1920x1280 screen! ).  You will be amazed how many people you will lose because it was immediately obvious what service you provide! If you need to add these features to your game, clay.io is certainly a place to start.

 

 

If you have developed and HTML5 related game library, or are a big fan of a library I missed on my list, let me know! 

News


3. July 2012

A poster, JakobProgsch, over on the TigSource forums has made a series of OpenGL samplesopengllogo available on GitHub. Each example is contained in a single file, doesn’t depend on any non-canonical libraries or hide code behind a framework.  As a results the examples are a bit longer, but easier to follow.

 

The following topics are covered ( description taken from each file header ).

 

Sample 1

Skeleton code that all the other examples are based on

 

Sample 2

This example shows the setup and usage of shaders and a vbo+vao

 

Sample 3

This example shows the setup and usage of shaders and a vbo+vao
In this example the attrbute locations are set via BindAttribLocation
instead of layout qualifiers in the shaders

 

Sample 4

same as the "Shader and VBO" example, only with an indexed vbo.

 

Sample 5

apply a texture to the fullscreen quad of "Indexed VBO"

 

Sample 6

set up a perspective projection and render a rotating cube

 

Sample 7

render the cube from the perspective example to a texture and

apply fxaa antialiasing to it.

 

Sample 8

create 8 instances of the cube from the perspective example

with an additional offset buffer and AttribDivisor

 

Sample 9

create 8 instances of the cube from the perspective example

the difference to the instancing1 example is that we are

using a texture buffer for the per instance data instead of a

vertex buffer with divisor.

 

Sample 10

create 8 instances of the cube from the perspective example

the per instance data is passed with a uniform buffer object

 

Sample 11

Uses a geometry shader to expand points to billboard quads.

The billboards are then blended while drawing to create a galaxy

made of particles.

 

Sample 12

This example uses the geometry shader again for particle drawing.

The particles are animated on the cpu and uploaded every frame by

mapping vbos. Multiple vbos are used to triple buffer the particle

data.

 

Sample 13

This example simulates the same particle system as the buffer mapping

example. Instead of updating particles on the cpu and uploading

the update is done on the gpu with transform feedback.

 

Sample 14

This example renders a "voxel landscape/cave" from the view of a

moveable camera. Occlusion queries and conditional rendering are used

to cull occluded parts of the world and timer queries are used

to measure the performance.

 

Hope he keeps them coming, good OpenGL resources are scarce.

 

Edit: 7/5/2012 Fixed links and added 14th sample, which by the way, is a bit of a monster.

Programming


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


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List