XML Copy Editor – Efficiently View/Modify LARGE XML Files

Recently I have been working on a very large data import project that results in XML files that are 10s if not 100s of MB in size. The standard Java based IDE that I am using (Jetbrains Webstorm) can’t really handle the files well. I am assuming because it’s build the XML into a DOM java Object.

After getting kind of fed up with lockups and slow “pretty printing” of the XML, I came upon this little utility:

http://xml-copy-editor.sourceforge.net/

This thing is a CHAMPION! It not only handles XML but is quite efficient at doing XSLT 1.x transformations as well. AWESOME =)

I tried to post this on the stackoverflow suggestion thread that led me to it but I don’t have enough stack overflow points or karma or whatever.

http://stackoverflow.com/questions/308679/lightweight-xml-viewer-that-can-handle-large-files

I upvoted his response though =)

-rOcK

Posted in General Bloginess | Leave a comment

First Mini Unity Game

In my last post I outlined some awesome intro vidoes in getting started with Unity.

I also linked a book on Unity 3.x programming authored by Will Goldstone, the same gentleman who made the videos and have been reading through that.

Unity 3.x Game Development Essentials

It’s $42ish new for a paper copy and $16 if you get it on the Kindle. I went the Kindle route mostly because if I had to carry around the ammount of technical books I am reading at any given point in time I would need a burro =P

Chapter 1 of the book is basically the same as the “Essentials Vidoes” but he goes into a bit more detail on some of the areas of the GUI.

Chapter 2is fantastic! You end up building a simple game consisting of the following:

  1.  a floor
  2. A 10×8 wall made of bricks
  3. a simple “gun” positioned at the camera

The game adds physics to the bricks and uses the concept of a Prefab to script in bullets when you hit the Fire1 button (left-ctrl or left mouse button by default).

Here is a playible compiled version of it:

http://www.rockhowse.com/wp-content/uploads/2012/03/UGDE.zip (64 bit windows binary)

There was one issue I had while writing javascript. In the book he kept using the direct classname RigidBody when defining variables.

var bullet:RigidBody;

But the compiler gave me some error about not knowing what that object was. Instead it was only able to compile after using UnityEngine.RigidBody as the data type.

var bullet:UnityEngine.RigidBody;

This might be a Unity 3.5 thing but I thought I would mention it.

I will continue to write about my progress as we use the rest of the book to build an adventure game “Adventure Island”

-rOck

Posted in Unity | Leave a comment

Intro to Unity – great video tutorials!

In the last post, I linked a thread on Unity3d forums that had a HUGE list of links to things get you started with unity, but I wanted the VERY basics and one of the best ones is located here:

http://www.unity3dstudent.com/

The only caveat with this site is that it is built on top of a blogging platform so everything is in reverse chroniological order =P The content is awesome, but the organization of it is confusing until you get into the meat of it.

Start out with their “Essentials” module:

http://www.unity3dstudent.com/category/modules/essential-skills/

“This section gets you aquainted with the Unity GUI and points out all the major basic areas of the workspace.”

Here are the modules in order starting from the beginning. Once you have completed a video, there is some nice navigation to move you forward or backward if you need to review something.

“The structure of a Unity project, its folders and where assets will be stored.”

“In this post we take a look at the Scene panel – Unity’s main area for constructing your games.”

“In this post we take a look at the Hierarchy panel, and how it is used to list and group objects in your active scene.”

“In this post we look at the Game view, where your game can be previewed / tested by pressing the Play button in Unity.”

“The Project panel, and how it lets you manage, organize and create assets.”

“Game Objects, what they are and how they should be used.”

“What are Components? what are they used for and more.

“How to bring external assets into your Unity project via the interface or operating system.”

“Light types, differences and ambient scene lighting.”

“How the game view is defined by cameras, positioning them and controlling them.”

By the end of these you should have a great handle on all the basics of Unity and where various things are done in the interface. I especially like addition of hot keys used to perform actions and the “further reading” sections!It looks like the author of these tutorials has a normal blog:

http://learnunity3d.com/

And has published a book about Unity. Here is the link to Amazon:

Unity 3.x Game Development Essentials

I will definately be picking one of these up. The internet is great, but by supporting the authors they can continue kicking ass!

-rOck

 

Posted in Unity | Leave a comment

Unity n00b!

As I am getting up to speed on using the Unity gaming engine I thought I would post this for anyone interested in getting started with Unity.

http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html

I just created an account, but can’t up-vote because I don’t have enough <insert unit of karma etc here>.

Wish me luck in the world of Unity.

-rOcK

Posted in Unity | Leave a comment

Code Hero Kickstarter over $75k!

After hitting the front page of reddit gaming:

http://reddit.com/r/gaming

They surged ahead to $75k! In the home stretch.

Caught a nice screenshot of their upvotes on reddit =P

1337 votes!

Evidently I also recieved 1 Karma! w00t!

-rOck

Posted in General Bloginess | Leave a comment

Gameception – Code Hero: A video game that teaches you to program video games

