Day 13 Progress

This is the download link to the latest version of the game:

https://www.dropbox.com/sh/0o38di2thg3x9za/N_CvcxejXT

I’ve been working on making new terrain for the levels in my game. The levels are a bit basic at the moment, and they don’t have many features, but they are much more interesting than what I had before. I have been experimenting with heightmaps and the Unity terrain generation to get better level terrain, and I am happy with the result. I had a few problems initially because using heightmaps in Unity requires .raw files, which are basically image files with very little formatting, and I am using GIMP, which cannot save to a .raw file. I found a program that can convert png files into raw files though, so I got it working eventually. Here’s a tip: if you have Photoshop, use that, it’s as easy as just saving to a .raw file…  hub_world_1

This is the heightmap I used for my hub world. I got this through a quick Google image search but you may want to create your own, like I did for my other levels.

A heightmap is basically a top-down greyscale view of your terrain, with white areas highest up and black areas lowest down, and grey in-between. When this is imported into Unity using the Terrain feature, it automatically creates terrain to match your heightmap. That makes it much easier to create your levels. You can then ‘paint’ your terrain with any texture you want, and bam! You have your basic level. Then you can just add objects in, like scenery, enemies and collectibles, and you have a game. I need to add some enemies and scenery, but I’m happy with my current progress.

I have also been working on getting my character to pick up gems, and it finally works! There is no counter to actually keep track of how many you’ve picked up and they have no function yet, but this will be implemented soon. The way I fixed it is by adding the ‘Rigidbody’ component to the box collider my gem pickup script was attached to, as this allows the ‘OnTriggerEnter’ function in the script to work. Basically this function is activated when any object with a collider component enters the collider of the object I’ve attached the script to, in this case the player. When activated, the script checks for any objects with a “Gem” tag, and destroys it from the game completely. So now you can pick up gems. Yay!

unity_platformer_3

This is the GameObject that handles all the gem grabbing.

I have also made a very simple start screen with two buttons, one to enter the game and another to quit the game. This is made with Unity’s built-in GUI creator. In this title screen, you can also walk around with the player, a feature I want to keep in the final version. It looks like this: unity_platformer_4

When you press the “Quit Game” button, the application will simply close. But when you click the “New Game” button, it will enter the game, starting with the hub world. This has had a few minor changes too: unity_platformer_5

The terrain for this world was made with the heightmap above, and it made a level with a couple interesting mountains as well as a large flat land in the middle. The textures are just default textures provided with Unity, but I will change them to something I like a bit more at a later date. I’ve also added a skybox, which is basically an imitation of a sky, but the camera angle doesn’t let you see it very well. There is a portal in this world leading to “Level 1”: unity_platformer_6

This is supposed to be a desert-like level, but I haven’t had much time to work on it so the textures aren’t complete. The heightmap for this one was entirely made by me though. I’m very happy with the progress I’ve made here, and I hope you will all have fun playing around with this, and if you find any problems or anything you would like added, please don’t hesitate to comment below. Thanks for all the support.

-Daniel

Advertisements