Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
10. February 2016

 

This news care of /r/gamedev, EA have released EASTL under the BSD license on Github.

EASTL has been around for ages, and got a limited release a number of years back, but this is the first time there has been a complete release under a BSD license.  EASTL is an implementation of the Standard Template Libraries in C++, but optimized for game performance, especially on consoles.  This new release represents a more up to date version and one that is actively maintained.

If you are familiar with the C++ STL or have worked with other templated container/algorithm libraries, you probably don't need to read this. If you have no familiarity with C++ templates at all, then you probably will need more than this document to get you up to speed. In this case, you need to understand that templates, when used properly, are powerful vehicles for the ease of creation of optimized C++ code. A description of C++ templates is outside the scope of this documentation, but there is plenty of such documentation on the Internet.

EASTL is suitable for any tools and shipping applications where the functionality of EASTL is useful. Modern compilers are capable of producing good code with templates and many people are using them in both current generation and future generation applications on multiple platforms from embedded systems to servers and mainframes.

The Github repository is available here.

GameDev News

10. February 2016

 

Intel RealSense is a technology and SDK for computer vision including motion controls, facial recognition and more.  There are several cameras and laptops on the market these days that are compatible with RealSense.  Very similar in scope and function to Kinect for the Xbox and Xbox One.

Well, earlier this week a plugin was released for Unreal Engine enabling RealSense support.  From the announcement:

Intel is always excited to introduce innovative tools and technologies that empower the world's most passionate content creators. In case you're unfamiliar, the Intel RealSense cameras use infrared light to compute depth in addition to normal RGB pictures and video. To assist in the development of applications with this technology, Intel created the RealSense SDK, a library of computer vision algorithms including facial recognition, image segmentation, and 3D scanning. 

Short-Range, User-Facing RealSense Camera Developer Kit

Seeing the potential use cases for this technology in gaming, we would now like to introduce you to the RealSense Plugin, a collaborative effort among games engineers at Intel to expose the features of the RealSense SDK to the Blueprints Visual Scripting System in UE4.

Check out the plugin source code and a sample project here.

PLUGIN OVERVIEW

The plugin is architected as a set of Actor Components, each of which encapsulates a distinct set of features from the RealSense SDK. Using these relatively lightweight components, you can add 3D sensing capabilities to nearly any actor in your game, and you can access this data anywhere by simply instantiating another instance of the same component.

Figure 2: ace scanning and mapping in Unreal Tournament using the Scan 3D Component

PLUGIN COMPONENTS

Currently, the plugin features these three RealSense Components:

  1. Camera Streams Component: Provides access to the raw color and depth video streams from the RealSense camera.
  2. Scan 3D Component: Supports the scanning of real-world objects and human faces (Pictured above).
  3. Head Tracking Component (Preview): Supports the detection and tracking of a user’s head position and orientation.

The downside to head tracking controls is the user ultimately still has to look at the screen!  So while it would be awesome to have the computer track your head movements in say... a car racing sim, you still need to keep your head looking straight ahead.  Well except of course in VR, where this entire process is done in the hardware.  Have any of you encountered actual cool usage of RealSense in a game?

GameDev News

10. February 2016

 

Another week another Unity patch.  No new functionality, this patch was populated entirely with fixes:

