Regard All Phenomena As Dreams


Note to Self: CHB and Workspace First...

I haven't been doing much the last few days (a friend's wedding, brief vacation in Maine, fun things like that....), but wanted to get back in and finish adding a couple basic things to my invoking TV3D to display a 'Hello World' window.

I had previously managed to use Dolphin's wizard to bring in the TrueVision 3D DLLs and it created all the necessary Smalltalk classes to use them. (I'm still very pleased with how smooth and easy that was!).

My first version of this opened a window that said 'Hello World' using the TrueVision 3D engine, but I didn't have it listening for a keystroke to finish up and close the window as the tutorial did, I had to manually invoke a method in my workspace. (Basic stuff, I know, but I gotta start somewhere....) So, I thought it would be a simple matter to have the test listen for a keystroke and respond to that rather than wait for a manual method invocation.

For the most part, it was easy, but at one point I ran into a minor question that frustrated me because I used my typical way of trying to find a solution rather than a more 'Smalltalk-appropriate' way:

The TV3D example I was following had you wait for the user to press the Escape key in order to close the tutorial window. It was easy to instantiate a TVInputEngine (their class to deal with keyboard, mouse, joystick and other inputs), but I had no clue where to find the constant their example used to identify that the Escape key was hit. (CONST_TV_KEY.TV_KEY_ESCAPE). I started out by hunting around in Google and such, with little luck. (Using TV3D with Dolphin is a rather obscure topic...) Then I happened to look at the class comments in more detail, and saw the reference to a poolDictionary 'TrueVision3DConstants' in the Class definition for the TVEngine class. From there it was a simple matter to browse to the PoolDictionary object, see how it worked, and play around for a bit in a Workspace. For example, I quickly found out I didn't need to prefix with CONST_TV_KEY from a little trial-and-error in the Workspace.

The lesson I learned is that there is a huge amount of info at your fingertips in the Class Hierarchy Browser, and, unlike working in Java or .Net where Googling for answers is often your best bet, a quick trip thru the CHB and some simple tests via a Workspace is a convenient and more efficient approach when stumped.


That rarest of things

A new book on Smalltalk! Well, new as of June 2005. I knew of the author, St├ęphane Ducasse, before this book came out because he went through a lot of effort to get various authors' approvals to offer up many older Smalltalk books for free. This was and still is a valuable resource for me as I'm learning Smalltalk.

He's recently had a book published called Squeak: Learn Programming with Robots. It's aimed primarily at teaching coding to kids, and initial opinions on Amazon are good so far. It may not be too applicable to what I'm doing, but I hope for his sake that the books sells well. If you know anyone, young or old, who wants to learn coding, this may be a good place to start!

Dolphin and TrueVision: A Quick Test

Before I had settled on Smalltalk, I had been checking out TrueVision 3D, which is an SDK for 3d game development, because of its strong feature set and the fact that it supports C#. Now that I'm going with Dolphin I was wondering how well it might work with TV3D.

