Back in the Game

Well, school is finally out for the semester. I finally have time to start posting again!

Currently I am working on a proof-of-concept for an objective-c implementation of Minecraft, both client and server, that runs faster and more efficiently than the original, and implements a dynamic plugin interface along with some other things. Hopefully by the end of this month I will have something to showcase on youtube.

OpenCL and the Adapteva Supercomputer

Recently I was browsing Hackaday and ran across an article about a deveopment board sporting a coprocessor touting 16 to 64 cores. It’s a kickstarter project by Adapteva, and they are trying to reach $750,000. They are trying to raise this money so that they can provide the boards and chips for around $99.

The $99 dollar reward for the kickstarter is a 16-core board, and the $199 is two 16-core boards, or if they reach their stretch goal, a 64-core board. Their stretch goal is three million dollars.

I love the idea of programming in parallel, and I really love the idea of computers being designed for parallel computing. So I am starting to teach myself OpenCL to prepare for the board that I am getting for my support.

Boredom Induced Node-ing

I have been taking a break from my kernel. After a while of being the only developer on a project, I have to let my mind take a break from it so I can work on all of the other things I have going.

And so I got bored because I couldn’t decide which one I should do. Kinda stank like the inside of a Tauntaun.

So I looked into nodeJS. And I started writing a fully javascript web server that renders dynamic pages with javascript. No static pages, though I plan on making it possible to use HTML directly in it. I think it’s kind of cool. If I get it to the point of initial testing soon, I will put it up on GitHub or Sourceforge.

Needless to say, I am no longer bored.

ARM Compiler Image now available for download

Paul-e-wogg suggested that I put my compiler on a DMG to make it easier for everyone. I don’t know why I didn’t do that in the first place, so thank you for pointing that out to me! So I dug up one of the DMGs that I had made and put it up. If there are any issues with it, please let me know so that I can fix them.

The DMG is now available on the Downloads page.

Using Angry Ant’s Behave Library in UnityScript

I have been learning how to use Unity3D recently, and I really wanted to use the Behave library without having to use C#. It took me a little while, but here is an example of doing it:

#pragma strict

 

// Where we store our new Behave Tree

var BTree : Behave.Runtime.Tree;

 

// Where we store our Behave IAgent

var Agent : BSIAgent;

 

// Where we implement all of our Behave level functions

public class BSIAgent implements Behave.Runtime.IAgent {

 

public function Tick (sender : Behave.Runtime.Tree, init : System.Boolean) {

Debug.Log(“Tick”);

return Behave.Runtime.BehaveResult.Success;

}

 

public function Reset (sender : Behave.Runtime.Tree) {

}

 

public function SelectTopPriority (sender : Behave.Runtime.Tree, IDs : int[]){

return IDs[0];

}

}

 

function Start() {

// Create a new agent

Agent = new BSIAgent();

// Create our tree

BTree = BLBasicMiner.InstantiateTree( BLBasicMiner.TreeType.Task_Systems_BasicTS,   Agent   );

// While the application is running and our tree exists

while (Application.isPlaying && minerTree != null) {

// Wait for a certain amount of time

yield new WaitForSeconds(1.0f / minerTree.Frequency);

// Tick the tree

AIUpdate();

}

}

 

function AIUpdate() {

BTree.Tick();

}

Yes, this is a bit of a hack, but I haven’t had much time to refine it. Hopefully in the future I will be able to provide a more readable version.

Getting Unity Web Player to work on Mac Lion

I have been getting back into using Unity 3D, which I believe is a very useful and insightful tool, but I have been having trouble getting the Web Player to work. For some reason, when I would install it, Safari wouldn’t recognize that it was installed, even after  restarting Safari.

Turns out that when the web player was being installed, it was being installed in the Unused Folder inside the plugins directory. So to fix it was as simple as moving it up a directory. Huh, funny bug.

Getting the Lion C/C++ Compiler

Unfortunately for developers like me, Mac Lion does not come with GCC, G++ or anything else pre-installed on the computer (plus the compilers are not GNU standard, so you can’t update them by compiling a newer version).

However, Apple has produced a disk image with an installer for these tools, if you want command-line tools like me, or you can download Xcode and use that instead.

If you have Xcode and want the command-line tools, all you have to do is go to the Xcode menu while Xcode is open, choose the Preferences item, click on the Downloads tab and press the button saying you want to install the command-line tools.

If you want Xcode, go to the App Store and download it. Personally, I like having both, mainly because I like the structure of Xcode for certain projects, but I enjoy the flexibility of the command line. Plus, it is simpler to update the command line tools through Xcode because it informs you of updates. Of course, this can be undesirable; I had to recompile some custom libraries that I had installed because of changes in the updates…

If you just want the command-line tools, follow these steps:

  1. Go to the Apple Developer’s Download page (This requires that you have a Developer Profile. You can get one for free, so you might as well.)
  2. Click on the latest version of the Command Line Tools
  3. On the right side of the screen there will be a link to the file. Click it and it will start the download.
  4. Once it has finished downloading, open the disk image and install the package.

NOTE: You need to have Administrator Privileges to install the command line tools!