Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
15. May 2017

 

LWJGL, the Light Weight Java Game Library, just released version 3.1.2.  LWJGL is series of low level language bindings to critical game development related APIs such as OpenGL and OpenAL.  LWJGL is the underlying technology Java libraries such as LibGDX and jMonkeyEngine depend on for desktop targets.  The 3.1.2 release brings several new fixes and features, including new VR oriented library bindings.

 

Details from the release log:

Bindings
  • Added OpenVR bindings.
  • Added Tiny OpenEXR bindings.
  • Added Yoga bindings.
  • bgfx: Updated to API version 41 (up from 34)
  • glfw: Updated to pre-release 3.3.0 version (up from 3.2.1). Includes many fixes and new features:
    • Last error code query (glfwGetError)
    • Requesting attention from the user (glfwRequestWindowAttention)
    • Platform dependent scancodes for keys (glfwGetKeyScancode)
    • Window maximization events (glfwSetWindowMaximizeCallback)
    • Window attribute modification (glfwSetWindowAttrib)
    • Joystick hats (glfwGetJoystickHats)
    • Library initialization hints (glfwInitHint)
    • Headless OSMesa backend
    • Cursor centering control (GLFW_CENTER_CURSOR)
    • macOS: Cocoa hints (GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_COCOA_FRAME_AUTOSAVE, GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_COCOA_CHDIR_RESOURCES, GLFW_COCOA_MENUBAR)
    • macOS: Vulkan support via MoltenVK
    • X11: Moved to XI2 XI_RawMotion for disabled cursor mode motion input
    • EGL: Added support for EGL_KHR_get_all_proc_addresses and EGL_KHR_context_flush_control
  • jemalloc: Updated to 4.5.0 (up from 4.4.0)
  • LibOVR: Update to 1.14.0 (up from 1.10.0)
  • lmdb: Updated to 0.9.20 (up from 0.9.18)
  • NanoVG: Added support for fallback fonts.
  • nuklear: Updated to 1.37.0 (up from 1.29.1, with the new versioning)
  • OpenAL: Added AL_SOFT_source_resampler extension.
  • stb
    • Updated stb_dxt to 1.0.6 (up from 1.0.4)
    • Updated stb_easy_font to 1.0 (up from 0.7)
    • Updated stb_image to 2.15 (up from 2.13)
    • Updated stb_image_resize to 0.94 (up from 0.91)
    • Updated stb_image_write to 1.05 (up from 1.02)
    • Updated stb_perlin to 0.3 (up from 0.2)
    • Updated stb_rect_pack to 0.11 (up from 0.10)
    • Updated stb_truetype to 1.15 (up from 1.12)
    • Updated stb_vorbis to 1.10 (up from 1.09)
  • tinyfiledialogs: Updated to 2.8.3 (up from 2.7.2)
  • Vulkan: Updated to 1.0.49 (up from 1.0.38)
Improvements
  • MemoryStack: Increased default stack size to 64kb (up from 32kb)
  • Shared library loading can now utilize a ClassLoader specified by the caller. (#277)
  • Significantly reduced DEBUG_MEMORY_ALLOCATOR and DEBUG_STACK overhead in Java 9 using the new StackWalker API.
  • Migrated windows builds to appveyor and updated to Visual Studio 2017 (up from 2015)
  • EGL: The core API now includes javadoc links to the Khronos references pages
  • OpenGL ES: The core API now includes javadoc links to the Khronos references pages
Fixes
  • Assimp: Struct member nullability fixes
  • Linux: Removed dependencies to newer GLIBC versions.
  • LibOVR: Fixed layout of the ovrInputState struct.
  • OpenAL: Removed buffer auto-sizing from alcCaptureSamples. The number of samples must now be specified explicitly, similar to alcRenderSamplesSOFT.
  • Vulkan: Function addresses are now retrieved only once, using the optimal method for each function type.
    • This avoids warnings on pedantic validation layers.
  • Fixed callback invocation bugs on 32-bit architectures.
  • Fixed various javadoc formatting issues (#308)
Breaking Changes
  • Mapped more integer parameters and return values to Java boolean, that were missed while working on #181.
    • Xlib's Bool
    • OpenCL's cl_bool
    • DynCall's DCbool
  • Moved JNI global reference functions from MemoryUtil to the generated org.lwjgl.system.jni.JNINativeInterface.
  • The Vulkan capabilities have been split into two classes: VKCapabilitiesInstance and VKCapabilitiesDevice.
    • Flags for core Vulkan versions exist in both classes.
    • Flags for instance extensions exist only in VKCapabilitiesInstance.
    • Flags for device extensions exist only in VKCapabilitiesDevice.
    • Functions that dispatch on VkInstance or VkPhysicalDevice exist only in VKCapabilitiesInstance.
    • Functions that dispatch on VkDevice and device-derived handles exist only in VKCapabilitiesDevice.
    • Bootstrapping functions can be retrieved with VK.getFunctionProvider().

GameDev News


15. May 2017

 

Construct 3 is the recently released version of the Construct 2D game engine.  If you are interested in trying it out right now might be the ideal time as all functionality is enabled for free until May 28th for the C3Jam hosted on Newgrounds.  If you are interested in learning more about Construct 3, be sure to check out our hands-on video available here and embedded below.

The game jam rules require you to use the Construct 3 game engine obviously, with the following requirements as well:

1) Your game must be based on original material, for example you can't use Mario sprites.
2) Your game must not contain unlicensed audio / music.
3) You may work with artists and musicians to support your project!

