Jump to content

historic_bruno

WFG Retired
  • Posts

    2.755
  • Joined

  • Last visited

  • Days Won

    47

Posts posted by historic_bruno

  1. If you scroll around using the keyboard sometimes the "key up event" seems to get lost so that the game scrolls forever in one direction. I haven't been able to find a workaround for this other than aborting the match. If you try to scroll in the opposite direction you can compensate the scrolling as long as you press down the key but there seems to be no way to restore normal conditions.

    This bug is difficult to reproduce. It seems to me that it occurs primarily when the game lags for a short moment while scrolling. It does not seems to happen if one uses the mouse for scrolling.

    I could try to give further information if necessary or even to look at the relevant code if someone could point out to me where it is located.

    I seem to have encountered this as well, on OS X. Which OS are you using?

    Edit: the scrolling code is in CGameView::Update (source\graphics\GameView.cpp).

  2. I've written a patch which would let AI's have a map of their territories, but my C++ knowledge is not very good and I am unfamiliar with the 0AD code base so would someone be willing to look over it?

    I have put the diff at http://pastebin.com/265ucAb2

    The main thing I am still having trouble with is using the DirtyID so it doesn't have to do the work every time it runs. I haven't managed to get this working at all.

    Apart from this a line needs to be added to base.js (in baseAI) to pass it through to AI script but that is trivial.

    The AI script gets fed something like this picture but in array form. It is similar to how the AI reads building restrictions already.

    kcbdf.png

    Why not make a Trac ticket and add your patch? :) Looks good at a glance, I didn't test it yet. One suggestion, instead of copying the territory Grid<u8> to Grid<u16> we could just add the necessary JS conversions (source\simulation2\scripting\EngineScriptConversions.cpp) - the most flexible solution would be to use templates, as we do for arrays. No idea what's going wrong with the dirtyID.

    The missing bits are (as you said) to expose the territory map to AI scripts and also to add BuildRestrictions data to the simulation state (GuiInterface.js), that way the AI can determine if a building is allowed in own, neutral, or enemy territory (for that matter diplomacy is not implemented either for the AIs, but this is a lesser point).

  3. is there a possibility to get atlas running somehow?

    outside the game or elsewhere?

    thx,

    regards

    As of r10300, this is possible :)

    Note: you'll need the wxWidgets-devel (2.9.x) library also known as wxOSX/Cocoa, because a 64-bit build is only possible with Cocoa (the stable 2.8 version of wxMac used Carbon instead). cc_julian will need to create the Xcode projects for Atlas, if not already, and bundle that dependency :) Otherwise just use the usual build instructions for OS X (update-workspaces, etc).

  4. Interesting, thanks for all the info and files, it's a very welcome contribution to the community (people have been begging recently for an Alpha 7 binary for OS X) :)

    the generated binary runs on Mac OS X 10.6 or later and only on 64-bit Macs. i don't consider the requirements problematic, 10.5 is unsupported by apple themselves by now, and apple only shipped very few 32-bit intel macs, most of which additionally only have sucky integrated GPUs like the GMA 950 and are barely able to run a game anyway. it would be easy to create a version that runs on 32 bit and 10.5 too, would just require a few hours creating updated version of the library dependencies, and a few changes to the xcode project

    I'll see if we can get some stats on how many OS X 10.5 or previous users we have and also how many 32-bit Macs (there are these semi-unrelated stats, which show 10.5 is at least as popular as 10.7 among browsers of that website, but I don't think we can assume 0A.D. players break down the same way). My feeling is that it's not a big deal, 0A.D. requires fairly good hardware to be enjoyed and Mac users seem to not mind spending out on new stuff, on an annual basis :P

    BTW:

    i've completely ignored the existing build system (premake) and instead created an xcode version from scratch. using something other than xcode always has difficulties creating something that is actually deployable to end-users. of course i generated stand-alone versions of all dependent libraries too - again, using macports installed versions would lead to dependencies that make deployment impossible.

    With Alpha 7 we include a new build system (not default yet) that generates an Xcode project on OS X (you'll see it using the normal build instructions but substitute update-workspaces-new.sh). Some effort has been spent getting this far, but it's not perfect. What we would prefer is to get that working correctly as it does on other platforms, instead of having to construct the Xcode project by hand (since we might refactor/restructure the code, add new files and folders, and we want that handled automatically to make the process as painless as possible, which it's not currently). Probably that involves fixing small bugs and deficiencies in Premake. I think it's close but I'm not that knowledgeable about app bundles and the OS X build process. It would benefit from an expert opinion ;)

    MacPorts is annoying and I wouldn't mind finding an alternative, but it doesn't really fit in with our build process to require manually downloading and compiling a bunch of libraries from source. I seem to recall reading somewhere that Xcode can manage these dependencies, I may be mistaken.

    The paths patch will definitely need to be more specific, we want the standard Unix path scheme for SVN builds. That code is due for changes anyway, even Windows builds need more reasonable data paths.

  5. aye, it's specific to lion. It's a bug with SDL or something, and can't be fixed until SDL makes a version addressing the issue.

    http://www.ultimaaiera.com/blog/apples-os-x-lion-10-7-breaks-fullscreen-for-sdl-based-games/

    Aha, thanks for the link :) Looks like they are working on fixing it in SDL. We'll have similar issues with OS X since we also need to use the display API (for detecting resolution), so their solution could be helpful for us in multiple ways.

    Edit: Another forum member has contributed an Alpha 7 binary for OS X :)

  6. No, I am saying ir does train units normally, but the trainingQueue array behaves differently and has a strange behavior.

    Interesting. I don't think the current AIs use that array which may explain why we haven't noticed this.

    wow, this is weird, you disabled the build restrictions ?!

    It's a short-term hack to make AI usable until they and the interface can be rewritten :) The alternative was no AI or let the game be extremely slow when they repeatedly fail to build without knowing it (as I understand, they would send a "construct" message and hope that it works).

  7. So, me building at the edge of my ally's territory will do what to the border? Add to his territory? Carve out my own?

    The territory calculation doesn't know anything about diplomacy. So if the building influences territory, it would carve out your own territory (each tile can only be associated with one player). I guess the bigger concern is the health decay when disconnected from a CC, there's no way to know if you originally placed the building in an ally's territory, it only matters who owns the territory at present :( We can get around that if the building doesn't influence territories because it will be on your ally's territory - the health decay can take diplomacy into account.

    Scout Towers should perhaps be able to be built in neutral territory as a way of speeding up expansion?

    Seems reasonable to me, but they do have an affect on territory weighting, so it would be like a mini-territory. Which raises the question of whether scout towers ought to be territory "neutral".

  8. Proposed territory building restrictions:

    Own Ally Neutral Enemy

    Civic Centre X X

    Fortress X X

    Barracks X X

    Scout Tower X X

    Temple and Market X

    Mill and Farmstead X X

    Farm Fields and Corral X X

    House X

    Dock X X X

    Walls X

    We kinda forgot to about this for Alpha 7. Maybe that's OK since we'll get lots of feedback on territories. Do we still agree on the above suggestions (the ally ones)?

  9. So the 1st problem I have is with the civic center trainingQueue, wich starts empty, then I fill it up with 1 entity to build, and it never gets empty anymore. I have traced the element 0 in the queue and it has a progress property which is always 0 during the training of the unit and then it goes straight to a number close to 1.

    I don't understand, are you saying the CC doesn't train your unit?

    The 2nd problem is with the obstruction map. It seems my bot can build anywhere, even over an existing building. Did you change something ?

    The obstruction map shouldn't be any different, but building restrictions are too advanced now for the AIs to understand given the information they have, especially since we added territories. So yes the build restrictions are disabled for AI players, but they wouldn't have any way to know even if they weren't. This is one of the reasons why I hope we completely overhaul the AI system.

  10. as alpha 7 is about to get released, i am very curious and keen on getting the game running.

    so are there any improvements on a ready-to-play mac-version or a in-detail tutorial on how to compile it?

    this would be very very useful as it seems, that a lot of mac-users out there love game but don't know exactly how to install it without additional help.

    Well if you're interested in compiling yourself, there has been a discussion here - several people have succeeded in building and running the latest revisions on OS X. We'll be updating the build instructions in the future. But OS X support is still very experimental and will need some fiddling to make it work.

  11. Meanwhile I keep searching and asking in the haxe community

    Bye !

    For one thing, there's no point having code after a return statement (haXe seems to be including $s.pop(); at the end of every function). I think that's what the warning is about: a code path that doesn't return a value (even though it's not reachable in the first place, it could indicate a logic bug).

  12. No I don't, but at least there is hex saying what the color is, I didn't even realize those buttons were supposed to display the color.

    That's interesting. Are you using the default theme for Ubuntu (assuming there are others)? For some reason your buttons are ignoring the background colour setting. I've found this problem on OS X, but I didn't know it affected wxGTK too. Maybe we do need to use a standard control for this.

  13. That sounds likely yeah :) The ability to choose an actor variation was implemented in simulation1, but has yet to be (re-)implemented in simulation2 :) So a reminder seems likely =)

    This ticket is relevant. There's no mechanism for saving the variations in the map file, so even if the control was added back to Atlas it wouldn't have much meaning (when we do implement this, the referenced ticket has some advice :))

  14. The result I got from running that command was

    2.8.11.0

    Do I need a updated version of wx?

    Hmm, I tested just now and it seems to work for me (also using 2.8.11.0). Maybe check the basics first, like are you running the same binary that you built (debug vs. release) and check the date to make sure the build time is as expected. If that checks out, are there any specific steps to reproduce this?

×
×
  • Create New...