Crab Meat: Placeholder Objects and CSV

Tiger Collins
Jul 21, 2017 · 4 min read

This is my first week of development for Crab Meat, my group — Tristan Shaw and Sean Visser — and I have already planned our project and pitched the project to our peers. Sean has been programming our games level generation from .CSV files and I have set up every scene, creating the UI and creating Placeholder Objects as well as testing the code Sean has produced.

Modelling
I’ve chosen assets that I knew had to be created for us to be able to test the game, but I have left just under half of the assets for my group member, Tristan to work on.

Placeholders that I have made for Crab Meat

To make the UI 3D using Magicavoxel I first created 2D assets in Adobe Photoshop. As Magicavoxel only supports up to 126 x 126 x126 objects, I created a 126 x 126 pixel Photoshop document and created a symbol for retrying, pausing and dropping the player’s item (shell). After finishing the 3 assets in Photoshop, I just had to export it as a PNG and import it into MagicaVoxel. PNG images automatically register as 1 thickness (z axis), so I simply changed that and extruded different colours using the face tool.

The general look that I was aiming for in the Art Bible was that the UI highlights the idea that the player is going on a journey to find Atlantis, a stone city that’s been abandoned for centuries — To achieve this I made stone coloured buttons and added green vines on the layer in front.

A bit of thought did have to go into the design for Sand and Sandstone Wall blocks, as Crab Meat is cubicle, the textures had to be repeatable so people can’t notice the different blocks too much.

Scripting
I’m not dealing with scripting for the .CSV files too much when it comes to the .CSV file instantiating and working on multiple levels. However, I am designing a lot of the levels and doing some of the more simpler coding tasks such as creating Scene Controllers.

#,#,#,#,#,#,#,#,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,#,#,#,SG,#,#,#,#,,,#,SG,#,,,#,#,#,#,SG,#,#,#,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,SG,SG,SG,SG,SG,SG,SG,##,#,#,#,#,#,#,#,#

Above is a block of code for a .CSV file that determines the level layout for Crab Meat. Sean, our programmer has done a .CSV for each layer of cubes, so the work above depicts the ground. # is for walls, whilst SG is for SandGround blocks and the gaps between , are spaces where nothing is instantiated.

#,#,#,#,#,#,#,#,##,,,,,,,,##,,,,P,,,,##,,,,,,,,##,,,,,,,,##,#,#,#,,#,#,#,#,,,#,,#,,,#,#,#,#,,#,#,#,##,,,,,,,,##,,,,,,,,##,,,,,,,,##,,,,,,,,##,#,#,#,#,#,#,#,#

The block of code above is for the .CSV for the second layer. On this layer # is for walls, the gaps between the , are where nothing instantiates and the P is for where the player spawns. These two .CSV files are combined in a script that Sean made to create the following result.

Progress on level 1 using .CSV files.

Doing slightly simpler work with .CSV files aren’t the only thing that I have worked on this week, I have also worked on the scene controller for the menus and created the placeholder Main Menu that does, in fact, connect to other scenes and work correctly.

public void MainMenu(){Application.LoadLevel("Main Menu");}public void Options(){Application.LoadLevel("Options");}public void Credits(){Application.LoadLevel("Credits");}public void QuitGame(){Application.Quit();print("Quit");}public void LoadLevel1(){Application.LoadLevel("Level 1");}

Above is the script I used for the scene controller, there are no update classes, start classes or variables — such as floats, ints, etc. There are only the public classes as seen above, which are only public so that the Unity inspector can access the classes for the buttons. QuitGame() has print("Quit) because the line Application.Quit only works on packaged version and I need to know that the button works. Similar to that is Application.LoadLevel("____") where the line would work but only when the scenes are loaded in the build which I was able to by going File>Build Settings>Add Open Scenes.

Before Next Diary
Before the next developer diary, I plan on having some feedback on our prototype that we’re currently making. However, I don’t plan on doing much scripting or programming, I intend on using .CSV files though to design the levels as well as script for minor bug fixes that Sean won’t be able to do. I also plan on creating more placeholder assets and collaborating with audio and animation disciplines to produce audio and animation for our game.

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade