Tag Info

New answers tagged

2

If you write a 1 for a connection and 0 for lack of connection, and have 8 sides, then you can write out the configuration of an octagon as a bit string. I'll order them as east, northeast, north, northwest, west, southwest, south, southeast. If north and west are connected to neighbors and other directions are not, this would be written 0 0 1 0 1 0 0 0. ...


1

Unless you want to allow octagons to overlap (when you would, you would be in quite a lot more trouble), it is impossible for two adjacent edges (a diagonal and an orthogonal) to be both connected to another tile. This makes stuff a lot easier. Separate each of your octagons into 9 tiles like this: You need one set of tiles where the diagonals are ...


3

A determined modder can and will always modify any part of your game which runs on the users system. You can put obstacles in their way to make their life harder, but you can't stop them. Creating a hash of your assets can be countered by finding that hash in your executable and changing it too. When you encrypt your assets, people will find the decryption ...


2

Once you've finalized your texture, create a hash of the file. Store that hash somewhere else in assets. When the level is loaded, create a new hash when you load the texture and compare it to the hash created when you finalized. If the hashes are different, the file has been altered. Further, you might really consider what your motivation is for preventing ...


4

Both of those pieces of code appear to pick a random location (xx,yy in the first example and x,y in the second), then try to change grass to something else near that location. There are lots of other algorithms, although most are more complicated than the ones you posted. I can't answer whether they're over your head; I don't know what's in your head ;-) ...


-2

I would say to check if there is a tile in that spot already if not place a tile and put that in a for loop for how big your x and y are.


2

One way would indeed be to try out the four possible moves for every tile (or rather the ones that have recently moved) and check for matches, then store them as hints. You wouldn't need to do this as often as you might think (especially if you only do it for tiles that have moved); you would only need to swap every tile twice since the one next to it would ...



Top 50 recent answers are included