Fixes
  • (742199) - Android: Fixed remote frame debugger.
  • (none) - Android: Marshmallow - Added the possibility to disable the permission dialog by adding metadata to the activity.
  • (755510) - Android: Mono - Fixed crash on startup with Unity Ads when stripping is enabled.
  • (none) - Core: Improved the error message when build data files are corrupted or from a mismatched version.
  • (752733) - Editor: Fixed folder-level toggle when importing assets.
  • (711720) - Editor: Fixed a bug in the property diff recorder would insert property modification on the prefab asset if it was being edited in the inspector.
  • (756409) - Editor: Fixed crash when entering playmode if LoadScene was called during Awake or Start.
  • (761995) - Editor: It is now possible to replace a prefab asset with a different prefab asset.
  • (752855) - Graphics: D3D11 Native API now supports obtaining native Texture type underpinning a Unity Renderbuffer.
  • (746302) - Graphics: Fixed building shaders correctly for WebGL in AssetBundles.
  • (none) - Graphics: Fixed an issue where standard shader using directional lightmaps could output NAN to the framebuffer. This would corrupt the framebuffer if any effects were used that spanned multiple frames.
  • (753593) - Graphics: Fixed occasional movie texture crash with multiple movies present.
  • (none) - Graphics: Reduced framerate spikes where culling system could sometimes stall for several ms while waiting for jobs.
  • (766642) - IL2CPP: Generate proper C++ code for marshaling wrappers of methods that have System.Guid as a parameter type.
  • (761412) - OpenGL: Fixed random crashes on compute shader dispatch.
  • (760830) - Particles: Ensure consistent direction between 3D and 1D rotation.
  • (757969) - Particles: Fixed a collision crash.
  • (763041) - Particles: Fix for terrains ignoring collision layers.
  • (758197) - Particles: Fixed support for negative inherit velocity values.
  • (765300) - Physics: Fixed center of mass and inertia tensor being reset after game object was reactivated.
  • (763806) - Physics: Rigidbodies without non-trigger colliders can. have custom center of mass and inertia tensor again
  • (767645) - tvOS: Fixed build error with Xcode trampoline.
  • (none) - VR: Dynamically switch to headset's audio output / input driver (Oculus SDK 1.0+).
  • (none) - VR: Fixed VR Splash screen color precision. No Longer limited to half the color spectrum for RGBA32.
  • (none) - VR: Mask invisible pixels so GPU time is not wasted (Oculus SDK 1.0+).
  • (765876) - Windows Store Apps: building from Unity will no longer overwrite project.json file if it was modified in solution.
  • (759735) - Windows Store Apps: When building from Unity files in Visual Studio solution will not be overwritten if identical.

Patch can be downloaded here.

GameDev News

9. February 2016

 

Today Amazon launched the Lumberyard Game Engine a modified and completely open source version of the CryEngine from Crytek.  Free.  So, what’s the catch?  You have to run your server component either on your own server or using Amazon’s web services.  Yeah, that’s it.  A pretty sweat deal all around.  So today I took a quick look at the contents of the engine as you can see below or in the video available at the bottom of this page.  I have only a couple hours experience with the engine, so don’t expect an in-depth review, this is just a quick hands on to give you an idea of what Lumberyard is and what you get.

 

Lumberyard installs as a 10GB zip file.  Simply extract the contents of that archive to folder on your system.  It’s contents look like:

image

Next run LumberyardLauncher.bat and you get this initial configuration window:

image

