Map Database  •  FAQ  •  RSS  •  Login

AI players question

<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 19 Nov 2011, 00:17

Yeah there's really no point supporting DirectX or trying to optimise the rendering code. If I turn off the FPS limiter I get 130-200 FPS on my medium level laptop graphics card at 1920x1080 :P
Read the discussion here:
http://code.google.com/p/castlesand/issues/detail?id=56

If someone really wants to write it in DirectX then go ahead, but I don't think there's any need for that. If you notice lag or low FPS it's usually because the CPU can't keep up (because parts of the code need optimising) not the GPU. Thanks for the offer :)

Motion blur could be nice to smooth out scrolling I guess.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 19 Nov 2011, 08:57

The main point was the AI, never mind. Using DirectX 11 only makes sense in a new game with new features, such as wheather that would be nice. I wouldn't try to do that with KaM Remake, because it's still very good and I don't want to mess it up. I think AI can't mess up a lot of things so I would rather work on that. But I don't think that You or Krom couldn't do that.

Btw. I did some kind of smooth scroll scrolling in previous version (in that the terrain rendering was slow, so I didn't deal with it more). So I created a velocity vector and I divided that with a number. And when user presses a key, this velocity vector is increased. Motion blur can be done by not overwriting the previous frame with the new one, but with using an alpha blending. And maybe everything needs to be rendered to a texture, but that's the most simple I think.

I had an idea to improve shadows. They can be easily translated into transparent shadows with a small program. I suppose it would look much better.

Currently I'm working on a new language (I have an article on CodeProject called "Anonymus, a New Optimal Language"), to test that I'll probably write something on it. Though I've already invented a lot of work to Anonymus it may take another year to finish this or even more. That's a lot of time, and both of them don't fit into 24 hour.
<<

Encaitar

User avatar

Lance Carrier

Posts: 63

Joined: 13 Oct 2011, 22:00

Location: The Netherlands

Post 19 Nov 2011, 12:45

Currently I'm working on a new language (I have an article on CodeProject called "Anonymus, a New Optimal Language"), to test that I'll probably write something on it. Though I've already invented a lot of work to Anonymus it may take another year to finish this or even more. That's a lot of time, and both of them don't fit into 24 hour.
I am trying not to be rude, but will you work at the A.I. or not? It seems you are telling that you are working for over a year at this New Optimal Language project.

OFF-TOPIC
Besides, I am a little interested in your article, could you post a link?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 19 Nov 2011, 14:21

Well if you want to work on the AI please talk to us about it when you're ready.

We could add acceleration to scrolling but I don't think it matters much.

Yes it would be nice to make shadows alpha blended instead of just a chessboard of black pixels. The problem with converting it is that the sprites are stored in a 8bit colour palette so there's no alpha channel. I think applying the conversion while loading the sprites would be very slow, and if we saved all of the sprites in RGBA we'd have GBs of sprites and loading them in would take a long time (KaM contains almost 11,000 sprites, mostly for units) It'd be nice to do but I'm not sure how we can do it yet... I reckon we'd have to assign a colour from the palette to be 50% alpha but then we need to find an unused colour or replace on of the existing ones.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 19 Nov 2011, 14:22

I don't know whether I'll work on that or not. If it's nessesary I can try to do that, but I'll need developer tools and have to learn the language before.

I can't post links because i don't have enough reputation, but if you write "Anonymus a New Optimal Language" to google than the first it is.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 20 Nov 2011, 07:34

I'm trying to use svn, but I couldn't finished it yet, because it takes hours to download and I had to interrupt it twice. And what tools should I use to compile the source code?

For color palette I would use LEB128 encoding. The first bit marks whether there's another byte coming, the other bits contains the number. It would be still bigger, but not much. I don't know whether there is a free in the color palettes, if yes we don't need LEB128. But It can be used for other things.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 20 Nov 2011, 08:22

Use TortiseSVN to download it and Lazarus (free) or Delphi (commercial) to compile it. (Google for them) Get the 32 bit version of Lazarus even if you have a 64 bit computer because we don't support 64 bit compiling. It shouldn't take hours to download, I can checkout the repository in less than 5 minutes last time I tried.

It would be possible to convert all the sprites to another encoding as you suggested, it would be interesting to see what they look like with proper shadows. I'll discuss it with Krom.
I don't know whether any of the colour slots are free, but all we need is for 1 of the slots to be unused in the units, houses and trees sprite libraries. (assuming we just want to replace the shadows with 50% transparent black all over which should be enough) I reckon that might be the case as KaM used a global palette so I imagine some of the colours used in the GUI would not be used in the units/houses/trees. It wouldn't be hard to do a test.
<<

Danjb

Sword Fighter

Posts: 288

Joined: 14 May 2007, 22:00

Post 20 Nov 2011, 18:24

It would be possible to convert all the sprites to another encoding as you suggested, it would be interesting to see what they look like with proper shadows. I'll discuss it with Krom.
I don't know whether any of the colour slots are free, but all we need is for 1 of the slots to be unused in the units, houses and trees sprite libraries. (assuming we just want to replace the shadows with 50% transparent black all over which should be enough) I reckon that might be the case as KaM used a global palette so I imagine some of the colours used in the GUI would not be used in the units/houses/trees. It wouldn't be hard to do a test.
Just some (perhaps ignorant) thoughts:

Could you not just use a special colour for shadows and have the game interpret it as semi-transparent blackness?

Would it not be a slight legal issue if we converted all the game's graphics into a new format and released them with the remake for anyone to download?
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 20 Nov 2011, 18:26

TortiseSVN is a good tool, Thanks. It took long time, because of my internet connection and I couldn't update with the previous command line tool, just download the whole. I don't like Lazarus's multiwindow system, so I might use it from command line.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 20 Nov 2011, 22:35

Could you not just use a special colour for shadows and have the game interpret it as semi-transparent blackness?
Yes we can, but the KaM sprites only have 256 colours. So we need to find a colour that is unused which is hard when there are so few. But I think some of the later ones are not used on buildings.
Would it not be a slight legal issue if we converted all the game's graphics into a new format and released them with the remake for anyone to download?
The whole KaM Remake project is pretty much illegal anyway. It's not like this will be the first time we've reverse engineered files. But we won't just be uploading a .zip of PNGs somewhere, they will still be in an encoded format so you'll need a tool to read them. (which you can do with the original sprites anyway)
TortiseSVN is a good tool, Thanks. It took long time, because of my internet connection and I couldn't update with the previous command line tool, just download the whole. I don't like Lazarus's multiwindow system, so I might use it from command line.
Hmmm did you checkout the whole repository or only the trunk? Because you don't need the branches or tags folder, that will make it take hours to download. Sorry for not explaining that.
<<

Danjb

Sword Fighter

Posts: 288

Joined: 14 May 2007, 22:00

Post 20 Nov 2011, 23:05

But we won't just be uploading a .zip of PNGs somewhere, they will still be in an encoded format so you'll need a tool to read them. (which you can do with the original sprites anyway)
Ok, that was my main concern.
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 21 Nov 2011, 16:56

Hmmm did you checkout the whole repository or only the trunk? Because you don't need the branches or tags folder, that will make it take hours to download. Sorry for not explaining that.
No problem. I checked out the whole repository, but I could download it at my friend.
<<

tigikamil

Serf

Posts: 5

Joined: 11 Dec 2011, 23:00

Post 12 Dec 2011, 11:54

The AI will work the same as singleplayer if they have AI script commands in the mission file. None of the multiplayer missions I included have this.
However automatic building for the AI has not been added so they need to start with a large village to make it fair.

If you open one of the singleplayer maps in the built-in map editor, then save it as a multiplayer map, it will have the AI script because whoever made the mission designed it for singleplayer with AI.
Basically we just need mission makers to create some missions with well scripted AI players, or edit some of the existing missions.
Hi, maybe you can use the AI from "TPR Single Mission" (Not campain)?
Is this posible?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 12 Dec 2011, 12:05

Hi, maybe you can use the AI from "TPR Single Mission" (Not campain)?
Is this posible?
We could, but as our AI engine doesn't support automatic building it won't help, the AI will still just sit there with only their storehouse. Also, there is basically no AI code for those missions, they don't even have defence positions defined.
<<

Teyrn Leto

Serf

Posts: 7

Joined: 05 Dec 2011, 23:00

Post 14 Dec 2011, 17:31

I'm not sure if this is the right thread to respond to, please correct me if I'm wrong.

I think the AI overall behaves rather nicely for the most part. I've had 2 seperate co-op missions with friends with us against the AI on TSK 7 and 8. In both cases the AI starts attacking us when we were around starting making units which was ideal and kept attacking periodly, this is specially something I note in TSK 7 where the AI, apart from the initial attack, hardly if ever attacks. Overall it was very fun and good and the AI responded rather well to our own attacks. In fact I almost thought we were getting overwhelmed!

However at the TSK 8 mission something weird occured, or at least to 1 of the enemy AI. I noticed the attack groups actually became gradually smaller and created some sort of obsession to attack certain targets. For the westeren barbarian village the north-westeren buildings were marked. For the northen barbarian village they often attacked the northen gold mines from behind the gold mine mountain, which created some funny fire exchanges. Eventually we tire of this and attacked both AI and destroyed them, they defended well though. In fact I'd like to compliment the northen village for unexpectingly sallying forth a large group of mounted units in a flanking manoeuvre seemingly.

If needed, I have the both replay games at disposal. :)

Return to “General / Questions”

Who is online

Users browsing this forum: No registered users and 11 guests