Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2014-02-19 in all areas

  1. There is a browser based JS debugger allowing breakpoints and variable inspection, but I got it running only once or twice, so dbgView from SysInternals is my debugging tool of choice. A bot has 3 possibilities to talk to you while running, 1) chatting, 2) the in game console and 3) logging to std, in this case dbgView. The console is of little use since it runs in another context. However, the Aegis Bot uses it quite well to explain its actions once debug is set in its config. I decided to use dbgView only and keep the chat function to entertain the human opponent. SpiderMonkey is very picky and demands properly written code. I use Sublime Text as editor and a JSLint plugin to make sure SpiderMonkey is happy before 0 A.D. fails to load the code. JSLint is even more picky, but there is nothing wrong with using a good coding style restricted to the good parts of JavaScript. In terms of style I tend to prefer Google's JavaScript Style Guide. You probably want to start developing with a simple map. Get used to the map editor Atlas and create a map with two Civil Centers one for your bot (Player 1) and one for Aegis (Player 2). It's actually quite simple. Since maps are XML files, direct editing is possible too. Atlas saves maps in a special windows folder, mine is: C:\Daten\My Games\0ad\mods\user\maps\scenarios My first map is attached. You start it with this command line:"D:\Games\0 A.D. alpha\binaries\system\pyrogenesis.exe" -quickstart -autostart=xbotmap01 -autostart-ai=1:xbot -autostart-ai=2:aegisAt this point you have an Bot which is functional, but as clever as a stone. It is a good idea to learn the hotkeys, triple clicks give you some advantages, also there is an useful developer overlay. xbotmap01.xml
    2 points
  2. After playing 0 A.D. far to often I decided to program my own AI/bot. 0 A.D. is an interesting client for an AI because first it is so beautiful, second it requires solving real world problems and, well, bots need to be written in JavaScript, which is quite popular. So this is kind of a forum blog of a Linux/Internet guy developing on an old Windows XP license against Mozilla's SpiderMonkey having no clue about C++ programming or compiling. The following wouldn't be impossible without a working AI. Wraitii's excellent Aegis Bot is nearly game complete and was a challenging opponent for dozens of rounds. Aegis implements resource allocation, queueing and management, building placement, map exploration and more - all important things needed whatever logic an AI prefers. I love the idea of AIs showing their capabilties in a complex environment fighting against each other. Hopefully developers reading this feel challenged and Hannibal gets opponents really soon, which is the purpose of this writing. Since all code is open everybody can use and optimize each other solutions and strategies. If you are interested, this is a good starting point. I'll plan to continue this series at least until the sample bot trains units and let them gather resources. I have a few design goals in mind: With highest difficulty the AI should be unbeatable while the lowest should be just interesting enough to engage beginners. Unit groups should solve most problems more or less autonomously. And at a later point research would be required to restrict the AI to launch only attacks according to the selected civilisation. Hannibal will use kind of a state machine to implement behaviours based on frames. Frames will run in a special context/closure providing something as close to a domain specific language (DSL) as JavaScript, time and "strict mode" allows. Everything below and above refers to 0 A.D. Alpha 15 Osiris (running on Windows) using SpiderMonkey 4 impementing Javascript 1.85. Some statements might be based on untested information found in the wiki or this forum and could be wrong or misleading. Please, let me know!
    1 point
  3. These were indeed the ones I was looking for:
    1 point
  4. That's because the game doesn't support multiple CPU cores yet. So only one of your CPU cores is actually working on 0 A.D. . This is intentional for now because it makes profiling much easier. In the end, we should be able to fix this particular problem.
    1 point
  5. Before Blender became so prevalent, 3DS Max was the tool that exported the majority of models and animations until around 2006-2007. It should still be possible, in fact many original .max file are available in the artist's SVN repository if you would like to view those. It sounds like you need general information of how to do rigging, not specifically how to get 3ds models and animations into the game? There are numerous resources for the former, and I'm one of the few resources for the later. So if you ask me specific questions I'll do my best to answer them. I'll subscribe to this thread and try to keep up with answering ASAP. Like blender - the goal is to output a .dae file. The method behind the output could vary. For example you could use the character studio feature of 3ds Max for your bones structure or you could use your own custom bone objects. You could use the skin or the physique modifiers for interpolating the mesh and assigning weights to each vertex. So right off the bat you have two options. I haven't exported to .dae in years and I think I was using 3ds Max R7 at the time with a open source freeware plugin called ColladaMax. This was because the default .dae exporter from max at the time was doing a poor job and the .dae file outputted weren't recognized by the engine at the time. The first step I would try if I were you would be to try and simply export one of the old models with the new version of max and it's .dae plugin and see if it breaks. Here is one you can play with. I think there is some very basic animation in it using a few bones (helpers) and a skin modifier. chariot.zip
    1 point
  6. Sorry new link heres my new channel: http://www.youtube.com/user/intipablo1
    1 point
  7. Alrighty then, I'll add the standard variation to the stalls. Since they don't have even topology, it may look a little warped, but I'll try my best. Here's a docks draft:
    1 point
  8. First I'll describe how to set up your system and show the basic layout of an 0 A.D. bot. It starts with downloading and installing the game, on my system that's the path d:\games\0.A.D\. Check out this guide for other systems and other paths mentioned below. A bit deeper is a huge zip file called public.zip, extract that into its folder keeping the folder structure intact. Now you'll find a folder called d:\Games\0 A.D. alpha\binaries\data\mods\public\simulation\ai Here the fun starts. Think of a good name, let's say XBot, and create a xbot sub folder as a sibling to qbot, testbot, aegis, etc, then two files are needed: data.json and _xbot.js.{ "name": "XBot", "description": "XBot - example", "constructor": "XBot", "useShared": true }Engine.IncludeModule("common-api-v3");function xbot(settings) { BaseAI.call(this, settings);}xbot.constructor = xbot;xbot.prototype = new BaseAI();xbot.prototype.CustomInit = function(gameState, sharedScript) {};xbot.prototype.OnUpdate = function(sharedScript) {};The files in your bot folder are loaded alphabetically, so the underscore makes sure the api is included first. I use a local.cfg file C:\Documents and Settings\Owner\Application Data\0ad\config in to ease development: windowed = truesplashscreenenable = falsepauseonfocusloss = truexres = 1024yres = 768jsdebugger.enable = false
    1 point
  9. Parthian Editor-Only-Unit Ustaran-e Zrehbaran (Parthian Camel Cataphract) Parthian additional levies Mardian Slingers (Falakan-e Marda)
    1 point
  10. hollth, greenknight32, Mythos_Ruler: And what if the simple way is in the end the best working one (but replaced with a complicated and worse one right away)?
    1 point
  11. Talk about that predominance of all ranged, some units can have a bonus for defensive behavior or stand ground. The infantry up their shield to defense. In AOE 3 have a buttons called tactics where the infantry can deal with raged fire over them taking cover. Representing something like this.
    1 point
  12. Could work, but could also re-encourage the dominance of ranged units. A bonus damage nerf while re-adding a bonus for any unit could work better imo.
    1 point
  13. It is alpha software, after all; playtesting is what we're doing when we run it. That is so broken, though...
    1 point
  14. That looks nice Idawin! Very cool editor object to make cool scenarios. I also made some eyecandy. This tents will be used in the Ptolemaic mercenary camp that will be coming soon, but the tents will be also available as eyecandy:
    1 point
×
×
  • Create New...