So, I downloaded v6.2 (which you can try for free as long as you don't mind a watermark in the lower right corner of your windows) and gave it a shot. Still being a newbie to Dolphin and Smalltalk as well as TV3D I expected to fumble around for a bit, but, my initial 'Hello World' test worked! Dolphin's wizards were able to set-up Smalltalk classes corresponding to the various functions in the TV3D API, and after spending some time learning how to pass things like window handles and such I was able to create a window and have TV3D render some text to it.

It may not sound like much, but I was happy to get things working relatively quickly given my being a novice in all tools involved. So, I think I'll dive a little deeper and try some more complicated examples over the next few days.


Dolphin XP: This one is just right!

Things didn't go as sequentially as these posts make it seem. I was popping back and forth between the various 'flavors', and it became clear as I would use one for awhile, then try another, and so on, that Object Art's Dolphin XP was the best match for my preferences and what I'm looking to do. Like MT, it's focused on the Windows platform, and provides facilities to smooth working with DirectX and other MS APIs, but maintains a more consistently 'Smalltalk' rather than C++ feel while doing it. Given that one of my goals is learning Smalltalk and the Smalltalk-way of doing things as much as the actual creation of a game, that was a definite plus for my purposes.

It's not perfect (at the time of this post, the help system is one version behind the release, and is a separate install), but it's got many strengths that tie in to what I'm looking for in my environment of choice. It's got a friendly interface with just enought style to make it stand out without getting in the way. It also has a very active and helpful community to assist with any issues that may arise, and plenty of detailed tutorials are out there. There's a newsgroup devoted to Dolphin (comp.lang.smalltalk.dolphin, easy to browse through Google groups...) that remains busy and has lots of good info. The people at Object Arts seem to be very helpful there, consistently chiming in and helping people out with questions/problems/etc..

I've also heard good things about the book 'Dolphin Smalltalk Companion' by Ted Bracht. While it may be a bit dated by now, I found that Amazon had some inexpensive used copies available, so I've ordered one and look forward to working through it.

I found Dolphin's various browsers and other tools well thought out and easy to use. As I did some simple projects in it (doing their tutorials, or some exercises in the book "Smalltalk, Objects, and Design", for example..) I realized I was meeting my primary goal in all this: having fun!! Dolphin's environment 'clicked' for me, and I'm enjoying working with it, and will be using it going forward as I get to know Smalltalk better and begin trying my hand at graphics/game development within Smalltalk. IMHO, they've really nailed the balance between a Windows-specific focus, and Smalltalk tradition.

If you want to take a look at it, then check out Bitwise Magazine's free download for the 'Value Edition'. Their discussion of Smalltalk itself is a fun read too.

I'm also keeping my fingers crossed that the ever-looming next release (v6) seems to be actually/really/this-time-for-sure almost ready to go. There's lots of great looking new features in it. Check out Dolphin Map for a nice overview of the features, and Object Art's own What's New page for an in-depth look at one of those features: a significant addition to their UI that they're calling the 'Idea Space'.

So, I'm very happy to have found the tool of choice for myself: Dolphin XP!

Smalltalk MT: The Fast and the Furious

As I was searching for my Smalltalk environment of choice, I saw several references to Smalltalk MT. It's focused on Windows, with an emphasis on performance. It comes with wrappers all ready to go for calling the various DirectX libraries (If I remember right, it's as current as the October 2004 DirectX 9 release). It definitely seems like a good candidate for game development, so I decided to take a closer look. A subsequent post will go into some details on my experiences getting some DirectX samples working in it, but as for a general summary of my impressions:

