Merging Mods, Collaborating

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Merging Mods, Collaborating

Post by Interkarma »

Nice! The panels are designed to take any old Texture2D, so probably good enough for now. We should investigate creating a RenderPanel component of some kind that takes a render texture directly.

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

Re: Merging Mods, Collaborating

Post by Nystul »

Interkarma wrote:Nice! The panels are designed to take any old Texture2D, so probably good enough for now. We should investigate creating a RenderPanel component of some kind that takes a render texture directly.
if that's possible this would reduce code a bit. Nevertheless it is not that of a performance issue anyway (regarding the automap). since I only plan to update and render the geometry when a button was clicked (when the camera position/rotation changed) it should hardly be noticeable performance-wise :)

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

Re: Merging Mods, Collaborating

Post by Interkarma »

I reckon keep doing what you're doing, I don't see any problems with it so far. I'm a great believer in hacking stuff in then improving later. :)

User avatar
Arl
Posts: 202
Joined: Sun Mar 22, 2015 10:57 am

Re: Merging Mods, Collaborating

Post by Arl »

Awesome progress so far, but please, please Nystul, make the Automap behave better, vanilla was very clunky.
My Deviantart page, I have some Daggerfall stuff in there.

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

Re: Merging Mods, Collaborating

Post by Nystul »

lets see what we can manage to pull off together ;)

@interkarma:
it would be nice to have a Button.OnMouseDown event - just repeated mouse clicks on the autmap navigate buttons are suboptimal ;) ah and maybe a right click callback as well (although I fear this could be a no-go under mac-compatibility considerations) ;)


update:
the more I investigate the automap in vanilla daggerfall the more I am wondering about it :D
there are several questions that arise and possible ways to implement automap navigation/movement.

  • The navigation buttons left/right/forward/backward in vanilla Daggerfall move the model - I find it more natural to move the camera instead. I would like to implement at least an alternative mode that behaves that way
  • The "stair"-up/down buttons in vanilla Daggerfall move the camera - so it violates the behavior of the other navigation buttons
  • The rotation buttons in vanilla Daggerfall also move the camera - pivot point is somewhere in front of the camera - here I would also like to implement an optional alternative approach by rotating around the player position - I liked it when I tried it ;)
  • in vanilla daggerfall the model is moved within a given y-plane (except the stairs up/down buttons which shift this y-plane). An alternative approach is to move the camera position along the camera axis (towards the center of the image and away of it). This might sound unintuitiv but it feels surprisingly natural. The behavior of vanilla daggerfall should be the standard approach though, but why not have an alternative mode as well) - update4: mouse wheel scrolling is pretty much the alternative mode I wanted ;)
  • of course we need mouse wheel support for zooming in and out (update3: implemented this - much more comfort... - omg, I just realize we need drag and drop for the model geometry)
  • would be nice to allow camera tilting as well
  • vanilla daggerfall automap is crap - daggerfall-unity's increased resolution alone will automatically result in a better automap
update2:
@interkarma:
would it be possible to extend script PlayerCompass.cs to use it for the automap compass?
What would be needed is to supply a different camera than the main camera as well as the possibility to render the compass hud over the automap background gui in the lower left gui background...
I can try if I manage to modify it in my work-branch. Not sure if this should be relatively easy or if it is hard to do...

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

Re: Merging Mods, Collaborating

Post by Interkarma »

Nystul wrote: @interkarma:
it would be nice to have a Button.OnMouseDown event - just repeated mouse clicks on the autmap navigate buttons are suboptimal ;) ah and maybe a right click callback as well (although I fear this could be a no-go under mac-compatibility considerations) ;)
I've added OnMouseDown and OnMouseUp events to BaseScreenComponent now. Will add a right-click event soon.

I'm totally on-board if you want to experiment with the automap design. It was a fairly primitive affair in Daggerfall and based on the feedback I've had from others they would be happy to have pretty much any improvements here. :)

Nystul wrote: update2:
@interkarma:
would it be possible to extend script PlayerCompass.cs to use it for the automap compass?
What would be needed is to supply a different camera than the main camera as well as the possibility to render the compass hud over the automap background gui in the lower left gui background...
I can try if I manage to modify it in my work-branch. Not sure if this should be relatively easy or if it is hard to do...
I can change this to use an alternate camera from parameter. You should already be able to render compass over any other Panel, just instantiate it and Components.Add to parent panel. I can help with this if needed.

Sorry for short reply. Lots on today and not a lot of time!

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

Re: Merging Mods, Collaborating

Post by Interkarma »

OK, I've added the ability to provide a custom camera (or null) to HUDCompass. If compass camera is null, you can set compass heading using EulerAngle property.

I have also added a OnRightMouseClick event to BaseScreenComponent.

You've got the makings of a fairly in-depth bit of code on your hands with the map UI. Might be best to start a new thread in Creator's Corner for your progress. :)

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

Re: Merging Mods, Collaborating

Post by Nystul »

thanks - will check this out and keep you informed! I will create a new thread in creator's corner soon! Or wouldn't be a new thread in Daggerfall Unity the better place? I mean it is implemented for Daggerfall Unity and won't work with DFTFU in its current state...

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

Re: Merging Mods, Collaborating

Post by Interkarma »

Sure, make the thread here if you like. :)

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

Re: Merging Mods, Collaborating

Post by Nystul »

had to make minor changes to the BaseScreenComponent class in update() function to make OnMouseDown event behave like I would expect it.
What I would expect is that the event is fired repeatedly as long as the left mouse button is pressed (it was behaving basically like a simple mouseclick event - just fired on first mouse button down)
that way I was able to implement drag and drop easily in the automap script which would otherwise be tedious...
Do you agree with my opinion?

Since I have made the changes in my own working branch along with lots of automap related stuff I would prefer one of these options (I would prefer option B over A):

option A: I could issue an immediate pull request for just the BaseScreenComponent script
option B: When nobody needs the bug-fixed mouse down functionality right now (at least I think it is a bug)I would finish a first pull-request-ready version of the automap and do the pull-request with all the collected changes

reason for this is that I want to prevent merge conflicts...

Post Reply