Closed tonihele closed 8 years ago
hi, is there any concept for selecting units?
Hi, nothing exists yet. In the original game I believe only these actions can be administered by the keeper, not really a selection, but closest to that:
For the creature animations, currently an array of ArtResources, has been separated and identified by good sir Grégory Boré. I'll implement them shortly. I have no experience on making these functional controls, so I have very little idea at the moment how to tie all these together.
ok, in JME there is the "Custom Controls Pattern" ( see here http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:custom_controls ). Sounds like we need some CustomControls.
and I found this nice thing: http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:steer_behaviours
Yes, controls. I have the 2 books of JME. They have quite complete examples on how to make controls & how to tie them to an AI. Hopefully helpful. Steering Behaviors I think nowadays only exist withing the MonkeyBrains. Latter being a bit problematic, there are no JAR's etc. The code needs to be forked if used.
My only major concern is how to patch a creature together really. By my simplest scenarios we just when loading, create ready instances by the level data. And clone them from there. And these instances are just made out of these multiple models that we load according to the data. However our models are quite big, especially the animated ones. And I don't really know if this is ideal. As then we would play with culling etc. to hide the nodes and only show the one with the current animation we want. Is this heavy or not?
I think the ideal structure would be:
We would have currently:
Multiple pose frames. Maybe it doesn't matter, at least at this point. Overthinking perhaps....
Oh and I yesterday commited much of ArcDemon's code, there was some kind of handling for which way the creature should face (while moving etc.). I don't know if it is working or not, or did I understood it correctly.
how we can find out, which kind of GameCreature/KeeperCreature (for example a imp) we have?
It has the id, on the info field. KwdFile instance can be used to get the creature data record by the id.
and where is mapping? which id is for the imps?
ID 1 for the imps. Hopefully you won't really need to know that :) Meaning that it should be very generic. Imps just have IS_WORKER flag. If you convert a dwarf, it is a worker as well and should work as such.
This goes hand-in-hand with the AI so this will be done at the same time (the initial version). I'll take it.
Initial version done
Implement creature control. I believe that this is how these things work. We should be able to call these walk, run, hit1, hit2 etc and the control, well, controls the creature. The data is in Creature data registry. The control could acquire this data from the creature it is attached to.