• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

mgoss

Members
  • Content count

    27
  • Joined

  • Last visited

Community Reputation

225 Neutral

About mgoss

  • Rank
    Member
  1. Riu pretty much summed it up for us. For preparations, I used a state machine I had made awhile back and used it for this game and made a behavior tree system. The current pigs you see in the game used my behavior tree system. However, the behavior tree wasn't really fleshed out enough to crank out AI. So improving it got pushed back. We switched to a behavior tree which we bought on Unity's asset store and that's what byte troll used. However, due to time constraints, I didn't have time to implement his work in the final submission. I was more focus getting the farming done and other aspects working.    During the week of the event, I created a Unity Editor tool to quickly generate a random farm for me and make changes for me. That tool was invaluable for me.    For the animations, I used Mecanim and interface it with my event manager system I had made. So it was easy to plug in new animations on the fly. Whenever Riu made a new tool(hoe, hammer, sickle) animation, it literally would only take 5 minutes to implement and ready to use.    I definitely had fun doing this game jam despite lack of time I had. I will most likely participate next year's game jam!
  2. Best article I've came across about tessellation. Stuff like this has to be explain to me like I'm 5. 
  3. I heard Xbox One will support Unity. So there's that. 
  4. I improved the averaging of vertex normals. I just need to improve the speed of it and chunk seams.   
  5. After reading the source code. It seems like they are just sampling the normals from a raw file. So I'm not sure how to translate that into perlin noise code.   private Vector3 SmoothNormal(Vector3 position) { float dxz = 1.0f / 16.0f; float dy = 1.0f / 64.0f; Vector3 grad = Vector3.zero; grad.x = PerlinNoise.Noise(position.x + dxz, position.y, position.z) - PerlinNoise.Noise(position.x - dxz, position.y, position.z); grad.y = PerlinNoise.Noise(position.x, position.y + dy, position.z) - PerlinNoise.Noise(position.x, position.y - dy, position.z); grad.z = PerlinNoise.Noise(position.x, position.y, position.z + dxz) - PerlinNoise.Noise(position.x, position.y, position.z - dxz); grad.Normalize(); return grad *= -1; } position is the vertex position
  6. Cool thanks.    My next question is this line float d = 1.0/(float)voxels_per_block; What's the voxels per block variable? And does the noise generator have to be anything like what I used for generator the scalar field?
  7. I have it somewhat working. However, doing it this way is a lot slower.    for each vertex v in vertex list { Vector3 n = Vector3.Zero for each triangle t that shares v's vertex { n += Normalize(v+ t.normal) } v.normal = Normalize(n) }    
  8. The source code is straight from the famous marching cube article. Which I'm doing on CPU side in Unity. http://paulbourke.net/geometry/polygonise/   I wouldn't know how to go about using a dynamic table. Doing a gradient sounds easier what I read in the Nvidia article. But not entirely sure how to implement in my current setup.    private static List<Vertex> GenerateTriangles(Gridcell grid) { //List<Triangle> triangles = new List<Triangle>(); List<Vertex> vertices = new List<Vertex>(); int cubeIndex = 0; for (int i = 0; i < 8; i++) { if (grid.Density[i] <= Isolevel) cubeIndex |= (1 << i); } Vector3[] vertlist = new Vector3[12]; int index = edgeTable[cubeIndex]; if ((index & 1) > 0) vertlist[0] = VertexInterp(grid.Positions[0], grid.Positions[1], grid.Density[0], grid.Density[1]); if ((index & 2) > 0) vertlist[1] = VertexInterp(grid.Positions[1], grid.Positions[2], grid.Density[1], grid.Density[2]); if ((index & 4) > 0) vertlist[2] = VertexInterp(grid.Positions[2], grid.Positions[3], grid.Density[2], grid.Density[3]); if ((index & 0x8) > 0) vertlist[3] = VertexInterp(grid.Positions[3], grid.Positions[0], grid.Density[3], grid.Density[0]); if ((index & 0x10) > 0) vertlist[4] = VertexInterp(grid.Positions[4], grid.Positions[5], grid.Density[4], grid.Density[5]); if ((index & 0x20) > 0) vertlist[5] = VertexInterp(grid.Positions[5], grid.Positions[6], grid.Density[5], grid.Density[6]); if ((index & 0x40) > 0) vertlist[6] = VertexInterp(grid.Positions[6], grid.Positions[7], grid.Density[6], grid.Density[7]); if ((index & 0x80) > 0) vertlist[7] = VertexInterp(grid.Positions[7], grid.Positions[4], grid.Density[7], grid.Density[4]); if ((index & 0x100) > 0) vertlist[8] = VertexInterp(grid.Positions[0], grid.Positions[4], grid.Density[0], grid.Density[4]); if ((index & 0x200) > 0) vertlist[9] = VertexInterp(grid.Positions[1], grid.Positions[5], grid.Density[1], grid.Density[5]); if ((index & 0x400) > 0) vertlist[10] = VertexInterp(grid.Positions[2], grid.Positions[6], grid.Density[2], grid.Density[6]); if ((index & 0x800) > 0) vertlist[11] = VertexInterp(grid.Positions[3], grid.Positions[7], grid.Density[3], grid.Density[7]); for (int i = 0; triTable[cubeIndex][i] != -1; i += 3) { Vector3 one = vertlist[triTable[cubeIndex][i]]; Vector3 two = vertlist[triTable[cubeIndex][i + 1]]; Vector3 three = vertlist[triTable[cubeIndex][i + 2]]; Vector3 normal = CalculateFaceNormal(one, two, three); vertices.Add(new Vertex(one, normal)); vertices.Add(new Vertex(two, normal)); vertices.Add(new Vertex(three, normal)); //Triangle tri = new Triangle(one, two, three); //{ // tri.faceNormal = normal; //} //triangles.Add(tri); } return vertices; } public static void CreateMesh(List<Vertex> vertices, Vector3 position) { Mesh mesh = new Mesh(); Vector3[] verts = new Vector3[vertices.Count]; Vector3[] normals = new Vector3[vertices.Count]; int[] triangle = new int[vertices.Count]; Vector2[] UVs = new Vector2[vertices.Count]; for (int i = 0; i < vertices.Count; i++) { verts[i] = vertices[i].Position; normals[i] = vertices[i].Normal; UVs[i] = Vector2.zero; triangle[i] = i; } mesh.vertices = verts; mesh.normals = normals; mesh.triangles = triangle; mesh.uv = UVs; GameObject terrain = GameObject.Find("Terrain"); if (terrain == null) terrain = new GameObject() { name = "Terrain" }; GameObject meshObject = new GameObject(); meshObject.AddComponent<MeshFilter>().mesh = mesh; meshObject.AddComponent<MeshRenderer>(); meshObject.renderer.material = material; meshObject.transform.position = position; meshObject.transform.parent = terrain.transform; meshObject.name = "Region"; }
  9. Hey sorry guys that I went AWOL. I went out of town unexpectedly and couldn't check this post. I will check out the links and report back.    Note. I'm using marching cubes and a perlin noise to generate the scalar data field.    This is the closes I can get to a smooth surface without vertex normals.    http://i.imgur.com/gWtCX2H.png
  10. foreach( Vertex v ) { Vector3 normal = Vector3.Zero; foreach (Face f adjacent to v ) { normal += f.GetNormal(); } normal.Normalize(); }   I found this algorithm. However, I'm not sure how to figure if a face is adjacent to a vertex. The reason I'm doing this is because I'm generating terrain and it's very blocky. I was told using vertex normals for lighting will smooth it out.  
  11. I believe it's the UV of the fullscreen quad. Since it's a post processing effect. And most post processing effects use fullscreen quads. 
  12. struct VS_INPUT { float4 vPos : POSITION0;                  <---- should this be a float3?  float2 vTex0 : TEXCOORD0; float3 vNrm : NORMAL0; float3 vTan : TANGENT0; float3 vBin : BINORMAL0; };   That maybe not be your problem. I know I had some problems with using a float4 instead of a float3. The rest of the code look fine. 
  13. Edit: Never mind I got it working. 
  14. I think the best and fastest way is this. We already have light propagating for each block. In the GBuffer, I can pass those lighting values to a channel. Then in the Directional Lighting, apply the ambient lighting according to whats in the channel.
  15. DX11

    I can for a stand Depth map. However, when I want a custom depth like float4(depth, depth * depth, 1, 1)(variance shadows); I can't use that. EDIT: Never mind, got it working.