Sign-up for Email Updates:

Help Survive Development:

Development Blog
March 24, 2016 By: David Tse

I recently started using Trello to manage development and I’m really loving it! Now that I’ve got it all set up and have been using it for a little while I’ve decided to open it up to you guys! Now you can get the most real time view of development possible short of a 24/7 live stream.

You can use the Trello board to see upcoming features, what’s left to be done for the current update, exactly what me and Erik(artist) are currently working on, bugs, and everything that’s been finished for this update.

Screenshot of the Trello Survive development page.
Screenshot of the current Survive development Trello board.

You can also use Trello to vote on the issues and features you think are most important! This way we know what you guys want us to prioritize when choosing what to work on next. If you want to vote you need to register an account. Luckily if you use my link to sign up and I get a free month of Trello gold which saves me a bit of money. So if you are going to sign up please use this link: https://trello.com/david_tse/recommend

Survive Development Board: trello.com/survive-development

Feel free to go check out the board and vote on some issues! There’s not a ton of stuff in there just yet, but as development goes on it will continue to grow. Once the next update releases you can submit the glorious bugs to me and I’ll add them to the list. Then you all can go vote on them to prioritize what gets fixed first.

I'm really excited to open up more of the development to you guys and I can't wait to start getting more of your feedback. Let me know what you think about it and if you have any suggestions!

March 22, 2016 By: David Tse

This last month has been a pretty big one for Survive development. Houses are finally in the game! Then if that wasn’t enough I also made significant progress on house generation 2.0! I’m working really hard to get this to a base level where I can release it to you guys as soon as possible. Then I can start doing much quicker generation/content updates with improved house/city layouts and new assets. Until then here’s all the stuff I got done over the last month.



House Placement

The first thing I had to do to get houses into the game was to decide where they should actually be placed in the world. Right now the algorithm is fairly simple, but I think it’s pretty powerful. It can also be extended fairly easily to place much larger buildings and lots in the future.

Screenshot of one generated house.
View of generated house from the outside. Ignore the hole between top and bottom of the roof, it will be connected.

The way it works is it goes through all the roads and looks on both sides of it to see if there is room for a house with a yard. If there is it simply places a house. This is the part that will be extended to handle large buildings and areas. Instead of searching both sides looking for a house sized space it will try to find enough room for a large supermarket and parking lot for example.

After the building is placed there is also a driveway road generated that connects the building to the road, but I haven’t gotten around to saving/loading them yet. This connector road can be a simple driveway for houses or longer roads connecting a parking lot.

Screenshot of neighborhood generation.
Close up view of a neighborhood.

Once the house lots have been placed there is a culling pass where we go through all the houses and delete any of them that are overlapping with each other or other roads. After that the remaining houses are shifted and resized a little to try and fill any gap left over. This part is not 100% done yet which is why you will see overlapping houses at road intersections.

Like I said before the algorithm is fairly simple, but should be good enough to place all the buildings we will need. Well, At least for now. It may require a more complex solution in the future, but this was the first thing I tried and it seems like it will be able to produce the results we need.

House Generation 2.0

Once I got the house lots placed it was now time to revisit the original house generation algorithm I worked on and posted a video about a while ago. That first attempt was OK in that it made houses with all the required rooms. The problem was it didn’t really account for the exterior at all and was not that realistic because most houses don’t have so much wasted space.

Screenshot of neighborhood generation with roofs cut off.
Same neighborhood as before with roofs cut off to show they all have interiors. You can enter every single house!

So the solution was to completely scrap it and think of a new generation algorithm that could generate both realistic interiors and exteriors. After many different failed attempts and algorithms I ended up with one I think will do this pretty well making totally unique and realistic house.

Walls

Basically the generation works by starting with a random house rectangle. Then we take both the front and back sides of the house and recursively subdivide them while moving new segments in. This creates a house like border that seems to be pretty realistic.

Screenshot of house generation placement.
High level view of a city and all the houses next to the roads.

Once we have the border we go along the sides we just subdivided and extrude new walls into the house. Then we go through all these new walls and raycast in both directions. With this information we shift the wall to create rooms that are as square as possible.

This is still more work to be done in this area, but it does generally make good looking interior layouts. After this we need to go through and break down some walls to make more interesting layouts and open areas, but I haven’t implemented this part just yet.

Voxel Grid

Now that we have the wall outlines the next step is to create a voxel grid for the house and intersect all the walls with it. With this grid we do a series of flood fills to determine the different rooms and what’s outside/inside. This information is really important for the next step and in the future will be used to place furniture and loot!

After setting up the grid we need to go through and create a bunch of doors and windows. I haven’t done any work on the actual door and window placement just yet so I’ll talk more about that in the next update, but it will probably do some sort of path finding to create all the doors and make sure the house is playable.

Screenshot of generated house showing voxel grid.
View of a generated house without the roof on the voxel grid. You can see that every room is a different color and the random door/window hole punching in action.

The only work I did do for the doors and windows was put in place the actual hole punching we need. Each voxel gets a bit of extra data to tell if there should be a hole in it. You can see in the screenshots all the random holes I created to test the system.

The final step is to use this voxel grid to create the actual wall mesh. We do this by checking every voxel in the grid and if it’s a wall it creates triangles on any side that it touches a voxel that isn’t a wall. Then we have some special logic for punching holes on top of that. I really like the way this voxel system turned out and I think it will be a really powerful base for all the building generation in Survive.

Roof Generation

Now the basic house walls are done we need to create the roof mesh. This is a little more difficult to get right because you can have sort of odd house layouts and it’s not a huge deal, but if you screw up the roof it just doesn’t look like a house. Because of that it will take a little more time and art assets before it starts to look good.

