That was an example to make the error more obvious. It doesn't matter the height of the image, it will always count an extra tile outside the bounds because the y position is going to be equivalent to the image height which you do not check for.
It's like array bounds, you are considering an index of 1 valid for an array of size 1 when only 0 is a valid index in this case.
Would changing my maps to binary reduce ram usage?
Maybe the code that loads the maps might use less memory, but once the maps are fully loaded there won't be any difference.
Remember... RAM is just how much memory you're using. IE: how many variables you have allocated. If storing the map as binary means you are using fewer variables, then that means reduced RAM usage.
Though I doubt how the map is stored in a file will change how the map is stored once loaded in memory -- which is why it wouldn't make a difference.
Making your files binary format won't stop people from breaking your game. People are still able to deduce usually what they are by looking at multiple files, the names of the files, as well, binary data isn't some magical thing.
Bad news. Chances are that only a handful will bother playing your game. In truth you are making the game for you. If the end user wants to change values in your game they will crack it.
Yes, that means all these companies saying they are making their games for the gamers are actually lying. They are making the game for themselves and hoping others will like it as much as they liked making it. Do you think back in the early 90s gamers asked for Mortal Kombat or Street Fighter? No! The developers decided they wanted to make it and hoped it would be liked by others. All we, as game programmers, can do is make the game and hope a lot of people play it.
In other words, stop worrying about people hacking your game and just make the game already. Being able to mod games are the norm now (ie the Oblivion and Skyrim, Fallout 3 and New Vegas).
(ie the Oblivion and Skyrim, Fallout 3 and New Vegas)
Can't really call it the normal and list such biased examples of games which were all developed by a single studio...
Yes, that means all these companies saying they are making their games for the gamers are actually lying.
Not really, a lot of games are dumbed down and made easier to accommodate the average gamer so they will not feel frustrated while playing the game so that they will continue to do so. The only ones that are actually like this are smaller indie teams which can experiment with features and gameplay as they don't have to usually fill expectations when millions are being poured into a game. Games like minecraft or even now with crowd funding games like planetary annihilation.
Can't really call it the normal and list such biased examples of games which were all developed by a single studio...
Not biased. I own the PS3 versions of all those and have never touched the PC version as I don't mod. Single studio or not those are the 4 largest modded games of their time which is the only reason I listed them. Minecraft is so you can mod it, but you have to know Java in order to even do that. With Elder Scrolls and Fallout you are given tools where you build the levels, items and everything you want, set the data in the tools and then the tools let you put them in the game or even publish them for other owners of the game to play the mods.
xerzi wrote:
Not really, a lot of games are dumbed down and made easier to accommodate the average gamer so they will not feel frustrated while playing the game so that they will continue to do so.
They don't dumb it down for the gamer, the dumb it down in fear the gamer will get frustrated with the game and leave it. The history of games prove this, older games challenged you and were damn hard to beat, but now the games are easy to beat. This discussion made me think of this video (WARNING the guys voice is a little grating) http://www.penny-arcade.com/patv/episode/when-difficult-is-fun
I'm a huge Metal Gear fan, and to date I have never been able to beat Metal Gear or the recent release of Metal Gear 2. Yet I have played and beat MGS, MGS2, MGS3, MGS VR Training, MSG4, MGS Acid, MGS Acid 2, MGS Peacewalker, and yet to play Revengeance.