Question to Mr. Mike about Ultima 7 world representation

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Question to Mr. Mike about Ultima 7 world representation

      Hello,

      Not sure if I'll get a reply to this post, but it's worth a shot. ;)

      I love the way Ultima 7 represented the world and have always wondered how it was done. I know that only a snapshot of the world is cached and is constantly being loaded from the hard drive as you walk around. This is simple enough, but what about the layering? How did you achieve the layers and the indoor/outdoor transitions? How were the data structures set up that represented the world? How did objects exist there and what kind of seperation what there from, say, a tree and the piece of wooden flooring?

      I really want to understand how the world fit together because, in my opinion, it's one of the best representations I've ever seen in a 2D game. I want to implement something similar for some projects of my own.

      Thanks!
    • RE: Question to Mr. Mike about Ultima 7 world representation

      Anyone? it doesn't have to be exactly like U7, but any thoughts towards world representation in a similar fashon would be greatly appretiated.
    • RE: Question to Mr. Mike about Ultima 7 world representation

      Ultima 7's object structure was organized as a list of object lists stored in a monolithic, self managing block of memory.

      The top level lists mapped to geographic square areas of the map - I think they were 16 feet by 16 feet. These areas were called "chunks". Each chunk had a special item in the list that mapped to all the common tiles and items in each chunk. This was not only important for saving memory, it was important for designers to quickly build a chunk once, then be able to lay it down a few hundred times all over Britannia.

      Within each chunk list, there was a list of objects in that chunk. Each object had a similar structure - with some objects like containers using a part of the structure to refer to the list of the containers contents.

      The objects in each chunk had data like (x,y,z), bitmap ID#, frame # (for animating objects), object type, and a special field that depended on the object type for use. Containers used the field to point to their contents list, while a pile of gold used it to store quantity.

      The layering was accomplished by creating a special draw routine that drew each chunk from the top of the screen to the bottom, and drew each object list in each chunk from the floor to the ceiling. You can notice some bugs in this routine especially around stairwells/railings, since the bitmaps were not drawn with a Z-buffer.

      Objects were always referred to by a object referent, and not a direct pointer. This allowed the master object list to swap in/out chunks and chunk lists as the player walked across the map.

      There was also a special list - called the "Etherial Void" that was used as a scratch pad - a place to move objects while they were being transferred from a container to the ground or from one chunk to another.

      NPCs were containers - but they also had a special NPC data structure that had lots of additional data that regular objects didn't have - such as their NPC schedule or behavior.

      Hows that?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: Question to Mr. Mike about Ultima 7 world representation

      Thanks for the reply!

      Let me see if I have this right....

      The world was basically a huge 2d array where each element represented a chunk that was 16' x 16'. Each chunk contained information about the tiles that made it up and held ordered lists of objects that were contained in those chunks. Is that about right (if over simplafied a bit)?

      Were tiles that made up each chunk only the background terrain tiles, or did you include trees and other such objects?

      I didn't realize that living NPC's were just a specialized container. Why not have an NPC (or agent) class and morph them to a container when they died?

      Out of curiosity, did you work on Serpent Isle at all? I know it used pretty much the same engine, just curious if you had a hand in it. :)

      Thanks again for your reply!
    • RE: Question to Mr. Mike about Ultima 7 world representation

      You've got it exactly right - and NPC's DID morph into containers when they died.

      I didn't work on Serpent Isle, I was already on Ultima 8 - but I know lots of people who did work on Serpent Isle.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • This is a great question! Check out Exult on SourceForge.net, it is a reverse engineered Ultima 7/7½ engine that uses the original content from the games. The cheat mode is similar to the cheat mode from the original game as well, and you can get some interesting insight from fiddling with the cheat menus and such.

      Personally I'm with you - I thought Serpent Isle was great! Pagan was very nice once they published the patch, but I finished it before the patch and then again after. It would be pretty cool to build a Game Builder type of app using a Serpent Isle-like engine. And it's far more attainable than building something like Morrowind or Neverwinter Nights.

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • Hmm i wonder if we could set up some kind of forum project to do something similar. Take all of the programming skill on the forum and build a dynamic engine so normal people can create games in a simple enviroment. It would be open source of course.

      Just a thought
      .Code
      push you ; haha!
    • Hey I thought thats what THIS forum was!!
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Exult is very awesome; I have it installed right now in fact. :D

      I'd love to bring a U7-style engine to life!