Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
16. December 2014

 

Sorry… absolutely can’t resist that pun, no matter how obvious it is.  Anyways… the Godot Game Engine has been on my radar since they announced they were going open source at the beginning of the year.  Today they finally announced their 1.0 release today.godot

 

 

Never heard of Godot?  It’s a Unity-esque game engine, except powered by C++ and scripted using a Python-like scripting language.  It includes a surprising number of tools and most importantly, a complete game editor (pictured right).

 

Godot works in both 2D and 3D, with 2D being a first class citizen, not just 3D minus a D.  Godot runs on Windows, OSX and Linux.  Godot is able to target iOS, Android, Desktops, Googles’ NaCL, PlayStation3 and Vita, as well as HTML5 and Windows Phone coming soon.

 

You can read the complete feature list here.

 

You can browse available documentation here.

 

Godot is an open source project hosted on GitHub.

 

What do you think… are you interested in Godot, would you be interested in seeing GameFromScratch do some more in-depth coverage now that it’s reached such a milestone release?

News


16. December 2014

 

This video tutorial covers handling gestures in LibGDX, this includes:

  • pinch
  • zoom
  • tap
  • pan
  • long press

 

You can view the video in full resolution on Youtube here.  The source is included below.

 

Source from this tutorial example:

package com.gamefromscratch;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.input.GestureDetector;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;

public class GestureDemo extends ApplicationAdapter implements GestureDetector.GestureListener {
   SpriteBatch batch;
   Sprite sprite;
   OrthographicCamera camera;
   GestureDetector gestureDetector;
   
   @Override
   public void create () {
      batch = new SpriteBatch();
      sprite = new Sprite(new Texture(Gdx.files.internal("storm_trooper.png")));
      sprite.setPosition(-sprite.getWidth()/2,-sprite.getHeight()/2);
      sprite.setCenter(0.5f,0.5f);

      camera = new OrthographicCamera(1280,720);
      camera.update();

      gestureDetector = new GestureDetector(this);
      Gdx.input.setInputProcessor(gestureDetector);
   }

   @Override
   public void render () {
      Gdx.gl.glClearColor(0, 0, 0, 1);
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
      batch.setProjectionMatrix(camera.combined);
      batch.begin();
      sprite.draw(batch);
      batch.end();
   }

   @Override
   public boolean touchDown(float x, float y, int pointer, int button) {
      return false;
   }

   @Override
   public boolean tap(float x, float y, int count, int button) {
      if(count > 1){
         sprite.setPosition(-sprite.getWidth()/2,-sprite.getHeight()/2);
         sprite.setSize(256f,256f);
         sprite.setRotation(0f);
      }
      else {
         Vector3 touchPos = new Vector3(x, y, 0);
         camera.unproject(touchPos);
         sprite.setPosition(touchPos.x, touchPos.y);
      }
      return true;
   }

   @Override
   public boolean longPress(float x, float y) {

      Vector3 touchPos = new Vector3(x,y,0);
      camera.unproject(touchPos);

      if(sprite.getBoundingRectangle().contains(touchPos.x,touchPos.y)) {
         float alpha = sprite.getColor().a;

         if (alpha >= 0.f)
            sprite.setAlpha(alpha - 0.25f);
         else
            sprite.setAlpha(1f);
      }
      return true;
   }

   @Override
   public boolean fling(float velocityX, float velocityY, int button) {
      return false;
   }

   @Override
   public boolean pan(float x, float y, float deltaX, float deltaY) {
      Vector3 touchPos = new Vector3(x,y,0);
      camera.unproject(touchPos);

      sprite.setPosition(touchPos.x - sprite.getWidth()/2,touchPos.y - sprite.getHeight()/2);

      return true;
   }

   @Override
   public boolean panStop(float x, float y, int pointer, int button) {
      return false;
   }

   @Override
   public boolean zoom(float initialDistance, float distance) {
      sprite.setSize(distance,distance);
      return true;
   }

