Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


4. January 2016

 

I was recently working with a tool that exported it’s level data as a directory full of obj files, literally hundreds of them.  You can import them into Blender using File->Import->Obj, unfortunately there is no way to do a select all.  Apparently in Blender 2.4x if you held SHIFT while selecting OBJ import, it would import an entire directory, but this doesn’t appear to work in modern Blender.  You can also SHIFT+Click multiple files to do multiple selection, but this gets tedious when you have hundreds of them.  Unfortunately CTRL + A doesn’t work…

 

Thankfully Blender is extremely scriptable, so let’s turn to Python for a solution.  The following script will import a directory full of OBJ files into the current scene.

import bpy
import os

def fileList(path): 
    for dirpath, dirnames, filenames in os.walk(path):
        for filename in filenames:
            yield os.path.join(dirpath, filename)

for f in fileList("C:\\file\\path\\here\\"):
    if f.lower().endswith(".obj"):
        bpy.ops.import_scene.obj(f)


Be sure to change the path to your directory and if on Mac OS or Linux, to change the path format /to/this/style. Otherwise this script will chug away importing the OBJ files for you. Hopefully at some point Blender gives you the ability to select all while importing and the need for this script goes away completely.

Art, Programming , ,

blog comments powered by Disqus

Month List

Popular Comments

Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

23. August 2016

 

Put a hand up if you are sick of reading about these database hacks?  Yeah... me too.  Epic Games just announced that their forums, including the Unreal Engine forums, were the victim of a recent break in.  Thankfully it’s not a huge deal, as password information wasn’t taken.  User information however was taken and could certainly result in a rise in spam... yay.  They don’t however expect you need to change your password on their forums.  If you do however enter proper information when you sign up for forums (date of birth, name, etc.) you may want to be wary of unauthorized activity.  In addition to the Unreal Engine forums, account information for several older Epic developed game forums was also compromised and in these cased, encrypted passwords were also taken.

 

The full details:

We believe a recent Unreal Engine and Unreal Tournament forum compromise revealed email addresses and other data entered into the forums, but no passwords in any form, neither salted, hashed, nor plaintext.  While the data contained in the vBulletin account databases for these forums were leaked, the passwords for user accounts are stored elsewhere. These forums remain online and no passwords need to be reset.

Also, we believe a compromise of our legacy forums covering Infinity Blade, UDK, previous Unreal Tournament games, and archived Gears of War forums revealed email addresses, salted hashed passwords and other data entered into the forums. If you have been active on these forums since July 2015, we recommend you change your password on any site where you use the same password.

We don’t believe that other Epic related forums were affected, including Paragon, Fortnite, Shadow Complex, and SpyJinx.

We apologize for the inconvenience this causes everyone and we’ll provide updates as we learn more.

GameDev News

23. August 2016

 

Another week, another Unity patch, this one 5.3.6p3.  The release notes for this patch follow:

 

Improvements
  • DX11: Improved texture upload performance for compressed, floating point ant RGBA32 formats. (812350)
  • Networking: Ping implementation for ipv6.
  • VR: Update Oculus to version 1.7
  • VR: Update Oculus GearVR to version 1.7.1
