So I am working on adding an event system, basically, triggers, possibly choices which generate different results, sometimes only one result. I want to generate a window that lets you make choices.
Due to the gui system in place and my lack of experience in the area its not as pretty as I would like, basically it just uses the same style as the rest of the GUI.
However that's just a graphics issue which I don't care about.
What I need to know is how to handle windows if multiple events trigger at once. I want the game to pause so players can pick choices and because obviously having a big GUI item in the middle of the screen will ruin their view of the game.
So I have a few thoughts and am trying to figure out what is best:
Store multiple events and then push one to the window which becomes visible if there are 1 or more events and doesn't exist otherwise.
Have each event spawn its own window, like a Paradox game does.
I feel like popping up a ton of windows might be slower, but its also more user friendly in a sense. I dunno. I haven't done this kind of GUI thing before.
So I am working on various strategy game stuff and I tried to figure out how to use multiple cores to speed up my game. From what I gathered the best way to use threads is to run a single main thread and pass off tasks from the same subsystem rather than splitting off each subsystem into a thread.
Like I run this:
Sequentially and get my performance from having each step use as many cores as the system has available. So during the AI step I would assign a main AI thread that would make high level decisions and then spin off low level tasks in a hierarchy to separate threads/cores.
I was given to understand that this method scales better than separate threads for subsystems. For instance a particle engine has a ton of tasks its can run separately and you can pretty much split them up arbitrarily. So you look at the number of cores available and split the tasks more or less evenly among them and if you have more cores to use you just split the tasks so each core does less.
Is that the best way to use multi-threading? Do I have something wrong? I understand that advice can really only be general since you don't have detailed information on my project.
So part of my upgrade to Majesty involves having multiple unit types per Order(Guild in Majesty). And also that they are not static types and they are selected from an educated populace. Educated populace is created Impressions style with high tier housing. Some low level heroes use regular population since you need some heroes during the process of advancing your early society.
Anyways because the game is a simulation and you are supposed to have only limited control you need to provide educated citizens nearby an order motherhouse.
I am trying to decide how to select citizens with stats suited for particular orders. I could assign stats based on the base class that are preferred and select citizens with the best match automagically when I initiate recruitment.
Alternatively I could let the player search through a list of in range and pick their own choice for a new ordermember.
A third more intensive option is to allow the guild to make its own choice and choose when to recruit a new member, that's simmier but farther outside the current scope of the game mechanics. It might take some work to make the AI smart enough to spend its money wisely.
The goal is basically to get the player to create several educated population centers and spread around various Orders and economic guilds and such. If I let them choose what citizen to use the goal would be for them to make smart choices about which people would be good at what kind of work. There may be motivation to spread top tier mages compatible citizens to different Orders or even pick a few good mages with high crafting for making an Order's special items.
Orders can choose to multi-class by reading special books of knowledge. Only the leader of the order, preceptor for military, high priest for church, and archmage for magic can read books. They can then enable their Motherhouse to train others in the guild. A leader would need high research skills to read diverse books and read them quickly for maximum knowledge gain. Crafters would need as previously mentioned high crafting and production related skills.
Equipping an Order with enough characters good at the right things is important to let them become powerful. You cannot directly control an Order member except in special cases. Perhaps assigning them to crafting or researching and special skills but otherwise they are autonomous. So they make their own decisions about fighting and buying items and patrolling and shit.
I'm trying to decide how much control in selecting initiates to give and such.
I was wondering if anyone had any advice about how to load skills/animations that are used by multiple units using XML.
I have a couple mechanics that really need me to be able to load a skill not defined in the XML of the unit. Basically some things like traits and schools of magic and other things that define special skills and can be gained by more than one unit.
Generally each skill has its own animation or set of animations. And obviously you can only use the animation of the given unit. Basically I was thinking I could set the animation path as:
Each unit already comes with a basic attack animation if its intended to be a combat. So if I name the basic one that then I can have any reasonable unit inherit the skill without an issue.
So the animation would be a generic spell casting type animation, handwaiving type stuff, and the differentiation would be the particle system that represents the effect. Particles are not restricted to the individual model like attack animations obviously so that wouldn't be a problem. Multiple skills could use the same cast animation and maybe units that could get stronger spells have a second animation but whatever the animation is its just called:
I would probably have more of an issue with melee or crafting type skills though, a spin attack really needs to be separate from an over the head blow.
My other thought is that I could just add an animation to a model folder for the trait and each unit would be passed the appropriate one to use. This would make it easier to add new skills that need individual animations. Some skills could use a less ostentatious particle system compared to magical spells to indicate different skills. Like instead of a whole new animation for a power strike you could just add some light particles or something and this would save memory and labor making custom animations, but some skills would still need a totally new thing.
Aside from these options, does anyone have a better method for this problem?