Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

6. December 2016

 

A couple years ago I did a detailed text tutorial on how to use a debugger which oddly is a massively important skill that simply isn’t taught.  Given that this article is still popular two years later I’ve decided to follow it up with a video version.  This video, Debugging 101, walks through the basic tasks involved in debugging.  It used Visual Studio 2017 and C++ but should be applicable in most languages and IDEs.  The video shows how breakpoints and conditional break points work, how to step into, over and out of your code, how to use the local and watch window, call stacks, how to do memory debugging and more.  Basically the video shows you how to get started using a debugger.

 

The following is the code used in this example.  There is nothing special to this code, it’s extremely contrived, but it enabled me to show the various features available in most debuggers.

#include <iostream>

// These two functions are used to illustrate how the call stack works
// As well as how step into and step out of behave.
int innerFunction(int input) {
	int meaninglessCounter = 0;
	for (int i = input; i > 0; i--) {
		// First show stepping through the loop
		// Set a conditional breakpoint that breaks when i is a certain value.
		meaninglessCounter++;
	}
	return input;
}

int outerFunction() {
	int i = 42;
	return innerFunction(i);
}


class Demo {
	std::string stringValue;
	int intValue;
	bool booleanValue;

	public: 
		Demo(std::string a, int b, bool c) : stringValue(a), intValue(b), booleanValue(
		c) {};
};

int main(int argc, char ** argv) {
	// Callstack demo, jump into, jump over example
	int someVal = 0;
	someVal = outerFunction();

	// Data example -- simply create a char buffer, fill it with 'a' then null 
	terminate it so 
	// it can be treated like a string.
	char * data = new char[1000];
	for (int i = 0; i < 1000; i++)
		data[i] = 'a';
	data[999] = 0;
	std::cout << data << std::endl;

	//set a watch on d.  Demonstrates watches and drilling into complex object
	Demo d("Hello", 42, true);
	
	std::cout << "End of demo" << std::endl;
	delete[] data;
	// delete[] data;  Calling delete again will trigger an exception
}

Programming , , ,

5. December 2016

 

The mobile focused cross platform Lua powered game engine Defold just released version 1.2.94.  The release includes several bug fixes but more importantly contains some rather cool new features.  A big one, and something that was glaringly missing, is (initial) skeletal animation support for 3D models.  While a 2D engine, being able to mix in 3D models enables you to do some pretty powerful things, like texture swapped characters or dynamic inventory systems.  Particle system support for flipbook animation powered particles was also added in this release.

Full new feature list:

  • DEF-2308 - Added: Automatic particle resizing from flipbook animation
  • DEF-2161 - Added: Skeleton animations for 3D models
  • DEF-2295 - Added: Cursor and playback control for model animations
  • DEF-2304 - Added: Max GUI scene count per collection is now configurable in game.project
  • DEF-2202 - Fixed: Up-axis for Collada models are now taken into account
  • DEF-2202 - Fixed: Correct UV/texture coordinates for Collada models
  • DEF-2303 - Fixed: Label with dynamically set text remained after go.delete
  • DEF-2308 - Fixed: Automatic sprite resizing from flipbook animation
  • DEF-1972 - Fixed: Disable animating node during complete callback didn't update property fragments
  • DEF-2274 - Fixed: Spine nodes with animated alpha now works as expected
  • DEF-2145 - Fixed: Libraries/dependencies loading performance

 

You can read more, especially on the use and limitations of the new 3D animation system, in the release notes available here.  If you are interested in learning to use the Defold Engine we have a complete tutorial series available here.  If you just want to learn more be sure to check out our hands on video.

GameDev News

5. December 2016

 

Just recently at MechCon 2016, Piranha Games ( MechWarrior Online ) announced they were developing MechWarrior 5: Mercenaries as a single player game.  Why is this of interest to GameFromScratch.com readers?  There are two reasons, one big one extremely small.  First is Piranha’s decision to make the game using Unreal Engine.  This is interesting due to the fact that the studio’s previous title MechWarriormechwarrior5 Online was developed using CryEngine.  In fact it may have been one of the highest profile non-Crytek CryEngine titles that actually shipped ( sorry Star Citizen… ).  No doubt MW5 will re-use a number of assets from MWO and could have benefited from a great deal of the existing code, so the decision to change engines couldn’t have been made lightly.  This is a pretty nice win for Unreal Engine and has to sting a bit for Crytek.  Lead programmer Brian Windover gave the following answer on why they chose Unreal Engine:

