Game Overview
Buddies Bad Day is a 2D, puzzle type game made for Ludum Dare 39 with the theme, "Running out of Power". You play as a robot that runs out of energy with each move made. Work your way through the levels by getting from point A to B by collecting ALL batteries. Try not to run out of the power in the process or the robot will run out of power.What went well?
What can be improved?
Level loading
This part of the code deals with erasing any collision object from the previous levels, then loads and sets up the next levels, such as setting the players spawn location and battery locations.case LOADING: level->EraseMapObject(); // erase level collider // Delete the pickup vector incase of failure for (pickupIter = pickupVector.begin(); pickupIter != pickupVector.end(); pickupIter++) { pickupVector.erase(pickupIter); break; } // This checks first to see if objects were all removed correctly before allowing the program to go on if (level->GetAllObjects().size() <= 0) { level->LoadFromFile(levelFiles[level->getLevelID()]); // load level tilemap from file bSpawnNoMore = false; player->setPower(10); // reset the power StartPosition(*level); // set the players start pos EnergySpawner(*level); // set the pos of battery pickups state = new GameStates(State::GAME); } break;