02-04-2013, 06:51 PM
(02-04-2013, 06:10 PM)Alblaka Wrote: I've got a few questions I would like to have answered if somebody (aka YinYin or Silva) finds the time:Or someone else.
(02-04-2013, 06:10 PM)Alblaka Wrote: - Is it possible to store entity-based, static values? As in, f.e., counting the number of melee strikes beformed by a specific character. And will this work INDIVIDUALLY for multiple instances of the same character ID?Yes, however there is currently no efficient way to do so.
One way is to create a static array (declare it outside of functions, as you would do in most languages), and then have each slot from 0 to 399 correspond to each ID. the problem with this solution is that you are going to waste a lot of memory, since you are hardly using every one of them.
The other way would be to store it within some of the unused chunks of the LF2 data structures, however this might cause unexpected results, and there might not be enough memory available for what you need.
(02-04-2013, 06:10 PM)Alblaka Wrote: - Is there a more efficient way in determining what is in a specific area, other then iterating through the entire list of loaded objects and checking every single one?No, nor do I believe there is a way to make it more efficient, with the exception of multi-core stuff, or writing a function in the DLL to do the checking, but neither of those are built in.
(02-04-2013, 06:10 PM)Alblaka Wrote: -Has there been any reports of fps-loss due to complex AI? F.e. 20 AI-constrolled characters onfield, all iterating through all 400 loaded objects every tick.Not that I know of.
The best way to check it would be to have a character clone himself to infinity, with some sort of stupidly complex AI.
If this turns out to ever be a problem I might look into writing a JIT-compiler which might speed up the process.
(02-04-2013, 06:10 PM)Alblaka Wrote: -Did anyone extract/recreate/copy the basic 'id();' LF2 uses for all vanilla chars? If not, did somebody write an own complete id() which could be refitted by me for my own characters? Or at the very least does somebody have a datasheet/list of all features performed by an basic id()-AI (aka fighting, approaching, running, picking objects etc)?I don't believe that is the case, and sadly my assembly skills are not nearly enough to try and help you out.
(AI - unrelated
Silva managed to reverse engineer the random function of LF2 so he might be able to reverse engineer the id function as well, but there is no guarantee as it is way more complicated.
(02-04-2013, 06:10 PM)Alblaka Wrote: -Is there a state that permits a character to change his facing based upon pressing left / right WITHOUT influencing the characters frame-behavior (which pretty much cancels out states 0 and 1, I guess)?)The only one that pops into my mind is state 7 (defend), but that only works in certain frames I believe.
If you feel like it you can download the DLL source and try to implement some of the things above. If you do so don't hesitate to contact me and I will update the DLL ASAP.
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.