The theme for this game jam is "Good Things Come in Threes."  You can read more about the game jam and Construct 3 engine on the Scirra blog.

Even if you aren't interested in participating in the game jam, this is perhaps the perfect opportunity to give Construct 3 a try.

GameDev News


9. May 2017

 

YoyoGames have just released GameMaker Studio 2.06.  The update brings new functionality to the built in image editor ( trim, reverse frames and colour remove ).  New touch gestures have also been added, rotate and pinch.  This release also marks the first release with feature parity between the Windows and newly released Mac versions.  Additionally the Mac version now automatically installs and downloads Mono if it is not already installed.

 

Details from the press release:

The GameMaker Studio 2 update will increase developer productivity with new image editor tools and Visual Studio 2017 compatibility, while user-interface changes to the Resource Tree will imagedecrease some occurring issues from the launch version. 2.06 also includes some necessary bug fixes to ensure users receive the smoothest GameMaker Studio 2 experience possible. For more information about each fix and feature coming in the GameMaker Studio 2 2.06 update, please visit: https://www.yoyogames.com/gamemaker/releasenotes

GameMaker Studio 2 for Windows PC is available as a free trial download and can be purchased through YoYo Games’ website and Steam starting at $99.99. Users of GameMaker Studio can still upgrade to GameMaker Studio 2 at a 40 percent discount until May 31, 2017. Developers interested in providing feedback to the Mac IDE can send an email to [email protected] with the subject line “Mac IDE Closed Beta” and provide their full name, country and Mac specifications (including OS version) to be considered an invite.

GameDev News


8. May 2017

 

Ever needed to loop a background forever in your 2D game and wondered the best way to do it?  That’s exactly what we are going to look at today, with all the code samples done using HaxeFlixel, which I recently covered in this tutorial series if you wish to learn more.  One key aspect is to have a background that is seamless.  That is the ending edge and beginning edge need to blend seamlessly together.  For this example I am using this graphic (click for the full resolution version).

BloodRed

 

There are two approaches we are going to cover today.  The first one is the simplest, essentially we update our camera when we get within half a screens height of the edge and loop it to the bottom, like so:

CameraLoop0001-0060

 

Let’s take a look at the code.

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.FlxObject;

class PlayState extends FlxState
{
   var bg:FlxSprite;
   var camTarget:FlxObject;
   override public function create():Void
   {
      super.create();
      bg = new FlxSprite(0,0,AssetPaths.BloodRed__png);
   
      add(bg);

      camTarget = new FlxObject();
      camTarget.setPosition(FlxG.width/2, FlxG.height/2);
      FlxG.camera.target = camTarget;

      add(camTarget);
   }

   override public function update(elapsed:Float):Void
   {
      super.update(elapsed);
      camTarget.y+=25;

      // Move the camera to loop forever  
      if(camTarget.y >  bg.height - FlxG.height/2){
         camTarget.setPosition(FlxG.width/2, FlxG.height/2);
      }
   }
}

 

The downside to this approach is you also need to reset the Y coordinate of all the entities in your scene as your camera resets.

Another option is to use two instances of the background and as you approach the edge you raise the lower most version to the top and repeat forever.  Like so:

CameraLoop20001-0060

 

Here is the code for this approach.

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.FlxObject;

class PlayState extends FlxState
{
   var bg:FlxSprite;
   var bg2:FlxSprite;
   var camTarget:FlxObject;
   override public function create():Void
   {
      super.create();
      bg = new FlxSprite(0,0,AssetPaths.BloodRed__png);
      bg2 = new FlxSprite(0,bg.height,AssetPaths.BloodRed__png);
   
      add(bg);
      add(bg2);

      camTarget = new FlxObject();
      camTarget.setPosition(FlxG.width/2, FlxG.height/2);
      FlxG.camera.target = camTarget;

      add(camTarget);
   }

   override public function update(elapsed:Float):Void
   {
      super.update(elapsed);
      camTarget.y+=25;

      var greater,lesser;
      if(bg.y > bg2.y){
         greater = bg;
         lesser = bg2;
      }
      else{
         greater = bg2;
         lesser = bg;
      }
      if(camTarget.y > greater.y + bg.height - FlxG.height/2){
         trace("Flip");
         lesser.y = greater.y + bg.height;
      }

   }
}

 

This approach has the advantage of enabling you to keep coordinates consistent, but has the downside of requiring a second identical sprite.  Since the second sprite is simply an instance of the same texture though, the memory impact should be almost non-existent.

Programming


3. May 2017

 

Ever find yourself wanting to render a 360 degree view of your model?  If you’ve ever used Blender for game sprite creation I bet you have.  What is the best way to go about doing this?  One way is to keyframe the object rotating over time, although this may not result in the lighting you want.  A better way is to orbit the render target using the camera.  The question is, how do you do this?  Well you can manually keyframe the camera’s position and rotation but this process is a gigantic pain in the butt.  An easier solution is to have the camera follow a spline path.  That’s what we are going to look at today, it’s thankfully quite easy, but perhaps not entirely intuitive.

 

First thing you need to do is create the path for your camera to follow.  In my case I’m using a simple circle, with the center of the circle around my target, like so:

image

 

Next, select your camera, then shift select the curve.  Then hit CTRL + P and select follow path.

image

 

And voila!

BlenderCamPath

 

That said, how exactly do you control how fast the animation moves?  Don’t worry, it’s quite easy.  With the curve selected, go to the Data panel and locate the Path Animation section.  The number of frames can be configured here.

image

 

Easy 360 degree (or in this case, 180 degree) rendering!

RotateGif

 

You can watch this in process in the video below.

Art


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List