Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
2. July 2015

 

Sometimes when you are working with Blender you want to render a beauty shot, but want to also show the wireframe of the model you are working on.  This video shows that process.  (As an added bonus, it also shows how to enable wireframe display while in Object mode in case you were wondering how ).

 

 

The Process

 

Select the Object you wish to render with a wireframe overlay:

image

 

Hit Shift + D to duplicate it.

image

 

Select the material on the wireframe and make it unique.

image

 

Select a diffuse color for your wireframe.  Optionally enable emit if you want the wireframe to glow slightly.

image

 

Add a Wireframe modifier to the copy

image

 

Now render:

image

Art


26. June 2015

 

The lattice object/modifier pairing is a under appreciated modeling tool in Blender, which makes it fast and simple to make sweeping changes to high density polygon meshes, in a way much faster than even sculpting.

 

This quick Blender Tip tutorial video ( available in HD here ), illustrates the process.

 

 

Basically, you envelop your existing mesh in a Lattice Object:

image

 

Like so:

image

 

Zoomed to illustrate better:

image

 

Then in object mode with your mesh selected, go to the modifiers tab and add a Lattice Modifier, click Object and select your Lattice:

image

 

Now select the Lattice object, and set the number of divisions you wish ( how many control points in each direction ):

image

 

Switch to Edit mode and make whatever alterations you wish, changes to the lattice will be applied to the underlying shape:

image

When done, with the Mesh selected, go to modifiers and click Apply:

image

 

You can now delete the Lattice, and tada, updated polygon mesh:

image

 

The video also shows how to set a shape key for animation if you are curious. 

Art


18. June 2015

 

So I decided to take a look at the process of extending the Godot Engine, and to my horror I discovered there is no solution file!  UGH…  Yeah, you can compile from the command line, but that’s not that pleasant of a development experience to an IDE warrior like myself.  I thought I found a solution that I posted about here and I almost did, but it still left me unable to debug and with mostly broken Intellisense support… so, yeah, not great.  Then I found this post, which although it didn’t work, it did fill in the missing pieces.  So, if you want to work with Godot using Visual Studio, here’s how you do it.

 

First you need to have a properly configured development environment… meaning Visual Studio, git and python, all in your PATH.  Next launch a Visual Studio command line, this guy…

image 

 

Make and change to the directory you want to install Godot.  Keep in mind this process will make a godot folder, so if you want c:\godot\ run the following from c:\.

 

git clone https://github.com/okamstudio/godot.git

This will download the latest source for Godot Engine.  Next we want to build it for the first time and generate a Visual Studio solution file.  cd into the Godot directory and run:

scons vsproj=yes platform=windows

If you get an error here, first be sure you are using a Visual Studio command prompt, next be certain you are in the correct directory.  Otherwise your computer should churn away for a few minutes while godot libraries and tools are built.

After several minutes, in an ideal world you should see:

image

 

This means Godot successfully built and it created your Visual Studio project files.  Woot.  Now time to get Visual Studio to actually work.

 

First in the root of your project directory ( C:\Godot\ in my case ), create a file named build.bat, with the following contents:

set vc_path=%1
call %vc_path% & scons platform=windows

 

Next load the generated sln file in Visual Studio.  Give it a minute or two to parse all the files.  You will notice massive amounts of Intellisense errors, don’t worry, we will fix those next.

In Solution Explorer, right click your Project ( not solution, Project! ) and select Properties.

image

Select VC++ Directories then double click Include Directories:

image

Append the following to the value in Include Directories:

$(ProjectDir);$(ProjectDir)/core;$(ProjectDir)/core/math;$(ProjectDir)/tools;$(ProjectDir)/drivers;$(ProjectDir)/platform/windows;

This adds the include directories Godot depends on.

 

Next click NMake on the left hand side.  We now want to replace the contents of Build Command Line and Output to:

image

Then click Apply then OK.

 

You should now be able to hit Build->Build Solution.  If all went right, you should see build progress in the Output panel:

image

 

You can now run and debug as normal, set breakpoints within the code, hit F5 and Godot editor will run.  Keep in mind, it’s the Godot Editor you are debugging, not the library, although since you have full source you should easily be able to step into Godot core code, you just may not be able to set breakpoints there.

 

You are now ready to extend or contribute to Godot using the full power and comfort of Visual Studio.

 

The following is a video showing exactly this process, just in case I missed a step.

 

Programming


13. June 2015

 