   @Override
   public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
{
float deltaX = pointer2.x - pointer1.x; float deltaY = pointer2.y - pointer1.y; float angle = (float)Math.atan2((double)deltaY,(double)deltaX) * MathUtils.radiansToDegrees; angle += 90f; if(angle < 0) angle = 360f - (-angle); sprite.setRotation(-angle); return true; } }

Programming


14. December 2014

 

So I recently did a complete nuke of my primary daily use Android phone, it’s just one of those things you have to do over time as it gets slower, hotter and your battery life gets worse.  However, the next time I went to debug on Android, ADB couldn’t find it.

 

This is nothing new of course, on Windows you need to do a bit of a device driver dance sometime to get your phone to work with ADB.  This time however it was different.

 

Plugged in my device, waited a few seconds and:

image

 

Hmmm, that’s not good.  USB device not recognized is certainly a common enough answer, let’s just go install the Google Android USB driver.

image

 

Device Descriptor Request Failed… that’s a new one…

 

Ok, lets Update the driver and point to the Google driver…

 

image

 

image

 

Well sh…. er, that didn’t work.  Well it previously worked, maybe I have an old driver kicking around that needs to be purged.  I download the utility USBDeview from here.

 

image

 

I certainly have some old or questionable drivers kicking around.  I am going to clean house in that regard, the nice thing about USB is you can just install the driver again next time you plug the device in, so very little risk here.  Purged the old drivers, scan for hardware changes… nothing.

 

 

Hmmmm…  Google indicates it might be a Windows 8.1 problem due to a driver change they made…

 

Ok, over to my MacBook, let’s see what happens.

 

Plug in the USB cable… BOOM, instant shutdown.

 

WTF?

 

Ok, this is weird.  Let me try a different USB cable.

 

Instant shutdown.

 

Hmmmm…  I’m basically getting the Mac equivalent of a blue screen of death each time I even plug this device in.  Let’s try a different port…

 

Hey, that worked.  Cool.  Try out “./adb devices”  Nothing.

 

Hmmmm, this is confusing as hell.  Doesn’t find the device on Windows 8.1 at all, even worse Crashes if I plug in to the right port of my MacBook Air, it “works” if I plug it into the Left USB port, but for charging only.  The device simply isn’t found.

 

So, at this point I borrow my wife’s identical HTC One phone and plug it in… HTC Manager works, either port, adb devices shows the device.

 

At this point I can only assume something is wrong with my device…  perhaps the connector is broken, but then I can’t explain why it charges successfully, but data doesn’t work.  Generally that is a cable or driver situation, but when I can get an identical phone to work and detect just fine, I am absolutely puzzled at this point.  The two phones have exactly the same versions… I just did a fresh factory install so I am frankly at wits end.

 

If any of you have experienced this before or have ideas, please let me know!  Otherwise I think I’m going to be on the market for a new phone soon.

Totally Off Topic


12. December 2014

 

Modo, a popular 3D modeling application ( learn more about Modo and more in my Introduction to 3D Applications post, or watch the video ) has just been released on Steam.  Actually, Steam being Steam, it’s actually on sale right now for 25% off!

 

image

 

 

Considering the full price of Modo is about $1,600, the Steam Indie version for $250 CDN is quite a bargain!  So, what’s the catch?

 

Yeah, there’s always a catch isn’t there?  So, what’s the difference between Modo and Modo Indie?  Well…

 

  • Project file (.lxf) linked to Steam account / cannot be shared with other users
  • OBJ and FBX export limited to 100k polys
  • Bake and render resolution limited to 4k
  • Command eval options unavailable
  • Command, scripts, and command history panel results unavailable except “undo” and “history”
  • Python editor, third-party scripts, and third-party plugins unavailable
  • OBJ and FBX export only
  • Can import all formats but can only save in .lxf format
  • Image save formats limited to .png, .jpg, .tiff and .exr

 

