Landscape Concept
LandscapeConcept_wip.png
« October 2011 | Main | December 2011 » November 2011 ArchivesNovember 1, 2011Landscape ConceptLandscapeConcept_wip.png PlayerConceptPlayerConcept.png ShackShack.png City conceptCity concept.png TentTent.png ShedShed.png landscape1.pnglandscape1.png landscape2.pnglandscape2.png landscape3.pnglandscape3.png landscape4.pnglandscape4.png Male_Base_Mesh.pngMale_Base_Mesh.png Female_Base_Mesh.pngFemale_Base_Mesh.png Male_idle.pngMale_idle.png Male_walk.pngMale_walk.png Male_run.pngMale_run.png tree1.pngtree1.png tree2.pngtree2.png well.pngwell.png mailbox.pngmailbox.png messageboard.pngmessageboard.png stonehouse.pngstonehouse.png Workshop.pngWorkshop.png forge.pngforge.png tincan.pngtincan.png book.pngbook.png November 7, 2011Specific DesignsNovember 10, 2011Generating Terrain in Realtime Yesterday it was decided that generating world tiles in realtime based upon heightmaps would be an easier way of transmitting them over the network and would save us from the problems we were having with Unity's terrain objects not being able to rotate. So now, when a client loads a tile they will be loading three 128x128 images; a heightmap, a texture map, and an object map. The heightmap is used both for generating the tiles and as a lookup table used for physics checks to keep players on the ground. The texture map allows for Ethan to paint the terrain using 4 different textures blended together with each texture being represented by a different channel (r,g,b,a). The object map keeps track of the locations of buildings, resources, and environment objects in the tile. November 21, 2011Generating Terrain in Realtime; Really This TimeA lot has changed since my last post about realtime terrain generation, but good news first; It works! What I had incorrectly blamed on the normals before was actually a problem of having incorrect faces. When you're missing half of your triangles there ends up being a lot of holes in your mesh. This past week I made a terrain editor so our artist can easily produce nice looking terrain without having to guess and check using photoshop (which would be really hard). Many features have been implemented including multiple brushes, smoothing of terrain, painting onto the terrain, undo/redo history, and texture blending. Future plans for the editor include connecting to the server so we can edit the generated game world, object loading and placing, and the ability to edit the border between two tiles. The Trials of NetworkingNetworking is something that's great when it works, but can be really hard to debug. With a server running on a linux VM we've faced several challenges. The first being, how do you connect the VM and the host to the same network? Well, there's a connection mode in the VMware player, called Host-Only mode, which allows the VM to connect directly to the host. This seemed like the ideal option, but on Nate's windows computer the VM failed to ever get a packet through. November 28, 2011Networking in Unity: Back to BasicsAfter the all the issues we had getting Unity to read our own dll and properly wrap our c++ code to c# we decided to use a "proven" solution, that of RakNet. RakNet is a library used by many games and other networking applications that comes with everything preconfigured to create a C# dll using a wrapper utility called Swig. There were even instructions for linking up this dll with Unity, so it seemed like the best option. As we stared at the lines of red which wouldn't go away it finally dawned on us; why not just use Mono's Socket library? After all, we didn't need the majority of RakNet's feature list, and we had originally been doing everything ourselves from the sockets with our original plugin. Three hours later we were able to get the client talking with the server using the correct endianness. Now we just have to make up for wasted time and start transferring images. November 30, 2011Unity, AssetBundles, the WWW and You!In order to populate our world, the development tools and the client machines have to agree on which objects have which IDs. Additionally, we didn't want Ethan to have to keep bugging us to register objects in some global registry somewhere every time he wanted to add a new model to the game. As such, we came up with an architecture where the development tools can send an object up to the server, and clients can download it from the server when they need it. Well, this week, I did a lot of work on the dev side of that process. And let me tell you, it was fun. And by fun, I mean it made me want to punch Unity right in the face. |