Jump to content

MoLAoS

Community Members
  • Posts

    135
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by MoLAoS

  1. I don't mean the thread title to be misleading, you just have limited space to describe the topic.

    As I work on my own game engine I have slowly been working on the concept for my AI system. I want it to be able to deal with new maps and units without my specific input. Now realistically I don't expect to have many modders making game factions, but I am sort of compulsive and perfectionist so I want it to work theoretically even if I am just making games to play by myself.

    On that topic, what sort of AI are people making for 0 AD? Any of the standard approaches? Anything original? How much simulation data is exposed to the AI? How does your AI read the map? How does it decide what units are for? Is it a tag system where the faction designer specifies a type tag? Can the AI look at the units stats and figure out what they are for?

    How does it work? I had been considering trying out some of my AI theories using 0AD since my engine does the AI in source and I don't have multiple well designed and completed factions. How much power does the API have to work with?

    Also I just like discussing AI and only one or two sites on the web are dedicated to AI for video games.

  2. Playing a MOBA with a community less than hundreds of thousands doesn't make sense when you can play LoL for free on an engine explicitly designed for MOBAs. I've never understood why people see the need to make games in genres that have dozens of varied options made with top quality are, balance, and dedicated engine types.

    The goal of indies and open source should be to make something different than commercial projects. ESPECIALLY in the case of games based on intense multiplayer churn.

  3. City Building games tend to have a lot of resources but almost no combat. Its very difficult to find a halfway game with more resources but still enough combat.

    Warlords Battlecry had metal, stone, crytal, and gold and that's the most we usually see. Although most games you could kinda count the population cap. SC has 2 and warcraft has 3.

    And honestly we have so many people whining about even starcraft. Wah I hate buildings, wah we should only need gold and so on.

    Aside from people like myself who are serious nerds you aren't going to find any audience for games with more complex economics, gaming has been pushing towards simplistic for so long, you can't reverse the slide.

  4. I've been working on a side project lately using my game engine because I am building up energy for the long haul to the various graphics/gui/pahtfinding upgrades which I hate doing.

    Sorry about the huge size, its mechanics vary from uncommon to unique and there is no spoiler button here to put each description in a separate box.

    Edit: Forgot, the beta version will be released around Christmas. All the engine stuff is done and about 95% of the game play coding is set, barring any bugs that are found. I am mostly cleaning up the XML and adding the remaining buildings and units, then I will just need to get all the credits documentation done.

    The engine is open source and the units are controlled by simple XML files. All the stats and date and items and resource stuff is data driven in the XML.

    The nearest comparison is sort of a blend between Majesty, in that you don't have control over mobile units, and maybe something from Tilted Mill since it has quite a big of economy and some pretty complex, optional though, production chains.

    Production chains are mostly tilted towards the end level. Multiple types and grades of weapons with various enhancements your units can buy for the weapons they purchase and so forth. There is some low level farm/market/guild/house economics. Houses buy food and clothes which increases their taxes. But no multiple food types. Markets can build shops that provide extra money but require farms or various guilds that produce items to be built in order to construct.

    Economic Guild Info

    Economic guilds produce basic goods that go into the production of items or gold but they can also harvest resource nodes in the environment for more valuable materials that increase power of items or create alternate effects. For instance rare herbs that alchemists make new potions with. Metals which the Metallurgy guild makes ingots of and sells to the blacksmith to make better weapons. Farms also produce crops like cotton for the clothiers guild which sells to your citizens as well as sell cloth to the people who make robes and what not for mages. Leather to the tanner who sells to the leather worker and what not.

    End line production buildings are leather worker, armorer, robe maker, weapons maker, alchemist and so forth. There are advanced structures like the foundry for most item lines as well. Foundry also sells things like structural enhancements to buildings and other such things. There may be siege weapons as well.

    Orders(The combat and priestly and magical orders that provide combat units):

    You can build some military and defensive structures which are modified and upgraded from the kingdom treasury. However the most powerful fighting units come from the Orders. Orders also produce new equipment and consumables. Some Orders produce new structures. Each Order has its own theme with its own strengths and weaknesses as described farther down.

    Each Order has a Motherhouse which does all the production and upgrades and construction. Once you build the Motherhouse everything the Order buys must be purchase from its treasury. Multiple Motherhouses can be built but they are quite expensive. Part of the cost of each Motherhouse is put into its treasury for initial purchases until its goods sales and taxes on member units kick in.

    Taxation Info

    Each orderhouse, mother or chapter can have its individual tax rate set. At 50% half the money the members put in as dues is kept by the house to pursue its evolution while half goes to them kingdom to be spent on non-Order things. The rate can be put up or down from 0-100. Each unit has its own tax rate as well which determines how much wealth it puts into the Order coffers. It defaults to 50 as well. This is to allow lower level units to maybe spend more gold on items enhancements and consumables. Higher level units who have all the permanents and only need a bit of cash for consumable resources can get a higher tax. It can be reset to a lower level if new items come onto the market.

    Each building built by the Motherhouse follows a similar pattern of a personal treasury which gets an initiate influx of cash from the Motherhouse treasury. Chapterhouses, built at the motherhouse, cannot do anything but create extra housing. They have a base number of extra order members and can make room for more.

    Motherhouses have limited space for units even if you put it all into housing ups and you have to decide what path of the Order to pursue at each Motherhouse. That is why multiple ones are allowed. The expense keeps you from just getting 2 or 3 per Order and/or ignoring chapter houses.

    Motherhouses can produce special units, a higher tier member unit which takes more space and more cost for fewer units as well as a single leader of the order who is much more powerful.

    Melee Order 1

    Furthermore each order has an individual style. The Order of Defenders which makes basic swordsmen features cheaper and more plentiful units. They have a larger base contingent and their barracks upgrade provides a larger housing increase than other Orders. Their chapterhouses are also cheaper and their buildings and facilities require less of a population. Did I mention houses provide population to man your buildings as well as produce taxes? Their motherhouse only provides unit type upgrades to allow new skills like bleeding and movement debuffs to enemies, no items and what not. Their champion and leader units may have some buffs however, and they may even have an extra unit type called the bannerman which gives a buff to nearby defenders and guardians.

    Melee Order 2

    Another melee warrior guild the Lunari(I don't have time or skill currently to make my own models and one of the creative commons licensed GAE/Glest compatible factions I got my models from was a moon based faction) has a totally different character. They can imbue their weapons with the rare lunar light damage type against which no monster, or only one or two, has any resistance. They can learn a skill which creates a lunar emanation which stacks based on the number of fellow order members to provide a magic shield and increased energy/mana. They have incredibly powerful but expensive champion units with various powers.

    Melee Order 3

    The other current melee order(there may or may not be more based on model availability and whether too many models shits on people's graphics memory limits) is the Chaos Warriors. They are heavily armored, in chaos, with high resistances to many damage types and health. They are slow but fearless, ie they don't run until they are at 5% health, compared to higher values like 20% for defenders and 35% for lunari swordsmen. Their leaders can summon various minions of chaos and possibly extend some of their Order's resistance to nearby units.

    There are also 3 archer factions and various magical factions.

  5. Based on Google search of the in operator:


    int value[5] = { 1, 2, 3, 4, 5 };
    bool member;
    int variable;
    for (int i = 0; i < value.size(); ++i) {
    if (variable == array[i]) {
    member = true;
    return;
    }
    }

    Alternatively you could create your own version of the in operator for use:

    Note that you would need to make one for all the kinds of type reactions which is a pain so I would stick with defining it on the spot.

    Header file:


    class PythonLike {
    public:
    bool inOperatorInt(int i, int intArray[]);
    }

    cpp file:


    bool PythonLike::inOperatorInt(int i, int intArray[]) {
    for (int j = 0; j < intArray.size(); ++j) {
    if (i == intarray[j]) {
    return true;
    }
    }
    }

  6. Indeed. It would be good to have the ability to set a civ's default pop cap either in the civ json or via technologies (as quantumstate has suggested, which isn't a bad idea either, as then you could have techs to increase the caps). They would be a multiplier in order to be compatible with whatever max pop the host sets, so a 1.1 (+10% pop cap) for Mauryans and Persians and a 0.9 (-10% pop cap) for Spartans. Then, if the host sets max pop to 200, Mauryan and Persian pop caps would be 220 and Spartans would be at 180. If the host sets max pop to 300, Mauryan and Persian pop caps would be 330 and Spartans would be at 270*.

    *Keep in mind that the Mauryans and Persians have lots of cannon fodder infantry and some high pop units such as elephants and chariots, so the difference in max pop is deceptive here. Spartan units are very powerful.

    But, but, how would I set it so that I could have the optimal number of spartans? Say, 300. :P

  7. Why don't you focus on gameplay innovations? I'm not asking that to be silly or anything, but to highlight the fact that different people have different skills. In other words: it's not a choice between adding one type of feature or another in a given release, but rather between adding what features the currently active developers are able to (and since we're volunteers: want) work on for the next release or not at all. And that means that given the currently active developers we've seen more development in terms of graphics than gameplay features lately. To be fair we have added gameplay features in the last couple of releases as well though :) So it's not all graphics even at this point (since we do have active developers who are skilled in that area as well).

    There are a lack of people interested in implementing gameplay features? That seems like the opposite of how it should be. I guess I'm biased since I dislike graphics programming. Can you really not find people interested in doing something as simple as javascript to add stuff they have wanted to see in games? IIRC the world is loaded with people who can't use compiled languages but really want to design game mechanics. I'm surprised more haven't popped up here.

  8. I'm sure people will be interested, but my enthusiasm for libRocket waned substantially when I discovered it doesn't use standard HTML/CSS :(

    My understanding was that there are some slight differences between libRocket and the browser versions. But most of the basic features are identical. I haven't checked it all out but the differences are minimal in most senses. A test RML document in the samples/shell that was copy pasted from my website appeared to work fine. libRocket lacks some features but, adds others.

    I was thinking of maybe making some changes to make it more standards compliant since its open source.

    I am taking a break from adding support to my engine to work on stuff that is more fun for me, I don't particularly enjoy graphics programming in any of its forms, I like to write game logic and other stuff is just something I have to do to do that.

    I should have a great deal more useful information after I finish integration next weekend.

  9. Some spanish guy posted a poorly written post on civfanatics advocating that people check out 0 AD. It was hard to understand due to the bad english and several people make mocking comments and such about the poster and the game. A staff member luckily already knew about 0 AD and put a stop to it but that was pure luck. It could have put a lot of people off the game. I did a bit of damage control as well.

  10. 0 AD seems like it could make a boatload from a crowdfunding system. Its already got global exposure and support, you proved you could commit seeing as its been 10 years, work definitely gets done.

    On the other hand because its open source you already get it free. It seems like you are mostly paying for a speed increase and maybe a bit of codebase cohesion and optimaztion. Of course I presume there would also be cool swag for donating. God I hate the word swag...

  11. Roads are one of those things you need to plan to have from the start or else they cause all sorts of drama. That's the fun of computer programming. Your brain is just so advanced that you think a computer game could handle something like roads no problem but pathfinders and build commands and trying to sneak your armies around enemy scouts throw up like 10 problems for each one you solve.

    Kinda like walkable walls :)

  12. The roads in most city builders are mandatory for non military units. That is, your units cannot leave the roads.

    In my personal game and engine I plan to implement roads that apply a movement bonus and I have had a lot of trouble working out how to get them to behave the way I want. Ideally you want to have control over a unit's movement and if your pathfinder auto incorporates roads you can have some issues.

    Currently roads are only planned to be enabled for the waypoint/trade route system where you specifically tell units to use a road when you define a trade route or other economic path. This allows you to control how your units move. Military units may or may not get a special move command that allows you to specify road use or maybe just access to the waypoint system.

    Do you really want to have to deal with all that in 0 A.D.? Roads that you don't have to use are such a hassle for programmers.

    And god only knows how the AI would deal with roads. My current non-player faction is different enough that it will just ignore roads but if I wanted the AI to play the human faction things would not go well. It would make terrible decisions.

    Plus you have to deal with all sorts of other fun issues like how long it takes to build roads, what are the costs, how strong is the speed bonus and what about people who don't build roads since 0 A.D. is a historically based game.

  13. In Majest they had a special screen that followed whatever unit you had selected at the moment. This was incredibly helpful for me when I played the game. It would cover perhaps 400x400 pixels, although of course for 0 A.D. you could change it to whatever size you liked.

  14. Dont't get me wrong, but why don't you try it yourself? This is open-source...I myself made some experiments, but I never came to the point where I would show my code here in the forums because people would probably lough about it... but you seem to be more advanced, so why not doing it?

    I am actually busy doing something else. I am indeed making my own AI, but not for 0 AD. I just like to discuss AI which is why I post here, as well as some other places. Posting on forums doesn't take up too much time, but making a full AI for 0 A.D. is too time intensive. I might do one in a year or so when I'll have more free time.

    The reason I am suggesting a utility based AI is because as a serious strategy gamer I have never been able to find an AI I couldn't smash even if it cheated with no fog on the map and large res bonuses.

  15. If i understand correctly, I would say that its mixtures of:

    1. Hierarchical FSM or Behavior tree, (example: if there is a building foundation and this worker is capable of building it, then assign this worker. If not, then make this worker to gather something. This also can be events-driven type of action )

    2 .Planner (example: picking which buildings to be used that are best for this civilization then customize the AI behavior later on ) This would usually happens initially.

    3. Rule based (example: worker can't build too far, worker can't gather resource far away, can't build dock if there is no fish)

    So far it would be Planner at the start of the game, then it would become combination of FSM/Behavior Tree/Rule Based ai format. That's how I would see in my AI once it evolves.

    I hope that answered to your question. :boredom:

    I expect it to be vague lol. its formatting reveal what kind of habit I have: laziness :lol2:

    I don't expect people to use my code at this point because, well, its very immature at this point.

    Someone should look into making a quality utility with maybe a high strategic level planner. For an RTS this should produce the most effective AI.

  16. Not familiar with AI format. I probably would guess planner? Other seems less clear to me.

    Random google grab for behavior tree or BT, I checked to make sure its decent:

    http://www.altdevblo...behavior-trees/

    Rule based AI is the probably the most intuitive. The original Glest uses a rule based system. Basically it has general directives like gather resources and produce units and then it has other things like when you have this, this is the finite state machine part, then do this. That might mean, when the game is 5 minutes in, and you have 10 units, send them to scout the enemy base. This system tends to rely on the game knowing where your base is as well as likely expansions. So the scout part is basically hard coded to go to your starter base while checking any expansions in between. The AI is given specific rules, hence the name. Rule based is sort of like planner iirc.

    I believe that 0 A.D. is set up for a rule based or hierarchical system. It may also be a planner, this is my impression from posts here and playing the game, I don't look at the actual code cause its time consuming.

    Here is a more complete list of AI frameworks:

    • Ad-hoc rules
    • Finite State Machine (FSM)
    • Hierarchical FSM
    • Behavior Tree (BT)
    • Planner
    • Utility-based system
    • Artificial Neural Network

×
×
  • Create New...