Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
29. April 2012

 

 

One of the most bizarre things missing from the PlayStation simulator was support for analog imagesticks, or gamepad support in general.  I had just assumed that you would be able to plug a gamepad into your PC to control the simulator, but I was wrong.  A keyboard only solution made owning an actual device pretty much an absolute requirement.  Fortunately a user on the PlayStation Suite Developer Forums YamatoKei released a code driven solution, which in his own words:

 

 

 

The simulator's input layout and limitations weren't to my taste, so I made myself a way around it:

Run a TCP server that reads PC's gamepad state and sends it back on a client request. And add a simple utility class/lib to connect to that server + decode data transparently from within the game. With a one-line change to revert-back to using the native input on real devices.

Uploaded here: http://dl.dropbox.com/u/1969613/openglForum/PadServer.7z

Code to use:

static ILXPAD pad1 = new ILXPAD_Net();
//static ILXPAD pad1 = new ILXPAD_Vita();
...
pad1.start();
...
pad1.update();
...
camera.roty -= pad1.RStick.X;
bool jump = pad1.Cur.CROSS;

Cheers. :Wink:

 

Just what the doctor ordered!

 

[Download Link]

 

Buyer beware, I haven’t actually tried this out, so if it doesn’t work, destroys your computer or causes a horde of angry cows to raze your house, I take no responsibility.

Programming


29. April 2012

 

 

One of the biggest points of confusion for people new to Blender seems to be navigating the UI.  The UI layout of Blender is amazingly powerful but it is extremely easy to find yourself lost in a sea of windows and panels you’ve opened with no idea how to close them.  This video tutorial shows you how to customize the Blender layout exactly how you want it and once you get the gist of it, it is an extremely powerful system. The video is for Blender 2.59, but should be equally valid in 2.6x.

 

 


 

 

There is no audio, it is entirely narrated on screen.  The video is probably illegible in the embedded window above, however it was encoded at 1080p and hosted on YouTube and Vimeo in HD ( although for some reason the Vimeo encoding looks much worse, so use YouTube for the best quality ).

 

 

If you are just starting out with Blender, I highly suggest you check it out. Once you realize just how much flexibility you have in deciding how you want to work you will become much more productive.  Oh and if you are lucky enough to have multiple monitors, Blender is amazingly flexible in this regard too!

Art


28. April 2012

 

Somewhere between 2.63RC and 2.63 release the Knife tool was changed so that you need to press Enter or Spacebar to commit the changes.  Previously you could commit using the right mouse button, which I preferred.  Lucky enough, it is easily addressed.

 

In Blender, selected the menu File->User Preferences…

 

Switch over to the Input tab, expand 3D View->Mesh then Knife Topology Tool then finally expand Knife Tool Modal Map, like such:

 

image

 

First we need to delete the existing Right Mouse binding, locate it and click the X to the right:

 

image

 

Now scroll down ( within the Knife Tool Modal Map panel) and locate the Add New Button:

 

image

 

 

 

It will insert a new empty record like such:

 

image

 

Expand the arrow to the left of our newly added entry, and it fill it in as follows ( or set by right clicking to the right of the Mouse dropdown):

 

image

 

 

Now locate the Save as Default button in the button left corner of the Window and click it:

 

image

 

Voila, right click should now cause your cuts to commit when you right click.

Art


21. March 2012

 

 

As my journey with Appcelerator continues, I’ve run into another annoyance, and the fix wasn’t immediately obvious.  Titanium Studio ships with an Android 2.2 image pre-configured, although I am trying to develop for Ice Cream Sandwich ( Android 4 ).  The problem is, every time I launch my application, it would ignore the running emulator ( launched using AVD Manager ) and launch it’s own. This is really irritating, as the Android emulator takes forever to load.  ( About a minute for 2.2, and well over 5-10 minutes for ICS, on an i7 machine with 12GB of RAM! ) to say nothing of the fact their emulator image is for a phone, not a tablet.

 

 

It seemed no matter what I did, it would still load a new instance of the emulator, regardless to if I had one running already.  The answer isn’t as intuitive as you would think.  My first thought was it would be under Debug Configurations, which can be accessed by right clicking tiapp.xml in your project, choosing Debug As –> Debug Configurations…  which brings up the screen below:

 

 

image

 

 

 

Ah, this looks promising, change Android API level to Android 4.0, click Apply then debug.   Still loads the pre-configured 2.2 emulator. Sad smile  Ok, so that wasn’t it.

 

 

In the end, it comes down to how you build your project.  In Project or Package Explorer, double click tiapp.xml to bring the property editor up.  Search for the “Deployment Targets” section, then click the configure link, like this:

 

 

image

 

 

In the dialog that pops up, there is a selection for “Default Android SDK:”.  This is the value you need to change:

 

image

 

 

Now I click debug and behold!  Ice Cream Sandwich goodness!

 

image

 

 

 

Well… that was intuitive.  Not really something you can blame Appcelerator for, nor Titanium Studio ( although again Eclipse/Google Android tools make things far too complicated! ) in the end.  That said, if I could debug on a physical device, I wouldn’t have to deal with the terrible Android emulator in the first place!

 

 

Anyways, finally after a few days of messing about with configuration and install issues, finally, time for some coding!

General


17. March 2012

 

 

 

So I have decided to give Appcelerator Titanium a shot for a cross platform mobile project I am working on.  If you are previously unaware of Appcelerator, it is basically a cross platform framework where you program in Javascript and can natively target a number of mobile devices including Android, iOS or in this case Blackberry.  That said, the IDE is based on Eclipse, so that means I am going to develop a number of new pains in my backside.   Lo and behold, I wasn’t wrong.

 

 

Installed the app, went to make a project and BLAMMO, hit the first wall.  Apparently you need to install the Android and Blackberry SDKs.  This of itself is no big shock, the problem arises when you try to install the Blackberry Java SDK which as you can see, you can either download as a pre-configured Eclipse install, or you have to use the Eclipse Updater.  As my Eclipse install is Titanium itself, I obviously have to go the updater route.  Fortunately, Appcelerator already has the Blackberry updater site configured, but then I hit the wall.

 

 

 

You select Help->Install New Software… select the Blackberry Update Site, then select the Blackberry Plugin, like so:

 

image

 

 

Of course, this is Eclipse we are talking about, so of course it isn’t going to work, throwing up the following error:

 

Cannot complete the install because one or more required items could not be found.
  Software being installed: BlackBerry Java Plug-in (core) 1.5.0.201112201607 (net.rim.EclipseJDE.feature.group 1.5.0.201112201607)
  Missing requirement: BlackBerry Java Plug-in (core) 1.5.0.201112201607 (net.rim.EclipseJDE.feature.group 1.5.0.201112201607) requires 'org.eclipse.jdt.debug.ui 0.0.0' but it could not be found

 

 

Oh joy.  Off to Google I go!  Sadly, I didn’t find an answer, but a few minutes later I puzzled it out myself.  If you are using Titanium Studio and run into dependency errors like this, there are a few things you need to change to fix it.

 

 

In the Available Software dialog, click the “Available Software Sites” link:

 

image

 

 

Check the box beside Eclipse Update site like below:

 

image

 

 

This will give you access to all the various Eclipse updates.  Finally back on the updates screen, you want to verify that the “Contact all update sites during install” checkbox is checked:

 

image

 

 

 

With this change, the Blackberry SDK install will be able to resolve it’s dependencies and complete the install.

 

 

 

 

It’s a small thing, but if you are just starting out with Eclipse, this is the kinda showstopper garbage that make me hate recommending this tool.

General


See More Tutorials on DevGa.me!

Month List