Details, details and more details

Adding details to a game can take it from a boring repetitive place, to a vibrant exciting world to explore.   The down side is that adding detail takes a lot of time.  Adding individual details can be very time consuming and can add delays.   Take for example, the following shot of three red mushrooms.

Three red mushrooms

Three red mushrooms, all the same

Since they are all the same, it looks rather boring and out of place.  As a designer you could do a few things.  One, have a few different mushrooms objects, each with a different size, shape and color.  This would increase the number of meshes and textures the game engine has to draw, so not ideal solution.  The second solution would be to manually scale and rotate each object.  While a better solution this would be very time consuming for the level designer.  So I came up with a better solution.  Add a small bit of code to a “master” object.  This object is then cloned for other mushrooms in the level.  When the game is started, the code randomizes the scale, rotation and colors.  As you can see, this provides a much more pleasing result with almost no additional effort during level design.

Same three red mushrooms with randomized style

Same three red mushrooms with randomized style

Now that I had my mushrooms looking good, I needed a way to harvest them.  One of early problems you run into with isometric views in a 3D world is large objects obscuring the player.

Tree blocking player

Tree blocking player

To counter this, I added some code to draw a ray from the camera into the scene.  Any objects that it collides with are then asked to be rendered in a transparent shader.

Same scene with a transparent tree

Same scene with a transparent tree

This works for making them transparent, but I had to add some code to make the object try to make itself opaque after the player moved.  Otherwise the world would end up being all transparent objects. 🙂

Adding these rather small details might seem trivial.  But I think in the larger context of the game, they will provide a much more robust and enjoyable experience for the player.

 

Avatar photo

About

I'm a long term gamer who has been playing games since the TRS-80 days. After a few decades of working in Information Technology field, I decided to pursue my passion for games and started making them. Being a solo indie developer can be difficult at times. However, I enjoy wearing many different hats and the challenge.

Leave a Reply

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