Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

1. December 2016

 

CryEngine 5.3 is coming soon and Crytek just announced one of the new major features, a new visual programming language “Schematyc”.  From the CryEngine blog:cry

What is Schematyc?

At its heart, Schematyc is a node-based visual scripting language aimed at changing the way gameplay systems can be built within CRYENGINE. It gives designers the power to create new gameplay functionality using a set of building blocks, without needing an actual programmer every step of the way. As such, it should especially benefit smaller indie teams, where we know that experienced C++ programmers can often be a rarity, as it allows everyone on the team to help with the gameplay scripting.

 

…wait a minute here.  Doesn’t CryEngine already have a visual programming language called Flowgraph?  Why yes, yes it does.  The new Schematyc language is meant to compliment Flowgraph:

How it differs from Flowgraph

Some of you may be raising their eyebrows now and wondering what the release of Schematyc means for our existing visual scripting tool, Flowgraph.  While they may look similar at first, their intended purposes are actually very different. Whereas Flowgraphs are great for level scripting, Schematyc is designed to provide more finite control of the objects within those levels. All logic is driven by state and context in order to simplify the information that is presented to designers, and greatly reduced latency should make it possible to take new gameplay systems beyond the prototyping stage without the need to re-write them in C++.

 

From that description it sounds like a UI for managing state machines without the performance penalty of Flowgraph.  Schematyc will be available in beta form in the upcoming CryEngine 5.3 release which drops later this month.

GameDev News

30. November 2016

 

Although perhaps overshadowed by the release of Unity 5.5, Unity have also released a patch for their older version, 5.4.3p2.  As always the patch is composed entirely of fixes and improvements, including:

 

Improvements
  • Shaders: Increased the number of allowed shader keywords to 256 (up from 128). Optimized related parts of the code, so it's often actually faster now.
Fixes
  • (844606) - Android: Fixed crash on some devices when multiple sprite objects are in scene.
  • (821909) - Collab: Auto Refresh is no longer force enabled even after Collab is turned off.
  • (800613) - Deployment Management: Report build-time-generated streaming resources, such as texture atlases, at the correct size in the build report.
  • (827803) - Graphics: Fixed Rendering.CommandBuffer crash when drawing meshes.
  • (849701) - IL2CPP: Fixed a crash that can occur in the player when a virtual method was called on a value type and that value type implements an interface which had an overload of that virtual method.
  • (851098) - IL2CPP - Android: Fixed an issue whereby compiler/linker error output were not captured.
  • (849072) - IL2CPP: Implemented the array SetValue method for arrays of nullable types.
  • (847838) - IL2CPP: Prevented a compiler error in generated C++ code when calling Interlocked.CompareExchange from some managed code.
  • (845174) - IL2CPP: Prevented a stack overflow exception in the player at run time when an infinitely nested generic method is used.
  • (846956) - IL2CPP: Support managed stack traces on Android now.
  • (840773, 849280) - IOS: Fixed an issue of freezes related to ARM atomics.
  • (852363, 814365, 823587) - iOS: Fixed several crashes with regards to WWW and WebRequest.
  • (801761) - Prefabs: Fixed an issue where a prefab instance could be incorrectly marked inactive when first loading a scene.
  • (850350) - Scripting: Fixed MonoDevelop build errors when building UnityScript and Boo projects.
  • (847853) - WebGL: Fixed crash when user writes a file using custom ArrayBuffer
  • (822480) - Windows Store: Fixed duplicate assembly warning when building Universal 8.1.

 

The patch can be downloaded here.

GameDev News

30. November 2016

 

After a good period of development time, Unity 5.5 is finally out of beta.  Well worth the wait however, Unity 5.5 contains an impressive number of new features.5_5_feature_curveboxtool_1

 

Some of the major features of the 5.5 release include:

 

  • addition of Microsoft HoloLens support.
  • codeless In-App purchases
  • improved particle systems
    • new light module, attach lights to particles
    • new noise module
    • new Trails module
    • improved Color Gradient tools
  • improved Animation Window workflow
    • new box tool for improved keyframe management
    • clamped-auto tangent mode in curve editor
  • better line renderer component
  • new splash screen tool
  • Look Dev, an HDR image based lighting tool
  • Visual Studio Code support
  • Unity Collaborate (team server) available in Beta

 

