For the clueless... no this is not based on the Manga, it's one of the very first games i started making and the origin of my "inability to finnish a game" disease.

I was just asked to upload an A.I. demo so i did, thinking it might help others out as well.
Ok B-San, Ninja Scroll was never completed so this is a 'lite' version of what i did so far for stage 4 of the game. It has the basic A.I. principles of what i discussed on my site forums. Keep in mind that i created this like 3+ years ago plus it's not finnished or even polished.
|Program|
I cannot guarantee that the program will work on your system but it was made using dark basic classic which is pretty stable, that's your only assurance

. You can download the program below:
Ninja Scroll
- 3c.dba loads the characters.
- 4aw.dba sets up the world.
- 4i.dba controls the interface.
- 4m.dba is the program core code.
- commoncode.dba contains a custom function i wrote to determine line of sight (very important for stealth games), the dark basic classic version wasn't accurate enough

.
-
4c.dba contains the main AI code.
|Controls|
- WASD + Mouse for general movement.
- QE for cheesy side flips

(part of combat maneuvering).
- Shift to switch stance (normal, stealth, combat).
- Normal stance for quick movement but makes noise.
- Stealth stance for slow movement but more quiet.
- Combat stance + mouse buttons for attacks.
- 1 Sword.
- 2 Climbing gear (to climb trees, figure out how to use it

).
- 3 Smoke bomb (2nd function K.O. bomb).
- 4 Grappling hook (used with climbing gear).
- 5 Darts.
- 6 Ninja Stars. (a Ninja game gotta have the stars!

)
- 7 Health potion.
- 8 Mana Potion.
To retrieve your thrown items move close to them until their highlighted then left mouse click to collect them back. Obviously if you kill a man with a bullet you can't retrieve it!
|HUD|
- Left top is the health display.
- Right top is the mana display.
- Eye tells you when you can be seen.
- Ear tells you when you can be heard.
- was planning on adding smell

but never got around to it.
- Map shows position, orientation and A.I. type of you and enemies (normal, confused and alert).
- Bottom middle is the stance indicator.
- Bottom right shows the current item.
|A.I.|
Nothing special, pretty straightforward. It's not a matter of trying to interprete the (my) code but more about trying to understand the underlying principles (like why i wrote this particular line of code) and creating your own code from what you learnt. Understanding other people's code is very hard!

As for testing the A.I., try doing the following within the program:
- Try approaching the enemy while in the light.
- Try approaching the enemy while in the dark.
- Try making a sound when the enemies back is turned.
- Try using the K.O. gas and watch the enemy as they recover.
- Try using the smoke bomb and watch the enemies reaction.
- Try making sounds while hiding behind a tree.
|Problems|
Code is old school, i could find better ways of doing some of the stuff in there now that i'm a better coder than i was back then. As i've repeatedly said the game wasn't finnished so stuff like sword attacks won't work on the enemy, enemy won't attack you (just stand there stairing at you like a zombie), bugs, glitches etc.
Hope it helps.