switchboy / isorts Goto Github PK
View Code? Open in Web Editor NEWIsometric RTS game with procedural generated maps.
License: GNU General Public License v2.0
Isometric RTS game with procedural generated maps.
License: GNU General Public License v2.0
In "player.h" you declare "int friendOrFoo[8];" as a private member on line 71.
In "player.cpp" you initialize it as "this->friendOrFoo[8] ={0};" on line 15. This doesn't do what you think it does because C++ only fills the array on declaration with this syntax. What this actually does is set the 8th element (which is a overflow) to 0 leaving all the other indices with whatever garabage is in RAM.
A number of options are available to fix this:
Describe the bug
Double click of command to actors makes them teleport
In "randomMapGenerator.cpp" the while loop on line 120 might never break if the return statement condition is never met I think?
bool foodFound = false;
while (!foodFound) {
int possibleFood = roll(0, static_cast<int>(listOfObjects.size()));
if (listOfObjects[possibleFood].getTypeOfResource() == 1) {
bool foodSourceOccupied = false;
for (const int& foodOwned : occupiedFoodSources)
{
if (foodOwned == possibleFood) {
foodSourceOccupied = true;
}
}
if (!foodSourceOccupied) {
return listOfObjects[possibleFood].getLocation();
}
}
}
In "main.cpp" line 111 I think this is meant to be a comparison and not assignment operator?
if (endProjectile = listOfProjectiles.size()) { ... }
Describe the bug
A single click outside the gamemap creates a selection box
In actors.cpp line 1603 I'm getting crashes when selecting troops and having them do things. I'm trying to determine how to replicate this easily. For reference, this is line 1603:
void actors::doNextStackedCommand()
{
if (!this->listOfOrders.empty()) {
switch (this->listOfOrders.front().orderType) { //crash here, maybe front is invalid?
...
}
The last return statement in the implementation of "int distanceToResource(int, cords)," currently line 135, has the potential to crash as it may dereference the front() of an empty list.
int distanceToResource(int kind, cords from)
{
std::list <nearestBuildingTile> listOfResourceLocations;
if (!listOfObjects.empty()) { ... }
if (!listOfResourceLocations.empty()) { ... }
return listOfResourceLocations.front().deltaDistance;
//Crash here if both of the above if statements are false since listOfResourceLocations is empty
}
I spent some time playing today and noticed a few things that can be addressed:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.