These are just the major features of the release, there are dozens more detailed in the release notes available here.

As this is a full release and not a beta , Unity 5.5 is available for download using the usual download page.

GameDev News

29. November 2016

 

Welcome to the next part in the ongoing BabylonJS Tutorial Series.  In the previous tutorial we created our first simple scene which contained a simple camera.  In this tutorial we are going to explore the concept of camera’s in more depth.  As always there is an HD video version of this tutorial available here.

 

In the previous example we created a Free Camera.  A Free Camera is a camera that can be moved around using the mouse and keyboard.  Often of course you are going to want to be able to customize which keys are used to move the camera.  Here is an example that configured the camera to respond to the WASD keys.

 

var canvas = document.getElementById('canvas');

        var engine = new BABYLON.Engine(canvas, true);

        var createScene = function(){
            var scene = new BABYLON.Scene(engine);
            scene.clearColor = new BABYLON.Color3.White();
            var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0,
            0,-10), scene);
            camera.setTarget(BABYLON.Vector3.Zero());
            camera.attachControl(canvas,true);
            camera.keysUp.push(87);    //W
            camera.keysDown.push(83)   //D
            camera.keysLeft.push(65);  //A
            camera.keysRight.push(68); //S


            var box = BABYLON.Mesh.CreateBox("Box",4.0,scene);
            return scene;
        }

        var scene = createScene();
        engine.runRenderLoop(function(){
            scene.render();
        });

 

This code running:

1

When we create the camera, we pass it’s initial location within our scene.  In this case the position is (0,0,-10) or –10 down the Z axis.  Of course we also pass the scene the camera belongs to into the constructor as well.  Next we set the target of the camera, in this case the origin (or a Zero vector).  Finally we need the camera to actually receive input controls from the canvas.  This is simply done by calling attachControl.  This will result in input (such as mouse and keyboard) being passed to the camera for processing.  There is a member of the camera for keys representing up, down, left and right movement.  To each we pass the appropriate key scancode for the each key in the WASD combination.  When you run this code, you can now navigate around the scene using the WASD and free look using the mouse.

 

Another common camera type is a camera that orbits an object.  That is the camera revolves around the target in a circular orbit.  This is accomplished using an ArcRotateCamera.  Keep in mind however, you could also implement this camera in any other camera object available in Babylon, it would however be your responsibility to implement the functionality.  The follow is the code to create an ArcRotateCamera:

        var createScene = function(){
            var scene = new BABYLON.Scene(engine);
            scene.clearColor = new BABYLON.Color3.White();

            var box = BABYLON.Mesh.CreateBox("Box",4.0,scene);
            var camera = new BABYLON.ArcRotateCamera("arcCam",
                    BABYLON.Tools.ToRadians(45),
                    BABYLON.Tools.ToRadians(45),
                    10.0,box.position,scene);
            camera.attachControl(canvas,true);

            return scene;
        }

 

This code running:

2

The three major parameters to the ArcRotateCamera are the alpha, beta and radius.  Radius is straight forward, this is the distance to orbit the target.  Think of the target as the mid point of a circle.  The radius then defines the size of the circle the camera will follow.  Alpha is the rotation angle around the X axis, while beta is the rotation angle around the Y axis.  Note that both take their parameter in radians instead of degrees, so we have to convert using the ToRadians() helper method.

 

