Posts Tagged ‘ programming

Fun learning Unity

I’ve made small games/apps in the past using Python/PyGame  & Processing.  When developing them, I’m always responsible for designing all the systems:  And while a great learning experience, I only have a fixed amount of time to work on these side projects.  So I thought I’d expand out and try a larger game development framework letting me focus on higher level concepts rather than the lower-level coding needed for basic systems.

The three big ones I’m aware of are Unreal (Epic), Cryengine (Crytek), and Unity.  Nowadays you can download them all for free, which is fantastic.  I’ve used Unreal & Cryengine professionally in the past, so I had interest in seeing how Unity worked.  And one of the big deciding factors was the “scripting language” the engine uses:  Unreal 4 has dropped their “UnrealScript” in favor of pure C++ (which I can read, but not really write), while Cryengine uses Lua (never touched it).  Unity however supports C#, JavaScript, and Boo:  C# is very similar to Java (Processing), which I am familiar with, so that made the decision pretty easy.  And while arguments could be made for the “power” of a given engine, and my guess would be that Unity would be lower on the list, they can all do far more than I’ll ever need, so Unity was the choice.

And so far, I’ve been very pleased:  Their documentation (user manualcomponent referencescript reference) and example tutorials/projects are fantastic .  Easy to read, well spoken, and a breeze to follow.  Plus, building the games and deploying to the web has been a snap.  To date I’ve completed the two below ‘projects’, and I include a link to the completed game.  While the ‘games’ are super simple, they were also super easy to make (thanks to the great tutorials):

roll-a-ball spaceShooter

Next I plan to go over their “Stealth” project next.  And like the subject reads, it’s been fun:  It’s nice to be in a development environment where it ‘makes sense’ and things ‘just work’.  So far, my only complaint is they don’t have a build in interactive shell (REPL), and they should really add Python to their scripting language selection :)

4WOC : Week 1

I’d heard of ’30 days of creativity’ before:  Sort of a forcing function to get the creative juices flowing.  I thought I’d try my hand at it, but instead, I’ll call it “Four Weeks Of Creativity”.  I’ve done plenty of 3d printing since my last post… I’m just a lazy blog poster.

Starting Nov 11th, I will BE CREATIVE!  This one post will hold an overview of what ‘creative’ thing I did each day for the first week.

Forward to Week 2

Week 1

Week 1 is now complete!  See notes for individual days below.  The final result is…..:

Day 7 : Sunday, Nov 17th, 2013

I’ve spent the past week working on the above Processing sketch I’ve coined ‘Orbital’.  It started out as just an idea of some floating cubes, and has turned into this:  A particle\physics sim.  Multiple light sources orbit around a central sun, colliding into multiple other bodies.  I wrote all the particle physics and collision, was fun to remember how to do all that.

My hope was to replace the light sources with some fancy-rendered OpenGL sprites with glow.  It appears that on my version of the mac (10.8.2) doesn’t recognize their OpenGL libraries properly… so no dice there.

Today I tidied up the code, created the above movie, an generated the below executables.


  • Processing source here.
  • Mac App here. (bigger than it needs to be based on its inclusion of Java)
  • Windows exe here.
  • Linux here. (untested)
  • Use mouse + wheel to orbit camera.
  • “s” : save an image
  • “r” (toggle) : Start recording an image per frame.
Time today:  about 2 hours.
Total time on this project over the past week:  Roughly 12 hours.

(and now for the previous days…)

Day 1 : Monday, Nov 11th, 2013

I haven’t done any work with Processing for a long time.  Thought I’d get back into it for a bit.  Today I:

  • Installed Processing 2.1
  • Wrote simple sketch with camera control, and 3d mesh rendering.  Download the sketch here.
  • Total Time:  About 1:45

Day 2 : Tuesday, Nov 12th, 2013

Continued to work on sketch from yesterday.

  • Now have mobile light source.
  • Cubes have random rotation, opacity based on distance to center.
  • Download the sketch here.
  • Total Time: About 1:00

Day 3 : Wed, Nov 13th

More sketch work:

  • Adding a trail to the lightsource. Remembering about Arrays in Processing. Cubes no longer delete and rebuild: stay persistent and rotate. Adding a top-down directional light, making background slightly brighter.
  • Download the sketch here.
  • Total time:  Just over an hour.

 Day 4, Thurs Nov 14th

  • Sad day:  Internet problems coupled with my boys homework really cut into creative time.  Only got half an hour in.  Started to turn the light source into a physics sim to collide with the cubes (now spheres for easy of collision).  Hopefully more to show tomorrow!

Day 5 : Fri Nov 15th:

  • Re-wrote the camera system to use the PeasyCam Processing library. Makes using the camera really easy, and resolves some issues with the new physics system:  The light source is now a dynamic body orbiting the center of the world.  It lost its trails, but they’ll come back.
  • Download the sketch here.
  • Total time:  1:30.

Day 6, Sat Nov 16th:

  • Good progress today:  Have physics fully working.  Light now collides with the balls, and the balls all collide with each other.  Changed the drawing style on the light-trail to look better.  Created LOD system on the balls for better performance.
  • Download the sketch here.
  • Total time: about 4 hours.

New Processing sketch: adventureLines

Haven’t posted much lately, been quite busy finaling my current game.

But I’ve had a bit of spare brain-power to work on some Processing stuff.

See more about it over on it’s page.

Click image to get full-size version.

PyGame Wiki created

It was only a matter of time:  I find Tiddlywiki’s a great way to store online notes.  I currently have made them for a variety of subjects (as shown on the left sidebar of my page).  They can be hosted for free through  Other than the funny name, and trying to explain it to people, they’re a wonderful data-publication medium in my opinion.

Based on my previous posts on ‘what to make a game in’ (1, 2, 3, 4, 5), I finally settled on PyGame, and have had a local copy of my ‘PyGame’ wiki for a few months now.  But today, I’ve got it hosted online.  Not a huge amount of info on it yet, but no doubt it will grow over time.  Enjoy

Kodu Game Lab

Yesterday I downloaded Kodu Game Lab from Xbox Live Marketplace.  I’d seen some demos of it online of a young girl (10?) programming games on the fly on the Xbox, and thought it would be something cool for my son.  Well, I was right, he hasn’t been able to put it down (although, we do make him 😉 )

Here are some links:

It’s a very visual programming environment, letting your quickly sculpt terrain, program bots, and plot paths.  Kind of like a mashup of Spore, The Sims, and Civilization.   Of course this is all sharable over Xbox Live.  I’ll be looking to see what kind of “expansion packs” they provide over time.  I now need to go help my son program a robot to shoot something…