Fixes
  • (800914, 802831) - 2D: Fixed an assert message "importer.GetNPOTScale() == TextureImporter::kNPOTKeep" showing when creating sprites in Advance mode. Creating sprites now ignores TextureImporter's non power of two settings if the texture is already a power of two.
  • (811963) - Android: Audio - Fixed glitches on GearVR when Best Latency is selected.
  • (811880) - Android: Fix for crash on returning from Handheld.PlayFullScreenMovie.
  • (769505) - Animation: Fixed an issue where having animations with a mixed number of bones in a controller, and having Write Defaults to false would throw errors.
  • (763293) - AssetBundles: Fixed AssetBundle.LoadFromFile usage with Application.streamingAssetsPath on Android.
  • (none) - Core: Added support for loading serialized files stored with 5.5.0a4.
  • (793567) - Editor: Exceptions from PostProcessBuild callbacks now introduce errors to the build.
  • (808080) - Editor: Fixed crash when trying to connect a GameObject to a prefab with no root GameObject set.
  • (793679) - Graphics: Don't re-upload textures to the graphics device when a quality change is requested and the pixel data is unavailable. This applies to textures loaded from asset bundles unloaded with AssetBundle.Unload (false).
  • (791721) - IL2CPP/Windows Store: Allow non-blocking sockets to work properly on 64-bit builds.
  • (819647) - IL2CPP: Corrected some calls to HasValue on nullable types, which could return true when the nullable does not have a value.
  • (818966) - IL2CPP: Generate proper C++ code for some cases involving array parameters passed by reference.
  • (815722) - IL2CPP: Prevent a stack overflow during code conversion which can occur for mutli-dimensional arrays with generic types.
  • (818102) - IL2CPP: Rename the types.h file to be il2cpp-string-types.h to avoid the possibility of is conflicted with a user-defined header file.
  • (369773) - iOS: Building from GUI now uses a project relative path if the location is under the project folder
  • (790724) - Kernel:Fixed rounding error so Mathf.MoveTowardsAngle always reaches target angle.
  • (735709) - Linux: Fallback to NET_WM_ICON for setting custom player icon.
  • (810289) - Networking: Fixed starting a server cashes on libwebsocket_service_fd.
  • (820523) - OS X: Fixed HTTPS support for WWW/UnityWebRequest when Mac App Store receipt validation is on.
  • (770034) - OSX: Fixed a crash when building for OSX in certain circumstances to do with paths to splash screen and icon.
  • (808187, 790220, 816014) - Prefabs: Fixed some issues and crashes related to undo-ing the creation of prefabs and prefab connections.
  • (none) - Tizen: Fixed a problem with UnityPluginLoad() not working.
  • (none) - UI: Fixed issue with OnPointerEnter event firing after touch ends.
  • (none) - VCS: Stop a C++ method being called during C# constructor and serialization (which is a scripting warning as it is unsafe to do this).
  • (806810) - VR: Fixed different particle shader transparencies between editor and build when splash screen is active.
  • (801951) - Windows Standalone: Custom image will be correctly shown in screen selector dialog when building to directory with non-english letters.
  • (803319) - Windows Standalone: Fixed a regression where "touch up" events would be lost when occurring outside window bounds.

You can download the patch here.

GameDev News

21. August 2016

 

Facebook used to be an absolute powerhouse in the game publishing space before mobile games became so dominant.  Many now gigantic companies like King got their start on Facebook as did many of the most popular mobile IP (Candy Crush, Clash of Kings, etc.)  So it should come as no surprise that Facebook is keen to become a bigger player in the gaming space.  This is doubly true considering their multi-billion dollar purchase of Oculus.  The approach they have taken is however somewhat shocking. 

 

Earlier this year Facebook launched the beta of their Facebook Arcade, a downloadable client for playing several of their most popular games.  It seems that Facebook is intending to morph this service into a more Steam like service.  One part of this strategy is a newly announced partnership with Unity that will enable Unity developers to publish directly to Facebook’s new service.  From the Unity forum:

Sign up to be a closed-alpha partner! Unity is partnering with Facebook to lower the cost and friction of bringing your games cross-platform, with the power to reach over 650 million people who are already playing Facebook-connected games every month. With over $2.5B paid out by Facebook to game developers last year alone, Facebook will be selecting developers building in Unity 5.4 to join as closed-alpha partners to test a new export functionality within the Unity editor. With this new functionality, Unity developers will be able to easily publish their games onto a brand-new Facebook PC gaming distribution platform to help drive additional growth and monetization.
Sign up here (fb.me/FBUnityAlpha) by August 31, 2016 to help us test and provide feedback on an alpha build of the new functionality we're in building into the Unity editor. Don't miss this opportunity to help shape an exciting new venture that we're investing in and reap the benefits of being an early partner*.
* Once selected, closed-alpha partners will need to agree to the the following minimum requirements:

  • Sign a non-disclosure agreement (NDA)
  • Use the alpha build and report bugs in order to help make this a better product
  • Once you've built your game for the new Facebook PC platform, submit it to Facebook for review

Please share any questions you may have in this forum thread.

 

Details of this new service are quite scarce.  Given the requirement to sign an NDA to sign up, it seems likely it will remain that way.  As loathe as I am to link to them (the TMZ of tech “journalism”), TechCrunch currently have the most details available:

