From 6823e8e5171fd24e132273321eae44501d7e1f7b Mon Sep 17 00:00:00 2001 From: Patrick Rye Date: Thu, 3 Sep 2015 14:26:56 -0400 Subject: [PATCH 1/5] Small Push Getting ready to start work on v4.1.2 --- Documentation/ChangeLog.md | 11 +++++++---- Source/version.h | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Documentation/ChangeLog.md b/Documentation/ChangeLog.md index e35dde6..ade8bcd 100644 --- a/Documentation/ChangeLog.md +++ b/Documentation/ChangeLog.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented here. This project adheres to [Semantic Versioning](http://semver.org/) +## UNRELEASED [4.1.2] - 2015-09-03 + + +## Old versions + +``` + ## [4.1.1] - 2015-09-03 ### Fixed @@ -10,10 +17,6 @@ This project adheres to [Semantic Versioning](http://semver.org/) * A bug with screen height being linked to player height causing screen to be a bit strange. -## Old versions - -``` - ## [4.1.0] - 2015-09-03 ### Added diff --git a/Source/version.h b/Source/version.h index b6116df..d6ed268 100644 --- a/Source/version.h +++ b/Source/version.h @@ -14,13 +14,13 @@ //Standard Version Type #define DEFINED_VER_MAJOR 4 #define DEFINED_VER_MINOR 1 -#define DEFINED_VER_PATCH 1 +#define DEFINED_VER_PATCH 2 //Miscellaneous Version Types //Don't forget to increment the build number before each build -#define DEFINED_VER_RC_FILEVERSION 4,1,1,4 -#define DEFINED_VER_RC_FILEVERSION_STRING "4, 1, 1, 4\0" -#define DEFINED_VER_FULLVERSION_STRING "4.1.1" +#define DEFINED_VER_RC_FILEVERSION 4,1,2,0 +#define DEFINED_VER_RC_FILEVERSION_STRING "4, 1, 2, 0\0" +#define DEFINED_VER_FULLVERSION_STRING "4.1.2-alpha.0" //Software Status #define DEFINED_VER_STATUS "Alpha" From 7cd52955427cfe635ec4a0dddbafccc3a9ebc069 Mon Sep 17 00:00:00 2001 From: Patrick Rye Date: Thu, 3 Sep 2015 14:55:45 -0400 Subject: [PATCH 2/5] Added Todos Added some to dos --- Source/screen.cpp | 3 +++ Source/screen.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Source/screen.cpp b/Source/screen.cpp index 19f2578..cbb9023 100644 --- a/Source/screen.cpp +++ b/Source/screen.cpp @@ -127,6 +127,7 @@ clsScreen::clsScreen() { if (Global::blnDebugMode) {printf("Monster loading successful\n");} } + /* TODO (GamerMan7799#3#): Embed Error Picture; then if a picture cannot be loaded load that instead with an error message */ path = DEFINED_DEFAULT_IMAGE_PATH; path += "error.png"; @@ -137,6 +138,7 @@ clsScreen::clsScreen() { if (Global::blnDebugMode) {printf("Error loading successful\n");} } + /* TODO (GamerMan7799#4#): If Font doesn't load just don't write messages instead of exiting the whole program */ MessageFont = TTF_OpenFont(DEFINED_MESSAGE_FONT,16); //Opens font and sets size if (MessageFont == nullptr) { printf("Failed to open font style.\n"); @@ -362,6 +364,7 @@ void clsScreen::writemessage(void) { char strPlayerNum[3]; char strFitness[6]; + /* TODO (GamerMan7799#5#): Somehow detect if over wall and change color of text */ std::string message; sprintf(strClock, "%8u", Global::Tick.getClockTime()); diff --git a/Source/screen.h b/Source/screen.h index d9a8434..62ee996 100644 --- a/Source/screen.h +++ b/Source/screen.h @@ -34,6 +34,7 @@ class clsScreen { private: + /* TODO (GamerMan7799#6#): Group these together somehow. Namespace or Struct */ SDL_Texture *player; SDL_Texture *monster; SDL_Texture *wall; @@ -55,6 +56,7 @@ class clsScreen { //Keeps track of which parts have been loaded //so when ending only the ones that are open //are closed + /* TODO (GamerMan7799#6#): Group these together somehow. Namespace or Struct */ bool blnWindow; bool blnRenderer; bool blnSky; From f7c3acbdb494d690f928c082a3c9108bd71f4794 Mon Sep 17 00:00:00 2001 From: Patrick Rye Date: Thu, 3 Sep 2015 16:05:38 -0400 Subject: [PATCH 3/5] Update to v4.1.2-beta.1 -Fixed Vsnyc bug -Fixed Screen being jumpy as player moves -Player can now do NOTHING!! WOW! --- Documentation/ChangeLog.md | 10 ++++++++++ Source/entity.cpp | 8 ++++---- Source/screen.cpp | 18 ++++++++++++------ Source/version.h | 10 +++++----- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/Documentation/ChangeLog.md b/Documentation/ChangeLog.md index ade8bcd..fcdca20 100644 --- a/Documentation/ChangeLog.md +++ b/Documentation/ChangeLog.md @@ -5,6 +5,16 @@ This project adheres to [Semantic Versioning](http://semver.org/) ## UNRELEASED [4.1.2] - 2015-09-03 +### Fixed + +* VSnyc bug +* Screen being jumpy as the player moves (screen is locked on the first 35 spaces until + player goes to the 36th spot then it will be locked on the next 35 spaces, and so on.) + +### Added + +* Player can now to nothing! Wow! + ## Old versions diff --git a/Source/entity.cpp b/Source/entity.cpp index f8771a2..f9a7ff9 100644 --- a/Source/entity.cpp +++ b/Source/entity.cpp @@ -50,7 +50,7 @@ void clsEntity::nextplayer(char death) { if (CnfgValues.blnLogging) { switch (plyPlayer.direction[i]) { case dirNone : - //Do nothing + fprintf(logFile," _"); break; case dirUp : fprintf(logFile," ↑"); @@ -137,7 +137,7 @@ void clsEntity::newplayer(void) { uint uRandSection, uTempStep = 0; if (uchrGenNum == 1) { //First Generation - for (uint i = 0; i < CnfgValues.uintFirstGen; i++) {plyPlayer.direction[i] = (uint)(rand() % (dirRight) + dirUp);} + for (uint i = 0; i < CnfgValues.uintFirstGen; i++) {plyPlayer.direction[i] = (uint)(rand() % dirDown);} for (uint i = CnfgValues.uintFirstGen; i < DEFINED_MAX_PLAYER_STEPS; i++ ) {plyPlayer.direction[i] = dirNone;} } else { //Growth Phase & Steady phase do { @@ -145,14 +145,14 @@ void clsEntity::newplayer(void) { uRandSection = (uint)(rand() % ((uintGenSteps - uTempStep)) + uTempStep); if (Global::blnDebugMode) {printf("Player %d Section of %d\n",uchrRandPlayer,uRandSection);} for (uint j = uTempStep; j <= uRandSection; j++) { - if ((uint)(rand() % 100) < CnfgValues.uintMutationChance) {plyPlayer.direction[j] = (uint)(rand() % (dirRight) + dirUp);} + if ((uint)(rand() % 100) < CnfgValues.uintMutationChance) {plyPlayer.direction[j] = (uint)(rand() % dirDown);} else {plyPlayer.direction[j] = genBestPlayers[uchrRandPlayer].direction[j];} }//End for uTempStep = uRandSection; } while (uTempStep < uintGenSteps - 1); if (uintGenSteps + CnfgValues.uintGenIncrease < DEFINED_MAX_PLAYER_STEPS) { - for (uint k = 0; k < uintGenSteps + CnfgValues.uintGenIncrease; k++) {plyPlayer.direction[k] = (uint)(rand() % (dirRight) + dirUp);} + for (uint k = 0; k < uintGenSteps + CnfgValues.uintGenIncrease; k++) {plyPlayer.direction[k] = (uint)(rand() % dirDown);} } } } diff --git a/Source/screen.cpp b/Source/screen.cpp index cbb9023..c9218e2 100644 --- a/Source/screen.cpp +++ b/Source/screen.cpp @@ -57,7 +57,7 @@ clsScreen::clsScreen() { if (Global::blnDebugMode) {printf("Window creation successful\n");} } - ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); + ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED); if (ren == nullptr) { printf("SDL Failed to create renderer.\n"); error(); @@ -169,11 +169,16 @@ clsScreen::~clsScreen() { /**********************************************************************************************************************************************************************/ void clsScreen::update(void) { PLYR tempPlayer = Global::Enty.getPlayer(); - + /* FIXME (GamerMan7799#1#): When player goes to the left the screen becomes white + (because it tries to reference a negative array spot). */ uint Max_Height, Max_Width; //Values for how far on the map the screen should render + uint x_start; //place where x starts at Max_Height = (uint) (height/pic_size); Max_Width = (uint) (width/pic_size); + //This will cause the screen to move in different segments at a time. + x_start = (uint) (round (tempPlayer.location.x / Max_Width) ) * Max_Width; + //clear renderer SDL_RenderClear(ren); @@ -184,9 +189,9 @@ void clsScreen::update(void) { //Start updating texture placements for (uint y = 0; (y < (Max_Height)) && (y < DEFINED_MAP_HEIGHT); y++) { - for (uint x = (tempPlayer.location.x - 5); (x < (tempPlayer.location.x + Max_Width - 5)) && (x < DEFINED_MAP_WIDTH); x++) { + for (uint x = x_start; (x < (x_start + Max_Width)) && (x < DEFINED_MAP_WIDTH); x++) { //update where we're trying to put the texture. - dst.x = (x - tempPlayer.location.x + 5) * pic_size; + dst.x = x * pic_size; dst.y = /*(y - tempPlayer.location.y + 10)*/ y * pic_size; //Query a texture to get its width and height //Since all textures are the same it doesn't matter which one we use @@ -331,6 +336,7 @@ void clsScreen::playerDeath(void) { //3 spaces then down about 4 spaces (depending on starting point) //the whole thing happens in 5 frames. + /* TODO (GamerMan7799#1#): Add tileDeadPlayer with its own image to better till when the death animation is happening */ PLYR tempPlayer; tempPlayer = Global::Enty.getPlayer(); //show(); @@ -405,10 +411,10 @@ void clsScreen::writemessage(void) { message = "Generation: "; valuesscanned = sprintf(strGenNum, "%2u", Global::Enty.uchrGenNum); if (valuesscanned >= 1) {message += strGenNum;} - message += " Player: "; + message += " Player: "; valuesscanned = sprintf(strPlayerNum, "%3u", Global::Enty.uchrPlayerNum); if (valuesscanned >= 1) {message += strPlayerNum;} - message += " Fitness: "; + message += " Fitness: "; valuesscanned = sprintf(strFitness, "%3.2f", tempPlayer.fitness); if (valuesscanned >= 1) { message += strFitness;} if (Global::blnDebugMode) {printf("Message written.\n");} diff --git a/Source/version.h b/Source/version.h index d6ed268..7856471 100644 --- a/Source/version.h +++ b/Source/version.h @@ -18,13 +18,13 @@ //Miscellaneous Version Types //Don't forget to increment the build number before each build -#define DEFINED_VER_RC_FILEVERSION 4,1,2,0 -#define DEFINED_VER_RC_FILEVERSION_STRING "4, 1, 2, 0\0" -#define DEFINED_VER_FULLVERSION_STRING "4.1.2-alpha.0" +#define DEFINED_VER_RC_FILEVERSION 4,1,2,7 +#define DEFINED_VER_RC_FILEVERSION_STRING "4, 1, 2, 7\0" +#define DEFINED_VER_FULLVERSION_STRING "4.1.2-beta.1" //Software Status -#define DEFINED_VER_STATUS "Alpha" -#define DEFINED_VER_STATUS_SHORT "a" +#define DEFINED_VER_STATUS "Beta" +#define DEFINED_VER_STATUS_SHORT "b" /* Software Status can be the following: From 042a0e796a936ef981e1a83f8a7ca1ae7f1bf622 Mon Sep 17 00:00:00 2001 From: Patrick Rye Date: Fri, 4 Sep 2015 10:18:52 -0400 Subject: [PATCH 4/5] Update to v4.1.2-rc.1 04 September 2015 Released version 4.1.2-rc.1 Change log: -Changed: Error image is now embedded so that even if it cannot load images; it will show the error pictures instead. -Changed: If font cannot be loaded, messages won't appear instead of program closing -Fixed: Font loading issue on Cygwin -Fixed: Tile Placement issue past first 35 spots --- Cleanup.bat | 45 +++ Compile-Debug.bat => Debug/Compile-Debug.bat | 2 +- Compile-Final.bat => Debug/Compile-Final.bat | 2 +- Debug/Object-Builder.sh | 2 +- Debug/complie.sh | 16 +- Documentation/ChangeLog.md | 99 +++-- Documentation/Credits.md | 9 +- .../Library Licenses/LICENSE-SDL2.txt | 29 ++ .../Library Licenses/LICENSE.SDL2-Image.txt | 20 ++ .../Library Licenses/LICENSE.SDL2-TTF.txt | 20 ++ .../Library Licenses/LICENSE.freetype.txt | 173 +++++++++ .../Library Licenses/LICENSE.png.txt | 114 ++++++ .../Library Licenses/LICENSE.zlib.txt | 31 ++ Documentation/Library Licenses/Readme.md | 19 + Documentation/Manual.md | 22 +- Documentation/ReadMe.md | 6 +- Documentation/ToDo.md | 4 +- Images/Readme.md | 55 +++ Images/coin.bmp | Bin 2442 -> 0 bytes Images/coin.png | Bin 0 -> 624 bytes Images/error.bmp | Bin 2442 -> 0 bytes Images/monster.bmp | Bin 2442 -> 0 bytes Images/monster.png | Bin 0 -> 1601 bytes Images/player.bmp | Bin 2442 -> 0 bytes Images/player.png | Bin 0 -> 864 bytes Images/pole.bmp | Bin 2442 -> 0 bytes Images/pole.png | Bin 0 -> 244 bytes Images/sky.bmp | Bin 2442 -> 0 bytes Images/sky.png | Bin 0 -> 136 bytes Images/wall.bmp | Bin 2442 -> 0 bytes Images/wall.png | Bin 0 -> 869 bytes Makefile | 2 +- Project/Experimental-Platformer-AI.cbp | 12 +- ...{NP++ Workspace.txt => NP Workspace.txt} | 11 +- README.md | 57 ++- Source/config.cpp | 46 ++- Source/entity.cpp | 188 ++++------ Source/entity.h | 25 +- Source/image_error.xpm | 337 ++++++++++++++++++ Source/main.cpp | 122 ++----- Source/main.h | 12 +- Source/map.cpp | 71 +--- Source/screen.cpp | 286 +++++++++++---- Source/screen.h | 23 +- Source/tick.cpp | 23 +- Source/tick.h | 3 + Source/version.h | 22 +- 47 files changed, 1427 insertions(+), 481 deletions(-) create mode 100644 Cleanup.bat rename Compile-Debug.bat => Debug/Compile-Debug.bat (97%) rename Compile-Final.bat => Debug/Compile-Final.bat (98%) create mode 100644 Documentation/Library Licenses/LICENSE-SDL2.txt create mode 100644 Documentation/Library Licenses/LICENSE.SDL2-Image.txt create mode 100644 Documentation/Library Licenses/LICENSE.SDL2-TTF.txt create mode 100644 Documentation/Library Licenses/LICENSE.freetype.txt create mode 100644 Documentation/Library Licenses/LICENSE.png.txt create mode 100644 Documentation/Library Licenses/LICENSE.zlib.txt create mode 100644 Documentation/Library Licenses/Readme.md create mode 100644 Images/Readme.md delete mode 100644 Images/coin.bmp create mode 100644 Images/coin.png delete mode 100644 Images/error.bmp delete mode 100644 Images/monster.bmp create mode 100644 Images/monster.png delete mode 100644 Images/player.bmp create mode 100644 Images/player.png delete mode 100644 Images/pole.bmp create mode 100644 Images/pole.png delete mode 100644 Images/sky.bmp create mode 100644 Images/sky.png delete mode 100644 Images/wall.bmp create mode 100644 Images/wall.png rename Project/{NP++ Workspace.txt => NP Workspace.txt} (79%) create mode 100644 Source/image_error.xpm diff --git a/Cleanup.bat b/Cleanup.bat new file mode 100644 index 0000000..f1f3b20 --- /dev/null +++ b/Cleanup.bat @@ -0,0 +1,45 @@ +@echo off +:: This batch file will go through the folders and delete files that are not needed. +:: Once again really just for personal use +:: There are a lot of random files that get throw about, this batch file will delete them if they are there. +:: because I'm too lazy to go searching for them myself, but I want to keep my folders clean. + +echo Cleaning Debug Folder... +IF EXIST %~dp0Debug\build.rasm.log del /F %~dp0Debug\build.rasm.log +IF EXIST %~dp0Debug\PlatformerExperiment-PRIVATE.exe.stackdump del /F %~dp0Debug\PlatformerExperiment-PRIVATE.exe.stackdump +echo. + +echo Cleaning Project Folder... +IF EXIST %~dp0Project\bin RMDIR /S /Q %~dp0Project\bin +IF EXIST %~dp0Project\obj RMDIR /S /Q %~dp0Project\obj +IF EXIST %~dp0Project\Experimental-Platformer-AI.depend del /F %~dp0Project\Experimental-Platformer-AI.depend +IF EXIST %~dp0Project\Experimental-Platformer-AI.layout del /F %~dp0Project\Experimental-Platformer-AI.layout +echo. + +echo Cleaning Resources Folder... +IF EXIST %~dp0Resource\boilerplate.res del /F %~dp0Resource\boilerplate.res +echo. + +echo Cleaning Source Folder... +IF EXIST %~dp0Source\main.o del /F %~dp0Source\main.o +IF EXIST %~dp0Source\config.o del /F %~dp0Source\config.o +IF EXIST %~dp0Source\map.o del /F %~dp0Source\map.o +IF EXIST %~dp0Source\entity.o del /F %~dp0Source\entity.o +IF EXIST %~dp0Source\tick.o del /F %~dp0Source\tick.o +IF EXIST %~dp0Source\screen.o del /F %~dp0Source\screen.o +echo. + +echo Cleaning Main Folder... +IF EXIST %~dp0Config.ini del /F %~dp0Config.ini +IF EXIST %~dp0gmon.out del /F %~dp0gmon.out +IF EXIST %~dp0Images.rar del /F %~dp0Images.rar +IF EXIST %~dp0Images.zip del /F %~dp0Images.zip +IF EXIST %~dp0PlatformerExperiment.exe del /F %~dp0PlatformerExperiment.exe +IF EXIST %~dp0PlatformerExperiment-PRIVATE.exe del /F %~dp0PlatformerExperiment-PRIVATE.exe +IF EXIST %~dp0PlatformerExperiment del /F %~dp0PlatformerExperiment +IF EXIST %~dp0PlatformerExperiment-PRIVATE del /F %~dp0PlatformerExperiment-PRIVATE +IF EXIST %~dp0Player.log del /F %~dp0Player.log +echo. + +echo All cleaning done. + diff --git a/Compile-Debug.bat b/Debug/Compile-Debug.bat similarity index 97% rename from Compile-Debug.bat rename to Debug/Compile-Debug.bat index 8c16423..5862262 100644 --- a/Compile-Debug.bat +++ b/Debug/Compile-Debug.bat @@ -50,7 +50,7 @@ echo. ::Complie everything together! echo Linking everything together... -g++ -std=c++11 -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -L%~dp0SDL2Stuff\lib -Wall -Wextra -g -DDEFINED_BUILD_MODE_PRIVATE -o PlatformerExperiment-PRIVATE.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -pg -lgmon -lmingw32 -lSDL2main -lSDL2 +g++ -std=c++11 -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -L%~dp0SDL2Stuff\lib -Wall -Wextra -g -DDEFINED_BUILD_MODE_PRIVATE -o PlatformerExperiment-PRIVATE.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -pg -lgmon -lmingw32 -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF echo. ::Delete all the leftover parts diff --git a/Compile-Final.bat b/Debug/Compile-Final.bat similarity index 98% rename from Compile-Final.bat rename to Debug/Compile-Final.bat index 0ec7b0c..9ec37a9 100644 --- a/Compile-Final.bat +++ b/Debug/Compile-Final.bat @@ -49,7 +49,7 @@ echo. ::Complie everything together! echo Linking everything together... -g++ -std=c++11 -LC:\MinGW\lib -L..\SDL2Stuff\lib -w -Os -s -o PlatformerExperiment.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -lmingw32 -lSDL2main -lSDL2 +g++ -std=c++11 -LC:\MinGW\lib -L..\SDL2Stuff\lib -w -Os -s -o PlatformerExperiment.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -lmingw32 -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF echo. ::Delete all the leftover parts diff --git a/Debug/Object-Builder.sh b/Debug/Object-Builder.sh index 412d102..b8f953a 100644 --- a/Debug/Object-Builder.sh +++ b/Debug/Object-Builder.sh @@ -1,3 +1,3 @@ #This will make a dump of the objects for the exe #use this with the stackdump to figure out what went wrong. -objdump -D -S ../Platformer-Experiment-PRIVATE.exe > build.rasm.log +objdump -D -S ../PlatformerExperiment-PRIVATE.exe > build.rasm.log diff --git a/Debug/complie.sh b/Debug/complie.sh index e3d2555..2a9aba3 100644 --- a/Debug/complie.sh +++ b/Debug/complie.sh @@ -7,25 +7,25 @@ rm Platformer-Experiment-PRIVATE.exe #Move to the Resources directory cd ./Resources/ #Complie the resource files of the icon and boilerplate -windres my_icon.rc -O coff my_icon.res windres boilerplate.rc -O coff boilerplate.res #Move to the source folder cd ../Source #Complie each of the cpp files -g++ -std=c++11 -Wall -Wextra -pg -g -c main.cpp -g++ -std=c++11 -Wall -Wextra -pg -g -c config.cpp -g++ -std=c++11 -Wall -Wextra -pg -g -c map.cpp -g++ -std=c++11 -Wall -Wextra -pg -g -c entity.cpp -g++ -std=c++11 -Wall -Wextra -pg -g -c tick.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c main.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c config.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c map.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c entity.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c tick.cpp +g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c screen.cpp #Move back to the main directory cd ../ #Complie everything together! -g++ -std=c++11 -Wall -Wextra -pg -g -o Platformer-Experiment-PRIVATE.exe ./Source/main.o ./Source/config.o ./Source/map.o ./Source/entity.o ./Source/tick.o ./Resources/my_icon.res ./Resources/boilerplate.res +g++ -std=c++11 -L./SDL2Stuff/lib -Wall -Wextra -pg -g -o PlatformerExperiment-PRIVATE.exe ./Source/main.o ./Source/config.o ./Source/map.o ./Source/entity.o ./Source/tick.o ./Source/screen.o ./Resources/boilerplate.res -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF #Delete all the leftover parts rm ./Resources/boilerplate.res -rm ./Resources/my_icon.res rm ./Source/main.o rm ./Source/config.o rm ./Source/map.o rm ./Source/entity.o rm ./Source/tick.o +rm ./Source/screen.o \ No newline at end of file diff --git a/Documentation/ChangeLog.md b/Documentation/ChangeLog.md index 2b4e70e..a2d5e5f 100644 --- a/Documentation/ChangeLog.md +++ b/Documentation/ChangeLog.md @@ -3,13 +3,50 @@ All notable changes to this project will be documented here. This project adheres to [Semantic Versioning](http://semver.org/) -## UNRELEASED [4.1.0] - 2015-08-28 +## UNRELEASED [4.1.2] - 2015-09-04 + +### Fixed + +* VSnyc bug +* Screen being jumpy as the player moves (screen is locked on the first 35 spaces until + player goes to the 36th spot then it will be locked on the next 35 spaces, and so on.) +* Font loading issue on Cygwin + +### Added + +* Player can now to nothing! Wow! + +### Changed + +* Error image is now embedded so that even if it cannot load images; it will show the error pictures instead. +* If font cannot be loaded, messages won't appear instead of program closing + + +## Old versions + +``` + +## [4.1.1] - 2015-09-03 + +### Fixed + +* A bug with screen height being linked to player height causing screen to be a bit strange. + +### Note + +* In this release I accidently left DEFINED_VER_STATUS as "Alpha" which means that the config file will always be replaced. + + +## [4.1.0] - 2015-09-03 ### Added * Debug Compile batch file as well as a final Compile batch * SDL graphics for show map. -* Place holder bitmaps for map tiles +* SDL TTF for text on screen. +* SDL Image for loading pngs. +* Place holder png for map tiles +* Note to ReadMe explaining that you HAVE to use SDL 2.0.4 ### Changed @@ -18,6 +55,11 @@ This project adheres to [Semantic Versioning](http://semver.org/) * Complie batch files updated for changes. * Default Show Map from false to true * Makefile with changes. +* Config Version check now also checks software status. +* Player Death anaimation will now show when player runs out of inputs +* Player death is now logged. +* Player can now die from too low fitness in hard mode. +* Tick wait is decreased the longer the rest of the program runs for ### Removed @@ -27,66 +69,44 @@ This project adheres to [Semantic Versioning](http://semver.org/) ### Fixed * Private build define not properly registering in boilerplate +* Prompt for using old config not working -## Old versions - -``` - ## [4.0.0] - 2015-08-21 ### Notes * This version has a completely rewritten code; I'll to remember the major things that are different but I may have forgotten stuff. - * The main point of this rewrite was to improve the structure of the code so later changes are easier as opposed to adding a bunch of new features. - * This was one big pain of a rewrite but hopefully it'll make things easier to improve upon in the future. ### Removed * Generate Random Number Function as it was quite useless - * Windows.h library requirement - * The increase chance of the player with the highest fitness being selected over the other players. ### Changed * Spilt the program into a lot more .cpp to better organize everything - * Change complier from Cygwin to MinGW - * Changed the icon (same author just different coloring) - * Change log around so that the bullet points appear - * The Read Me so that it is not off putting to the people who find the code. As well as better explain it. ### Added * Classes - * Tick with universal "sleep" - * More debug messages. - * More comments. - * Makefile for Linux builds. - * Compile.bat for MinGW Windows builds. - * Debug Folder with some debug scripts - * Documentation Folder for documentation - * Count down that will kill player when it reaches 0. - * Define of Best Players - * Naming Notation - * A short death animation ## [3.3.0] - 2015-08-05 @@ -98,24 +118,18 @@ This project adheres to [Semantic Versioning](http://semver.org/) ### Changed * The icon (like 3 times because I can't decide what I want) - * File version numbering changed slightly in boilerplate For File Version it goes [MAJOR].[MINOR].[PATCH].[BUILD NUMBER] This is mostly just when I am working on the new RC. It won't be reflected in the Product Version which will still follow [MAJOR].[MINOR].[PATCH] * Boilerplate.rc around to make changes to it easier to do. - * Easier to change log name - * Generation number added to log - * At the end of a generation a line is made in the log to help divide them easier - * Log name from "log.txt" to "player.log" This so that now that I have GitHub on my computer I can set it to ignore *.log rather than *.txt - * How "Mating" is done to make the New generation ### Fixed @@ -124,41 +138,33 @@ This project adheres to [Semantic Versioning](http://semver.org/) so I fixed that. - ## [3.2.0] - 2015-08-04 ### Changed * Player gets fitness boost for killing a monster - * Monster from "O" to "+" - * Name from Mario to Platformer! (Please don't sue me Nintendo!) ### Added * Coins (are "O") - * Score for player. Goes up after collecting coins, and killing monsters. Weighs into fitness (I did this because under hard mode these actions would not effect fitness) - ## [3.1.0] - 2015-08-04 ### Added * Multiple jumps allowed; it is configurable - * Configurable Jump height ### Changed * How player falling is handled. - * Config functions split into its own .cpp - * Changed Monster symbol from '?' to 'O' ### Fixed @@ -167,7 +173,6 @@ This project adheres to [Semantic Versioning](http://semver.org/) restarting the map before I recorded the fitness -_- - ## [3.0.0] - 2015-08-04 ### Changed @@ -179,17 +184,13 @@ restarting the map before I recorded the fitness -_- * Max Player Steps (Cannot be greater than 65535) * Players per Generation (Cannot be less than 10) * Sleep Time - * Mario.h - a basic header to clean up the main code - * Base map moved to Mario.h - ## [2.1.0] - 2015-08-03 ### Added - * Program now checks version number written to config file with its own if the numbers do not match it will overwrite the old file with a new one this is to prevent program crashing bugs if I add something to a new config @@ -202,21 +203,17 @@ restarting the map before I recorded the fitness -_- * A player "jumping" on a monster will kill it. - ## [2.0.0] - 2015-08-01 ### Added * "Hard Mode" in config - * With this enabled players die under more conditions ### Changed * Fitness drop from frames increased. - * Code performance increased (removed unneeded for loops) - * Map up a bit to increase the chances of a player making it through ### Removed @@ -224,7 +221,6 @@ restarting the map before I recorded the fitness -_- * A lot of debugging lines I commented out - ## [1.2.1] - 2015-08-01 ### Fixed @@ -275,13 +271,9 @@ restarting the map before I recorded the fitness -_- ### Fixed * A monster walking into a player will kill them - * A player attempting to jump with a block two spaces above them will only jump 1 block - * Player can no longer jump through a 1 block high platform - * Generation counter is fixed - * Certain areas of the map that were impassable @@ -299,7 +291,6 @@ restarting the map before I recorded the fitness -_- ### Added * Change Log - * Config file so I don't have to keep recompiling to test stuff ### Notes diff --git a/Documentation/Credits.md b/Documentation/Credits.md index 97b6e7f..8110e68 100644 --- a/Documentation/Credits.md +++ b/Documentation/Credits.md @@ -3,12 +3,11 @@ We would like to thank the following people for their work and support (knowingly or not) towards this project. ``` +[Daniele De Santis] (http://www.danieledesantis.net/) for his icon that is currently being used for the project. +The Developers of the [SDL Library] (https://www.libsdl.org/credits.php) -Daniele De Santis for his icon that is currently being used for the project. - -The People at C-For-Dummies.com for their example code [Here] (http://c-for-dummies.com/blog/?p=69) - +Mr Foo for his amazing tutorial on SDL, which can be found [here](http://lazyfoo.net/) +Sam Lantinga for his SDL TTF library ``` - diff --git a/Documentation/Library Licenses/LICENSE-SDL2.txt b/Documentation/Library Licenses/LICENSE-SDL2.txt new file mode 100644 index 0000000..76eecfd --- /dev/null +++ b/Documentation/Library Licenses/LICENSE-SDL2.txt @@ -0,0 +1,29 @@ + +Please distribute this file with the SDL runtime environment: + +The Simple DirectMedia Layer (SDL for short) is a cross-platform library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the zlib license: +http://www.zlib.net/zlib_license.html + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + diff --git a/Documentation/Library Licenses/LICENSE.SDL2-Image.txt b/Documentation/Library Licenses/LICENSE.SDL2-Image.txt new file mode 100644 index 0000000..a98cc5a --- /dev/null +++ b/Documentation/Library Licenses/LICENSE.SDL2-Image.txt @@ -0,0 +1,20 @@ +This library is distributed under the terms of the zlib license: + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +The source is available from the SDL website: +http://www.libsdl.org/projects/SDL_image diff --git a/Documentation/Library Licenses/LICENSE.SDL2-TTF.txt b/Documentation/Library Licenses/LICENSE.SDL2-TTF.txt new file mode 100644 index 0000000..b91800c --- /dev/null +++ b/Documentation/Library Licenses/LICENSE.SDL2-TTF.txt @@ -0,0 +1,20 @@ +/* + SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ diff --git a/Documentation/Library Licenses/LICENSE.freetype.txt b/Documentation/Library Licenses/LICENSE.freetype.txt new file mode 100644 index 0000000..2122ec7 --- /dev/null +++ b/Documentation/Library Licenses/LICENSE.freetype.txt @@ -0,0 +1,173 @@ +The source code to this library used with SDL_ttf can be found here: +http://www.libsdl.org/projects/SDL_ttf/libs/ +--- + + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + http://www.freetype.org + + +--- end of FTL.TXT --- diff --git a/Documentation/Library Licenses/LICENSE.png.txt b/Documentation/Library Licenses/LICENSE.png.txt new file mode 100644 index 0000000..78d131c --- /dev/null +++ b/Documentation/Library Licenses/LICENSE.png.txt @@ -0,0 +1,114 @@ +The source code to this library used with SDL_image can be found here: +http://www.libsdl.org/projects/SDL_image/libs/ +--- + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are +Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +December 15, 2011 diff --git a/Documentation/Library Licenses/LICENSE.zlib.txt b/Documentation/Library Licenses/LICENSE.zlib.txt new file mode 100644 index 0000000..ecd619e --- /dev/null +++ b/Documentation/Library Licenses/LICENSE.zlib.txt @@ -0,0 +1,31 @@ +The source code to this library used with SDL_ttf can be found here: +http://www.libsdl.org/projects/SDL_ttf/libs/ +--- + +Copyright notice: + + (C) 1995-2010 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. diff --git a/Documentation/Library Licenses/Readme.md b/Documentation/Library Licenses/Readme.md new file mode 100644 index 0000000..35a6546 --- /dev/null +++ b/Documentation/Library Licenses/Readme.md @@ -0,0 +1,19 @@ +# Library Licenses + +This folder is used to store a copy of the licenses of the libraries that we use for the program. + +Current Libraries that are being used include: + +* SDL2 + +* SDL2-TTF + +* SDL2-Images + +* Png + +* ZLib + +* FreeType + + diff --git a/Documentation/Manual.md b/Documentation/Manual.md index a82575f..bacef45 100644 --- a/Documentation/Manual.md +++ b/Documentation/Manual.md @@ -7,25 +7,26 @@ This manual will quickly walk you through how to use the program. When you first load the program it will create a config file with the default name "Config.ini" it should look something like the example below. ``` - Config File for the program. -v4.0.0 +4.1.0-rc.1 First Generation Steps: 100 Generation Increase: 100 Gens Past Growth: 10 Percent Mutation Chance: 15 Log to File: 1 Hard mode: 0 -Show map on update: 0 +Show map on update: 1 Random Seed: [12345] Append Time: 1 - +Only define these if the default screen size doesn't work for you, otherwise leave blank. +Screen Height: 0 +Screen Width: 0 ``` ### Version number Under the first line you will see a line that has the version of the program that the config file was made for. If you get a new version of the program it will check this number verses its own internal number. -Since the versioning goes v[Major Revision].[Minor Revision].[Patch Number] the program will interpret the number differences and see if it can use the old config file or not. +Since the versioning goes [Major Revision].[Minor Revision].[Patch Number]-[Software Status].[Status Update] the program will interpret the number differences and see if it can use the old config file or not. A Major Revision change means that it CANNOT use the old config file and a new one will be created. This is because most major revisions that we commit will have a change to the config file. Either in a new item, removed item or an item was moved. If the config file is not replaced bad things could happen when the program attempts to load it. @@ -36,6 +37,10 @@ That being said if you notice strange results or the program crashes try replaci A Patch to the program will never affect the config file unless the patch is to the config file. In this cause the program will just load the old config file. If we end up making changes to the config file in a patch; then that release will say in it to delete old config files. +The Software status will only appear if it is NOT a release version (such as a Beta, Alpha, or RC). The software will check this and replace the config if it doesn't match the current software status. + +The Status Update is an internally number we use to keep track of how far into a Software Status we are. It is meaning less to the program. + ### First Generation Steps The number is the number of steps that the first generation will have. This can be any number from 1 to the Max Player Steps (default is 1000) but a number between 50 and 200 is best. @@ -75,6 +80,8 @@ This can be a 1 for true or a 0 for false. When this is enabled the program is p This can be a 1 for true or a 0 for false. If this is enabled then for every step that the player takes the map will be shown. This will of course slow down the program but will allow you to follow the player around on their journey. +You can also disable this if you do not have the images folder (you will still require the .dll files unfortunately). + If this is disabled then you will only see the end result of the Top Players in terms of fitness. It is useful to have log to file on if you disable this so you can see the moves that the player took. Disabling it is useful if you want to quickly test if a change has resulted in higher fitness; or are just testing that everything works (this is what we use it for). @@ -93,6 +100,11 @@ program is different because unless the Random Seed & the Time are the EXACT sam This can be disabled as I talked about in Random Seed if don't want the random numbers to be random and instead what the numbers to come out the same. +### Screen Size + +Here you can set a specific screen size if you need it. (This will only apply if show map is on). The program will attempt to set a screen size based on the current picture pixel size (24px by 24px), however if +this size doesn't work you for you can change it with this option. I only recommended changing this if you need it; otherwise leave them both as 0 so the program knows to set it itself. + ## Running the Program Running the program is as simple as double clicking on the .exe to allow it to run. If this is the first time you ran the program then it will create the config file that you can use to change the settings diff --git a/Documentation/ReadMe.md b/Documentation/ReadMe.md index a86756b..98a6463 100644 --- a/Documentation/ReadMe.md +++ b/Documentation/ReadMe.md @@ -4,13 +4,15 @@ This folder will hold (surprisingly) the documents of the program. Such documents include (at the moment) include : +* Folder Containing all the licenses of the libraries we used. + * Change Log -* License +* License for this project * Credits -* ToDo +* ToDo (for documentation stuff) * Manual diff --git a/Documentation/ToDo.md b/Documentation/ToDo.md index 9f29766..e00fd3b 100644 --- a/Documentation/ToDo.md +++ b/Documentation/ToDo.md @@ -14,10 +14,12 @@ Improvements to the code can be made as [Issues] (https://github.com/GamerMan779 * Figure out IOS compling +* Replace pictures with better ones + ~~* Finish Naming Notation~~ 2015-08-13 ~~* Add a brief manual describing what the config file options do, as well as a how to use file.~~ 2015-08-11 ~~* Change the Read me so its not so off putting~~ 2015-08-10 -* Update readme to use 2.0.4 SDL library +~~* Update readme to use 2.0.4 SDL library ~~ 2015-09-01 diff --git a/Images/Readme.md b/Images/Readme.md new file mode 100644 index 0000000..374ddbc --- /dev/null +++ b/Images/Readme.md @@ -0,0 +1,55 @@ +# Images Folder + +This folder holds that images that will be loaded by the program if show map is enabled. + +Currently these are just placeholder images that will likely be replaced in a later version. + +If you are not okay with us using your image for this project, and / or we are not adhering to the license under which your image was released, please let us know through an issue, or a message and we will work on fixing it as soon as possible. + +All the images are png and 24px by 24px. + +## Credit + +### Coin.png + +This picture represents the coins of the game. + +The coin itself is a Mario Coin. But the image was designed by [Sandro Pereira] (http://sandrodcpereira.deviantart.com/?rnrd=50936). You can find the original [here] (http://findicons.com/icon/423492/retro_coin). + +### Error.xpm + +This picture is used if an unknown tile is on the map. + +This picture was created by [Hopstarter](http://hopstarter.deviantart.com/) you can find the original [here] (http://www.iconarchive.com/show/button-icons-by-hopstarter/Button-Close-icon.html). + +The image was converted to an xpm using GIMP to allow the image to be embedded into the program so that it can always load. + +### Monster.png + +This picture is used to represent the monsters. + +This picture was created by [SpoonGraphics](http://blog.spoongraphics.co.uk/) you can find the original [here] (http://www.iconarchive.com/show/monster-icons-by-spoon-graphics/Green-Monster-icon.html). + +### Player.png + +This picture is used to represent the player. + +This is a single frame from the animation picture found [here] (http://www.2dgameartguru.com/2011/12/game-assets.html) + +### Pole.png + +This picture is used to represent the pole marking the end of the level. + +This is a modified version of the picture found [here] (http://www.mariowiki.com/images/a/a4/Flagpole_secret.png). + +### Sky.png + +This picture is used to represent empty space tiles. + +This picture I created (since it is just a white picutre). + +### Wall.png + +This picture is used to represent the wall tiles. + +This picture is a scaled down version of the one found [here] (http://www.it.murdoch.edu.au/units/ICT207/nominations/previous/Tavern%20Defender/executable/textures/brick%20paving.png) diff --git a/Images/coin.bmp b/Images/coin.bmp deleted file mode 100644 index b4900fc38404435fe726df2ef383242f4c9f333f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcmeHI&r2IY6rR|FilsJqQKTU>6g?CyJr)EJ!IM1*{u8|h+LRQsNhuYvxAxLM!9zXv zQUv`2{6VelL5uWIjK-c?GrF66ec$X(*xef36ms*Cw>$IZ&G&xnFA?dp(=7=OBdnD?=nq+S~pF*Jk$8qqg;$URq zDKZQBh|w#bWWwFszsOxf(EXsF6Mjbaf5syyL5k2W#h;`1lhKKO9Po8d9>SQmM4X zZ#J7|&EnsayosIC8meB0dhXX{dcqvUdu;2>#9$q?FTN}r42u;HMxRotWXv}|*A2d^ zYcqfMC+L^dHT2A{kue5q7w~&kHRpgB?SyO0pK|Mq-xrI&eBvSdO(XkN?9wOt5{Wft zzPskz^Njs3{+p_YoW$%FeyQO~z8bmR?&R-y9+Z2H-|qZe_s8d`ZuiIXgW5hrulzT8 zCMk|9=U>L@9gV&x0T+oqDL+_FviwHOx55eIf=689TX`)5azmWoc;8SgmYKvJ<#M^j zAsfFNCI;(xT)hA}h|2NpV~x9e8uvdPnL8lNT`|bWly^j&qu49*U0BJl?V>$pjO7zw>+WoAVvku&tB4FAHsRjK44QjoJPJt}@_^ diff --git a/Images/coin.png b/Images/coin.png new file mode 100644 index 0000000000000000000000000000000000000000..e3b1ad7b7a7f679886138bcaa926f794c7fd60c7 GIT binary patch literal 624 zcmV-$0+0QPP)l5|X~{x-guX-t7u`(BN^p?}$WwIb6V$p93ZkiqA_X@}t!W4po0(+h zUKf+JNz){4X;*sT!sX}O|3Bxy!#N|IZrLHYjJr5A!1sOYd0xV9Eh7D)y;u+gl*?r~ zYX-KL?8M9cq9<~x<3OoYvI(c9yPF?{@bk649elcqtd|-dPrmVMt;oSv zW#Efb!yZn#6F?TCF5U^ydAv;K$i_%vBF*nciURN0C$j0000< KMNUMnLSTaGc^Lr! literal 0 HcmV?d00001 diff --git a/Images/error.bmp b/Images/error.bmp deleted file mode 100644 index 900c57020baca22845146c8f9761535ec4fe91e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcma)8T~L%|6h7bXvM#@(fC(rv{AfVqu*R=o%isv!kTZ56O?K}^cini=Z8w(9Xr+$R zj6X$%ESQP4tgsTuhP8p>fXWn5kWirc1Igchr{{e8eY?P7^$ic-`@QF!=Xu}rp7%gy z&5=mbo+J4E4zN*&Lg{1{3+xHe0m!HRFj4S_Dy#RuZ5aOV+qA-wS9w%@?!4Q5)qUW= zz7`^7f=sC@nKD&UGR8?s{uVs0*K7Bm@pwGqZp5rY7dBPj-rg?ptk`xj#T{jeZ^XNS zDdr2NsLzviekSE-@2}@t}vn{6NbLq@k$AJi;Hao8+BcER-_*vD$X89x zRg9Z;8`fh!28|QYC~R$PbV|6}ki4 z9Zt_|W50hhU)6EAioS$)z8Uk zUe3(%YV)d55%?-9`c;nuhvghJKE^((!0mirTYDbX{L&Cp!Y}X})?hLX^XTXTcr`lh zJ@s&wpH9y&o12_mWbrlP$lQ(^JAvAL?=7@9>)d#&sCu3BEV<@Pp!ZMF02~ixp{vW|C8wj&M6&%|AVj?iuojP&rMml zmv*L-S*BueM?Qq_UpgMKz3P4#@6w4yBq_V(KKvi)K&%P*iaQ_ZC6+AgVGGmF1*{)F zDdP83L;Qxv8r9PC9USzt&lkRz_>G}BvfV;Ish55=O| zZeO1Bkr9<6B4%)RW_Vy=xyIhT*uNHs_c|AVei&QdOB5|Ngt|mu+_i{(KqFcB#ebHY zngTpNpBkJan$yN!Z@@M*q_Wj2{`1H=>Obi+dZP5gV^aHp`$fA^KgeAf{6r&G{E;&a zhzpL5xxm|Ek+*KQ;_On~OfR^Y)|K^p2f6L&EeygB_$TW>RE z^`dwAaHlST`_1m9{n-$}yE!2t7WOw#!_de=zi>cDG^BP#V+ZOiAKcqvlYS){d3TX> ztl#8D?7=3h6-j;m<8nB5!tZ6|!-<$4{4GO2%Eh|#p|JxR`N(x1?o`Gw&S(HWK2>}b zrJ%*(D1AP2$ntq-XJ@n2t)f&y=K}B>@B}cH!%>Mvh@O|$9 diff --git a/Images/monster.bmp b/Images/monster.bmp deleted file mode 100644 index cef70602e70c669df674c625ab508745c7e88819..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcma);eN@xe8OPJLe{AQh>(-r~v!hbQm{;;fLc*H_hse7KAqnyl1CEyoYdgET*4Y=a zZbPbe_IO&fqbe2Awzf=|QXzmLkPsjtga{Et1&3w4$cscIA>Z9(*5g4u$LHkc{+{RF z`+4r~xzBx)h|MKGqj;r+e7{TDZyvViC~GLsdq&8(?ic@W9`&JsLV5I|L`2K}^y9#@ z_CHxN5f7!(HZyp5YbM2gm!$&C~rSx@WGR zSp*K+C+(i4d;c?atDflP_nq?|z3A560Z;$9+#^cyPcKHes2aJ8ad|Tsnk4tSE2;C; zCMA4ZRE{_s0_Ay~CBLsVVH^qMC50!qgT(N*TxXIAJkjITDzO~0xM|I)Wv zt)~2g(&}=%9`{lF;u#LOwVM#2jRU89I|7U{2+WxXXqUs!mWSZxC5MLabX6-WiVweFTKIEU>S?0e)W|LJe_X>ryw(rO|X8n9A|MdRJrlGakbckCwBe;wB>D>-NUk)V4c0iqIL2mR-4f9ki z{;aOTCws4>{NsB#d1xA^4$qK&3dQf3k(O2jQDY=Rx@6#+GiTWsqyPC!eU{M$_fr1$ zFYRZW*EXhtYs&QUsU)s}QVH08Owedlu$XK}#Gw%SONhP>bUGD$E(e@_36S(;AV8l8 z)}`n-D4I=6*&hAvJza;onKe;hcIT4)q=4S`CR8a(ME*7canUhQB+IZdd;@~T62wJC zBTcSAd`t|I6p1AEao`!Z-d@>J_|;qXrpyWM{M7tbh-(}&bplQZ-iC?I}S5cFn&M;ddW5PXuuVv7Qt{zA7%8#leWIrGr2 zn-xp>9=*-E=xq48btn8aQQrJ#5B|}cKYoL+gGGGGDx*>K{caRg=Yv@rg9t+;8TZ6e zhLDaeV02`U_!#rfT$=4&j(^bhgQ@pbtJtOdiq z)f>ys_nmtJ{?PFDq0Wy%Z;&BKpFqwr7k=g})ZXt$tP$9t%EG>)B79YL9Af=F^o=hf zt#ud4gG>_7><46D{mkm9_r_=MJdHm*=@@HWeLffheF`|&3K3*Xz-uElIMO=@-}(`7 zw-;b!!G*@#ZrGeN;5U+bN^**8%>t__>C=}#U->k)$F6rc9W}HQbQf0>4<1<)OmZ)* zAp>7OxPj9CS>$#CM|why0`v{O>bh)wX--fp~t5qT2iO~24TAb(spuhEov~@R6nr33;$qde(Diu znTH>X(jO>A6es&a1pIYdAnI0m--B;aK}dAEz0jNYffl9rH;8G-bg;ga?km>4zYOvT zlgEddv=a6S`hu{6lpZzLT5nDdWc%LK-iXoKy9>}*AVC6R;|B4FI{okKC$e5eHKp|H{3OhQlA^l z<33};Q>-E3Nd`oxm^TDvw6AHOt$6LM?X;29m1ki+ZO)$m&W-lnciu1S8^3zsfd0ds ZCHlWs+QzKpMnL<(<^50cw6z}l{{SIJec%89 diff --git a/Images/monster.png b/Images/monster.png new file mode 100644 index 0000000000000000000000000000000000000000..c29906d2ebcf9337c4d05ae29bd332d2b772a010 GIT binary patch literal 1601 zcmV-H2EO@;P)&dkpBxy^I&l?jAxss7)c;*}$Ix^m2(bh~X!AXPsOdIO?^^wX zB|L_(w)=mMJ;8VI6@9FftC2rD|BM?!7rmG7SX@%KMkgB?7*=82x) z_H?*&ro99?!$PXYSZO>-A)BY=D4Z<6&RNT$i9t@S5ZDeQW8!4r)0gKwutDdFj?J;S zm}>@6TBsCP(U zbb5f(#S+~q2m*mpBSOY7BWo6{(q;tCO!V*GGxF40Gi+jdI-2B>irO5WJV4vXd_MQ- zK^EOUg=`eK?ML|XyPIk6lF?+7Qd1|V7n!zbzBBggiy!z*cU&-f`|osoDm_bKZoEOm zRngTJ#Zo}&MmLXU9;WP0GOYCCr5>U^Rii=?Y8e(Wl@ogpMKU=AuVWen5Rkc1XTGgpLD$}LJyld6nr)F&MX7SncO}q2)_Pk5Ofr06HWH;a8 z`QCLbZ=cWXWC}kB5CnlB47oWq!NKA4ocQE5R8J-mX)+ZGjd^-%IaKZkwspU>W6#A` zCvH`uRBqy6n}BuB+jLWB@>S7an#;pqB73V9JtvZyp8BonStZ=@?D z&69f<#6Gt99$@?N?;P$-b$-!^cuZOe+EZn2OlMJ71#DY%fkpp>!jOz9g`8XNBYj*Z z8_}4yL~^kP2qCtwFfUd6(&52V+wW`ewVo~8PD~!N{2+|x^g2Z|M$4B_C7-rAGUhsk zYhnPQfadC0u0&F)kc`_{Ed|q6h^q}OSC))fVl{2xjv;0Z_m*S(NeLwy;m&wRHXbQ8gQ#Q4SEieF zd0{fuf3UxL<-U(>u-5;^t?Jaz4~-ny+O_xL)z9{|EqdX4HnaMV-MJ0#vE)i|@U`pJ zv#$-*{=E<2YWeDJfZ@vM_wLTQF+Kd^-Ru7V!Fj5*=)pGZ00000NkvXXu0mjfE3*sI literal 0 HcmV?d00001 diff --git a/Images/player.bmp b/Images/player.bmp deleted file mode 100644 index 6248b637133325d03b9286efa5f0043d8b856fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcmd^JPIipEF?<)rZv4J%P{>o{$kcL%9Bo8IrqEarM~{GB_29uvxE_NYKMr^V2U1 zZf;1;Z`^e3X3+s&IYpY?R4me!az-jK3=|?7(d&`+#cbF&!X!0 zo={$yh~DQ9fzv=oU5jvz&qbj#IpgKCJ}%MywBy{0Oy2!#SywBRdrn_d5|_&WeoJ`aZEjM&%Hml~AM^jQZM-LlEkuw<$w@rZGIuaf}l+E|v zYajO140>TFYhd|z=qr4PIy63M0Q)Jwk3${UkDd7(KiM0M%>#b@Be_u}l<2_|#`XTm zP6l0UaS4SIUDM+rkX_e=7oPyqKjcL19vJ93;OQ&F?{)rjwvRlsY0TwwK6+VGd00RI?L_t(Y$L*C#OcQYw#@~OY6xz~M zN*QRe3zh|OFNiMvkMIk59)Sy zT%_G@_0lxW?C&2~;KTrc0LzAm^79j=U0vPTv9VDyfB?heg>ia&dpb%>uU|?|HYhio zHZv<##iL`dNF1wiyX{-e%}rH&K68a(r~&|B`TTGWMX?UAms}g;H^(OofgOm>GI+Vm4i?tCp`~ zu{10%uf)JG6lFFqF5!3xZnG_0ii)dVp%Z!lkeXkXUY^3cBNU4Gd@k~O$pgJU>#|a* z)_FYp6hi)8CJ2*%N|TbKmnma$9LJ5uiSHyy0?X3iaICq?%4!~A0MAYia9GXzeD5Gh zl5~In$GOVNT5N2rGqkYqR-NBZGEV2(1_X6zI46Xn7MOSO1 z#WK=O5VB~6B0;mV;y6^P5_GpK9==3Dn;aP<7Ye!l`udjFOG|U#($e&)b92+vLqh}R zW2GtfM}SmuSDP9y5S*3yd?X1V45w*^!LR^%djFuYy7;MQZxh3CJR(9O5{siU5yEJl zuINT$lHoE6YDEA5+O)XZ?1Bn}5W+AVpP8AQbUN3#>+4^ph~3RKRvaxyK~1ncJF!4f qGyt#wfEXqaP-`>uLgBwoQ$GMsJU22ophXY>0000A0c@(WSx zK7@e_n+Ew74L=H9*fyLmEki0HMbQvP9<=y@_XQolL;jMAA9^tIiRvFue5(EmevkE` z`ah5S4cYw~`R$f$J|vM3yAJt8^C5`?*!L~gpJx7~NeDl?j;y~~8o}?rmz_Tc4DPdN diff --git a/Images/pole.png b/Images/pole.png new file mode 100644 index 0000000000000000000000000000000000000000..5470e18670206bcc26f5f6a90c6aed1a24f9b61f GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE_ z9u~f1Z~y(+cTfKO^w*m|{Vxe|aAnQ@zn!(~XE{rohiGDVLrSL@tF9))mPLoAG0aev zn5ZgTe~DWM4f4G&!o literal 0 HcmV?d00001 diff --git a/Images/sky.bmp b/Images/sky.bmp deleted file mode 100644 index 603663da1ca126a4588613a454f69e13fa881d71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcmZ?r?c!trgDxOh1H=+g%*dd?zzmWB$_sNtFo+8U{}~wIh{4G{s2CekohMnD*Ps!X9=TLhSr$_5b)rroOlUK TaZwtt4#+@HS3j3^P6~tYaB>{t*g!A=BV#}y-U5MSjih;x=KazG@Q=u^Oup-Q zvhXS#7uDTWb?f%+p2ll$itk#Ve+quv*pFZAo7PXQ7m5)7;roA0(=R`Nw_5-GYpwmd zJ!}I1*MIv};=zaao&9&a2giTD-9I{LA78xRKRP_^T=d%S4u_ZLz5D*{aL~KH-@WS% zcDA>6x3)HRPG7&;+B^Diy7%^vy^?hpFU>xl3wA; zJ3baN4?HI{9V@VnkLKpYuxG#jwwby1EQ)5CMeb}ovZl;~(Qs;$=aOTY6E|kv47|8Q zoy$03&7S#*MLbfB+JKl(jrzvS*U8U+SzC|dFb{=IZ(mi4V~~jhjj5S2o+*ZTK15N>z`|X)wwvkIpM81 zJ3Kh)c8<=v$A{fB?16FT_U7RwvCFleUv|4EmqV@dZj4#?xQAo#4g3JSE8da*+3D5j z=Bht^=#OmP7V$IT=V8)I-?717#^kHsRlUxXxpb2T+UuD7YvTR$?)3z`K6@I<(|Zr! z<87+YARuk?I{yKdWp*&SpN0poq<*% zx~@2X;S}HqyQXF?PUPmo7ABS}hJRvh38z^5WPcfXdbcYylcsmfg`aVj>M0yyC)Ahh zt%8sED_2|#)`hJ;;%{k9?Y133 zc(_`88i_w=TPp`!DhE!D&eA0#KclX(gmIzsVZG^@DhGbbDV57UExf)#=@WuovR`Rg zNK5jy7wx;blRDQDTd?L!Gw!wG(!G#ZKYS#fU>NW;;6CCFG3hZuCztPg$~*ADn>S#6 nfPMxxQXV;DY{Yvo!JFhZZ=c>4{r%Se6(-bAiQRxP;!XPpoDgy5 diff --git a/Images/wall.png b/Images/wall.png new file mode 100644 index 0000000000000000000000000000000000000000..f75487993e0fa7fe4d2be5a6b160d85674a5e970 GIT binary patch literal 869 zcmV-r1DgDaP){BBDFrX`bG;ecOit@X4F7s%B=P)D!>` z4Vsa++cvrR)e$jl=eImYpjncHkNEfj#styOnb%gpUMkA4KGnGq}G*kucGFyr`kWW?|L>(4WoGB_ zNSa$!J$-u?k%xzioBHG;a#@!i$%d|~hlh))*iT;{8={4{D-n&6XT+=O@$rXtL`{iE znC96dadc?}Gn=_}uHNHMG|&DKNL1YP9CuY^W+UowF3Th$W-9owF3#-t-+e??nabIO zHbMFTeHnm6qJ^kx1R@cM*VnfQ^a46pN>!Z&A`ubC+7b~F6DBf65oMZ5Tj=g)a-X`o zm&dt-TIrc#6xk6oqA^lU-L#WsW)X4DZP!2LXC~?x-AD+Noy%#Sy$g;=;X`>_X0*baa*vYK?AYhl}nM0Z}=X=QcX%0D73aOza^lND#qHi0J9*ng96xm&_758rjya v>ntKY+}G=^di5x0o=v38I_K%PUw{4|Ar64zUX2?P00000NkvXXu0mjf6Tp-g literal 0 HcmV?d00001 diff --git a/Makefile b/Makefile index 2301763..a751532 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC=g++ CFLAGS= -std=c++11 -Os -s -LNFLAGS= -lSDL2main -lSDL2 +LNFLAGS= -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf source=$(wildcard source/*.cpp) HEAD=$(wildcard source/*.h) OBJ=$(source:.cpp=.o) diff --git a/Project/Experimental-Platformer-AI.cbp b/Project/Experimental-Platformer-AI.cbp index 50cd5a6..e180b04 100644 --- a/Project/Experimental-Platformer-AI.cbp +++ b/Project/Experimental-Platformer-AI.cbp @@ -18,7 +18,6 @@