MT is offered by Genify in the U.S. and ObjectConnect in Europe. (I think they're basically one and the same, with one site being their European 'face' and the other their American.) The web sites are sparse, but do the job. Good additional information can be found here as well. There's a newsgroup hosted on, but it's been rather inactive lately.

In working with Smalltalk MT I felt it had lots of potential, especially for someone like me who is interested in games development. The interface is well done, and it comes 'ready to go' for working with DirectX. However, I did encounter a couple frustrations working with it too. For example, it provides preferences for setting fonts, etc., but they don't seem to work, they just kept resetting to original values. At one point after trying to change fonts, all the text vanished. When I looked in the preferences settings, I saw the font size was set to some huge huge value, so each letter would have been the size of Cleveland. Setting the font size back down fixed it. I also managed to get things to freeze up a couple times in my poking around. Looking through how MT sets up its classes/methods makes the C++ 'flavor' of things very evident.

But, these were relatively minor things, and my overall impressions were good. This is a Smalltalk with a mission, and it's clearly focused on helping you get compact and fast results, and facilitate working with the various MS APIs. However, that isn't my primary focus (at least at this point in time), and I ultimately ended up with another product, but it was a close call. I did get the personal edition of Smalltalk MT, and look forward to using it in the future. But, for my first project, I settled on...


Visual Age for SmallTalk: Little Orphan VASTie

Once upon a time IBM seemed to be rather interested in Smalltalk, especially back in the 90's when it seemed to have potential to take hold as a more mainstream development environment. Their VisualAge for Smalltalk product was quite sophisticated for its time, and along with VisualWorks was one of the heavyweights in the Smalltalk world.

However, times change, and whatever people were backers of Smalltalk at IBM must have lost interest/left/been outnumbered, because IBM is ceasing support of VAST in 2006. However, Instantiations is adopting the remnants of VAST, and is promising to keep moving forward with it. They do offer a free trial (not sure if it's time limited or not), but it remains pricey pricey pricey, so not suitable for me.

Good luck to Instantiations though....I hope they can keep the product alive and thriving!

Cincom VisualWorks: The Corporate Face of Smalltalk

This is like Squeak's elder, much much more serious and responsible brother. Cincom VisualWorks is clearly aimed at a corporate development environment. It's very robust, with a large set of ready-to-go development tools and packages that will save you lots of effort. It's IDE seems to me to be solid and functional, if a tad uninspired.

They very generously offer a free download with a license for unlimited non-commercial use. No time-limits. Their site has lots of great informational links, not just for their product, but for Smalltalk in general, as well as other common Smalltalk environments.

You can get a 3rd party package called Jun that functions as a wrapper for Open-GL for VisualWorks. I have no idea how stable/well-documented/easy-to-use it is, but it is there, and it too is free. There's also been a fair amount of activity recently on its site, which is a good thing!

They also have 'ObjectWorks', which seems to be an associated product that is more closely tied to the Windows environment, and would be able to talk to DirectX libraries via it's COM/ActiveX capabilities.

VisualWorks is also notable for being one of the original efforts by Xerox ParcPlace at a commercial development environment for Smalltalk. (See this article for more info.)

However, for my purposes (see my earlier posts) VisualWorks didn't really seem appropriate. It's definitely aimed at the corporate user rather than the individual developer like myself. (When they don't even have the price on the web site, I know it's too much for me.) Plus, there are other distributions that look a little more in-line with what I'm looking to do....

[EDIT] In a (surprisingly prompt) comment, the product manager for Cincom Smalltalk clarified a couple things (it's 'ObjectStudio', not 'ObjectWorks' as I called it, and Cincom Smalltalk consists of VW and OS in conjunction, they're not separate products per se), and he also provided this helpful link with the details on their pricing policy.

Squeak: The Wild Wild West of Smalltalk

I had first encountered Squeak a few years ago, and tried it out. It has some very interesting strengths and weaknesses.

Some strengths: It's free, which is always a good thing, and seems to have quite an active following. The ambituous Croquet project is one example, with its emphasis on collaborative development/multimedia/etc. in a three-dimensional 'world'. The author Mark Guzdial has a couple excellent books that, while getting a little dated, still have lots of great information. There's also an emphasis in the Squeak community (if not a main focus) on using it as an educational tool for teaching coding and more to children.

Some less than strong points: When you first start it up, IMHO there's no other way to describe the interface than U-G-L-Y. Garish colors and unaliased fonts really make a harsh first impression. (It looked a little more refined on OS X, but the PC distro is a real eyesore.) There are themes, alternative fonts, etc. that you can download/install to make things much nicer, but in doing so I managed to really hose things, which leads to another minus: it can be a touch unstable. (Especially with an ignorant newbie like me blundering about.) I'm sure that with a little knowledgeable effort, the appearance can be greatly improved. I'm just worried that alot of people have/will get really put off by the initial look-and-feel of it.

Squeak is fun to poke around in, and is a great choice if you're on a budget. But, I wanted to see what else was out there, and so have also been looking at other Smalltalk choices recently.

(A quick note for those who haven't read my blog sequentially: I'm still playing 'catch up' with these posts on my adventures with Smalltalk. These are still covering events/decisions that have happened over the last couple weeks. In other words, my blog isn't "real time" yet.)


And the language of choice is....Smalltalk!

When we're going out to a restaurant, Russ is amused by my inability to decide exactly what I'll order until the waiter/tress is hovering over us. Sometimes, after having been saying I'll order either A or B, B or A, I'll blurt out a third thing at the last minute. I just did it again: "Let's see, C# or Java? Which one......oh, how about Smalltalk!" Okay, it wasn't quite that impromptu, but it definitely was a come-from-behind decision to pick Smalltalk.

I know most people would find that decision downright ridiculous, but there's a (form of) reasoning behind my madness. I've always found Smalltalk interesting from the perspective of language development history, and had dabbled in various free versions of it over the last few years. (Squeak and Cincom VisualWorks in particular). While I wasn't initially blown away by it (for reasons I'll detail in some later post) I was intrigued.

As I mentioned in a previous post, having fun and enjoying the development process itself was of key importance. In thinking about this I remembered one of the best times I ever had: writing in Forth on my Commodore 64 back in the mid-eighties. What really appealed to me about it was the way code was naturally segregated into smaller parts, and you could incrementally build up your functionality and slowly let it 'grow' one piece at a time. (One could object that this is true of any language, but some facilitate this more than others...) Similarly, Smalltalk provides a very interactive experience that lets you fluidly move between design, coding, and testing. It's also rigorously object-oriented (some may say to the detriment of the language, but I love it), and I enjoy using a Class Hierarchy Browser for not only reference but as a place to code in. It makes looking up information feel like a smoothly integral part of the development process rather than an interruption to my coding while I hunt for what I need to know.

So, a major theme of this blog will be about my experiences and such as I go about developing a small game in Smalltalk. There are some wonderful sites with lots of information on Smalltalk, especially insofar as the language itself. BUT, there's not a whole lot of information out there (at least easily available) on developing games in Smalltalk, so I'm hoping to pass along whatever interesting/helpful info bits I find or discover as I do this. At the time of this post, my sidebar links are a miscellaneous mix of stuff, but over time I'll put a separate section of smalltalk-related links that I find especially helpful or interesting.

Next up: I'll review the various Smalltalk implementations, and make a choice for which one to concentrate on for my initial efforts.

C# or Java?

Over the last few years at work I've been coding in ASP/Javascript, then C#, and eventually Java. The previous year I was using Websphere/Java, but I switched departments recently and am now back to coding in Visual Studio/C#. I'm not overly partisan regarding either platform. I really don't feel a strong preference for one over the other.

Java has an immense library, and some good free IDEs, with my favorite (at home) IDE being Eclipse with the MyEclipseIDE add-on. (MyEclipse conveniently packages tons of great additional functionality for Eclipse. You could hunt down and install most of what they provide for free, but if nothing else they save you a lot of effort.)

But, I also enjoy working with C#. Visual Studio is very easy to develop in, and, like Java, there's an abundance of support and resources available for either one.

Since my focus is going to be graphics and game creation, I considered C++ too, but didn't want to worry about pointers, garbage collection, etc. etc.. That just doesn't sound appealing. They may not match C++ for speed, but I'm not looking to create the next Half-Life 2 or Doom 3, so I don't think that'll matter.

But, thinking about that reminded me of one of my key goals: not to necessarily pick the most 'efficient', the 'best' language, but to pick something that I would find fun to code in. I won't pretend that my decision is in any way based on careful research or a well-reasoned consideration of all various factors. It's going to be very subjective.

So, time to actually decide...

Flipping a coin....

I have a Gateway PC (P4 3.06 w/1G of memory) and iMac (G5 2.0 w/1G of memory), so I could potentially develop something for either platform. In the end, much as I love my mac, I decided to do something primarily targeted for the PC. Why? Because I have more graphic horsepower on the PC (ATI x800 Pro w/256M of memory on the PC vs. an ATI 9600 on the iMac.) and a larger monitor and better sound system. At some point I'm sure I'll do something for the Mac. Apple certainly provides some marvelous tools (XCode 2, Interface Builder, and tons of cool utilities) for free. But, I have to start somewhere, so the Evil Empire gets to go first.

So, the next question: what language?

Tired of only consuming

I love gaming in general. My favorite genre is RPGs, with MMORPGs being my most-often played subgenre. (Current fave: Everquest 2) I also appreciate the occasional 'lightweight' game like Bejewelled, WordTwist, or other quick entertainments you can play for 5 or 50 minutes. But, lately I've been getting tired of just waiting for other people to come up with something fun. I want to do more than just consume what someone else is creating.

It's not that I have some great idea for a fun game, more just a desire to create learn something new, try to come up with a fun design idea, and then enjoy actually making it happen.

So, next questions: Mac or PC? What language(s) to use?


Why this blog?

I dabbled with blogging in the past (using Movable Type) but eventually lapsed. I just didn't feel compelled to regularly post my opinions and musings on the net, there seemed a surfeit of ramblings already.

But, I've found an initial topic that I hope at least a handful of others will find interesting, or if nothing else will provide a resource for some future reader who is searching for helpful information on this rather obscure topic.

I'll no doubt post on other things as well, but initially there will be a burst of posts on this topic as I play 'catch-up' and describe how I got to where I am now. Then, the frequency of posting should go down dramatically once I'm current.

What's the topic? Future posts will make that clear... (And, no, the name of the blog is not a hint...that's a hint for future posts on another topic.)