“While deciding on a technology base for MechWarrior 5: Mercenaries it quickly became clear that Unreal Engine 4 would really hit all the notes for us,” said Lead Programmer Brian Windover. “When we were able to take our past experience developing a MechWarrior title and bring it to life in Unreal Engine 4 so quickly, and with such a high degree of visual fidelity, we had the immediate confidence that it was the clear engine of choice for MechWarrior 5: Mercenaries.”

“Unreal Engine 4’s increasingly versatile Blueprint system enables our designers to quickly prototype their ideas and craft the foundations of an outstanding single-player campaign. Its core technology, intuitive AI framework, and native VR support enables our engineers to introduce truly next-gen features with great ease and reliability. On the artistic side, Unreal Engine 4 is stunning, but it’s also extremely adaptable. It empowers our artists to really push our visuals to the edge, both in detail and scope, while still maintaining excellent performance.”

 

So, what’s the second reason?  The previous game, Mechwarrior 4:Mercenaries is easily in my top 5 games of all times list.  I also enjoyed MW:O, especially once their terrible publisher was removed from the equation, so I feel the title is in good hands.  Basically I’m just giddy this title was announced and I really look forward to seeing it happen.  The following early alpha video was shown along side the announcement:

 

 

 

For the three people that might be curious, my top 5 games of all times ( not the best games of all time, but certainly the ones that affected me the most) in no particular order is:

  • MechWarrior 4 series
  • Ultima 7
  • Tie Fighter
  • ShadowRun (Genesis Version)
  • Baldur’s Gate 2

 

Do you have a similar list? 

GameDev News

2. December 2016

 

Unity have just announced they have acquired Anima2D, a bone based 2D animation system (like Spine, Spriter, Creature, DragonBones, etc.) that works directly inside Unity.  After the aquisition Anima2D was removed from the Unity Store and will be instead made available for free starting in January 2017.

 

Details from the Unity blog:

At Unity, we are always looking for new ways to help our developers and provide them with the best tools possible. To that end, we are excited to announce that Anima2D, a popular skeletal animation software, will be available to the entire Unity developer community for free starting in January 2017! Along with this powerful tool, we welcome one of the asset creators, Sergi Valls, into our dedicated 2D team.
Improving the 2D creation experience

We’re committed to the goal of democratizing development and Anima2D will be an important part of improving our toolset and workflow for developers who are focused on the 2D space. Anima2D’s unique approach to 2D animation and 2D character tools combined with Sergi’s experience will be a pivotal part of this effort.

Anima2D features

  • image002D Bones
  • Sprite to mesh conversion
  • SpriteMesh Editor
  • Automatic weights
  • Weight Editor
  • Inverse Kinematics
  • Save / Load Poses
  • Atlas compatible
  • Bake Animation to Bones
  • Onion Skin
  • Create Avatar Masks

 

You can read more about the announcement here.  You can see a quick video of Anima2D in action linked below.

GameDev News

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

Month List

Popular Comments

Cross platform Java game library PlayN v1.6 was released
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > >

8. March 2013

Version 1.6 of the cross platform Java based game library PlayN was released recently.  PlayN enables you to target desktop, HTML 5, iOS and Android all using a single Java code base. 

 

  

Here are the release notes for this release:

PlayN v1.6

  • The complete API changes are summarized in this JDiff report.
  • Below is a summary of the interesting changes.

Project Layout

  • The way projects are organized has changed, please see Migrating15to16 for details.

