-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,4 @@ dkms.conf | |
/tests/configuration.yml | ||
/tests/bin/Debug/netcoreapp3.1 | ||
/gba-demo.sav | ||
/.vs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
#ifndef ENEMY_AI_H | ||
#define ENEMY_AI_H | ||
|
||
#include "level.h" | ||
|
||
// perhaps have this fit some kind of entity_ai interface | ||
// throw all of this in an `ai` folder | ||
|
||
typedef struct entity_ai_s // enemy, player, follow, dummy, etc... | ||
{ | ||
// entity_id | ||
|
||
// ai_state | ||
// 40 byte limit | ||
|
||
// ai_type => function pointer to update function // needs to be persistent | ||
|
||
} entity_ai_t; | ||
|
||
|
||
//----------------------------------------------------------------------------- | ||
typedef struct enemy_ai_state_s | ||
{ | ||
// state | ||
|
||
// last known player position | ||
// time since last seen player | ||
|
||
// patrol waypoints ? | ||
|
||
} enemy_ai_state_t; | ||
|
||
typedef enemy_ai_state_t* enemy_ai_state_ptr; | ||
|
||
|
||
//----------------------------------------------------------------------------- | ||
void enemy_ai_update(entity_ptr entity); | ||
|
||
/* | ||
hidden ... | ||
not yet in the level | ||
patrol ... | ||
follow predefined waypoints | ||
check for line of sight to player - perhaps use navigation data to determine this. | ||
pursue the player ... (hunting) | ||
check for losing sight of player | ||
if in range attack player | ||
if out of sight for a certain amount of time, return to patrol | ||
flee ... | ||
should all reset between levels | ||
generate sounds ... | ||
*/ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
#include "common/input/input.h" | ||
|
||
|
||
// refactor to player_ai.h | ||
|
||
/* | ||
idle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters