Skip to main content

Posts

Showing posts with the label prefabs

New Worlds Part 2

There are still some thing to add to the terrain set, but its mostly finished for now. It's really great to have a fully featured level editor so that the map elements can be tested right away. No messing around with modifying text files or external programs. Just switch modes and paint. The terrain has achieved the appearance I aimed for, which is similar to a table top gaming board. I never wanted a photo real game environment, and I'm happy with the way it has turned out. It reminds me of bonsai trees or miniature gardens. It is quite obviously tile based, there's no getting around that, but it's important in any case, since otherwise it could be difficult to know where units can move or not as well as guessing lines of sight. Most of the techniques I've used here are things I tried before, but I never got them looking so nice or running so well. Drain on the graphics card is negligible at this point. The shader works really well. The movement shader ...

Level generation types.

I've now narrowed my level generation methods down to two. Previously I was also using randomly placed rooms and BSP trees, but with one the corridors were too long, and the other suffered from terrible predictability. The two I'm using are (1) cellular automata and (2) collision based room insertion. In the maps above the D and E maps are type 1, a kind of cavern like level. There are several inputs like coverage and smoothness. They basically generate these two extremes, very open, joined caves, or sparse tunnels. I may add double thickness corridors to the (E) map as otherwise they are annoying to play (no room for maneuver).    Type 2 maps start by piling up a bunch of random rooms in the center of the map. Then they run collision detection to push them apart. (A) is a map with quite high padding value, which places the rooms far apart. (C) is the same method by a padding value of 1. The rooms are quite close together. Corridors are short, which is a good thin...

Back to tilesets...

It's been a while since I did anything graphical, but I feel the need to see how the game will look once there's more than just cubes as dungeon. I also need to test some of the dungeon building ideas I've had lately. Lastly, I feel that it's important to come up with a fast, and good way of decorating a dungeon. For the last 30 minutes I've been working on a single paving slab. That might not seem like good time management, but I didn't spend the whole 30 minutes making it. I experimented with some quick and dirty ways of modelling stone. First I created a cube, scaled it to a tile (2.0,2.0,0.2), beveled the edges and cut it with the loop cut tool. (Previously I tried the boolean modifier, but that took too long and didn't give good results).  After that I added some subdivision with fractal noise and smoothing. Next I unwrapped a stone texture and used that as a basic displacement map to provide the micro texture. Last I created a low poly tile a...

Real dungeons.

Progress  as of this afternoon. Some areas are still not being linked. I'll have to take another look at the linking algorithm. There's also something funky going on with the tunneling algorithm. In some cases it seems to be going a few squares in the wrong direction before doubling back. I think I left out a stage in the old A* script that I used, I'll have to switch it with the more developed (but more complicated) one I was using for movement in the main game. Anyway, today I want to talk a bit about dungeons. What does a dungeon look like? I've chosen perhaps a rather strange style of dungeon, with small packed areas linked by winding corridors. You don't need me to show you a roguelike dungeon from times past but here it is anyway: Long corridors and rooms. Nothing special. other roguelikes from more recent times have used different types of dungeon generation. Often a theme is to try to pack in more rooms in to the smallest space to get the most ...

Level builder MK2

Actually it's more like MK32 but as it's the second attempt at a working level builder I'll just stick with that. Right now I've got a partially working version of the new level builder using the new prefabs. I'm glad I only made a few prefabs for testing as seeing them placed in the level has made me think a lot more about prefab design. The level builder uses a simple BSP tree to designate areas of the map to contain prefabs. The it picks the best fit prefabs for that area. I choose a few and then randomly select one, I don't want to always use only the best fit as that will leave some prefabs unused and as such, wasted. Here's a couple of examples with the BSP areas highlighted with different colors. There was a bug with these where it was in some cases choosing the smallest room instead of one of the biggest, but that's been corrected. One thing that jumps out at me about the prefabs is that they need more big and medium sized rooms...