Core

  • Implemented tinting for layers (only on GL backends). See Layer.setTint and Layer.tint.
  • Added Log.setMinLevel to allow suppressing log messages below a certain level. (Recommended by Google for Android release builds.)
  • Added Sound.release for releasing audio resources sooner than waiting for GC to do it.
  • Added Assets.getMusic which allows backends to make some optimizations relating to large audio files.
  • Graphics.setSize was removed, and special setSize methods were added to individual platform backend code that can reasonably support them (e.g. HtmlGraphics.setSize).
  • Added GLContext.Stats for debugging rendering performance on GL backends. (See Triple Play's HUD class for an easy way to display these stats.)
  • Deprecated Canvas.setTransform because it interacts poorly with automatic scale factor management in HiDPI modes.
  • Added CanvasImage.snapshot which can be used to create an immutable snapshot of a canvas image which has higher render performance.
  • Added TextLayout.ascent/descent/leading for cases where an app needs to know more about the text that will be rendered by aTextLayout (for underlining, for example).
  • Added Json.Writer.useVerboseFormat to cause the JSON writer to generate pretty printed output (rather than compact, everything on one line output).
  • Added support for nested clipping regions (e.g. clipped groups inside of clipped groups).

Java

  • Made the Java backend look for .wav audio files and then fall back to .mp3. This allows a game to use uncompressed .wav audio files, and only compress them when preparing an Android, iOS, or HTML build.
  • Made playback of large MP3s work (when loaded as music).

HTML

  • Added HtmlAssets.ImageManifest which can be used to pre-load the dimensions of all images known to your app, and enableAssets.getImageSync to (sort of) work in the HTML backend. A wiki article explaining this will be forthcoming.
  • Added support for HiDPI mode. See HtmlPlatform.Config.scaleFactor and HtmlAssets.setAssetScale.
  • Added HtmlGraphics.registerFontMetrics for overriding the (hacky) measurement of font line height.
  • Removed source code from the stock POMs. HTML backends now need to add the source jar files to their html/pom.xml. See playn-samples for an example.

Android

  • Fixed issue with audio not stopping when device was put to sleep.
  • Images loaded locally are now marked as "purgeable" and "input shareable". Google for "android" and those terms to learn more.
  • Added AndroidGraphics.setCanvasScaleFunc which allows games to use lower resolution canvas images if desired. This is useful on devices with low memory.
  • Added AndroidAssets.BitmapOptions which allows games to downsample images if desired. This is useful on devices with low memory.
  • Added GameActivity.prefsName for customizing the name of the Android preferences file.
  • Added GameActivity.logIdent for customizing the Android log identifier. It defaults to playn which is what was hard-coded before.
  • Rewrote sound backend based on SoundPool. Music (large audio files) still relies on the old more-hardware-resource-intensive approach.

iOS

  • Added IOSPlatform.Config for specifying configuration options.
  • Added IOSPlatform.Config.frameInterval for specifying target FPS on iOS.
  • Added IOSImage.toUIImage for custom platform code that needs to manipulate an image loaded via IOSAssets.getImage.
  • Numerous bug fixes and performance improvements.

 

Additionally, TriplePlay 1.6 was also released.  TriplePlay is a library built over top of PlayN to support higher level functionality like UIs and animation.

The following are TriplePlays release notes:

 

TPUI:

  • Added Scroller makeVisible.
  • Added LongPressButton which supports both a normal press interaction and a long-press interaction.
  • Added AxisLayout.Policy CONSTRAIN off-axis sizing policy.
  • Added Field MAXIMUM_INPUT_LENGTH style.
  • Added TableLayout colspan for configuring a column span on an element.
  • Added ValueLabel.
  • Added Style ICON_CUDDLE and UNDERLINE (the latter for underlined text).
  • Added TableLayout.Column free to allow weighting of free columns.

TPAnim:

  • Added AnimGroup for creating a group of invoked-in-parallel of animations that are either added to an Animator later, or are added to a serial animation chain.
  • Moved animation creation methods from Animator to AnimBuilderAnimation then now returns an AnimBuilder which is a cleaner design.
  • Clarified behavior of Animator add and then, made then freak out if used incorrectly.
  • Fixed bugs with repeating animations.

TPSound:

TPParticle:

  • Added Transform randomScale and randomOffset.

TPFlump:

  • Various bug fixes and small API improvements. See API changes.

TPPlatform:

  • Added NativeTextField Validator and Transformer for (native) text validation and transformation.

TPShader:

  • TintingShader was removed as PlayN layers now support tinting directly.

TPUtil:

 

 

For existing PlayN 1.5 developers, there is a guide for migrating to 1.6.

,

blog comments powered by Disqus

Month List

Popular Comments