Jump to content

  • Log In with Google      Sign In   
  • Create Account

dAND3h

Member Since 14 Apr 2011
Offline Last Active Oct 19 2013 10:11 AM

Posts I've Made

In Topic: Ensure no dependency error with DirectX release

27 September 2013 - 09:22 AM

Thanks for the reply, so do I need to give my friend the entire redist folder? ...I still don't understand why it won't work for me though, I have everything installed and I just double checked the spelling in the release configuration.. Specifically, it is currently looking for the d3dx9.lib. I am also using the "additional Include Directories" within the C/C++ General option, should I perhaps be setting the include and lib directories from within the VC++ directories option?

 

EDIT: So I found out why it wouldn't work for me, I didn't add the library include to the release config....I have no idea why


In Topic: Oh my glorious code!

02 August 2013 - 06:27 PM

system("cls")...oh how those days were glorious!


In Topic: How? - Loading Unity Terrain Async without Pro or Asset Streaming

15 July 2013 - 11:57 AM

I assume you have already found this? http://docs.unity3d.com/Documentation/ScriptReference/Mathf.PerlinNoise.html or are you using a custom solution?


In Topic: How? - Loading Unity Terrain Async without Pro or Asset Streaming

15 July 2013 - 11:25 AM

hmm, do you really need every new piece of "Terrain" to be completely random? 

 

If not, you can create a set of pre computed heightmaps in a image program which you can then load a random set from.

 

In regards to your question, have you thought about generating a heightmap texture via shader code? If you are doing alot of floating point calculations this would greatly increase performance.  It would increase performace even more if you decided to only generate a new random heightmap after you have used one a certain number of times, and just apply rotations to bits of terrain to keep it looking like it is more random than it really is.

 

Regards


In Topic: C++ One enum name for more types

15 July 2013 - 10:55 AM

public struct TileInfo
{
	public bool walkable;
        public bool destructable;
	
	 public static TileInfo Grass()
        {
            return new TileInfo ()
            {
                walkable = true,
                destructable = false;
            }
         }

	 public static TileInfo Water()
        {
            return new TileInfo ()
            {
                walkable = false,
                destructable = false;
            }
         }
}

 

Then, where I want info for a tile, I have a TileInfo variable in a generic tile class, which I set like:

 

TileInfo tileInfo = TileInfo.Grass();

 

 

This makes it very easy and decouples tile meta data into nice segments which you could possibly parse from a file.

 

EDIT: To then do the actual check with player is trivial, since all instances of Tile will have a set TileInfo data, we can just use:

 

if(tileInfo.walkable)

{

//allow player movement

}

 

etc.


PARTNERS