Transport menu

Discuss coding questions, pull requests, and implementation details.
User avatar
Interkarma
Posts: 7234
Joined: Sun Mar 22, 2015 1:51 am

Re: Transport menu

Post by Interkarma »

No probs mate. :) I'm about to head to bed soon (just after 11pm here and I have a stupid early start again). I'll answer what else I can later.
Hazelnut wrote: Last question. Why are there 2 prefabs, PlayerAdvanced and PlayerStandalone?

Only former seems to be used, but this confuses me.
There are two parts to this project:
  • Daggerfall Tools for Unity (DFTFU) is the set of tools that interface Daggerfall's files into the Unity engine. This side of the project came first, long before I had decided to rebuild game.
  • Daggerfall Unity is the game proper, it sits on top of DFTFU.
The PlayerStandalone prefab is a simplified setup for DFTFU tutorials and basic standalone scenes. Whereas PlayerAdvanced has all the game-specific widgets.

User avatar
Hazelnut
Posts: 3014
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut »

Interkarma wrote:Imagine centre of the capsule is about waist height, the current camera local offset of 0.0, 0.8, 0.0 represents player's eye height.

It took a fair bit of tweaking to dial in good dimensions for the player capsule and keep eye height at about the right level. Daggerfall's dungeon geometry can be quite woeful in places, so very easy for player to become find impassible spaces.

One of the problems with raising camera height above capsule is that jumps in low spaces will result in camera clipping through geometry that capsule would have registered a head-hit against.
I'm sure you're aware, but just in case... when crouching the camera is much higher than the capsule. Looks like crouching but is more like crawling for collision detection. Probably intentional I guess.

Also the code that sets the y pos on the capsule transform seems to be redundant.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Hazelnut
Posts: 3014
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut »

RIght, spent the evening fixing the following issues:
  • * Capsule height and camera height now set correctly. Height when riding is now 2.6m (1.6 + 1, horse+rider) and camera is always set at 9cm below the top of the capsule. (execpt for when crouching cos that is strange and I didn't want to mess with it)
    * Speed is calculated using the base units from DF provided by Allofich (thanks!) and affected by speed skill level. (moved numbers into constants)
    * Sounds and animations stop when game is paused. (neighs can still occur for that original flavour :) but not to same amount - try original in DOSbox: riding horse, press esc and listen :? )
Created a PR for you. Let me know if you find any other issues or have any other comments.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Transport menu

Post by Interkarma »

There's a lot I want to do with PlayerMotor in next release cycle, will fix camera outside of collider in crouch then. Head clipping is less of a problem because camera is so close to ground and jump height is reduced while crouched.

Y adjust not redundant, it snaps shape-changed capsule foot position back to whatever player was standing on at time of crouch toggle. This stops capsule from falling back to ground when contracted and doesn't rely on physics to resolve intersection on expansion. I'll put together something when I can to better illustrate why this is needed. :)

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

Re: Transport menu

Post by Interkarma »

Hazelnut wrote:RIght, spent the evening fixing the following issues:
  • * Capsule height and camera height now set correctly. Height when riding is now 2.6m (1.6 + 1, horse+rider) and camera is always set at 9cm below the top of the capsule. (execpt for when crouching cos that is strange and I didn't want to mess with it)
    * Speed is calculated using the base units from DF provided by Allofich (thanks!) and affected by speed skill level. (moved numbers into constants)
    * Sounds and animations stop when game is paused. (neighs can still occur for that original flavour :) but not to same amount - try original in DOSbox: riding horse, press esc and listen :? )
Created a PR for you. Let me know if you find any other issues or have any other comments.
Great stuff! Thanks for putting that together, I'll review and keep testing when I can.

My preference would have been to prevent neighs while paused, but I'll run with this and see how I feel later after playing with it for a while. :)

User avatar
Hazelnut
Posts: 3014
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut »

Interkarma wrote: My preference would have been to prevent neighs while paused, but I'll run with this and see how I feel later after playing with it for a while. :)
Actually it doesn't play them when paused, seems unity stops the timer. So it's time in seconds the game has been running since start. I took the docs literally when they said time since start of the game. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Hazelnut
Posts: 3014
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut »

Thanks for merging into master Interkarma, and I hope anyone who tests the next build enjoys their orsie riding. I do apologise that you can't mod it yet, so all those my little pony mods will have to wait a while... :D

Next steps:

* Ships - anyone care to tell me where the ship models are located in the DF world? I believe they're floating on the ocean somewhere fixed in space.
* Modding support - custom sounds & textures? Anything else required? Events?
* Riding enhancement (?) - configurable by setting: restricts view, prevents riding backwards. Other ideas?
Last edited by Hazelnut on Thu Aug 31, 2017 3:14 pm, edited 2 times in total.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Transport menu

Post by Interkarma »

Ship is just an exterior location: "High Rock sea coast/Your Ship" (case important). Until housing is properly implemented, just stick with the default ship in that location and assume player always owns a ship. We can worry about the small/large ship once banking is implemented. This is scheduled for 0.6 on Roadmap along with player housing.

For the basic setup, you just need to teleport player to that location and use the local Start marker to position player on deck. I can help you get this setup if you wish. Look to how fast travel uses Streaming World to move player to new locations and position them outside city gates for an example.

You will also need to serialize player's prior location in world (map pixel and position) before teleporting to ship so player can return later if they save on ship and exit game.

As player housing not implemented, dropped loot containers will not serialize on the ship like they do in classic. This is one of the reasons I have the ship scheduled for housing features in 0.6. There's a lot more I wish to do around this and I won't be up to this until the allotted point in roadmap. :)

User avatar
Hazelnut
Posts: 3014
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut »

PR for ship basic transportation submitted.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Gudadantza
Posts: 43
Joined: Wed Aug 09, 2017 11:12 am

Re: Transport menu

Post by Gudadantza »

Since the next build will have transport menu implemented, how It will be used? I mean, if the buy/sell interface is not included yet, will we have horse and cart for free testing? :)

Greetings

Post Reply