It’s the Current Generation, People

May 31st, 2008 Brad 1 comment

The Xbox 360 was released on November 22nd, 2005. The Playstation 3 was released on November 17th, 2006. The Wii was released on November 19th, 2006.

The last release was well over year and a half ago. So I am wondering why people (the media in particular) insist on referring to this current generation of consoles as “Next Gen.“?

Categories: videogames Tags:

blife2 on the wii

May 26th, 2008 Brad 1 comment

I was up until 3:30am last night working on this. :=)

blife2 on the wii

Categories: blife, code Tags:

blogging

May 19th, 2008 Brad No comments

You might remember blife.  It was an implementation of Conway’s Game of Life in C, and used OpenGL to render the state of the colony.  It worked in Windows, Linux, and everything else.

I threw it away.

I’ve been working on a nice and clean generic cellular automata application.  I’ve been programming in C++, and using SDL to render output.  The kicker is this, though–the ruleset isn’t going to be hardcoded.  The idea here is to abstract away the rules, so that it can be used to simulate anything.  I’m working on a LISP interpreter that will run the rulesets.

What are the advantages of this approach?  In the original blife, you were bound to Game of Life, and only Game of Life.  By virtue of implementing the GoL as a standard, you were also stuck with its default rules. Neither of these assumptions will be present in this new application.  You’ll be able to modify life to your hearts content.  And who says you have to run Life; run Wolframs ‘Rule 30′ instead.  Or use it as a tsst bed for any ideas you have kicking around in your head.

I forgot to mention, SDL wont be the only output option available.  NULL, Text, and PNG output will be available out of the box.

Categories: blife, code Tags:

Email

April 18th, 2008 Brad No comments

If you and I correspond via email, please update your Address Book entry for me to brad@stackpointer.org. I haven’t, and won’t be checking my other inbox’s very often.

Categories: Uncategorized Tags:

Outstanding Clips

April 16th, 2008 Brad No comments

The most English thing I’ve ever seen:

http://www.youtube.com/watch?v=6Mq59ykPnAE

Possibly the funniest short film:

http://www.youtube.com/watch?v=DSLqZbSrnIQ

Categories: Uncategorized Tags:

2004 Book List

April 10th, 2008 Brad No comments

I was recently looking through Stackpointer Labs archives and discovered a list of book I read back in 2004. Perhaps this will tide you over until my next ‘real’ post is finished.  Again, I’ve put the titles I liked in bold.

[1] Quicksilver
[2] Pattern Recognition
[3] Masters of DooM
[4] Dungeons and Dreamers
[5] The Golden Ratio
[6] The Elegant Universe
[7] American Pie
[8] The Fabric of the Cosmos
[9] Shadow and Claw
[10] Atlas of the Skies
The Icewind Dale Trilogy
[11] The Crystal Shard
[12] Streams of Silver
[13] The Halfling’s Gem
[14] Burning Chrome
[15] Winning Chess Tactics
[16] A Crown of Swords
[17] The Path of Daggers
[18] Designing Virtual Worlds
[19] MUD Game Programming
[20] Database Management
[21] The Cuckoo’s Egg
[22] Slaughter-house Five
[23] Shadow of the Tortuer
[24] Claw of the Conciliator
[25] Codes and Ciphers : Julius Caesar, the Enigma and the internet
[26] Y Mabinogi

Re-Reads:

[26] Neuromancer
[27] Count Zero

Categories: Books Tags:

Comments Are Enabled

March 18th, 2008 Brad 4 comments

By the by, I disabled having to register to comment.

Categories: Site Tags:

The Codebook

March 13th, 2008 Brad 1 comment

I’ve been keeping a journal that I call “The Codebook” for the past four of five years. When people see it for the first time, they usually ask me something like: “So.. are you with the NSA then..?”, and I although cliche, reply with something like: “I can neither confirm nor deny my involvement with the NSA”. Anyway, The Codebook is a notebook that I write down all of my programming ideas, work through technical problems, and keep track of what I’m working on.

The content of The Codebook is intractable. It ranges from C++-pseudo code, and algorithm analysis, to mocked up maps that I plotted out when I did that Legend of Zelda clone I wrote back in college. It’s also organized very poorly. Anybody who looked at it would probably think it’s gibberish Computer Science, or some kind of nerd stream of consciousness piece. For instance, I just found an outline of what my plans for JuiceMUD were, right next to a rather large listing of UNIX programs, and then on the next page there’s some mysterious binary work surrounded by blank paper.

This all leads me to a question: how do you keep your technical thoughts organized?

Codebook Cover Codebook Example Codebook Map

Categories: Computing, code Tags:

Compiling libpng in Visual Studio .NET {2005}

March 1st, 2008 Brad No comments