The final kind of camera we are going to look at is the FollowCamera.  This camera does exactly what you’d expect, it follows a given target.  Let’s look at some code:

        var canvas = document.getElementById('canvas');

        var engine = new BABYLON.Engine(canvas, true);

        var createScene = function(){
            var scene = new BABYLON.Scene(engine);
            scene.clearColor = new BABYLON.Color3.White();

            var box = BABYLON.Mesh.CreateBox("Box",4.0,scene);

            // Create a second object so we can actually witness the movement
            // Make this one wireframe to distiguish the difference.
            var box2 = BABYLON.Mesh.CreateBox("Box2",4.0,scene);
            var material = new BABYLON.StandardMaterial("material1",scene);
            material.wireframe = true;
            box2.material = material;

            box2.position = new BABYLON.Vector3(0,5,0);

            var camera = new BABYLON.FollowCamera("followCam",BABYLON.Vector3.
            Zero(),scene);
            camera.target = box;
            camera.radius = 100;
            camera.heightOffset = 0;
            camera.attachControl(canvas,true);

            scene.activeCamera = camera;
            return scene;
        }

        var scene = createScene();
        engine.runRenderLoop(function(){
            scene.getMeshByName("Box").position.y += 0.1;
            scene.getMeshByName("Box").position.x += 0.1;
            scene.render();
        });

 

This code running:

3

This code contains two rendered cubes, the second a box with a wireframe material attached.  This was done so you could actually detect movement!  We will cover the specifics of materials shortly so don’t sweat the details.  Notice in the creation of the FollowCamera we pass in a target to follow (box), how far away we should follow from (radius) and there is also a control for how height the camera should be relative to the target.

 

It should be noted these are only a few of the possible cameras implemented in BabylonJS.  There are a good dozen other cameras available out of the box with features like touch or gamepad control, VR rendering and more.  The basic principals remain the same regardless to camera type.

The Video

Programming , ,

29. November 2016

 

Version 1.3.2 of Cocos Creator was just released.  Cocos Creator is a full game engine and editor built over top of the Cocos2d-x game framework.  It is cross platform, free and open source.  I did a hands on video shortly after Cocos Creator was launched if you want more details.  This release is primarily composed of fixes and improvements.

 

From the release notes:

Cocos Creator 1.3.2 released!

We are excited to release version 1.3.2 of Cocos Creator. Cocos Creator is a new, unified, development tool that handles every step in the game development process.

This version offers an incredible performance increase for both Web and native platforms. There are 6 major features and numerous small changes in this version that will help Creator meet the needs of more and more types of projects! The following is the highlight of this update:

  • [RichText] Added custom TTF font support
  • [DragonBones] Fixed an issue initialize the dragonAsset property of the DragonBones component will report error and cause crash。
  • [Engine] Fixes the problem of inconsistent viewsport after using renderTexture to capture screen.
  • [Label] Fixed a bug where LabelOutline and RichText underline style has incorrect color on iOS and Android platforms
  • [Loader] Fixed cc.loader.loadRes andcc.loader.load may not recognize the same resources correctly using caching.
  • [Loader] You can pass in url to cc.loader.release to release texture assets that don't have uuid.
  • [Engine] Detect WeChat version on iOS, in iOS 9 or before use Canvas rendering (due to the WeChat UIWebView bug), in iOS 10 on use WebGL rendering
  • [Action] Fixed rotateBy parameters in the native platforms can not control the two axial rotation at the same time issue.
  • [Prefab] Fixed issue that when Prefab node Size is 0 while the positions are greater than 100, double-click the Prefab will cause scene view not properly display.
  • [Builder] When building a native project, if the C ++ engine version changes, prompt the user to delete the build project to regenerate
  • [Builder] Add building process monitor to reduce the possibility of process stuck situation.
  • [Builder] The build target path now supports relative paths
  • [Collider] Fixes the bug that CircleCollider computes the error of boudingBox after it has modified anchor
  • [Editor] Fixed the problem of displaying the account information in the main menu when switching account login
  • [Animation] Improve the sample method to operate on a particular animationState and automatically update the animation state by callingsample after setCurrentTime
  • [Layout] Padding margins can now be customized in different directions
  • [PageView] adds a new page layout mode, support for irregular page size

Important upgrade instructions

  • The Windows version now uses use a 64-bit architecture, there is no longer support for 32-bit Windows systems. The advantage is that the editor can deal with a large number of image resources and improve the efficiency by at least 5 times, but also to support the emerging image format Webp.

Cocos Creator is maturing nicely.  Is this a technology you would be interested in seeing tutorials for?

GameDev News

  • ...
  • 17