Screenshot of generated house exterior.
Screenshot showing a better view of roof generation. Will have connector meshes at intersections and a lot more polish, but you can get the idea.

That being said I think the base algorithm is good and once we get all the correct looking art in it will look like a house. So for the actual algorithm we start off by creating the main roof. To do this we find the skinniest part of the house and create a large roof across that. This creates a solid base that all the sub roofs can connect to.

Then we need to go and create the sub roofs. The way it works is similar to the interior wall generation. It goes through the subdivided front and back walls and creates a sub roof for every segment. This is then extended into the house until it’s attached to the main roof.

 Screenshot of generated house exterior with roof cut off.
Same house with the roof cut off so you can see how the roof fits with the actual house.

This roof generation seems to do pretty well, but we won’t really know for sure until I start to add all the extra assets and polish that make the roof look like an actual roof. The large base shapes are there and should make some good looking houses once that other stuff is in. If not then we’ll just throw it out and try something else! The nature of these generation algorithms is about constantly trying stuff until it works and the generation pipeline we have now makes it really easy to do just that.



I’m super excited to finally start getting this stuff into the game, and the rate of stuff going in is going to start growing rapidly. With this we now have a fully functional generation pipeline which is the foundation and core of the entire game:
Continent Generation -> City Distribution -> Interstate Creation -> Main City Road Generation -> Neighborhood/Block Generation -> House/Building Placement -> House/Building Generation -> In-Game Streaming
It’s all working and flowing now it’s just a matter of improving the generation algorithms and integrating the art assets. The framework is there now it’s time for the really fun stuff!

I probably should have done a video for all of this, but in just a few weeks the houses are going to look significantly better so I’m holding off a bit longer. If there’s anything you guys want to see specifically in the video that I might not think of just let me know.

So that’s what I’ve been up to for the last month and boy was it an exciting one. The next update will probably(no promises) be sooner and more in the 2 week from now range because I would like these posts to be a little shorter and there’s just so much to talk about now! As always if you want to see frequent updates about the generation and sick screenshots/gifs go follow me on twitter!

February 22, 2016 By: David Tse

In the last update I got intersection meshes generating for the main city roads, so over the last few weeks I’ve primarily been working on generating the neighborhoods which is the first step to finally get some houses into the game. These new roads naturally added complexity to the mesh generation and streaming so I also worked on improving those systems to cope.

I mentioned on twitter that I was hoping to do a video for this update, but I couldn’t get all the intersections and stuff to behave in time. If all goes well there should be a quick video for the next update.



Road Generation 2.0

So once I had the interstates and main city roads I had to figure out how to create interesting flowing neighborhoods. While there will be simple grid based cities and neighborhoods, exploring curvy roads and cul-de-sacs is much more fun. What I did to fix this involved a lot of refactoring and moving stuff around, but I’m really happy with the results.

New fancy gif showing the generation in action! You can see the three different growth systems building onto eachother.

The new road generation system takes the road growth algorithm and moves it to its own class. Now I can create multiple growth systems with different rule sets for the different levels of the city. So the high level main city roads don’t curve much and split much less. Then the lower level connector roads are curvier and split more. Then the neighborhoods get a growth system that avoids other roads and tries to fill area as best it can.

This new system means I can layer many different growth system rulesets on top of each other to create all kinds of different city layouts, road systems, and city blocks. I’m really proud of this new modular system and am excited for the kind of variation it will allow in the future.

Another fancy gif this time showing a close up on the neighborhood generation. It's a little choppy because the thread generating the roads can gen like 10-20 roads in the background for every frame rendered.

The current values used for the growth systems are all temporary and were done quickly to test the system. I think the roads and neighborhoods generated are fairly realistic, but there are still many improvements to be done on the growth algorithm itself and the values each city level uses. Now that the system is in place changes can be done very quickly. Especially because of the next thing I worked on.

Generation GUI

I don’t remember if I talked about this before, but I decided a while ago that the GUI system for the editor, called Atlas, will be completely home grown. So this month I spent some time improving said GUI system so I can rapidly iterate on the growth system parameters.

The main work I did was on improving the very simple line edit box that was used when creating a new world in the old builds of the game. This old line edit basically allowed you to click on it, add some text and delete some text. I made it so you actually have a cursor, can select text, edit at any point in the string, and do anything else you expect to be able to do when using a line edit in windows. I also hooked it all up so editing the value in the GUI immediately changes the value in the data manager allowing for instant feedback in the generation.

Initial Test
High level view of the new generation also showing off the new generation editing GUI!

I really don’t like working on tools stuff like this when it’s been so long since the last pre-alpha, but this property window has made iterating on the road parameters insanely fast compared to the old method of editing text files, saving, and reloading. So I think it was time well spent, especially since I’ll be using these same GUI widgets in Atlas and in-game.

Streaming and Mesh Generation Improvements

Like I said in the beginning this new and improved road generation system has added some complexities to the road data we are trying to stream and render. To deal with this new data I had to make some changes and improvements to the streaming and mesh generation.

Initial Test
Top-down view of a city in-game!

There’s not a ton to talk about here because I’m still working on this stuff right now and most of it is optimization stuff, but I did do some significant optimizations to the streaming and rendering of roads so I can show nice screenshots of a bunch of the new roads in-game which is the main reason why I included this section.

Initial Test
Top-down view of a bigger city in-game!



So that’s what I’ve been doing over the last few weeks. I’m still actively working on getting the intersections of these new roads to all play nicely. So in the next update there will be awesome close up screenshots and possibly a video of the neighborhoods in the game. There might even be buildings? See you in 3-4 weeks or you can follow me on twitter for daily-ish updates.

Previous Page