-
Notifications
You must be signed in to change notification settings - Fork 1
Home
razvanalex edited this page Sep 6, 2015
·
5 revisions
XNAEnviroment is a project made in C# with XNA framework. It's a game engine developed by me and it includes things like skydome, billboards system, terrain rendering system and more...
- W, A, S, D - control the position of camera
- Shift - increase the speed of camera
- Space - change time mode: manual, automatic, real time
- T - turn on/off terrain
- P - screenshot
- F - fullscreen
- B - depth blur
- Up/Down - move the sun/moon across the sky in manual mode
- 1, 2, 3, 4, 5 above QWERTY keyboard - change water's graphics (Very low/Low/Medium/High/Very low)
- 1, 2, 3, 4 from NumPad = change water's properties(Length/speed/height of waves) with specific values
- hold Ctrl - show mouse cursor and lock the camera
- PageUP/PageDown - change the height of terrain
- Q/ESC - close the app
- U/J - change height of models[0]
- To add models:
models.Add(new Models(Content.Load<Model>("MODEL.fbx"), (Vector3)POSITION, (Vector3)ROTATION, (Vector3)SCALE, GraphicsDevice));- To change initial camera:
camera = new FreeCamera((Vector3)POSITION, (float)YAW, (float)PITCH, (float)NEAR_PLANE, (float)FAR_PLANE, GraphicsDevice);- To change texture tiling:
//in LoadContent() change the value like that:
terrain.textureTiling[OBJECT] = TILING_VALUE;
//OBJECT = 0-3; TILING_VALUE = any value you want- To change terrain's textures:
//in LoadContent() change the value like that:
terrain.MAP = Content.Load<Texture2D>(TEXTURE_PATH);
//MAP can be: WeightMap, RTexture, GTexture, BTexture, DetailTexture
//for DetailTexture, the variable DetailDistance must be set greater than 0 (somewhere between 10 and 2000-3000)
terrain.DetailDistance = VALUE;- To add texture:
-
first you have to add textures files(TEXTURE_NAME.bmp/png/etc... and TEXTURE_NAME_MAP.bmp/png/etc...) in Content\textures\Terrain\ in a NewFolder(TEXTURE_NAME_PATH)
-
in Game.cs add in TerrainTextures():
terrain.TexturesMaps[INDEX] = Content.Load<Texture2D>("TEXTURE_NAME_PATH//TEXTURE_NAME_MAP");
terrain.Textures[INDEX] = Content.Load<Texture2D>("TEXTURE_NAME_PATH//TEXTURE_NAME");
terrain.textureTiling[INDEX] = VALUE;- in Terrain.cs change:
public const int NoOfTextures = INDEX;- in terrain.fx change:
const static int NoOfTextures = INDEX;- in terrain.fx add:
texture TextureINDEX;- in
sampler TextureSampler[NoOfTextures] = {add
sampler_state {
texture = <TextureINDEX>;
AddressU = Wrap;
AddressV = Wrap;
MinFilter = Anisotropic;
MagFilter = Anisotropic;
}- CPU: 1.8GHz dual core or with multi-threading support
- GPU: with Shader Model 3.0 and DirectX9.0c
- RAM: 1GB
- HDD: 300MB
