Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

31. January 2017


I found myself recently needed some rocks… I could easily download a collection of rocks, but I figured it would be extremely easy to just make my own.  My first thought was to simply take a cube, smoothly sub divide it a number of times, and apply a displacement modifier to it.  The end results however didn’t really bring the results I wanted:



By the way, you can learn more about using the Displace modifier on my earlier tutorial on using Blender for level creation.


Ok, apparently this is going to take more than a few seconds…  hey… I wonder if there is a plugin?  Turns out, yes, yes there is.  The plugin add_mesh_rocks does exactly what it says.  You can download a tarball of the plugin here using the snapshot link.   You can get instructions for installing (a different but same process) plugin in Blender here.  Download and enable the plugin.



Once you’ve downloaded and enabled the plugin, there is a new option in the Add->Mesh menu, Rock Generator:



NOTE*** There seems to be a bug, the option wont be available if there isn’t any existing geometry in the scene.




Ok, I admit, that looks a bit more like a kidney bean than a rock, but it’s a start.  If you look in the Tool (T) panel, you will see initial creation options for Rock Builder:



Click Generate materials if you want it to create a starting rock texture for you.  Every time you change any setting, you will get a completely different rock, like so:



If you don’t want this behavior, turn off the random seed setting.  Once you’ve got a rock you are happy with… let’s destroy it!


Before we go to far though, if you dont want performance to absolutely crawl, we want to apply several modifiers that were created as part of the rock creation process.  Go to the modifiers tab and start applying the various modifiers:



OK, back to destruction.  The first and most obvious option is the Explode modifier.  There are a few steps we have to take here… first go into edit mode, select all the vertices and in the vertex data tab create a new vertex group.  Now apply first a particle system modifier, then an explode modifier.  Finally wire up the vertex group, like so:



The problem with explode is that it applies to the hull of the object only, so the results may not be way you want… as you can see:



In some cases, that effect might be exactly what you are looking for.  Oh, and I turned gravity off to get the effect above. But if you instead want things to be a bit more… substantial, it’s time for a rethink.  In fact, it’s time for another plugin, but thankfully this one ships with Blender, it just needs to be enabled.   What you are looking for is “Cell Fracture”:



Once enabled, in Object mode, there will now be a new option available in the Edit section of the Tools tab:



Cell Fracture will split your object up into several solid pieces.  You’ve got tons of control over how the fracturing will occur.



What I personally did was changed source limit (number of pieces) down to 12 and unchecked “Next Layer” so the fracture occurs in the primary layer.  Now you will notice you’ve got several meshes instead of one:



In fact, you can now get rid of the source rock if you want.  You will notice your rock is actually 12 rocks now:



Instead of using a particle system like we did with explode, we are going to use Dynamics (Physics) instead.  Select all of the objects, switch to the physics tab and select Add Active.



This means all of our rocks will now participate in the physics engine.  To see the result, quickly add a plane to the scene, make it a rigid body and turn dynamic off:



And now press play in the timeline:



Now that looks much more realistic!  Now, what if we wanted our rock to explode instead of fall?  Well, physics are once again coming to our aid!  This time add a force field to the scene:



Then crank the strength way up (or lower the mass of your objects), like so:



Once again, I don’t want gravity to be part of the process, so I turn it off.  In the Scene tab, simply turn off gravity, like so:



And voila, exploding rocks!


Art, General , , ,

31. January 2017


The Haxe Foundation have just announced the release of Haxe 3.4.0.  Haxe is commonly used in game development with several game frameworks and engines available.  3.4.0 is a relatively minor release composed primarily of bug fixes, the following is an abridged version of the changelog:

