JavaOO AIWrapper

JavaOO AIWrapper

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

JavaOO AIWrapper

Post by Petah »

Where do I find the source for JavaOO AIWrapper

I have looked to no avail.

I need to because looking at

Code: Select all

setWantedMaxSpeed(float f, short s, int i)
in the definition is not very much help. WTF are f, s, and i.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: JavaOO AIWrapper

Post by abma »

i hope that helps:

https://github.com/spring/spring/blob/d ... ds.h#L1025

f seems to be wantedMaxSpeed

i looks like options

and int i could be the unit id... (but i'm not sure). hoiju can maybe say more...
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: JavaOO AIWrapper

Post by Petah »

In most cases I'm pretty sure the last s, and i are options (like queue) (bitflags converted to short) and time out.

But in functions that have more than just the obvious parameters, it hard to figure out.

And thanks for the link, it seems to have the needed info.
Zyre
Posts: 20
Joined: 18 May 2011, 21:56

Re: JavaOO AIWrapper

Post by Zyre »

it was my mistakes...not only one but many consecutive...
Last edited by Zyre on 14 Jan 2012, 17:41, edited 1 time in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: JavaOO AIWrapper

Post by hoijui »

Zyre wrote:It's not working in version 85 to me, commands not work, i has to change all the code and put it in my AI to function properly
i have no idea what you have done, or even what problem you faced, but the good way to do it would have been, to report the problem(s). if you already did that, then you should have mentioned that here (and possibly linked to the mantis report).
in other words.. this post is very confusing, and useless, sorry. ;-)
Zyre wrote:UnitDef_iscommander insist to give me always a false...how if the unit is the commander ?? game = ba 7.63
the commander tag was removed in spring 85.0, so the engine does no longer know about this anymore. the function is only left in there so old AIs will still compile fine. if you want to make a general AI, you should probably not handle the commander differently then other units, and if you want to make an *A specific AI, you might regex search the unit name or something.
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: JavaOO AIWrapper

Post by Petah »

@hoijui

So, no word on where to find the source for the Java OO AI wrapper?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: JavaOO AIWrapper

Post by hoijui »

they are generated by the spring compilation process.
it also generates a sources jar for the Java AI Interface, the OO Java AI Wrapper and each Java Skirmish AI.
i would not know if there is some place where you could download them from directly.
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: JavaOO AIWrapper

Post by Petah »

hoijui wrote:they are generated by the spring compilation process.
it also generates a sources jar for the Java AI Interface, the OO Java AI Wrapper and each Java Skirmish AI.
i would not know if there is some place where you could download them from directly.
In the Spring download there is not source for the OO wrapper, only the Null OO AI
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: JavaOO AIWrapper

Post by hoijui »

generated sources are not considered part of the sources (that is not a spring thing). if they are somewhere, then i would expect as sources jar in the windows installer or in some linux package, but i guess that is unlikely. the goal is to have an auto generated dev package for each interface/wrapper one day. i half a half done version of it for hte JavaOO wrapper locally. but i guess as of now you have to generate them yourself. the cmake generated makefile for spring has a target called generateSources.
Post Reply

Return to “AI”