Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2013-09-28 in all areas

  1. Hi guys, wanted to introduce myself; I love history, and I'm a Java programmer by trade, based in St. Petersburg, Russia. I did a joint-degree on Computer Science and Artificial Intelligence; so I have some experience with AI-coding from back in my uni days; although mostly it was theory and reading - I still refresh my knowledge from time to time. Also gained some experience with rule/knowledge based systems at work (JBoss Drools & CLIPS/JESS); although what we have is not an expert system in the true sence of the word. Anyway; 0AD looks really promising and I would like to be a part of it. I am particularly enthusiastic as I can see the potential here for putting theory into practise in terms of AI; symbolic AI techniques, expert systems, ANNs, genetic algorithms, fuzzy logic - I really want to see what might work here in terms of putting together effective computer behaviour (without breaking the bank/processor time, of course). I understand that the AI code here is all based on JS; I have some experience with JS from web-programming, although it's fairly rudimentary. Hopefully I can bring myself upto scratch quickly, if you guys would have me. In the longer-term I might be interested into branching out into other areas; graphics processing, or perhaps UI development which I might know a thing or two about too. So tell me - what's the first step? Download the source and research the AI files? Anything in particular that I would do well to focus on?
    2 points
  2. Introduction This is a guide covering how to import assets from the game to blender, create a second UV coordinates, bake the AO maps and export again. The game's buildings are usually divided in different .dae files (one per diffuse texture used) Usually, they consist in one main ".dae" file located in "meshes/structural" and one or more ".dae" children (props) that are attached to the main file, this "prop" daes are located in "meshes/props". (this is not always the case) In this example, we're going to bake the AO map for the celtic civil centre. 1.- Import the mesh into blender3D Inside blender, remove the starting cube, camera and point light. Go to file->import-> Collada (.dae) and select the .dae file to import. This building consists on three files: celt_civic3.dae, celt_civic3_props_1.dae and celt_civic3_props_new.dae If blender shows an error importing: *Note: The file may be imported rotated -90º in the X axis. To solve this, simply center the pivot point at the origin with SHIFT+C, select the cursor for your pivot point, select the asset and hit "R" for rotate, "X" for the axis, and then type "90" on the numpad and hit enter. Each time you import an asset, it is important that you create a new material with the name of the .dae or the texture that is going to use if you know it. This will let us separate the object again after we join all the meshes together. 2.- Set up a new UV coordinates. Select all your meshes and join them with CTRL+J Go to "object data" panel, scroll down to UV Maps menu and click the "+" sign to create a new UV coordinates. --Select the building, enter in edit mode with TAB. --Open a window with the UV/Image editor. Click in "new image" and "ok" in the pop-up menu. This creates a new 1024*1024 black image where we will bake the Ambient occlusion. --Now let's unwrap the model automatically. Go to object mode, select the model, use "CTRL+A" and select "apply scale" this will recalculate the scale of our building, so the polygons could be unwrapped nicely. --Enter "edit mode" with TAB. select all with "A" and hit "U" and select "Smart UV Project" in the pop-up menu. --In the next menu select the following settings: 3.- Baking the AO into our new generated black image. Preparing the AO settings: go to the "world" tab in the settings panel, mark the checkbox of Ambient occlusion and set it to "multiply". Scroll down to the "Gather" pannel and change the samples to something between 20-25 --We have the model ready to bake the AO map. Go to the render tab, scroll down to the "bake" panel (click on the "bake" pannel if it is closed) and use the following settings: --Then click "bake" and wait until the baking process is completed (this will take a while depending on your machine) --Once finished, you can hit "N" in the viewport to open a toolbar, go to the "display" menu, and click in the "texture solid" checkbox. This way you can see the AO map we have just generated on the model and check if it has been correctly generated. ------If you see black strange black faces where it shouldn't, the polygon normals are probably facing the wrong direction. This could be fixed selecting the black faces and then hit "W" and select in the pop-up menu "flip normals". ------If you find the problem where there are dotted black parts, it's probably because there are two or more polygons overlapping each other. You'll have to tweak the model sightly to fix this issue. --Once the bake is finished and you're happy with it, remember to save the image generated so it doesn't get lost. In the UV editor select Image->save image As... 4.- Separating the mesh by materials Now that we have our AO map, and the model has a second UV coordinates for the AO, we have to separate it's pieces again and export the parts one by one. To separate by materials, enter "edit mode". Make sure you don't have anything selected hitting "A" twice. Go to the materials tab, select the first material on the list, and click "select" button. This will select all the faces that have that material assigned. Once selected hit "P" and select "selection" in the pop-up menu. Repeat this step for each material (prop) you have imported. NOTE: Now that you only need to export the objects into .daes again, is a VERY NICE moment to save the .blend file in case the export process goes wrong. 5.- Exporting the meshes back to .dae files. This is the last part. You have to export the objects one by one. Make sure the following requirements are met: - There's nothing else on the scene except the mesh you want to export (even hid objects breaks the export) - You have to remove every material applied on the mesh. - There are no lights, armatures or other objects in the scene. - You have your object selected. Then you simply go to File->export-> Collada (.dae) and select the file to export or overwrite the old one. After that, reload the .blend file and repeat this step with the rest of the objects (or hit CTRL+Z a few times until you get back the other meshes and repeat the process with the next one) I hope it's somewhat understandable and useful .
    1 point
  3. Hello all this is by far my favorite open source project so I decided to make an account here. I had an idea that I couldn't find already in the suggestions here. If you have played the RTS called company of heroes at one point you know by dragging the mouse while holding the right mouse button you can change the direction your units will be facing when they arrive at wherever you are sending them. I think if this isn't already in the works it would be a very useful feature so you can make sure your units arrive how you want them to. At times it is hard to preposition your units in battle without this feature. That is my suggestion! I hope to contribute on the programming side of things too once I get more familiar with the codebase as this would be my first time working on open source project.
    1 point
  4. Could make the units from the barracks train really fast, but be kind of weak (low Health points), while the Settler units are slightly more expensive than normal, but stronger health.
    1 point
  5. I already gave them 2 different barracks. The standard Barracks (for Egyptian, North African, and Middle-Eastern units), and then the Military Settlement or "Klēroukhia" (for Galatian and Macedonian units) which can be built in Neutral territory.
    1 point
  6. C++ would be nice; at least for me - it would mean that I would be able to call C tools/libraries such as CLIPS and FuzzyCLIPS almost directly. Well whatever you guys decide I guess. Keep the JS AI structure though as well for now I would say; for backwards compatibility. For what concerns gamestate duplication - I presume you mean converting C++ objects to another language (e.g. JS) and visa-versa? To a certain extent it may be unavoidable in my approach, even if you switch to C++; because rule-based engines often have their own specific representations of objects/facts. Well we'll see. One of the properties of rule-based systems; or rather the Rete algorithm specifically that most of them are based on - is that the speed of the final code is largely dependent on the amount of partial matches generated in each rule before a complete match is found; and several other subtle things too. Programmers at first rarely write such code optimally - which means that there is usually a hell of a lot of scope for optimisation if they focus their attention back on it again. The good side of this is that it's very straightforward to optimise - just reorder/reconstruct the rules, and test your changes regularly to see if you're headed in the right direction. Put your head to it; and you're almost guaranteed to get your AI running as fast as it possibly could be sooner or later; and don't have to bash your head against the desk to find all these hidden details that are chugging down your Aegis or qbot AIs
    1 point
  7. Would it be possible to consider supporting Lua for scripting AI ? I understand that Lua is already used in the build system. Lua is almost comparable to c++ in speed and used in commercial games for scripting. Supporting AI via scripting has the additional benefit that it can be downloaded as mods. Restricting it to c++ might make things difficult for modding the AI...
    1 point
  8. We are actually considering moving the AI to C++ because of how badly it performs in JS. It would save us a lot of time in the long run if we started working on a new AI in pure C++ instead of expanding the JS AI. It would also solve any limitations of JS and the duplication of game state (it's a major slowdown having full gamestate duplication from C++ to JS).
    1 point
  9. I also agree that's annoying. May-be a solution would be to focus only a fixed fraction of the arrows (maybe 30%) on the chosen target, while the rest of the arrows would still be distributed as it is now.
    1 point
×
×
  • Create New...