It unfortunately does not seem to play nice with high DPI displays :(.  Check all the features you require then click the next error.  You will then be informed what software you need to install:

image

Thankfully (for my cellular bill at least!) each component already appears to be locally available.  Next it’s going to ask you for a variety of SDKs.  Most of them are optional, such as Photoshop, Max and Maya plugin SDKs, but some are not such as NVidia and PowerVR SDKs.  Annoyingly, some of these require registering an account to download.  Both SDKs are small downloads, the the PVRTextTool will download 100+MB of files.

image

Finally you will be asked which plugins you wish to configure, and we are finally done the configuration phase.  Now simply click Configure Project to create a new Project:

image

 

This will launch the Lumberyard Project Configurator tool:

image

 

For now I’m simply going to click Launch Editor for the SamplesProject project.  Now we wait...

image

Ugh, another login:

image

Finally!

image

The Getting started guide link doesn’t work right now.  Instead use the URL https://aws.amazon.com/documentation/lumberyard/ to access the documentation.

 

I’m going to go ahead and create a new level.

image

Straight forward so far.

 

And finally the Lumberyard editor:

image

Again, high DPI support isn’t great as you can see from the cropped menu panel across the bottom.  Let’s take a look at a some of the included tools.

 

Terrain Editor

image

 

Asset Browser

image

 

Flow Graph (Visual Scripting)

image

 

Dialog Editor

image

 

Geppetto (Animations)

image

 

Database View

Img1

 

UI Editor

image

 

Obviously this is only a very surface level look at some of the tools that are bundled in the Lumberjack Game Engine.  It certainly has me interested in learning more.  If you are interested in seeing tutorials for this game engine, let me know and I will dive in deeper.  Even if I don’t create a tutorial series, I will certainly review this game engine in the typical “Closer Look” style.

 

There is a quick video hands on available, embedded below or in 1080p here.

Programming , ,

9. February 2016

 

In the first tutorial we looked at installing Superpowers, running the server and creating our first project.  In the next tutorial we got to know the editor, the relationship of Actors and Components and finally created a camera for our game.  In this tutorial we are going to draw a sprite on screen, then a sprite sheet which will enable animation.  So without further ado, let’s jump in.

 

There is one more important part of the relationships in Superpowers to understand.  As we’ve seen already, our Scene is composed of Actors, which in turn are made up of Components.  Components however can have Assets.  Assets on the other hand are NOT part of the Scene.  They actually exist at the same level as the Scene and can be used in multiple scenes.  Assets are declared on the left hand side of the interface.

 

Adding a Sprite to Your Game

On the left hand side of the screen click the page with a plus sign icon (the same we used to create the scene):

image

In the resulting dialog, select Sprite:

image

The sprite options will now be available in the inspection window on the right hand side of the screen.  In that window, select Upload and navigate to the image file you are going to use for your game.  We sure to use a web friendly format such as JPG or PNG.  Then set the grid size to the same dimensions as the Texture Size, like so:

image

 

You could also modify the pivot point of the sprite by changing the origin position.  The default of 50% will put the pivot point in the middle of the sprite, so this is the point the sprite will be drawn and transformed relative to.  You can also configure the opacity, how the sprite is rendered, etc.  The Grid Size parameter is used when you have multiple sprites in a single texture, which we will use later.

 

Adding a Sprite Component

Now that we have a sprite asset available in our game, let’s add one to our scene.  First on the left hand side, or using one of the tabs across the top of the editor, select your Scene.  Next create a new Actor, just like we covered in the previous tutorial, name it sprite or something similar.  Finally click the New Component button and select Sprite Renderer, then click Create:

image

Now there should be a SpriteRender component available.  From the Asset window on the left side of your screen, drag the sprite you added to the Sprite field of the Sprite Renderer in the Inspector, like so:

GIF

 

Tada, we’ve added a Sprite to our game world and it should now show up in the View in the center of your screen:

image

The sprite can be positioned using the transform widget, or directly in the Transform component on the right.

 

Running Your Game

Now that we’ve got a camera and something on screen, let’s take a moment to actually run our game.  There is a small amount of configuration we need to do.  On the left hand side of the screen, locate the “Settings” link, click away!:

image

 

In the resulting form, select your scene as the starting scene(via drag and drop):

image

 

We have one final task to perform.  Our Camera and our Sprite are both at the same Z location, meaning that at least initially, nothing will be in the view of the camera.  You have one of two options, you can either position all of your sprites at a –z location, or you can move your camera to z=1.  The later is the easier option, so I will go that route.  Select your camera actor, it’s transform component and set the Z value to 1:

image

 

Now we press either Play or Debug in the top left menu.  The debug option will load Chrome with the developer tools enabled, making it possible to detect errors in your code.  The Play option will run it in the Superpowers player.  Either way, we should see:

image

Congratulations on your first successful game!

 

Using a Spritesheet

Now let’s take a look at how we can used multiple sprites in a single texture, often known as a spritesheet.  I’m using this simple 3x1 sprite sheet:

sheet

 

Add it as an asset like we did earlier.  This time however, after we upload the image, we want to configure the grid size using this button:

image

 

When prompted enter the number of rows (1) and columns (3) in your image, or simply enter the width and height of each frame of animation in the text boxes.  Now lets create a new animation named walked.  Simply click the New button under animation, name it walk.  Then in the settings we set (I believe, the UI does not make it obvious), the first frame of the animation, the length and the number of frames to step by.  I also set the animation speed to 3 frames/sec meaning our 3 frames on animation will play once per second.

image

 

And the end result:

GIF

Ignore the twitch, that’s just me capturing the animated gif at the wrong end point.

Programming , ,

Month List

DisqusCommentsSummary

Course-specific creative-The Complete iOS 9 Developer Course - Build 18 Apps