Facebook was apprehensive to reveal details about the specs and plans for the PC platform, but here’s what we know from talking with Facebook and Unity:

  • It will run on different types of PCs, not just Windows like the Games Arcade test
  • The desktop platform provides a distraction-free gaming environment uncluttered by other Facebook features like the News Feed
  • It will support the traditional casual Facebook games, mobile games ported from iOS and Android, and Unity says it will likely support more “immersive” hardcore games like you typically see on Steam or consoles, as there’s no plans for a limit on genres or specs right now
  • It will offer discoverability so gamers can find titles to play
  • Facebook will provide a revenue split for game publishers, though it’s unclear if it will deviate from the industry standard 30% it’s used in the past

So basically Facebook appear to be launching their own marketplace to compete with the likes of Steam with both casual games and an eye towards more hardcore games in the future.  If you are interested in signing up you have until the end of August.

GameDev News

21. August 2016

 

LibGDX just released version 1.9.4 composed primarily of bug fixes.  LibGDX is a cross platform Java based 2D/3D game framework.  If you are interested in learning more we did a Closer Look at LibGDX review.  Additionally there is a full tutorial series available both text based and video based.

 

While not exactly a massive release, here are 1.9.4’s release notes: 

 

[1.9.4]
- Moved snapping from ProgressBar to Slider to prevent snapping when setting the value programmatically.
- Bullet: added btSoftBody#getLinkCount() and btSoftBody#getLink(int), see https://github.com/libgdx/libgdx/issues/4152
- API Change: Wrapping for scene2d's HorizontalGroup and VerticalGroup.
- Fix hiero problem with certain unicode characters. See https://github.com/libgdx/libgdx/issues/4202
- Switched to RoboVM fork 2.2.0, fixes incompatibility with Android Gradle plugin and iOS 9.3.4
 

There were several other bug fixes that can be viewed on the Github commits

 

LibGDX is available for download here.

GameDev News

21. August 2016

 

GLFW 3.2.1 was just released, consisting primarily of bug fixes but also adding static linking of the Vulkan loader.  GLFW is a C based cross platformed windowing and input library built over top of OpenGL.  This functionality is not provided by OpenGL, so GLFW makes creating cross platform applications using OpenGL easier, while being lighter weight than alternatives such as SDL and better supported than the GLUT library that proceeded it.

 

From the release notes:

  • Added on-demand loading of Vulkan and context creation API libraries
  • Added _GLFW_VULKAN_STATIC build macro to make the library use the Vulkan loader linked statically into the application (#820)
  • Bugfix: Single compilation unit builds failed due to naming conflicts (#783)
  • Bugfix: The range checks for glfwSetCursorPos used the wrong minimum (#773)
  • Bugfix: Defining GLFW_INCLUDE_VULKAN when compiling the library did not fail with the expected error message (#823)
  • Bugfix: Inherited value of CMAKE_MODULE_PATH was clobbered (#822)
  • [Win32] Bugfix: glfwSetClipboardString created an unnecessary intermediate copy of the string
  • [Win32] Bugfix: Examples failed to build on Visual C++ 2010 due to C99 in linmath.h (#785)
  • [Win32] Bugfix: The first shown window ignored the GLFW_MAXIMIZED hint when the process was provided a STARTUPINFO(#780)
  • [Cocoa] Bugfix: Event processing would segfault on some machines due to a previous distributed notification listener not being fully removed (#817,#826)
  • [Cocoa] Bugfix: Some include statements were duplicated (#838)
  • [X11] Bugfix: Window size limits were ignored if the minimum or maximum size was set to GLFW_DONT_CARE (#805)
  • [X11] Bugfix: Input focus was set before window was visible, causing BadMatch on some non-reparenting WMs (#789,#798)
  • [X11] Bugfix: glfwGetWindowPos and glfwSetWindowPos operated on the window frame instead of the client area (#800)
  • [WGL] Added reporting of errors from WGL_ARB_create_context extension
  • [GLX] Bugfix: Dynamically loaded entry points were not verified
  • [EGL] Added lib prefix matching between EGL and OpenGL ES library binaries
  • [EGL] Bugfix: Dynamically loaded entry points were not verified

 

GLFW can be downloaded here.

GameDev News

Month List

Popular Comments