This is a topic that seems to cause some degree of confusion, especially among new game developers.  We often here the terms “game library”, “game framework” and “game engine” but what is the difference, where does one end and the next begin?  This post attempts to explain the difference as clearly as possible.  It’s important to note, there isn’t a hard and fast definition for each term, basically the meaning prescribed to each is formed by the most popular usage.  I suppose that’s true with most modern words.

 

Library

A library is simply put a collection of code and data intended for reuse.  Libraries are often compiled binaries, such as DLLs, but don’t have to be.  Plenty of JavaScript libraries exist for example, while entire template libraries in C++ are pure code.  In game development terms, a library generally is a collection of code for performing tasks from a specific domain.  For example, playing audio, performing physics, handling input.

Gamedev examples of libraries include FMOD, RakNet, Box2D or Assimp.

There can be some ambiguity here, as FMOD for example contains some tools and calls itself “middleware”, while Box2D refers to itself as an “engine”, both are still essentially libraries.

 

Framework

What happens when you gather a bunch of libraries together, throw in a couple of tools, assembling all the ingredients you need to start creating a game?  Well, you’ve got yourself a framework.  Essentially a framework is a collection of libraries and tools that go together to solve a given task, in this case, making a game.

Gamedev examples include SFML, OGRE, LibGDX and MonoGame.

SFML is a good example of the relationship between libraries and frameworks.  SFML is composed of several libraries… graphics, input, window, audio, etc…  Collected together as a whole they become the framework SFML.  LibGDX is a slightly more interesting example as the inclusion of Scene2D straddles the line between framework and game engine a bit closer than most. 

 

Game Engine

So, a library is a collection of code to accomplish a task, a framework is a collection of libraries to create a game, we does something become an engine?  This classification is probably the least defined but in my opinion two key things separate a framework from a game engine.  In addition to providing all the various libraries needed to create a game, a game engine must include:

  • a scene graph
  • a world/level editor

The scene graph is essentially the data structure that  holds a game’s world.   Generally there are a number of supporting functions for managing, searching and saving the scene graph as well, although often these are left to the game itself to implement.  The level/world editor requirement is probably the biggest distinguishing factor, although there exist some game engines (often 2D) that have no editor ( although I would then argue they are in fact frameworks ).

Game Engine examples include Unity , Unreal, Construct2, GameMaker, HeroEngine and Copperlight.

 

Quite often however, frameworks and engines will be used interchangeably.  Even here on GameFromScratch, the game engine resource refers to both game engines and frameworks using the same moniker.  This is because frankly, at the end of the day, it’s a matter mostly of semantics.

 

What about APIs and SDKs

This is another point of confusion for developers…  what’s the difference between an API, an SDK or simply a library?

Well an API is generally one or more library, as is an SDK.  An API ( Application Programmer Interface ) is generally a programmatic interface to another product.  That product could be an entire operating system, or an embedded programmable interface within a game.  That interface is generally provided in the form of libraries.

An SDK (Software Development Kit) is generally the same thing as a framework.  While a framework is a collection of libraries and tools used to create a game, an SDK can be a collection of tools and libraries to create device drivers for your OS, to use or integrate a technology or hardware such as the Oculus Rift or Android phones.  Of course and SDK can also be aimed at creating games, like DirectX or GameKit.  Then of course just to make life even more confusing, you can have a SDK/API/Library combo, like OpenGL.

Generally where APIs and SDKs vary from everything else discussed today is who provides them.  Quite often these are provided by the OS or hardware manufacturers.

General


1. June 2015

 

For my most recent tutorial, I am using a feature that is currently under active development.  This means I have to use a developer preview release and I figured I would share a quick post on how to install preview releases.  Of course the standard disclaimer applies…  you should never use preview releases for production work!

 

 

Installing a Preview Release

To install a Unreal Engine preview release, launch the Epic Games Launcher.

image

 

Select Library

image

 

Click Add Versions

image

 

A new empty version will be added:

image

 

Click the arrow to the top right and select the version you wish to install.  You will note the preview release isn’t available as an option for me ( nor is 4.7.6 ), as they are already installed on my machine.

image

 

The preview release should now download and install.  Now the next time you launch Epic Games Launcher, you will have an option over which game engine to launch:

image

 

It is safe to install multiple versions side by side, although it will take 5-6GB+ of disk space per install.  However project versions may not be compatible between different engine versions.  When you go to open an existing project, the engine version of each project will be noted, like so:

image

Programming


See More Tutorials on DevGa.me!

Month List