Monday, 25 August 2014

Ludum Dare #30 Dev Journal: Salvation – Progress (6 hours in)

Ok, I got a major milestone out of the way I think. So far I have:
  • Building Panel working
  • Buildings in the game scene
  • Backdrop with a particle system (basic but looks neat)
So I’m 6 hours in and I can now select a building from a menu and it’ll be built in the area I specify. In the screenshot, the red/green/blue and yellow boxes are placeholders for building icons. I select one of these bad boys and the corresponding building will be built in the desired location.

Realism is not my friend since I can’t art very good. And my pixel art skills are terrible so I can’t do that either. I’m hoping that by following a Neon-like art style I’ll be able to hide most of my artistic failings. I’m thinking something similar to Hotline Miamis art style. A gamble I guess but I hope it’ll pay off.

I’d like to declare here that I made use of Alex’s space skybox tool to create my stars quickly (available here

My next objective is either to finish off all the buildings and finish my building panel, or start working on the’ Management Class’ which will be dealing with the controller aspects of my game (in terms of a MVC design). I am leaning towards the Management Class at the moment as that is going to be more work I feel. If I get this working for atleast one building, then adding other building objects shouldn’t be that hard (touch wood).

- Improvement ideas -
I’m not happy about how I build buildings currently. My code instantiates a new building in the same vector as empty building slot I want to use. This empty building slot is a building initself. Meaning that I destroy the building (emptyroom) and then initiate the desired building in its place. This seems pretty memory intensive to me, but for now it’ll work. The one good thing about this is I can overwrite any building I want now, visually atleast. Regardless of which type of building it is or where I placed it. Example of my current code for placing a new building:

public void spawnBuilding(){
          Destroy(killObject); //kill the current gameobject that I get from the buildings class of the building I clicked on
           switch (BuildingSelect) { //BuildingSelect is a unique ID
                      case 1: Instantiate(Building1, tempVec, transform.rotation);
                      case 2: Instantiate(Building2, tempVec, transform.rotation);
                      case 3: Instantiate(Building3, tempVec, transform.rotation);
                      default: Instantiate(Building0, tempVec, transform.rotation);

Back to it!

No comments:

Post a Comment