Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

19. May 2016

 

At Google.io, along with the announcement of VR Mode in Android N, Google announces a preview release of Android Studio 2.2.  Android Studio is a free IDE for Android development based off the popular IntelliJ Java IDE.

 

Details of the new release:

Android Studio is the quickest way to get up and running with Android N and all our new platform features. Today at Google I/O, we previewed Android Studio 2.2 - another big update to the IDE designed to help you code faster with smart new tooling features built in. One of the headline features is our rewritten layout designer with the new constraint layout. In addition to helping you get out of XML to do your layouts visually, the new tools help you easily design for Android’s many great devices. Once you’re happy with a layout, we do all the hard work to automatically calculate constraints for you, so your UIs will resize automatically on different screen sizes . Here’s an overview of more of what’s new in 2.2 Preview (we’ll be diving into more detail this update at 10AM PT tomorrow in “What’s new in Android Development Tools”, livestreamed from Google I/O):

  • Speed: New layout designer and constraint layout, Espresso test recording and even faster builds
  • Smarts: APK analyzer, Layout inspector, expanded Android code analysis and IntelliJ 2016.1
  • Platform Support: Enhanced Jack compiler / Java 8 support, Expanded C++ support with CMake and NDK-Build, Firebase support and enhanced accessibility

GameDev News

19. May 2016

 

Google.io is currently going on, Google’s annual developer conference.  In a world currently dominated with VR announcements, did you really expect no VR announced from Google?  Yeah, me neither.

 

The following is from the Android developer blog:

Android was built for today’s multi-screen world; in fact, Android powers your phone, your tablet, the watch on your wrist, it even works in your car and in your living room, all the while helping you move seamlessly between each device. As we look to what’s next, we believe your phone can be a really powerful new way to see the world and experience new content virtually, in a more immersive way; but, until this point, high quality mobile VR wasn’t possible across the Android ecosystem. That’s why we’ve worked at all levels of the Android stack in N–from how the operating system reads sensor data to how it sends pixels to the display–to make it especially built to provide high quality mobile VR experiences, with VR Mode in Android. There are a number of performance enhancements designed for developers, including single buffer rendering and access to an exclusive CPU core for VR apps. Within your apps, you can take advantage of smooth head-tracking and stereo notifications that work for VR. Most importantly, Android N provides for very low latency graphics; in fact, motion-to-photon latency on Nexus 6P running Developer Preview 3 is <20 ms, the speed necessary to establish immersion for the user to feel like they are actually in another place. We’ll be covering all of the new VR updates tomorrow at 9AM PT in the VR at Google session, livestreamed from Google I/O.

 

So basically they are baking much of the functionality required to support VR directly into Android N.  On top, they also released a reference device for developers and manufacturers to build their own Android N powered VR device, including this controller:

image

It has built-in sensors for helping to determine position along with a a trackpad for fine tuned control.

 

It appears that Google intends to leave device development up to others.   In an already saturated market, it will be interesting to see if this approach works.  Frankly the only real selling point I see for Android powered VR is the price point ( since the phone provides the CPU, GPU, Screen, etc ), but the GearVR is already in place and is the best selling VR Headset available.

GameDev News

18. May 2016

 

Another week another Unreal Engine release, this time 4.12 Preview 4.  Once again this is a preview release, so don’t expect to use it in production work and expect bugs.  The biggest feature of this release is a preview of VR Mode announced back during GDC.  This enables you to place and move actors in the editor while using a VR headset, currently Vive and Oculus Rift are supported.

Of course there are a host of fixes in this release as well:

Fixed in Preview 4 - CL 2978217
Fixed! UE-30690 Behavior tree serialization is creating duplicates of task services on every save
Fixed! UE-30693 Server logging regressed
Fixed! UE-30763 Make details panel favorites experimental
Fixed! UE-30417 SetWorldOrigin in console command crashes editor
Fixed! UE-30515 Debris particles constantly firing in ending sequence of Infiltrator Demo
Fixed! UE-30606 Crash adding Begin Play to Character blueprint after breaking links
Fixed! UE-30663 Crash transforming cloth bone unweighted at current LOD in persona
Fixed! UE-30157 If variables are connected to pins of Layered blend per bone, the all variables' value are recognized as the last pin's value.
Fixed! UE-30588 Curves loaded from DDC do not always work on additive animations
Fixed! UE-30563 Memory leak in active sound on world teardown due to async traces
Fixed! UE-30539 Preferred audio device settings not overriding default audio device settings
Fixed! UE-30142 Landscape3 in ContentExamples Landscape crashes when using erosion tool
Fixed! UE-30429 Odd collision in VehicleGame track results in Buggy driving above the landscape
Fixed! UE-30462 Landscape grass placement changed
Fixed! UE-30372 Unusual Rendering on SunTemple with iPhone6+ Metal
Fixed! UE-30739 [CrashReport] UE4Editor-OpenGLDrv.dylib!FPlatformOpenGLContext::VerifyCurrentContext()
Fixed! UE-30775 Fix checkin error for InputDevice version checking
Fixed! UE-30767 Add protection against calling unsupported InputDevice methods on devices with Android version before KitKat
Fixed! UE-30579 StrategyGame fails to launch on Firefox
Fixed! UE-30553 Multiple Launches required to get Project running on Firefox
Fixed! UE-30699 Correct SupportsVulkan check for Vulkan shader format
Fixed! UE-30034 Xbox One: Level assets are not rendering for several samples
Fixed! UE-29328 Linux SCW crash Assertion `!"Illegal formal parameter mode"' failed.
Fixed! UE-30069 On one Retina MacBook Pro using re-opening UE4Editor after previously quitting it will cause a GPU hang on Nvidia requiring a force-reboot of the Mac
Fixed! UE-28411 Linux crash report folders are not placed in the Saved directory
Fixed! UE-30509 Crash running project examples in Standalone game on Mac
Fixed! UE-30498 Bad shadow flickering in Flying template
Fixed! UE-30469 tvOS Code fails to package if a space exists in directory name
Fixed! UE-30536 Large values of "Reflection Capture Resolution" cause extreme Graphical artifacting and degredation with no Warning to the User
Fixed! UE-30620 ContentExamples: Material_Properties level: Example 1.10 not enabled
Fixed! UE-30732 Crash opening QA-Sequencer - UE4Editor_Engine!FStaticMeshVertexBuffer::Init()
Fixed! UE-29556 Normal maps do not render on BSPs
Fixed! UE-30389 GPU Driver crash when setting reflection capture resolution to unreasonably high values
Fixed! UE-30341 [CrashReport] UE4Editor_Engine!FReflectionTextureCubeResource::InitRHI() [reflectioncapturecomponent.cpp:703]
Fixed! UE-30286 Player loses all input when unplugging the controller while in ShooterGame
Fixed! UE-30671 Opening Level Blueprint Produces Error (Third Person Blueprint Project)
Fixed! UE-30567 Misspelling in Parallax Occlusion Mapping level of Content Examples
Fixed! UE-30446 Paper2D map is missing from Windows Content Examples in 4.12 Binary
Fixed! UE-30287 Launch on iOS from windows fails for Match3 project obtained through launcher
Fixed! UE-30740 [CrashReport] UE4Editor_Sequencer!FSequencerTrackNode::GetDisplayName() [sequencertracknode.cpp:264]
Fixed! UE-30688 Crash adding a second animation to UMG on Mac
Fixed! UE-30656 Camera is not set to the characters camera when sequence is over
Fixed! UE-30680 Master tracks (camera cuts, fade, play rate, etc) should appear before folder nodes
Fixed! UE-30654 Packaged sequence does not autoplay
Fixed! UE-30666 Crash undoing UMG widget added to an animation
Fixed! UE-30529 Scroll bar does not have fixed width in Sequencer
Fixed! UE-30577 Multiple Transform track on Camera created from Add Master Sequence
Fixed! UE-30676 Crash using assign actor in sequencer on Mac
Fixed! UE-30490 [CrashReport] UE4Editor_SteamVR!FSteamVRHMD::D3D11Bridge::UpdateViewport()

 

To get the newest preview, simply download it using the Epic Game Launcher.

GameDev News

17. May 2016

 

In our previous tutorial looking at the Heaps game framework, we looked at creating an initial application.  As part of that tutorial we used s2d to draw some text on the screen.  Today we are going to look a bit closer at using 2D graphics with Heaps.  Let’s start straight off with a simple example:

import h2d.Bitmap;
import h2d.Sprite;
import h2d.Text;
import h2d.Tile;
import hxd.Res;
import hxd.res.Font;

import js.Lib;

import hxd.App;
class Main extends App {
	
	override function init() {
		
		// Example one, create a new Bitmap using a Tile
		Res.initEmbed();
		var logo = Res.logo.toTile();
		var bitmap = new Bitmap(logo, s2d);
		
	}
	
	override function update(dt:Float) {
	}
	
	static function main() {
		new Main();
	}
	
}

 

When we run this example:

image

For this example to work you need to copy an jpg, gif or png file named logo to the resource directory.  Don’t forget you need to tell Haxe where this directory is using the –D resourceDir flag (see previous tutorial for more information ).  In this example we convert the resource to a Tile object, which you can think of as a rectangular region within an image (even if it encompasses the entire image).  Finally we used this tile to create a Bitmap object, which is brings together the thing to draw ( the Tile ) and where to draw it (the Sprite). More on these later.  As before to display it on screen the bitmap is parented to the s2d object, which is a Scene object that is created for us automatically.


Let’s look at another quick source example, the performs a very similar task:

import h2d.Bitmap;
import h2d.Sprite;
import h2d.Text;
import h2d.Tile;
import hxd.Res;
import hxd.res.Font;

import js.Lib;

import hxd.App;
class Main extends App {
	
	override function init() {
		
		// Example two, create a bitmap manually using BitmapData 
		and draw it to screen.
		Res.initEmbed();
		var logoBitmapData = Res.logo.toBitmap();
		var bitmap = Bitmap.create(logoBitmapData);
		s2d.addChild(bitmap);
		
		// Set the pivot point of our bitmap so it is positioned 
		relative to it's center
		bitmap.tile.dx = -Math.round(bitmap.tile.width / 2 );
		bitmap.tile.dy = -Math.round(bitmap.tile.height / 2);
		// Now center the bitmap to the screen
		bitmap.x = s2d.width / 2;
		bitmap.y = s2d.height / 2 ;
	}
	
	override function update(dt:Float) {
	}
	
	static function main() {
		new Main();
	}
	
}

 

And running this one...

image

 

Here we again create a Bitmap to be drawn on screen, but this time using a different process.  In the first example (which is that way you would do things 99% of the time) we loaded the resource as a Tile.  In this example we instead load it using the toBitmap() method.  This is VERY VERY VERY confusing, and is why I decided to show it as an example.  toBitmap() does NOT create a Bitmap object, instead it creates a BitmapData object.  This naming convention was quite poorly chosen in my opinion and leads to a great deal of confusion.  BitmapData can be thought of the raw bytes of information that go together to make all the various pixels in our bitmap.  BitmapData is stored in system memory and is extremely slow to work with.  That said, you can easily manipulate this information, so if for example you wanted to convert all of the individual pixels to grayscale, you could.

Another change here is we didn’t set the Bitmap’s parent (s2d) during construction.  Instead we manually add the newly created bitmap to our scene by calling addChild().  This function will take any Sprite derived class.  We will get back to that in a second, but it’s an important concept to understand.  This second example shows a couple other key concepts.  Notice how we set the position .x and .y?  Well these are simple pixel coordinates to represent where the image should be drawn relative to the origin of it’s parent (s2d in this case).  The origin by default is the top left corner.  In this example we set the pivot point (or origin) by specifying dx and dy.  These are delta values that tell you where drawing calls are made relative to.  In this case we will perform drawing calls on this object relative to it’s mid point.

 

That’s about all I want to cover at this point in time, but there are a few key Heaps classes we should understand before moving on.

 

Sprite

If you come from other game engines, this terminology is very confusing.  Almost universally a Sprite represents and image ( bitmap or texture in memory ) and the position to draw it at.  In heaps however, a Sprite is only about the position of the object. Sprite is the only type of object that can be added to Layer (and thus Scene) ‘s addChild() method call. 

 

Drawable

Drawable inherits from Sprite and is the parent class for things that can actually be drawn on screen.  Bitmap inherits from this class, but so to does Text which we used earlier, as does Anim and Graphics.

 

Scene

s2d is an instance of Scene which is ultimately the root of the 2D scene graph.  At it’s core, Scene is actually a Sprite itself ( via Layer ), but it also holds a special object called Stage and is capable of responding to a number of UI events, as we will see in an upcoming tutorial.

 

Tile

This is another one of those things can be a bit confusing.  A Tile is a rectangle within a texture or image, but ultimately represents a source rectangle that is going to be displayed.  For example, the tile of a bitmap could represent only a portion of the source image.  Consider the following change to our original source:

	override function init() {
		Res.initEmbed();
		var logo = Res.logo.toTile();
		var bitmap = new Bitmap(logo, s2d);
		bitmap.tile.setSize(Math.round(bitmap.tile.width / 2),	
		Math.round(bitmap.tile.height / 2));
	}

 

When this code is run we get:

image

 

The underlying image of our Bitmap is unchanged, but we are only using a quarter of it because we shrank the dimensions of the tile.  This Tile approach is handy when dealing with sprite sheets, where you have several different frames of animation in a single source texture.  We will see this process in a later tutorial.

Programming

16. May 2016

 

MakeHuman 1.1 was just released today.  This marks the first release to Make Human in nearly two years and adds major new functionality such as a new pose system and completely new and more game friendly skeleton support.  MakeHuman started life as a Blender plugin but was since spun off into a stand alone application.  It enables people to quickly and easily create fully rigged and textured human models.  Oh and it’s complete free and released under the CC0 Creative Commons open source license, perhaps the most liberal license in existence.

 

image

Major components of this release include:

  • Many bug fixes and stability fixes
  • Many targets improved and minor modeling corrections
  • Completely new skeleton and posing system, with support for pose loading from BVH, and support for custom weight and proxies
  • New pose system with auto-rigging, support for T-pose export, and initial support for special poses like high heel shoes
  • New skin library with age variation
  • New expression system now based on a face bone rig, including a library with facial expressions.
  • Improved topologies/proxies
  • FBX export now supports binary FBX and should work for most third-part applications which support FBX

 

 

You can read the full release notes here.

 

You can watch a video of MakeHuman in action below.

GameDev News, Art ,

Month List

Popular Comments