Automap (indoor & dungeon) implementation

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Automap (indoor & dungeon) implementation

Post by Nystul »

made further progress...

everything is on github - check it out if you are interested!

required installation steps:
create Layer called "Automap" in Edit -> Project Settings -> Tags and Layers
in your scene:
if not present create GameObject called "Automap" in hierarchy root and attach script Game/DaggerfallAutomap
make sure layer Automap is unchecked in culling mask of Main Camera
As far as I can remember that's all...

new features:
  • rotate with right mouse drag left/right and change camera tilt with right mouse up/down (don't do this in 2D mode right now - since it will break some things there)
  • custom automap shader for improved rendering functionality
  • geometry slicing (when automap is opened slice level is player head position (currently only when map is first opened - this is a bug, that will be fixed), afterwards change with right click on upstairs/downstairs button - shader will adapt shading to geometry meshes to highlight current slice level)
  • geometry is now created like Interkarma's suggestion, and updated only when entering dungeon/building
transparency turned out to be tricky and not that useful as thought because it is only partly correct most of the time when geometry is complex due to mesh ordering issues...

still lots to do:
  • player arrow
  • the mini-overview of the rdb-blocks of the current dungeon with the player and start marker
  • discovering of an initial unknown dungeon (this is a huge point and here I will need help especially when it comes to saving/loading state to/from savegame)

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Automap (indoor & dungeon) implementation

Post by LypyL »

Nothing really to say, other than it's good...maybe a little too good :lol:
the mini-overview of the rdb-blocks of the current dungeon with the player and start marker
Can you clarify what you mean here? Are you planning a minimap for the hud?

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Automap (indoor & dungeon) implementation

Post by Nystul »

LypyL wrote:Nothing really to say, other than it's good...maybe a little too good :lol:
the mini-overview of the rdb-blocks of the current dungeon with the player and start marker
Can you clarify what you mean here? Are you planning a minimap for the hud?
haha thanks!
Just the mini-overview which also exists in vanilla daggerfall when inside a dungeon (near the left screen edge).

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Automap (indoor & dungeon) implementation

Post by Nystul »

Nystul wrote:
LypyL wrote:Nothing really to say, other than it's good...maybe a little too good :lol:
the mini-overview of the rdb-blocks of the current dungeon with the player and start marker
Can you clarify what you mean here? Are you planning a minimap for the hud?
haha thanks!
Just the mini-overview which also exists in vanilla daggerfall when inside a dungeon (near the left screen edge).

update: I reconsidered the mini-overview - I think the markers are a sufficient solution - see the screenshot below of the current state...

The screenshot shows several features that were implemented recently, these are:
  • adjustable camera field of view in 3D mode allowing to set an (almost) isometric view (this is optional - fov can be adjusted with mouse wheel over grid button)
  • geometry slicing and geometry shading dependent on slice level
  • player arrow marker
  • ray markers for player position, dungeon entrance and rotation pivot axis
Image

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Automap (indoor & dungeon) implementation

Post by Interkarma »

Holy !@#$ dude this looks incredible!

CyberWilhelm
Posts: 17
Joined: Mon Oct 19, 2015 6:57 pm

Re: Automap (indoor & dungeon) implementation

Post by CyberWilhelm »

Outstanding! An automap with sane navigation controls is definitely one of the things I was hoping to see come to this project.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Automap (indoor & dungeon) implementation

Post by Nystul »

CyberWilhelm wrote:Outstanding! An automap with sane navigation controls is definitely one of the things I was hoping to see come to this project.
it is still not easy to tell where all the tunnels go due to daggerfall's complex dungeon geometry but it is definitely an improvement over the original automap

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Automap (indoor & dungeon) implementation

Post by LypyL »

Nystul wrote: Just the mini-overview which also exists in vanilla daggerfall when inside a dungeon (near the left screen edge).
Ah yes, that little yellow thing in the map window. To be honest I find it completely useless, I completely forget it even existed! :D
Nystul wrote: it is still not easy to tell where all the tunnels go due to daggerfall's complex dungeon geometry but it is definitely an improvement over the original automap
I was just thinking that screenshot looks a bit like an M.C. Escher painting :D Still, having tested your automap it's way easier to use than daggerfall's

How do you think you're going to accomplish revealing the map as the player moves around?

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Automap (indoor & dungeon) implementation

Post by Interkarma »

LypyL wrote: Ah yes, that little yellow thing in the map window. To be honest I find it completely useless, I completely forget it even existed! :D
I'll second that. I always despised that little blob of non-information. >.<
LypyL wrote:
Nystul wrote: it is still not easy to tell where all the tunnels go due to daggerfall's complex dungeon geometry but it is definitely an improvement over the original automap
I was just thinking that screenshot looks a bit like an M.C. Escher painting :D Still, having tested your automap it's way easier to use than daggerfall's

How do you think you're going to accomplish revealing the map as the player moves around?
What we'll need to do is drop the geometry in without mesh combining (clear flag in DaggerfallUnity instance before deploying with RDBLayout, but don't forget to set flag back again after). There will also need to be a utility method to return which section of model geometry the player is standing inside of. I'm not sure how Daggerfall handles this internally, but the implementation in Unity is likely to be different anyway. I can think of a few ways to accomplish this, the simplest being a hit-test, with more complex methods (spatial partitioning) yielding better results.

We'll also need serialization support for which dungeon fragments have been explored, which parts have been clicked to hide, and any notes the player has placed on the map.

It's possibly one of the most wired-up UIs in the whole game, touching a little bit of everything. Fun and exciting. :)

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Automap (indoor & dungeon) implementation

Post by Nystul »

Interkarma wrote: What we'll need to do is drop the geometry in without mesh combining (clear flag in DaggerfallUnity instance before deploying with RDBLayout, but don't forget to set flag back again after). There will also need to be a utility method to return which section of model geometry the player is standing inside of. I'm not sure how Daggerfall handles this internally, but the implementation in Unity is likely to be different anyway. I can think of a few ways to accomplish this, the simplest being a hit-test, with more complex methods (spatial partitioning) yielding better results.
Will give it a try. Maybe it would work to set the material to a "null"-material for undiscovered geometry and set it to the shader material for discovered... (update: activating and deactivating the mesh renderer would be even easier)
discovery itself is a bit of a mystery though - raycasting with daggerfall's geometry with its holes is nasty
Interkarma wrote: We'll also need serialization support for which dungeon fragments have been explored, which parts have been clicked to hide, and any notes the player has placed on the map.

It's possibly one of the most wired-up UIs in the whole game, touching a little bit of everything. Fun and exciting. :)
It is indeed very challenging ;) I like it

Post Reply