General improvements and optimizations:

  • all : support completion for static extensions (#5766)
  • all : removed neko dependency for macros, use PCRE instead
  • all : disabled analyzer optimizations by default, re-enable with -D analyzer-optimize
  • php7 : generate native $v instanceof MyType instead of, MyType) where possible for better performance
  • php7 : added @:phpNoConstructor meta for externs which do not have native php constructors and yet can be constructed
  • php7 : greatly reduced amount of generated tmp vars
  • php7 : Array performance improvements
  • hl : made various improvements


  • all : fixed using picking up non-static abstract functions (#5888)
  • all : fixed issue with side-effect detection when optimizing (#5911)
  • all : fixed issue with zlib bindings causing zlib_deflate errors (#5941)
  • php7 : Allow user-defined modules in php package (#5921)
  • php7 : Dereference some of php.Syntax methods if required (#5923)
  • php : fixed assigning a method of dynamic value to a variable (#5469)
  • php : fixed missing initialization of dynamic methods in classes with empty constructors (#4723)


For complete details of what’s changed in the release be sure to check the complete change logs available here.

GameDev News

28. January 2017


Amazon have just released beta 1.7 of their Lumberyard game engine.  Lumberyard is a fork of the CryEngine game engine, we took a quick hands-on look shortly after Lumberyard was released.  Lumberyard 1.7 beta brings a number of fixes and improvements to the engine, in fact it brings “more than 403 of them”…  which I have to admit is somewhat strange wording on Amazon’s behalf.   One major new addition is the new Asset Browser:

With the new Lumberyard Asset Browser Preview in 1.7, you can now see all of your available assets (including source folders and files in editor, gem, and project folders) in a familiar view in the Editor, and use those assets in your scenes by drag and dropping. Having the ability to access source assets in just one step from the Editor dramatically speeds up iteration, especially when your project uses complex source assets that can produce multiple outputs (e.g. a single .fbx file that contains both meshes and materials). Also, the new Asset Browser automatically updates itself as assets are changed, removed, or added, using the Lumberyard Asset Processor.  The Asset Browser’s underlying APIs are exposed to the Lumberyard bus system, so if you are writing your own plugin or controls, you have access to rich information about the assets, for example file size, name, location, what source produced the asset, and what other assets were produced at the same time.

Another major aspect of this release is improvements to the UI:

What you see above [to the right]is the first phase of our Editor UX improvements. We’ve interviewed many game developers, both internal and external, and have begun reorganizing and streamlining the main editor interface based around the new Component Entity system and the feedback we’ve received from our customers. Previously, to create a game object you had to select between 12cry1 different object types, and then navigate multiple layers of the Rollup Bar to customize them. Now there is one type of game entity, which you can create with a simple right click. Editing an entity’s components, selecting files to be used on that entity, and toggling between all of your level’s entities all happens in the main window. You can also create nested prefabs of entities (“slices”) just as easily – just right click on the main window.

Next on our UX team’s list is to streamline the toolbar and top menu, while still giving you the ability to deeply customize your layout based on your role or preferences. We’re collecting more data and feedback from customers – if you have ideas, we want to hear about them. Please let us know on our forums, where you can see a preview of where we are heading next.


Android developers will now have the ability to deploy directly from the editor, no more need to drop to a command line to deploy your application.  They also shipped a new multiplayer focused example (Geometry Wars clone) using their new Component Entity workflow and their networking layer GridMate.   Other improvements in this release include:

There’s lots more to this update, too, including Visual Studio 2015 support, spherical video playback support for VR, integration with Perforce Helix, UX improvements to our Geppetto character tool, new component entities that support audio, lighting, compound shapes, and animation, updates to Twitch ChatPlay and Metastream, integration with the latest AWS 1.0.24 SDK, and more.


You can read the full details of this release in the release notes or in the announcement blog post.

GameDev News

27. January 2017


Currently in closed beta, but available to existing purchasers, GameMaker Studio was just released.  Along side this release several new supported platforms were added, Mobile, Web and UWP (Universal Windows Platform).  In addition to the new supported platforms, brings the following new features (from the release notes):

  • Lots and lots of bug fixes throughout the product, including:
  • Choosing "Sensei" in Font Editor and then saving project caused the IDE to fail to finish the save, had to force close image
  • IDE hanged when using Convert To Frames on large sprite
  • IDE could crash when selecting the rectangle or line tools while on a tile layer
  • Double-clicking collision mask could lock it and changing mask values in this state gave "IDE Unstable"
  • Undoing collision mask changes or toggling auto/manual on an empty sprite resulted in "IDE unstable"
  • Some users have been unable to download some assets in My Library, got a blank error dialog
  • A sprite mask which used an alpha tolerance of 255 was not previewed correctly
  • TAB names are now saved as part of the layout
  • You could not copy/paste frames between sprites before - you can now
  • Copy/pasting events between objects sometimes required you to paste twice before the event appeared
  • Code Editor forced you to use UK or US English function names as per your Preference - you can now type whichever
  • Object/room physics fields and the colour picker didn't like commas as decimal seperators - can now use comma values with these
  • Image editor didn't save grid settings as part of the sprite
  • Configs weren't being applied properly during builds, so only Default config's values were applied
  • F2 should now rename everything
  • Lots of source control fixes
  • Branding info and version number has been removed from taskbar buttons and the titlebar
  • Following feedback, we have changed the manual to open in-IDE by default (new installs), rather than in your browser
  • And we fixed the manual sidebar so it can now be resized
  • You can read more about the release on their blog available here.

    GameDev News

    25. January 2017


    Tiled, the popular open source map editor, just released version 0.18.1.  This release is entirely composed of fixes and improvements, with no new functionality added.  If you are interested in learning more about Tiled, we have a complete tutorial series available here.


    From the changelog:

    • Fixed terrain brush for isometric staggered maps (#427, by Clyde)
    • Fixed crash when resizing map causes objects to get removed
    • Fixed crash when duplicating an object layer
    • Fixed position of image layer after Resize or Offset Map (#1418)
    • Fixed the quality of the minimap on HiDpi displays
    • Fixed Alt-drag behavior to not override resize handles (#14251)
    • When adding a new layer, insert it above the current one
    • GmxPlugin: Fixed positioning for non-tile objects and support scaling (#1426)
    • GmxPlugin: Export tile objects without a type as tiles
    • GmxPlugin: Support horizontal and vertical flipping
    • Windows: Fixed encoding problems with command-line output (#1381)
    • Windows: Fixed the architecture of shipped MSVC DLLs (#1338)
    • Updated Chinese translation (#1432, by Clyde)

    GameDev News

    Month List

    Popular Comments