Ball Race – Day 2

After finishing up the level parser with some minor tweaks and writing some unit tests which immediately highlighted several mistakes I then fixed, I began with the geometry building code.

The level file format is really easy and anyone should be able to create his own mazes. For example, this simple text file will be enough to have my game make a nice, textured 3D maze board of it:

###############
#O            #
# + +-+-+-+-+ #
# |    O      #
# + +-+-+ + +-#
# |       |   #
# +-+-+ + + + #
#     | | | |O#
#-+-+ + + + + #
#       | | | #
# + +-+-+ + + #
#F|       |   #
# + +-+-+ +-+ #
#        O|S  #
###############

After taking an in-depth look at the XNA model classes, I decided to build a special MazeModel class that would construct a model from a maze provided to it in its constructor.

That took most of day 2. While writing the mesh generation code, I noticed that my original idea with equally sized tiles and walls that only used a fraction of the tile they were on didn’t work out. But because I had already made the decision to limit the tiles walls can be on, it was not a drastic change to use alternating tile sizes.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please copy the string Jr5ofk to the field below:

This site uses Akismet to reduce spam. Learn how your comment data is processed.