So they went the Maya LT route and limited the functionality but not the licensing.  This means you can use Modo Indie regardless to how much money you make or how you use it.  This is the deal breaker for many Indie licenses…  As to the stripped out functionality, I think the first restriction is going to be the most difficult one for many to swallow.

 

Simply put you cannot collaborate on a Modo Indie project!  Only one artist will be able to work on the project, ever.  It’s tied to your Steam account id and cannot be shared with others or distributed, although obviously you can export/import in OBJ or FBX format, so for many this wont be much of a limitation in the end.  However for teams with multiple people working on the same resource, or teams where the artist could change at some point in the future, this is going to be a gigantic deal breaker.

 

I haven’t used Modo recently enough to tell if script/plugin support is a big loss or not.  I frankly don’t recall there being any plugins back when I evaluated.  I understand why they do this though, or the very first plugin that would be released would be something to get around the 100K polygon limits.

 

The other limitations seem reasonable.  The 100K export limit precludes you from being able to use Modo as a level editor, but I don’t think many people are doing this anyways.  For game ready assets, 100K polygons and 4K texture limits seem appropriate.  If your needs are much more extreme than that, I can see how you wouldn’t be viewed as an Indie anymore and thus should have funds to purchase the full version.

 

Another affordable 3D option for indie game devs is always welcome, more choice is almost always good.  If you are interested in picking up Modo, the sale ends December 18th/2014.  That said, this is Steam we are talking about, so there will always be another bigger and better sale around the corner!  Oh, they also have a package deal with their MARI Indie texture painting package.  You can purchase both together for $315CDN.

 

Oh yeah, they also released MARI Indie as well… suppose I should mention that.  I have absolutely no experience with Mari, so I figured I would go with their description:

 

MARI indie is the fastest, most artist-friendly way to texture, paint, and detail amazing 3D assets for your game projects. Fine-tuned for individual developers and freelance artists in the game industry, MARI indie is an invaluable toolset that lets you focus on the artistic aspect of 3D game asset painting without getting bogged down by the technical side -- free of any individual commercial restrictions and without breaking your budget!

 

Delivering massive power and flexibility at minimal cost, MARI indie gives you ultimate control over painting and detailing every facet of your 3D models and animations in a way that's quick, intuitive, and highly creative -- all in one complete package that lets you work just the way you want.


Supported by the world’s most advanced layering system, MARI indie is a real workhorse. It gives game artists and content creators all the functionality they need to exactly replicate the look of assets in their games engine.

 

Once again, MARI Indie has no limitations on commerical usage, all limitations are technical:

 

  • Project file (.mra) linked to Steam account / cannot be shared with other users
  • Allowed export formats: .psd, .png, .tga, .jpg
  • Output formats no longer available .exr, .tif, .tiff, .hdr, .dds, and .ptx
  • The patch count is limited to 2 patches
  • The object count is limited to 3 objects
  • The output texture resolution size has been limited to 4k
  • Python scripting disabled

 

With zero experience with MARI I have no opinion on these limitations either way.

 

But WAIT, there’s more!

 

image

 

Yep, there is also a subscription plan available.  And at as low as $11 CDN a month it’s pretty freaking reasonable too.  For example, Maya LT is $30 a month, although they only offer monthly rates.

Art News


9. December 2014

 

In this video tutorial we look at using the different types of Cameras available, using a Camera to position your world in a device independent way.  Next we discuss the various Viewport options available for making your render results look best across a number of devices.  Since this video was released at the same time as the text version of the tutorial, I will be linking to those tutorials for code examples.

 

You can see the full 1080p video directly on YouTube or embedded below.

 

 

For the text tutorials, or for the code or assets used in this tutorial, check this tutorial on Cameras and this tutorial on Viewports.

 

Additionally, the text only tutorial also covers converting coordinates too and from your world coordinates, something I forgot to do in the video tutorial.

Programming


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List