April 2013
1 post
Modeling Tribes
Over the weekend I sat down and did some high level modeling of community social structures.  I wasn’t making a descriptive or predictive model, but more of a generative model.  That is to say, I was trying to grow a culture of simple fictional people the way I might grow a culture of mold in my fridge.  And I hit upon some peculiar and interesting snags. First, to build my Tribe, I...
Apr 15th
March 2013
2 posts
Couldn’t help myself. Rebuilt my controller node today. /woot user@control01:/etc/init.d# nova-manage service list 2013-03-10 16:55:12 DEBUG nova.utils [req-c7373e01-84cb-48c5-95cc-049257c39991 None None] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.pyc'> __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:506 Binary ...
Mar 10th
4 tags
Taking OpenStack for a Spin.
Thanks to my current circumstances, I can try out OpenStack on something other than a laptop running a pile of VMs.  Instead, I’ve got hardware.  Bare metal boxes, racked and stacked, the way it was meant to be.  And this is great. But, OpenStack is daunting.  It’s trivial to install the base Ubuntu system, and pretty easy to get the controller node established running Folsom with...
Mar 8th
October 2011
1 post
1 tag
Coming home to Jetty
In the spring of 2003, I spent a crazy week in San Francisco with Greg Wilkins and Jan Bartel, spearheading the design of their Core Developers Network venture.  I remember working all night on their new website with Dain Sundstrom and Jeremy Boynes, and launching the story in the early hours of the morning that a large chunk of the JBoss persistence and web server team were defecting to go their...
Oct 28th
4 notes
September 2011
5 posts
2 tags
Starting to work on 2nd gen terrain smoother.
This is essentially where the rubber meets the road for me.  I’ve gotten back to the point I was at in Java, with all of the functional power of Scala at my disposal, and a completely redesigned TileForm library.  Now it’s time to write the new terrain smoother.
Sep 4th
33 notes
4 tags
Streams and QuadTrees in Scala
Scala allows you to use the lazy keyword to defer the initialization of member values until they are called.  With this technique, you can implement some excellent data structures called streams. As discussed in Chapter 3.5.1 of Structure and Interpretation of Computer Programs by Abelson, Sussman, and Sussman (a.k.a. The Wizard Book), streams are delayed lists. They let us use sequence...
Sep 4th
4 notes
Non-blocking IO 2.0 in Java SE 7
Really looking forward to using this! Java NIO 2.0 (sometimes referred to as NIO.2) provides comprehensive support for the filesystem. Besides enhancements to the way you create, open, read, and write to files, you can now create custom filesystems and file providers in Java as well. One example is the ZIP file provider, which comes with the API and treats an archive file as a filesystem in its...
Sep 2nd
1 tag
Scala 2.9.0 final released
Scala 2.9.0 final was released last night: http://www.scala-lang.org/node/9483 The Scala 2.9.0 codebase includes several additions, notably the new Parallel Collections, but it also introduces improvements on many existing features, and contains many bug fixes.
Sep 1st
2 notes
1 tag
Data generation versus storage
The data structure I was wrestling with last night collapsed into a binary tree as I slept.  There’s no good reason to use a structure like that for storage, when a binary tree will do.  The lesson to take away from this is twofold: the relationships that are used to generate data need not necessarily linger on the storage of that data, and a binary tree need not be full to be useful.
Sep 1st
2 tags
Sep 1st
6 notes
4 tags
Refactored graphics pipeline using IoC
I’ve now completely refactored my entire graphics pipeline to use PicoContainer for inversion of control, and separated out the engine components into a variety of services which each focus on running and managing different aspects of the entire application. As you can see, the number of component dependencies is staggering, and the difficulty of wiring these all together might lead me to...
Sep 1st
58 notes
August 2011
34 posts
1 tag
il codice: Too much curry! →
Eschewing method overloading as a matter of principle seems to conform to the general spirit of functional programming, though for the sake of fluent API designs it might still be useful.  I’ll have to chew on it some more.  Thanks for the detailed post, Chris! iamchrislewis: What does a compiled curried method in Scala look like in java? Compile this: object Concat { def concat(s:...
Aug 29th
1 note
2 tags
PicoContainer v2.10 construction in Scala
Upgraded to PicoContainer v2.10.  Close inspection convinced me that the new lifecycle annotation methods were absolutely crucial, library size be damned. Here’s an example of how to construct a DefaultPicoContainer instance in Scala, using the  version 2.10 API: val pico : DefaultPicoContainer = new PicoBuilder(). withJavaEE5Lifecycle(). withConstructorInjection(). ...
Aug 27th
4 tags
Aug 26th
1 note
4 tags
Aug 25th
2 notes
3 tags
Scala terrain engine nearing major milestone
With a little effort and some “clever” workarounds (I don’t like these), I finally got my new vertex buffer object (VBO) code written in Scala!  The first tile was a simple cube, but I ran it through some tests to see a few of the other tileforms as well.  Instead of drawing the tile edges into the texture itself, I also implemented a wireframe overlay. In addition, I built a...
Aug 25th
1 note
“A decade ago, blogging seemed more powerful, more revolutionary, more...”
– This part resonates, and I’m grateful for the link: “The content on your blog, however, belongs to you, and you alone. People come to your online home, to hear what you have to say, not to hear what everybody else has to say. This sense of personal sovereignty is important.” In...
Aug 25th
5 notes
4 tags
Can't call ARBVertexBufferObject.glGenBuffersARB...
I know that Scala has no static methods and it uses singleton objects instead.  I also know that Scala is supposed to be able to call Java methods, including Java static members. Further, I know that org.lwjgl.opengl.ARBVertexBufferObject extends org.lwjgl.opengl.ARBBufferObject in the LWJGL library, and that the latter is generated code. What I did not appreciate, but do now, is that Scala...
Aug 25th
2 notes
3 tags
How Game Programming Relates to the "Real World"
I have a worry about game programming, and calling myself a game programmer, that it will engender a split reaction from readers, or potential hiring managers for non-game programming jobs. The split reaction is “that is really cool, but it’s not serious programming”. This is faulty reasoning.  As we move together toward the threshold of how many transistors we can place on a...
Aug 25th
2 notes
3 tags
Calling PicoContainer from Scala
Yeah, I’m using PicoContainer version 1.3 still, because size does really matter a lot in game programming, and I’m not sure how much of what’s in 2.0 is sugar.  I’ll use it out of the box for now, but might chop it later if I don’t need some of what’s in there. Which reminds me of something else.  Before I got sucked into grad school and surrendered my entire...
Aug 21st
1 note
4 tags
Optimized Tumblr theme for SEO and social media
I realized with some amount of dread two nights ago that Google was not able to crawl my blog and index my pages.  The default theme I was using was all kinds of b0rked.  The dread was mostly due to the inevitable task of digging under the hood and fixing the markup. Now that’s done.  I added some social media sharing bookmarks while I was at it, and also rigged a makeshift title...
Aug 20th
1 note
5 tags
Aug 20th
6 tags
OpenGL VBO Power Tools in Scala
This is why Scala is so ridiculously powerful for graphics programming.  Assume I have these two lists representing x,y and z coordinates, and corresponding normal vectors for a couple of triangles that I want to draw: val surfaceCoordinates = List( List( List(0.5, 0.5, 0.5), List(0.5, 0.5, -0.5), List(-0.5, -0.16666669, -0.5)), List( List(-0.5, -0.16666669, -0.5), ...
Aug 19th
20 notes
4 tags
Computation of 2700 billion decimal digits of Pi... →
Numbers in the computation are represented in base B with B = 2^64.  It’s exceedingly rare to find people who don’t strictly think of numbers in our (somewhat arbitrary) base 10, but as relationships relative to a given mode.  I’ve often wondered: Is Pi irrational, or is the base 10 number system irrational?
Aug 18th
25 notes
8 tags
Aug 17th
6,511 notes
1 tag
Long View Suggests Google+ is a Big Win
I just read this myopic post eulogizing Google+.  Having spent the better part of the last three years studying social networks at the University of Minnesota, I believe that Paul Tassi’s conclusions are both premature, and seem to miss at least two very important considerations. First, since joining Google+, I can report one very important behavioral change that makes all the difference to...
Aug 17th
1 note
2 tags
58,000 students to attend free online Stanford AI... →
PALO ALTO, Calif. — A free online course at Stanford University on artificial intelligence, to be taught this fall by two leading experts from Silicon Valley, has attracted more than 58,000 students around the globe — a class nearly four times the size of Stanford’s entire student body.
Aug 16th
1 note
6 tags
Wherein game design drives software design
Game designer Alex: It's not a simulation. It's a game. The player should be able to modify the terrain, and that means keeping the choices limited. We're not shooting for photorealism here.
Game programmer Alex: Okay, I ran the numbers and there are 175 types of tileforms available, roughly 45 for each direction. Some of these are duplicates.
Game designer Alex: 175 is too many choices.
Game programmer Alex: It's worse than that, actually. There are also 38 types of tileforms that can be drawn two different ways, depending on if you want them to be a valley bottom or a ridge top.
Game designer Alex: That's almost 200 tile types. TOO MANY. Can we limit the number?
Game programmer Alex: Well, we can. At the cost of realism.
Game designer Alex: Realism? It's a GAME. The last 2D isometric game I played didn't even have hills. It just had art that sort of looked like hills. The map is not the world, my friend.
Game programmer Alex: I can limit the possible positions for surface vertices to TOP, UPPER, and LOWER. Take out center and change the heights to one-third increments instead of one-quarter increments.
Game designer Alex: So, there will only be flat, lazy inclines, and steep inclines?
Game programmer Alex: Yep. And vertical cliffs like before. You lose one of the incline types, but you also reduce the number of possible tiles from 175 to 65.
Game designer Alex: That's roughly 16 for each direction, or 8 of each direction counting diagonals. How many of those funny ridge / valley cases do we get if we reduce to thirds instead of quarters?
Game programmer Alex: 12.
Game designer Alex: Down from 38. I'm not sure. Let me make some phone calls and see what others think.
...
Game designer Alex: Yep. I think 2 different slopes is enough for our purposes. Make it happen.
Game programmer Alex: o7
Aug 16th
19 notes
5 tags
2nd Generation of Tileforms
Last week I moved 700 miles across the country, so have had some time to think about how to proceed with development. I’ve decided to reevaluate my terrain tileforms.  In my last iteration I was having lots of problems with lizard-scale type surface textures on diagonally sloping terrain, which is not what I wanted to see.  My work right now is to essentially turn an isometric game board...
Aug 15th
5 notes
7 tags
Test Driven Development hurdles in Scala
So.   My plan was to save myself a lot of headache involving the silly amount of list and coordinate manipulation I was starting to do, and switch to Scala.  Great idea, things are now moving pretty quickly.  However, the decision came with some serious side effects.  First, Scala takes a long time to compile.  Type inferencing comes at a cost, and the compiler has to make two separate sweeps to...
Aug 15th
3 notes
2 tags
makeagame: Finally learned almost all the programming techniques to make a simple 2D side scrolling game : scrolling, collision, sprite movement….. haha… Now I guess it is time to start making an actual game out of it…. But oops!!!! there’s a big problem where am I going to get all the sprites needed…..  Why, at Shy Guy Kingdom, of course!
Aug 15th
5 notes
2 tags
Simple Scala app runner for IntelliJ IDEA
When you code in Scala in IntelliJ IDEA, and especially if you use a test driven method like I do, you will find yourself constantly, constantly wanting to run the app.  In order to speed up this test driven development process toward continuous integration, and save yourself a lot of repetitive typing, you can use scala scripts in IntelliJ to do that bit for you.  This will help you to minimize...
Aug 14th
1 note
3 tags
Getting Started with LWJGL in Scala
Here’s how you bootstrap an LWJGL Display in Scala: import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.DisplayMode; class GameDisplay { def main(args: Array[String]) { val gameDisplay : GameDisplay = new GameDisplay(); gameDisplay.start(); } def start() { try { Display.setDisplayMode(new DisplayMode(800,600)); ...
Aug 14th
3 notes
1 tag
Go Test, Young Man. →
zenith-software: I think I’m going to buy myself a yardstick and whack my knuckles with it when I catch myself not documenting a new block, at least cursorily.  Consider writing unit tests with JUnit.  Tests serve as documentation and example code.  They force you to explicitly design your APIs, and to think about the usability of your code as you’re writing it.  They also have a...
Aug 8th
1 note
Journey of an Aspiring Game Programmer: Change of... →
The code understandability and program flow control is being too tedious for any person. So, I have decided to change the way I will be programming. Instead of creating a base class and letting all classes inherit from the base class, I will be creating separate classes for each purpose and… I actually have been doing the exact same thing with the rendering engine I started on July 22nd....
Aug 7th
2 notes
Tailgating on Tumblr
Good news! uzpowcvy (some random string of letters) started following you on Tumblr. Finally! Love, -- Tumblr Click on their user link Get sent to some random website trying to sell me books or some such. Gnash teeth, block user. I aggressively curate links, and will block you if your Tumblr site redirects to a non-informational website or does not contain useful material.  I appreciate...
Aug 5th
7 tags
Aug 4th
17 notes
7 tags
Aug 4th
2 notes
1 tag
Support Vector Machine with Polynomial Kernel... →
mrizwan: SVM with polynomial kernel visualization That really clarifies support vector machines for me!  Somewhere in the late-term panic as we crammed in lectures and homework and studied for the final exam in my Machine Learning course last winter, we blasted through SVMs without much time for careful attention or explanation, but only a vague sense of how they work.  Thanks for this...
Aug 3rd
2 notes
5 tags
Java Generic array creation
I just ran into a rather annoying roadblock. // Will not compile, because you can't make generic arrays in Java! x = new Tuple<Float,Tuple<Slope,Direction>>[24][24]; Rather serious bummer, but probably for the best all the same. I spent some time digging for a generic 2D matrix implementation, to no avail. In general, I try to find these things online before I sit down to roll my...
Aug 3rd
27 notes
5 tags
Self organizing incremental neural network →
@mvmoai “Instead of trying to produce a programme to simulate the adult mind, why not rather try to produce one which simulates the child’s? If this were then subjected to an appropriate course of education one would obtain the adult brain.” — ALAN TURING, “Computing Machinery and Intelligence”
Aug 3rd
17 notes
9 tags
Aug 2nd
1 note
6 tags
Tuple.java
/** * Copyright 2011 Alexander R. Saint Croix (saintx@umn.edu) * * Available for personal or commercial use under the terms * of the Apache Software License, version 2.0 */ public class Tuple implements Comparable { private S s; private T t; public Tuple(S s, T t) { this.setCar(s); this.setCdr(t); } public int compareTo(Object o) { if(o...
Aug 1st
111 notes
July 2011
9 posts
9 tags
Jul 30th
1 note
8 tags
Jul 30th
1 note
Less Talk, More Rock →
Jul 27th
6 tags
Jul 27th
9 notes
Jul 24th
Jul 24th
Jul 23rd