vrijdag 12 november 2010

Level editing and workflow

Today I’ll tell you guys more about the level editing of our new Rhino-themed platform game, in its essence this game is a 2D sidescrolling platformer with 3D graphics, much like New Super Mario Bros. We’re working on quite a few projects right now here at Xform so unfortunately we don’t have the time or resources to build a custom level editor, instead we’re using 3D studio Max and some custom max scripts. It’s far from perfect but it’ll get the job done. 

Before building the levels I’ve prepared three files: 

  1. LevelTiles.max which contains the floor tiles
  2. LevelMisc.max which contains all the non interactive background elements like trees, bushes, rocks, clouds etc.
  3. SharedObjects.max which contains interactive elements which are re-used in each level like destructible blocks, pick-ups and floating platforms.
For each level I have to create a new file(LevelX.Max) and merge the files mentioned above using Xref. The reason I use Xref  instead of a normal Merge is that it’ll automatically update changes made in the original file. For example: I’ve made a tree in LevelMisc.max and placed 50 copies of this tree in LevelX.max but afterwards I had to change the trees mesh, luckily changing the tree in the original Xref file will automatically update the trees in the level file.

When the level is done I export the LevelX.max file using a custom max script, this script exports the floor 3D mesh and replaces all the Xref objects with dummies which only store the location, rotation, scale and name of the respective object. I also export the 3d assets of LevelMisc.max and LevelTiles.max.

Once this is all done the game engine loads the 3d floor mesh and replaces the dummies with their respective assets. This setup makes it possible to adjust level assets until the end of the project and also keeps the filesize small.

-- Matthew

1 opmerking:

  1. eToro is the ultimate forex broker for novice and pro traders.