There is very spotty documentation on how to use libpng under Windows. I did find one site that talks about the subject, so you might want to refer to it as well.

1. Libpng Setup:

First, you’ll need to download the latest version of libpng and zlib. Extract them someplace (I placed them within my projects root, in a directory called ‘deps’). The pre-canned Visual Studio settings that come with libpng look for ‘zlib’ rather than ‘zlib-x.y.z’, so rename the directories so that they lack the version numbers.

2. Compiling libpng and zlib

Next go into <projectname>\deps\libpng\projects\visualc71 and open libpng.sln. Go to Build and run ‘Clean Solution’. Now you have a choice, you can either compile libpng as a dynamically loaded library, or a binary blob to statically link into your executable. You can compile either one as a debug or release build. Just make sure that whichever way you compile libpng (debug/release), is the same as what you compile your project. So choose an option, and go to Build -> Build Solution. This will compile both libpng and zlib.

3. Project Setup

Now you’ll need to set your project up to include the libpng and zlib files. Open your Visual Studio project, and go to Project -> <projectname> Properties. Expand Configuration Properties, and then expand C/C++. The top field on the right will read “Additional Include Directories”. Click it and add “C:\<projectname>\deps\zlib;C:\<projectname>\deps\libpng”.

Now close the C/C++ tree and expand the Linker tree, which is directly below it. Roughly 3/4 of the way down is a field called “Additional Library Directories”. Click it and add

“C:\<projectname>\deps\libpng\projects\visualc71\<projecttype>\ZLib;
C:\AnimTester\deps\libpng\projects\visualc71\<projecttype>”.

In my case, I compiled as Win32_LIB_Debug (Statically Linked, Debug Symbols included), so that’s what I set <projecttypeyoucompiledas> to.

Next open the Input node that is in the Linker tree. Under “Additional Dependancies” add libpngd.lib zlibd.lib if you chose to statically link, or libpng13d.lib zlib1d.lib if you compiled it as a dll. If you did compile as a dll, you will then need to copy the dll’s that were generated to the same directory as your executable, or to a directory loaded in PATH.

Now you can implement PNG reading or writing into your project.

4. Troubleshooting

Q: I get a ton of linking errors!
A: Visual Studio cannot find the lib files. Double check that they are compiled (libpng{..}.lib, zlib{…}.lib), that your projects Library dependancies includes the directories that they are in, and that the lib files are included in the Additional Dependancies field.

Q: Visual Studio spits out errors about undeclared identifiers!
A: Make sure you have #include <png.h> in your source. Also make sure that png.h’s path is included under Additional Included Directories in your projects settings.

Categories: Computing, Projects, code Tags:

Xmonad

February 20th, 2008 Brad No comments

I’ve been using Xmonad as my window manager under X11 since early December. Xmonad is written in Haskell, a purely functional programming language that compiles down to machine code. Haskell is the most different looking programming language I’ve ever seen; when I started looking at Lisp, the structures made sense, but I’ve been lost looking at Haskell code. I suppose I need to pick up a book on the subject. I digress, Xmonad builds upon a different paradigm than what most users are used to. Most Window Managers (including Windows Explorer, Gnome, Etc.) use co-ordinate based stacks of objects to represent the environment. Think of this as having Firefox or Internet Explorer fullscreen, and you press alt-tab to get to Google Talk or you drag iTunes around the screen. Xmonad deviates from this by implementing what’s known as a tiling window manager. Instead of stacking objects, Xmonad gives applications non-overlapping regions of your monitor. This has the handy effect of putting what you’re using right in front of your eyes.

The way Xmonad handles where it puts the applications is terrific. If you have one window open, it will take up your whole monitor. If you have two, each will get half. But what about if you have three, or more? Xmonad solves this by declaring the left half of your screen as the main workspace, displaying one window there, and divides the right half in twain. Hence your attention can be given fully to your main application, while you switch to the other programs for support. This is quite handy if you’re a programmer and you have GNU Emacs or gVim open as your main application and two terminals open to test your project stacked one on top of the other to the right of it.

There is the obvious issue of “Most of my applications are designed as WIMP interfaces and this will break them!”. Don’t worry, other tiling window managers such as Ion force you into strict tiling, but you can configure Xmonad in its settings file to allow certain applications to float on top of other windows. Everything in Xmonad can also be controlled by the keyboard. Switching between windows is as simple at hitting alt-k. You can switch virtual desktops by pressing alt-<screen_num>(I switched mine to alt-f1 … f9 so as to not interfere with Irssi). There’s also multi-monitor support.

You can find out more about Xmonad at http://xmonad.org. They also have a directory of interesting screenshots, and a wiki full of configurations.

Xmonad In Action

Categories: Computing, Review Tags: