gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > AI on the GBA

#35413 - Celeryface - Fri Feb 04, 2005 11:01 am

Hi there,

I was wondering which AI techniques are used widely on the GBA? Is A* used in a lot of games? FSTNs are most likely used.

Are there any optimizations that have been made on AI algorithms for the GBA, or do they basically remain the same as used on other platforms?

:)


Last edited by Celeryface on Fri Feb 04, 2005 4:44 pm; edited 1 time in total

#35432 - jma - Fri Feb 04, 2005 4:15 pm

There's lots of different AI. A* happens to be pathfinding (I assume you already knew this). Based on your map size, A* requires a lot of RAM to execute, and while a speedy algorithm, may be too slow on the GBA to use in real-time.

Also, you haven't really stated what kind of game you are making: turn based strategy (A* should be fine), platform (why do you even need AI beyond walk left/right in a pattern and attack player?), shooter (AI is on a rail based on mob type), board game (alpha-beta), etc. It can make a huge difference.

You really need to be more specific as to your needs and requirements. Right now you've just tossed out a rather generic question and asked if it can work. Well... yes, it can. :-)

Jeff
_________________
massung@gmail.com
http://www.retrobyte.org

#35434 - Celeryface - Fri Feb 04, 2005 4:28 pm

jma wrote:
There's lots of different AI. A* happens to be pathfinding (I assume you already knew this). Based on your map size, A* requires a lot of RAM to execute, and while a speedy algorithm, may be too slow on the GBA to use in real-time.

Also, you haven't really stated what kind of game you are making: turn based strategy (A* should be fine), platform (why do you even need AI beyond walk left/right in a pattern and attack player?), shooter (AI is on a rail based on mob type), board game (alpha-beta), etc. It can make a huge difference.

You really need to be more specific as to your needs and requirements. Right now you've just tossed out a rather generic question and asked if it can work. Well... yes, it can. :-)

Jeff


Yeah, sorry -- I should have been more specific. :)

The first demo I want to do is of similar style to an overhead Bomberman-style game, where the AI would need pathfinding and be able to react to obsticles being added to the path in real-time (bombs, etc).

The second demo I want to do would be similar to an overhead adventure game like Zelda, and use finite state machines for the character behaviour and bosses. :)

Would the pathfinding need to be simplified in any way, or by just simply making the maps not too huge ( like 32 x 32 )?

#35446 - Miked0801 - Fri Feb 04, 2005 9:13 pm

You can do a fast (enough) A* on GBA for an action game. Sims Bustin out used it, LOTR Third Age used it, and heck, I used it back on Heroes of M&M on the GBC a few years back (although it was modified a bit to take less RAM.)

So yeah, you could use it for a bomberman style game. or you could use a pole navigation system instead. Both will work.

#35461 - Celeryface - Sat Feb 05, 2005 2:39 am

Miked0801 wrote:
You can do a fast (enough) A* on GBA for an action game. Sims Bustin out used it, LOTR Third Age used it, and heck, I used it back on Heroes of M&M on the GBC a few years back (although it was modified a bit to take less RAM.)

So yeah, you could use it for a bomberman style game. or you could use a pole navigation system instead. Both will work.


What kind of enhancements did you need to do for A* on the GBA, if any? Are the RAM limitations based on the size of grid map for the nodes?

Also, does anyone know of a good algorithm I could use in C for sorting the open list in A*? I've done A* in C++ and used a heap sort (priority queue), but I'm not going to use C++ on the GBA for these demos. :)

Edit: Also, is a 32x32 node map a good size limit to use A* on for the GBA? Or can the node map size be larger (around 64x64) ?