flipCode - Tech File - Steven Hugg [an error occurred while processing this directive]
Steven Hugg
Click the name for some bio info

E-Mail: hugg@pobox.com



   03/31/2000, The Housemate Experiment


I bought "The Sims" yesterday. For an eating, sleeping, and urinating simulator, it sure is addictive. Kinda ironic how the game has you managing the health, hygiene and social life of the little dudes while causing you to neglect your own.

I share a house with three other guys, so I decided to simulate our household to determine our fates. I created a family of four with our attributes, built a house similar to ours, started the sim, and went to dinner. When I came back, the scene was grim. Three of us were dancing around in our pajamas, another of us was asleep standing up in the kitchen, we had no jobs or money, and since the maid quit there were piles of rancid garbage all over the house! It took about 2 sim-weeks to clean up this disaster area.

I don't think the game is not supposed to be educational, but after seeing the scene of sim-sloth, I promised to clean up my dishes more often ;-)



2 D's Better Than 3?


The reason I mention "The Sims" is because of its house-building facilities. I've been prototyping a similar kind of isometric level-building tool, and Maxis has a very good system in their game. I like the way walls fold away when you move the cursor into a room, and moving and rotating furniture is very easy.

There are a couple of things that wouldn't work for my game, however. In "The Sims", houses can have two levels, and you press a button to toggle between viewing the first or second floor. It's not hard to figure out, but in my game you can construct several levels with varying ceiling heights. It'd be a lot harder to visualize how things are supposed to be laid out and line up. This wouldn't be a problem for an experienced level designer, but level-building is an integral part of the game, and I it accessible to everyone.

Another problem with multilevel structures is that you can't see everyone running around inside at the same time. This kind of bugs me in "The Sims", because much of the fun is in watching all the activity going on in your house.

So I've decided to forget isometric and go with a pure 2D design (think "SimTower"). This will allow for maximum ease in level-building, and allow the player to see the entire world (or whatever fits on their screen) at once. I think these benefits outweigh the coolness and "correctness" of a true 3D isometric world. And what's even better, you can edit a level with a plain ASCII editor! ;-)

But now I have to live with the limitations imposed by 2D-game physics. Rooms have height and width, but no depth, so obstacles must be climbed over instead of walked around. Occupants will seem to pass through each other as they meet in the hallways. There will be lots of other things which change the game mechanics in unnatural ways. But fortunately the art of 2D game making is relatively mature after 20 years, so there's plenty of prior art to draw from.

Question for you out there: Anybody know any other build-your-own-building type games that have a side view? All I can think of now is SimTower, but I'm sure there's something on the Amiga that I'm missing.



Java Prototyping


I have a new development process. Instead of hacking away at a C++ program until a game pops out, I'm going to make a really messy prototype in Java, and plan to throw it away. Here's an picture of the isometric building tool I started, written with Java and Swing.



Why might this be a good idea? For me, Java is a much easier language to program in. Your results may vary, but the package system is just wonderful, not having header files is bliss, and build times are non-existent. Also, I know the language well enough that I don't have to run to my "More Effective C++" book to look up an arcane bit of misimplemented STL trivia.

After the prototype is game-like in nature, I plan to port the whole shebang over to C++. This is not as bad as it sounds. Once you have the major algorithms designed and tested, recoding the game in another language should take a fraction of the time it took to write it in the first place. The important thing is to accelerate the unpredictable design-code-test-review-repeat phase of game development.

But there are pitfalls in using Java, even for prototyping:
  • Java still ain't as fast as C++, and if you're making a game which relies on its framerate for gameplay (a first-person shooter), Java might not be suited to this task. But on the other hand, if you write a fast game in Java, it'll be lightning-fast in C++!

  • Java lacks some of the chest-hair-growing features of C++, and if your world revolves around one of these features, you may not be happy. Still, an acceptable Java substitute can usually be found.

  • Library support sucks for games. There are a few OpenGL bindings, but support for DirectX is not very good even in M$ land (don't even bother with Java3D). Since my game is 2D I can get away using the AWT for now, but I'll quickly outgrow this API. I'm working on porting SDL (Simple DirectMedia Layer) to Java, so I'll use that when it's finished.
  • I'm using JBuilder 3 (free from www.borland.com) and JDK 1.2.2. I must say, the latest JDK is much much faster than I remember. In JDK 1.1 you might have multi-second pauses as the garbage collection did its thing; in 1.2.2 you barely see a hiccup. The IDE is written in Java, and thus a bit flaky and piggy -- but no more than Windows itself ;-)



    Back To Simwork


    Well, now it's time to put on my pajamas and dance to Latin music on the boombox, while the maid steals my toaster oven and my friends sleep on the front step. Maybe later I'll admire the lava lamp, or play chess with myself. Is this a game? Is it real life? Who knows...





  • 05/14/2001 - Finally, The Project!
  • 10/03/2000 - Whereever I May ROAM
  • 07/08/2000 - Tech File Update
  • 06/12/2000 - Good Vs Evil
  • 05/24/2000 - Ego Surfing
  • 04/24/2000 - Nocturnal Coding
  • 04/12/2000 - Exploding Thought Giblets
  • 04/03/2000 - Event-Driven Games
  • 03/31/2000 - The Housemate Experiment
  • 03/28/2000 - Introduction

  • This document may not be reproduced in any way without explicit permission from the author and flipCode. All Rights Reserved. Best viewed at a high resolution. The views expressed in this document are the views of the author and NOT neccesarily of anyone else associated with flipCode.

    [an error occurred while processing this directive]