Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

its hard to explain, but basically what i did was define different color amounts that a customer can choose from(a bit, some, a good amount, a lot)  and each section of the sword(the handle, hilt and blade has different verification algorithms, the blade should be sharp so i check that, the hilt should also be sharp and the handle can be either blunt or sharp and i made a variable for these two posibilities too. The sharpness algorithm sorts the positions that were saved for rating either from top to bottom(y for blade) or from bottom to top(y for handle) and then the pixels are also sorted according to the x axis for the hilt. After the sorting algorithms run(i used a simple bubble sort), i compare different y values to determine the sharpness. The color is quite simple, i count the number of pixels found for the wanted color, then i compare that with the amount wanted(a bit, some, a good amount, a lot). Thanks for your feedback, hope this clarified what i did.