Leaderboard
Popular Content
Showing content with the highest reputation on 2014-05-01 in Posts
-
At game start or load a bot is thrown into cold water. He might discover a very hostile environment in terms of resources, units, buildings and enemies. Interestingly game start and end can be very similar, meaning eveything is low, if the human opponnent has victory within his grasp. But a bot doesn't give up, as long there is a small chance of success - he takes it, right? What is the worst case? Let's say no civic centers. That's close to ground zero in 0 A.D., because without CC you lack the territory to build any other structure. So, naturally the very first questions in this case are: Can I build a CC? And if not, what can I do at all? It turns out, these are very complex questions. Let's start with some simple conditions: has only resources -> whiteflag has only buildings -> whiteflag has only units -> whiteflag or fight like hellOk, that's not so difficult. And it looks translatable into straight forward JavaScript, too. Here comes the next level: has buildings, units, no resources has no CC has no CC builder can not train CC builder -> whiteflag or fight like hell can train CC builder -> gather resources -> train CC builder -> construct CC has CC builder -> gather resources -> construct CCActually that's only the surface. It assumes the units are not champions and the needed resources are available. Here are a few more: and finally: has units, resources, buildings has no CC has CC builder -> construct CC has no CC builder can train CC builder -> train builder -> construct CC can not train CC builder -> whiteflag or fight like hellCan you imagine how many conditions the bot has to check just to find out he has definetly lost? Now add more edge cases, mixin technologies, multiply with all buildings and all factions and you'll end up with tens of thousands lines of code, hard to read, difficult to maintain and taking months to write. That's where planners jump in. They know which conditions to check and how to answer them. Ontop they come up with a list of actions leading to your goal or none if your goal is unreachable. HTN (hierarchical task network) planners are conceptually fairly simple, but extremely powerful. They define a state, that's the starting point, a goal and operators and methods, the latter are just functions. Operators can change the state and methods result in more methods or operators. So, you initialize a planner with a state, your goal and then call the first method. From there it tries to decompose the problem until only an ordered list of operators is left - that's your plan. 0 A.D example: state = { resources: {food: 300, wood: 300}, entities: { structures.athen.civil.centre: 1 }, technologies: [phase.village]};goal = { resources: {}, entities: { structures.athen.field: 1}, technologies: [gather.wicker.baskets]}The goal basically says: I don't care about resources and the civic centre, but in any case I want a field and foragers better equipped. Do you see the two traps? Here's the plan: HTN: SUCCESS, actions: 8, 1 msecs op: 1, train_units ( units.athen.support.female.citizen, 1 ) op: 2, wait_secs ( 10 ) op: 3, build_structures ( structures.athen.farmstead, 1 ) op: 4, wait_secs ( 45 ) op: 5, build_structures ( structures.athen.field, 1 ) op: 6, wait_secs ( 100 ) op: 7, research_tech ( gather.wicker.baskets, 1 ) op: 8, wait_secs ( 40 )See how the planner automatically found out he needs a builder for the field and the farmstead for the technology. And the final state: resources: { food: 250, wood: 150, time: 195, metal: 0, stone: 0, pop: 1, popmax: 300, popcap: 20 }entities: { structures.athen.civil.centre: 1 units.athen.support.female.citizen: 1 structures.athen.farmstead: 1 structures.athen.field: 1}technologies: [phase.village, gather.wicker.baskets]... which can be used for your next goal. HTN Planners are well used in RTS games. The link finds a a few interesting presentations. Some games have highly optimized ones, checking hundreds of plans each tick, looking for the optimal strategy to keep the human opponent entertained. So far Hannibal's planner lacks a few features, he needs a better awareness of time e.g. calculate how long it takes to get a given amount of resources and more challenging learns the concept of parallel tasks. I'll continue when it produces heros. PS: Did I mention that's probably the first JS planner ever written for an RTS?3 points
-
Hephaestion, It is best to stick to two parts (First and second half of the Medieval Age) to not loose coherence with the other factions (Although there are currently only 2 WIP)2 points
-
2 points
-
Alright, Thematic byzantine is your best bet. First, I should let you know that it wasn't called Byzantium, it was called the Βασιλεία Τοη Ρωμαίων (Basileia Toh Rhomaion) or the "Soverignity of the Romans." Let's look at some Thematic Roman units: Barracks Units: Village Phase: Ακριται (Akritai) - The Akritai were the descendants of the Late Roman Limitanei. They were professional soldiers whose purpose was to defend the borders of the Empire, but were given lands to maintain called Εκονομικαι (Ekonomikai). These men could be armored or unarmored, and were usually equipped with a medium or large ovoid shield, a spear, and javelins. Like the Republican Roman units, they should gain armor as they gain experience. A Κλιβανίων or Lamellar cuirass would suffice. http://img167.imageshack.us/img167/7061/acritaefinalrs0.jpg Ακοντισται (Javilenmen) - Akontistai were the descendants of the Roman Lanciarii that were stationed in the back of a Legion. Although the legion was no longer used, the Akritai still carried on this practice in order to make them more versatile to face a wider variety of foes. They have a bundle of javelins and a small or medium shield. Like the Republican Roman units, they should gain armor as they gain experience. A gambeson would suffice. http://img291.imageshack.us/img291/8333/18542551.png http://img692.imageshack.us/img692/6199/52439774.png Ιπποακριται (Hippoakritai) - These men are the same as the Akritai, but mounted. They were professional soldiers, and given lands to tend like the Akritai, but were more like screening cavalry than lance and bow cavalry. They were armed with a set of javelins, and a lance (κοντός or kontos), and a smaller cavalry shield. http://img63.imageshack.us/img63/3485/13a.png http://img641.imageshack.us/img641/927/13bv.png Town Phase Σκουτατοι (Skoutatoi) - The Skoutatoi were the descendants of the Late Roman Comitatenses, and were the standard line infantry of the Empire. They carried a large ovoid or kite shield and were either spearmen or swordsmen (for gameplay purposes I'd make the Akritai Spearmen and the Skoutatoi swordsmen). They were armored, professional soldiers, and did not tend lands like the Akritai. http://img84.imageshack.us/img84/2263/26942752.png http://img84.imageshack.us/img84/7572/34770726.png http://img641.imageshack.us/img641/1808/14a.png Τοξοται (Archers) - These men are archers. Skoutatoi also had units of Akontistai, as a development of the late Roman practice, and archers as well. The Roman government also had several laws in place that stated cities were required to keep a garrison of Toxotae at all times. These men were armed with Turkish composite bows, although not nearly of the same quality as the ones that took 10 years to make. They also sometimes had a small shield. Like the Republican Roman units, they should gain armor as they gain experience. A gambeson would suffice. http://img715.imageshack.us/img715/9894/cburtoxotai.png http://img692.imageshack.us/img692/4566/35547533.png Κουρσορσες (Koursorses) - The Koursorses were lance-and-bow cavalry, equipped with a long lance called a Kontos and an Asymmetric horse bow. The Koursorses operated in tandem with the Defensorses, rushing out to attack and then retreating into the Δεφενσορσες (Defensorses) which the pursuing enemy would slam into, in a tactic modelled after the Alans (Ossetians). http://img718.imageshack.us/img718/9558/0013k.png http://www.twcenter.net/forums/attachment.php?attachmentid=178552&d=1314215548 http://img15.imageshack.us/img15/9454/0011gq.png Fortress Units: Βαρανγιοι (Varangioi) - The Varangioi were the Varangian Guard, who were recruited from the Kieven Rus and later the Anglo-Saxons of England, many of whom fled to the Roman Empire after the Norman conquest of 1066. Not all Varangioi were in the Varangian Guard, many operated as professional soldiers who fought in the front line. Varangians had a full maile-hauberk, a one or two-handed bearded axe, and a large kite shield. http://img524.imageshack.us/img524/6116/varangianguardfinalch6.jpg http://img367.imageshack.us/img367/52/varangianguardug1finaluo7.jpg Οπτιματοι (Optimatoi) - The Optimatoi were the elite cataphract corps stationed in the Thema Optimaton, the modern day provinces of Yalova/Kocaeli/Sakarya in Turkey. They were heavily armored versions of Καταφρακτοι (Kataphraktoi) called Κλιβανοφοροι (Klivanophoroi). The difference was that Kataphraktoi did not have an armored horse, while Klivanophoroi did, albeit both terms were interchangable. These men would have a partially or completely armored horse, and were armored head-to-toe in chainmail. They had a twohanded Kontos and a small shield affixed to their forearm. http://img521.imageshack.us/img521/2159/scholariifinal1ry3.jpg http://img524.imageshack.us/img524/6936/scholariifinal2qc7.jpg http://img365.imageshack.us/img365/29/athanatoifinalik0.jpg Images taken from the Complete Byzantine Unit Roster Project. They have a few errors, but are a darn good start. These images are just ideas for units, and not to be copied.2 points
-
Hey everyone, I thought I'd help out here. First, I need to know what Byzantine Era are we looking at? I'm thinking because your name is "1000 AD" we'd be talking the era of the Macedonian Emperors, and the height of the Thematic system. Also called the Byzantine Restoration. The symbol of the Empire, overall, seems to have still been the Roman Labarum, i.e. Chi-Rho. It was in a much different style of course, but I will hunt down some images for you guys. The Palaiologian Eagle and many of the other Heraldic symbols mentioned only date to the 13th century and onwards.2 points
-
We need a Robin hood model then. Moreover I ´d like to have some fat priests as bandits. We need a bandit faction.2 points
-
1 point
-
Impressive, how you are combining these concepts such as the triple store, the query language and the HTN approach for planning actions based on the data and goals. It seems to be as generic as it can be and seems to be a good approach to make the AI more flexible, more configurable and easier to understand. I hope it works out as planned. Do you have a working version somewhere where these concepts could be tested in 0 A.D. directly? Even if it has just basic functionality as shown in the video, it would be interesting so experiment with that and figure out how it works. Using a git repository for your work would probably be the best way for sharing it and it's also very helpful for managing your own versioning and keeping track of changes in the development version of 0 A.D..1 point
-
It may be related to this : EDIT: It doesn't seam so though, see below Reducing the number of players set the (now unused) players civs to undefined. Raising it again does not change that (at least in Atlas). In random maps the players just gets fallback civ's entities but the civ string (used by the engine and so likely by gamesetup as well) does not change (it's still undefined). Maybe the AI has problems with that because (in opposite to human players) he used the civ string (not the entities he's given) to determine it's civ. (I mentioned that before and still think it's a bad behavior. The civ string should be set to a fallback/default case, not the starting entities) However, that was some time ago so I'm not sure it's still like that. EDIT: It doesn't seam to be related. It also happens if I just choose Sicilia (2) and start the game. (So it seams to be map related)1 point
-
From what I read the athen_support_converter_a should be up to the task, but I think he isn't assigned to a building. Also we might want to replace the actor with a ptolemian one instead of a greek healer.1 point
-
Try enabling preferGLSL and gentangent only, that doesn't cost a dime performance-wise.1 point
-
From now on, the tutorial can be found in the wiki: http://trac.wildfiregames.com/wiki/CreatingNewUnits1 point
-
Welcome to my post, friends and family of 0ad and Com I would like to welcome you into my head, below i will be giving you some of the ideas and planns i have for my mods and some new mods i am planning Base Mods Cloth Blood Reward1 point
-
This problem are normals facing the wrong way. (inverted normal faces do not result in error when importing) To solve this, you can try with blender "auto correct" normals: -Select the object and TAB to edit mode. -Select All with "A" -Hit Ctrl+N to recalculate normals. If this auto correct is not perfect, you can always flip the faces of the polygons that you want: -In edit mode select all the faces you want to flip normals with shift-right click to keep adding to the selection -When you have all the faces you want to flip normals, in face mode hit "W" for the specials menu, and select "Flip normals"1 point
-
This error usually happens if you have vertices or edges that are not conforming a triangle. These are called "loose vertices". To get rid of them: -Select your mesh -Hit TAB to enter edit mode -Hit Ctrl+TAB and switch to face selection mode -Now make sure to select all the faces with "A" (or double "A" if you had anything selected already) -Hit "H" to hide all the selected faces -HIT Ctrl+TAB again and now change the mode to vertex selection -Toggle between "select all" and deselect hitting A some times and look for single vertices and delete them. This basically only "hides" faces and polygons, and then switch to vertex mode, so you can only see vertices that are disconnected from your mesh. DAE files throws that errors when trying to import single vertices and sometimes single edges.1 point
-
The display options are minimized in that menu when you first open it, you have to scroll down near the bottom and expand it. Backface culling should be under that.1 point
-
1 point