In my previous post, I mentioned that NodeAdventure was going to be placed on hold for the time being. I made a reference to multiple things that are distracting me from that end at the moment. The first one was CouchDB and IOS. The second thing is this fabulous game called “Code Hero”. It’s developed by the fine folks at primerlabs

http://www.primerlabs.com

Right now they have a Kickstarter going in hopes to raise $100,000 to kick start their game.

http://www.kickstarter.com/projects/primerist/code-hero-a-game-that-teaches-you-to-make-games-he

I was the first contributor at the $1337 level! And helped them get their first power level of over 9000! The second person to contribute at this level was the CEO of Unity: David Helgason.

Unity is the cross-platform game engine they are using to build their game!

http://unity3d.com/

I had the great fortune to talk to Alex Peake (briefly, before he got swept away in all the excitement of running a funding campaign!) and evidently he had run into my blog while looking for javascript based gaming engines. As it turns out, one of the first two languages they are looking to teach you (which is right on in my opinion) is in fact Javascript!

I think this is a super smart move for a bunch of reasons:

1. It’s the main scripting language used in millons of websites

2. With the advent of HTML5 and the support for the <video/>, <audio/>, <canvas/> (2d and 3d graphics), webgl (3D graphics), and websockets (real time server side push) you could realistically build any game you wanted right inside the browser!

3. Windows 8 and Microsoft Visual Studio 11 have HTML5 and Javascript as one of the main set of languages to build Metro style apps

4. With the advent of Node.js you can not only use javascript on the client, but you can run your SERVER on javascript.

5. With the likes of MongoDB and CouchDB you can have your back end store data in native JSON (or BSON) and not have to go through the trouble of serializing and de-serializing from RDBMS  (Realitional Database Managment System) -> ORM (Object Relational Mapping) -> JSON (JavaScript Object Noation) and the revers. JSON -> ORM -> RDBMS

Having played through the Beta (available for FREE if you donate via Kickstarter!), I can say that even in the Beta you get a good feeling for their games concepts.

I started with Javascript since it’s something I have used every day on the job for the past decade (except for that brief period when we were attempting to use Adobe… although Actionscript 3.0 wasn’t too far off from Javascript used in browsers since they both extend EchmaScript). Besides a few issues with some syntax and lack of “visuals” for most of the intro javascript (right now it’s a lot of reading and code without 3d objects). It was spot on =) You learn about variables, conditionals, syntax, and basic loops.

After that, I headed on over to the Unityscript section and tooled around for a bit. The fact that they have you are running unity inside of Unity is awesome! (They must be doing some dynamic code compliation?) Being able to “move” a bridge to where you want, or telleport to a specific location really gives you a handle on what’s going on in the world. You feel like you are in the “Matrix” as Neo and you are in in control.

After honing your coding skills, you are then confronted by the FizBoss, an army of flying bots that you have to try and stop from getting across the gaming space, which payes homage to the original “Space Invaders”. But this time, it’s in 3D and some of them have invulnerability sheilds on. It’s up to you to use what you have learned in the coding tutorials to defeat them!

It’s been great to be a part of this historic game and to see the community behind it forming on facebook and twitter. I think that primerlabs will meet and exceed their goal of $100,000 and go on to do great things with this game!

I am especially interested to see what they do with the new donation levels of Sentor and K12 which is trying to get donations from the government and public education sectors, asking them to contribute to the cause of the “future of education”.

So, that being said, I might be spending my free time hacking with the folks at Code Hero assisting with some of the Javascript tutorials and missions.

Best of luck to Alex and his crew at primerlabs!

Hack the Planet!

-rOcK

Posted in General Bloginess | Leave a comment

NodeAdventure put on hold for the time being

I had a few days of un-interrupted coding while desinging the new NodeAdventure concept but in that time frame things have rapidly evolved to the point where my free time might be whole consumed on some more “concrete” development in my free time.

The first “distraction” was my desire to learn a bit of IOS and Objective C. Mostly to help my team out with IOS related bugs and enhancements that will invariably creep up, but also to play around with CouchDB. My original NodeAdventure preliminary design was based around using MongoDB + Mongoose + Node.js for “real time” communication. But one of the more enterprising developers I work with (Mike Lamb) mentioned using CouchDB because it encompasses the datastore, middle tier and “real time” data push to IOS/Android built right in.

This is the demo that really wowed me:

You can watch the beginning of the video, but the “demo starts about 27 min in. Browser to mobile real time sync sub second with almost no backend coding!!!! No marshaling RDBMS to objects to JSON, couchdb’s REST api stores JSON natively and allows you to pull and query against it using views.

For those enterprising individuals who want to get IOS playing with couchdb quickly, Here is a quickstart in getting mobile couchbase up and going:

If you haven’t used couchdb or IOS before (like me!) continue reading to get up to speed on both technologies. Big thanks to Mike Lamb for his suggestions and work on tracking down some squirrely issues.

To get up to speed with IOS quickly, I suggest the Stanford Itunes U course on learning Objective C and IOS 5:

