Pac-Man Evolution
Loading...
Searching...
No Matches
source
Pac-Man_Evolution.h
1
/*----------------------------------------------------------------------
2
Pac-Man Evolution - Roberto Prieto
3
Copyright (C) 2018-2024 MegaStorm Systems
4
contact@megastormsystems.com - http://www.megastormsystems.com
5
6
This software is provided 'as-is', without any express or implied
7
warranty. In no event will the authors be held liable for any damages
8
arising from the use of this software.
9
10
Permission is granted to anyone to use this software for any purpose,
11
including commercial applications, and to alter it and redistribute it
12
freely, subject to the following restrictions:
13
14
1. The origin of this software must not be misrepresented; you must not
15
claim that you wrote the original software. If you use this software
16
in a product, an acknowledgment in the product documentation would be
17
appreciated but is not required.
18
2. Altered source versions must be plainly marked as such, and must not be
19
misrepresented as being the original software.
20
3. This notice may not be removed or altered from any source distribution.
21
22
------------------------------------------------------------------------
23
24
Pac-Man Evolution
25
26
Pac-Man clone. Main features:
27
- 2D environment
28
- 1024x768 with 32bits
29
- Highscore table
30
- 1 player
31
- Procedural and deterministic mazes creation algorithm
32
- Ghosts team IA using neural networks trained with genetic algorithms
33
34
Changelog:
35
- Check History.txt
36
37
------------------------------------------------------------------------ */
38
39
#ifndef PACMANEVOLUTION_H
40
#define PACMANEVOLUTION_H
41
42
// Includes
43
#include "MemoryManager.h"
44
45
// Defines
46
#define GAME_VERSION "Pac-Man Evolution 1.0.1"
47
48
#define PME_BREAK -1
49
#define PME_LOOP 0
50
#define PME_ENTRY 1
51
#define PME_MAZE_END 2
52
#define PME_GAME_OVER 4
53
#define PME_GAME_STANDARD 8
54
#define PME_GAME_EVOLUTION 16
55
#define PME_GAME_WORKBENCH 32
56
#define PME_HOF 64
57
#define PME_EXIT 256
58
59
#define PME_SCREEN_MENU 0
60
#define PME_SCREEN_HOF 1
61
#define PME_SCREEN_GAME 2
62
#define PME_LOGIC_RATE 40
63
64
//#define PME_WORKBENCH_ENABLED // Enable the training mode
65
66
// Global status struct
67
struct
GlobalStatus
68
{
69
GlobalStatus();
70
~GlobalStatus();
71
Sint32 clear();
72
73
Sint32 iRenderScreen;
// PME_SCREEN_MENU, PME_SCREEN_HOF or PME_SCREEN_GAME
74
char
szName[8];
// Name of player, by default set to PacMan string.
75
Sint32 iPoints;
// Store PacMan score across all the mazes.
76
Sint32 iGameType;
// Game type: standard or evolution.
77
Sint32 iHighestScore;
// Game type highest score.
78
Sint32 iLowestScore;
// Game type lowest score.
79
80
// Workbench
81
struct
WorkBench
82
{
83
Sint32 iTraining;
// Training mode (0 disabled and 1 enabled)
84
Sint32 iExecutions;
// Number of executions, by default 100.
85
Sint32 iSpeed;
// 1 for realtime, 2 for 2x, etc.
86
Sint32 iTime;
// Maximum playing time in seconds per maze (0 for no limit)
87
char
szOutputCSV[255];
88
Sint32 iPacManBrain;
89
Sint32 iGhostRedBrain;
90
Sint32 iGhostPinkBrain;
91
Sint32 iGhostBlueBrain;
92
Sint32 iGhostOrangeBrain;
93
} workBench;
94
};
95
96
// MazePoint struct
97
struct
MazePoint :
public
CMemPME
98
{
99
Sint32 iX;
100
Sint32 iY;
101
double
dDistance;
102
Sint32 iReserved;
103
};
104
105
// Points
106
#define PME_POINTS_EAT_PELLET 10
107
#define PME_POINTS_EAT_PELLET_POWER 50
108
#define PME_POINTS_EAT_GHOST 200
109
110
// Maze global vars
111
#define MAZE_WIDTH 28
112
#define MAZE_HEIGHT 31
113
#define MAZE_TILE_SIZE 24
114
115
#endif
Generated by
1.9.6