90 Actions

Approach to AI in Entity Systems@bobby There are several ways to handle your first concern. A lot of games will just ignore it (for example, the last bullet from one of the characters will be in the air when the unit dies). Think about it, would a soldier stop firing at an enemy assuming his buddy will kill him first? Your agent will move on the next frame anyways and frames are really short so the delay is acceptable in 99% of cases.

Jul26

comment

Wall penetrationActually, +1 for the dead simple yet effective answer. The pro art was just the cherry on top of the sundae.

Calculating distance by force@Creator That would probably have been a good thing to add to your question considering it changes everything. I have no idea how Unity simulates physics under the hood, there might be functions in there to achieve what you want and depending on the precision you need it might be very impractical to predict this. Your question then becomes "How can I predict body movements in Unity's Physx?" which is a whole different thing.

Should I use text files for my save data?@Althezel As for the databases, think of it as a sort of engine to which you pass requests to read or write data. That engine is responsible for saving/reading it in an efficient manner, usually in relational form in tables. In your use case, I'd take a look at SQLite (sqlite.org). Basically you'd use a C++ library to connect to a local SQLite database (SQLite uses local files) and pass that library calls in SQL syntax to access your data.

Jul22

comment

Should I use text files for my save data?@Althezel The thing is, regardless of how you save your data, someone determined enough to modify it will be able to. In that sense, it's usually a waste of your precious development time to try and put protections in place :)

Advices on Linking Between Entity Component System in C++@deniz It all depends on your design. If your components don't have any methods but only data, the system can still iterate over them and perform the necessary actions. As for linking back to entities, yes you could store a pointer to the owner entity in the component itself or have your system maintain a map between component handles and entities. Typically though, you want your components to be as self-contained as possible. A component that doesn't know at all about it's parent entity is ideal. If you need communication in that direction, prefer events and the like.