Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Dungeon Keeper Style Levels

Author
Message
MadTinkerer
14
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 20th Jul 2018 21:55 Edited at: 20th Jul 2018 22:07
So I've been following the Minecraft thread for a couple days now, and there's a bunch of neat stuff going on. However, for the game I'm trying to make, I was thinking of something more along the lines of Dungeon Keeper levels. Specifically:

I was replaying DK1 and 2 and trying to figure out exactly how the level geometry worked. It seems to be generated from a couple of 2D arrays or grids. One grid for the base terrain type (ores, dirt block / open space, wall block, water, impenetrable rock, lava), one for room type (none, claimed floor, and one for each room type), and one for which faction the tile belongs to. The ceiling seems to be an upside-down height-map that automatically attaches to walls and un-attaches if you dig out the wall.

Walls are the most interesting, because each side changes according to the tiles next to it. You can have a wall block that displays up to four different room-styles by plunking down four different room tiles next to one wall tile. I know you can SetObjectImage to change all of a box's faces at once, but is there a way to change each face independently?

In DK1 most of the props are billboard sprites, but in DK2 they're all 3D models. They seem to mostly be static meshes, though some of them rotate.

Anyway, what I'd like to do is something kind of like Delver. But Delver has a completely separate level editor, and I kind of want the dynamic levels of DK. Delver also has large, detailed rooms that are fine individually but get same-y if you play long enough, and I'd like to have something a bit more rogue-ish (or, to keep things on topic, obviously Dungeon Keeper does this as well) where the functions of the rooms are similar but the dimensions and precise layout vary wildly. Maybe I should have called this post "Dungeon Keeper / Delver style levels".

You want source code? My source code? For some reason? All right, but it's not very pretty right now:



So far, I have a 3D array which has data for blocks, and a function that creates randomly colored boxes according to each position in the array. (If "WASD or joystick to move" looks familiar, that's because I borrowed the camera controls from the FPS Example project. It's just a placeholder) I don't need infinite terrain, in fact I'm thinking more along the lines of "cozy" corridors and rooms for now with maybe overland or more exotic locations later.

Attachments

Login to view attachments
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Jul 2018 12:10
I think you want 8-bit autotiling to generate the dungeons.
You would still need to modell the possible hallways and corners.
puzzler2018
User Banned
Posted: 25th Jul 2018 18:09
Thats how i started - something similiar to your results - keep reading through minecraft and you will get to something more enlightening.

Keep up the good work though
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 4th Aug 2018 15:15
have you played war for the overworld?
it's basically a more modern version of dungeon keeper
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
MadTinkerer
14
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 4th Aug 2018 15:47 Edited at: 4th Aug 2018 15:48
Actually, I backed WftO on Kickstarter. Paying close attention to how the walls change when tiles next to them change, it seems like WftO has custom meshes that automatically attach to each other, and not just texture changing like in DK1 and 2. It's really cool, but a bit beyond what I can even consider doing right now. I'm looking at this thread as well, so I think I'm probably going to try to learn more about blender and modelling before I try to do 3D auto-tiling.

So for now all my cubes will just have the same texture on all sides. It's not forever.
MadTinkerer
14
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 7th Aug 2018 19:53
I found this page. It's a good start, but incomplete and has links to pages that aren't up any longer.

But at least it has some good info on the level data format. I believe the "subtile" data is primarily intended to make the meshes line up properly.

Login to post a reply

Server time is: 2024-11-23 05:34:14
Your offset time is: 2024-11-23 05:34:14