Author Topic: AI Concepts  (Read 3451 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
AI Concepts
« on: July 03, 2011, 10:28:51 am »
I would like to verify some concepts of building a good AI:

1. The enemy positions should be held in an array, not in the map data?
2. The enemies should be there when you move off the map, then move back, or should they be gone?

I could use some help with this, if anyone has time.

Ashbad

  • Guest
Re: AI Concepts
« Reply #1 on: July 03, 2011, 10:56:21 am »
Well, depends what you're going for.

The initial enemy positions should start out stored near the map data, and copied to a dynamic buffer upon them being "activated" (i.e. you just entered the room they're in) and the stats for them you use should be in the new buffer.  It's your choice if you want to form a way so that the enemies can stay in the same state upon deactivation and reactivation on the same playing session, but for most cases that isn't what's done.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: AI Concepts
« Reply #2 on: July 03, 2011, 10:58:48 am »
Can you help me out with implementation? I'm curious to see how this is done.

Ashbad

  • Guest
Re: AI Concepts
« Reply #3 on: July 03, 2011, 10:59:43 am »
sure, I can provide a quick example -- what language, how many enemies per screen, size of enemies?

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: AI Concepts
« Reply #4 on: July 03, 2011, 11:31:37 am »
A quick suggestion for enemies is to give each type of enemy a set of "rules" that it follows in order to be run.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: AI Concepts
« Reply #5 on: July 03, 2011, 11:48:43 am »
language is z80. Max is 4 enemies per screen. Their spawn locations can be random on that screen. Enemies are 1 tile by 1 tile (or 8 px by 8 px). Movement should be partially random, partially attack of user-controlled player.
« Last Edit: July 03, 2011, 03:06:09 pm by ACagliano »