Sorry for the confusion, it's for PC-Engine not NES (which is why I put it in this section). I didn't mention target platform, because that wasn't really what I wanted to discuss. I just wanted to discuss/get ideas about easy AI in general (for said style).
But yeah, I was trying to fit it into pseudo vblank area. PCE has no limits when writing to the SAT in vram, or vram itself (tilemap, tiles, sprites, etc) - but there is a catch; SAT from VRAM is transferred to the internal VDC (PPU equiv) regs on the very first 'defined' line of vblank. So I put the status bar at the bottom of the screen, fire a H-int 64 scanlines before the real vblank (which I have set to line 240) and clear the vblank variable flag. That gives me ~30k cycles for that window of 64 scanlines. The screen is fixed, like Zelda and other japanese 8bit home computer softs of BITD. So I'm not scrolling while running game logic. The map for logic is just the window size (8bit coords, etc). The game is fairly simple. The sprites (as of right now) are 16x16, so that means no meta-sprite cell decoding overhead (although I do use spritesheets for the animation tables). 7% cpu resource is 8k cycles. Way more than I'll probably need for AI itself. I was originally figuring AI+object collision+map collision at 1k cycles per enemy. The spritesheet decode and write to vram SAT has its own time allocation that I already figured for, separate from the 1k figure.
Like I said, it's a simple little game. I just wanted to fit the game logic into that pseudo vblank area (which is about the time for a whole NTSC frame on the NES).
Anyway, I'm just looking for some ideas for doing some AI for enemies - varieties and such. Or quite ways to implement the logic (65x preferably, since the PCE cpu is based on that). Like I mentioned previously, zelda-ish style (legend of xanadu, neutopia, hylide, alttp, soul blazer, etc).
Edit:Bregalad wrote:
Ah, AI is *THE* hardest thing to make about a game. I have the exact same problem as you.
However I managed to partially solve it. The first thing is to have a working "wandering" enemy. Then you copy it and add new features or extra states. Now and then you'll want to have an enemy that is not based on this one, it can either chase the player, or flee, or not move and shoot homing projectiles, or whathever.
For bosses I simply prefer relying on patterns, sometimes with simple random factors. This makes them more predictible therefore easier to defeat and more fun.
Did you find some decent AI routines? I could create more, but I want some polished AI routines. Or at least what devs did back in the day. I don't want it to come off as generic or such. I figured there would be some info out there, or observations/etc.