Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Any way to make AI less resource demanding?

Author
Message
HellsDevilDog
13
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 23rd Nov 2011 06:32
Just a quick question, Is there any way to make Dark AI less resource demanding? Like, to have a few hundred able (For a RTS). Or should I just try working out my own AI system? (Or any alternative to DarkAI?)

Thanks!
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 30th Nov 2011 15:51
you best of luck is to make your own AI system if you do not want to use the dark ai... but if your RTS game is running to slow maybe it is your media loading into your game. If you do not use .dbo files, use them instead of .3DS or .x, etc. you could also use lower amount of polygons in your game also (could replace some 3d models with sprites if possible). I tend to use GDK because it tends to run better for me then dbpro, but that is my opinion.

sov the game creator!
HellsDevilDog
13
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 1st Dec 2011 15:48 Edited at: 1st Dec 2011 15:48
Thanks for the reply ^^

I think I'll just work out my own AI system then, I have a few ideas I may try out soon.

And as for the media, Already using the .dbo format, thanks though

but if I replace the .dbo item with say the "Make object box" command, It still lags. but not too surprised as I tried loading 500 AI

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Dec 2011 15:53
sounds daft but it may be the for next loop thats slowing it down.

try a while / endwhile it might be a bit quicker but not much.

Dark Physics makes any hot drink go cold.
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 5th Dec 2011 20:58
Quote: "try a while / endwhile it might be a bit quicker but not much."


Nah, the for loop is faster in DBPRO; why? because the for loop does not perform as many internal checks as the while, do and repeat loops.

Quote: "but if I replace the .dbo item with say the "Make object box" command, It still lags."

Use instance or clone object instead; loading and creating is always slower than not loading or creating anything; reuse what is already loaded or created. Use clone object if you do not want the object to depend on the existence and properties of its source.

As for loading, get most, if not all of what you need loaded during loading time; before the game begins.

Quote: "Or should I just try working out my own AI system? (Or any alternative to DarkAI?)"


Ditching DarkAI is up to you, but for me, reinventing the wheel while Ferrari drivers are roaring past, isn't my idea of a good way to spend life. Consider the thousands of lines of code to get your own system up to DarkAI standards, then the other code that actually creates the RTS.

To speed up DarkAI, you have to control how many AI entities are thinking at the same time. Right now you have 500 units trying to figure out if any enemies are nearby and whether they are colliding into an obstacle, and who they can or cannot see, and if they are enemies or friends, all at once. As standard the system is suitable for FPS with 9 or 10 AI in a number of rooms seperated into containers.

You need to organize your units into groups and containers to work best with an RTS; and disable containers when the AI inside them do not really need to be thinking about anything.

All in all, the RTS is a difficult genre to build on your own; and DarkAI needs tweaking to work with teams, unit types, formations and strategies. But with practice and research you can do it.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 6th Dec 2011 15:32
check out this AI command.

AI SET ENTITY STANCE

allows you set how they behave

Dark Physics makes any hot drink go cold.
HellsDevilDog
13
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 8th Dec 2011 09:29
Thanks for the replies everyone, I'll mess around with it more soon and try out what's suggested, If worse comes to worst then I'll just have to work out my own AI system. I wouldn't try to get it to DarkAI's standards, But would try to copy the AI off "Empire earth 2". Just check who's on what team, distance from one another (For both firing ranges and collision detection), and move to location.

But still, easier said than done

Login to post a reply

Server time is: 2024-03-29 14:31:16
Your offset time is: 2024-03-29 14:31:16