http://itunes.apple.com/us/itunes-u/developing-apps-for-ios-hd/id395605774

If you want transcripts and other artifacts hit up the stanford site directly.

http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-fall

After getting the hang of IOS, I went through the couchdb docs (not Couchbase!)

http://guide.couchdb.org/

If you go through this book and some of the intro stanford lectures you should know enough to understand how to build the simple demo couchdb sync to IOS demonstrate the mobile sync.

Here is the demo app:

 https://github.com/couchbaselabs/iOS-Couchbase-Demo

First you’ll need to download the CouchCocoa 2.0.0 from CouchBase 

http://www.couchbase.com/wiki/display/couchbase/iOS

Make sure to follow the instructions about how to set up the Frameworks in the demo project.

You also need to install a couchdb setup for your OS. (not couchbase! they don’t currently support the REST apis shown in the couchdb book). I am using Mac OSX and here are the instructions:

http://wiki.apache.org/couchdb/Installing_on_OSX

If you go through the various links above you should be well on your way to syncing data “real time” using IOS with little to no back end server coding \:D/

Hack the planet!

-rOcK

Posted in General Bloginess | Leave a comment

Fun with Kinect(inator)

So it’s been a while since I have used the M$ kinect and man is it a baby terminator. I really like the way they have the on screen avatar demonstrate what you have to to while configuring and calibrating it. Although one thing I noticed that when the sun was pouring in over my lilly white legs, it couldn’t tell if I was a humon or not (not to future self… use sunlight to “blind” terminators with pale belly flesh).

I re-purchased an Xbox 360 mainly as a glorified Netflix streaming device (man I miss the originaly XBMC, gogo mechwarrior hack!). But I also decide to try out a new “fitness” game called “Your Shape: Fitness Evolved 2012″. It lets you put in your starting fitness level (couch potato) and desired fitness level (olympian) and gives you a “fitness contract” based on what you want to accomplish so it’s personalized. Interesting concept. I will see how it works out (pun intended).

One of the things that future children won’t think anything of is the fact that if you walk out of the Kinect’s “kill humon sensor” area, it says things like “was it something I said?” or “where did you go?”. Very weird the first few times, but like all future terminator food, it’s their way of desensitizing us to the AI/humon interaction. And when you walk back into range it cheerfully (because it can sense the kill?) says things like “welcome back!” and “good to see you!”.

Between the humon detection, facial recognition (it switches players based on your FACE!) and voice detection. This thing is a few machine guns and bombs away from Terminator.

-rOck

 

Posted in General Bloginess | Leave a comment

Terminator Laptops

Just came across this article on /.

http://hardware.slashdot.org/story/12/01/28/2319231/some-windows-8-laptops-may-come-with-built-in-kinect-sensors

This is scary because having played with the kinect plugged into my computer’s USB port directly. It was able to pick up a “human” by seeing the motion of a FOOT coming down the stairs, not a full human body, just the FOOT. There was an issue a while back where school administrators were got in trouble for using the laptop’s webcams to spy on students. What happens when the computers can spy on humans and report back to whoever is controlling them… hackers, admins, other computers (A.I.).

Fun times!

-rOck

Posted in General Bloginess | Leave a comment

NodeAdventure

Here is the preliminary “design” for the start of my new project:

NodeAdventure

This will be a generic platform using javascript across the board:

GUI: HTML5, CSS3, Three.js, Backbone

Server: Node.js, Jade, Stylus, Mongoose

Data storage: Mongodb, GridFS

Most of this stack was developed by an e-learning company called Learnboost.

https://www.learnboost.com/

(their contributions to node include but are not limited to: Socket.io, Mongoose, Stylus, Jade)

There is another product that I have been fiddling around with at work called Trello.

https://trello.com/

They posted an article about their stack which uses a lot of what I had originally fooled around with. They talk about their stack here:

http://blog.fogcreek.com/the-trello-tech-stack/

I have used pretty much all of it except for backbone.

Here is the high level overview.

First step:

The first object that we will store is a User. This will allow you register a username/password that saves your data between sessions inside of mongodb. Initially it will be simple and allow you to store a username/password and uid of an “Avatar”. Initially, the avatar will just contain a link to an image but might be associated with a 3d model in the future.

The “chat” functionality at this point will show you who is logged in and who is logged out.

Second step:

Map data structure.

Initially we will have a “Map” object. This map will be 2d for now and might transition to 3d at some point in the future. The map will consist of an n x m matrix of uids. each uid points to a “Tile”.

The tile data structure will be simple to start out with consisting of only 2 types: floor, wall. You can move into a floor, you can’t move into a wall.

Third step:

Allow the Avatar and Map so that you can “move” around the map. The only limitation is that an Avatar can move to Tiles with “Floor” and can’t move to Tiles with “Wall” tiles.

If I can get all this done by the end of the week (Sunday the 29th. of Jan 2012) I will be happy.

-rOcK

Posted in General Bloginess | Leave a comment