• Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

We're also offering banner ads on our site from just \$5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

# Anastas

Member Since 30 Sep 2012
Offline Last Active Mar 06 2014 03:32 PM

### In Topic: Plasticness in Today's Graphics

05 March 2014 - 11:46 PM

So would an HD Crimson Shroud be the game that finally has true photorealistic graphics?

### In Topic: What is your favorite videogame and why?

20 February 2014 - 01:45 AM

Link's Awakening, because of the excellent overworld design and item balance, and because of the way the game gets you to interact with the island's inhabitants, giving the story depth through gameplay as opposed to pure narrative.

### In Topic: Tiling a Square Room - Algorithm

19 January 2014 - 03:16 PM

A 2x2 room is easily filled as, once the empty square is allocated, the mere remainder of the room makes up a single tile. As you can see from this picture, an empty square can also fit into any 4x4 pattern and it is that top-leftmost 4x4 pattern (herein referred to as the TL pattern) that is key for filling any size room.

In this example, the empty square has a coordinate of (2,5) in an 8x8 room. Once the first 4x4 pattern was found, the TL pattern from the previous image was wrapped around it and the pink tile filled in what was left. Another way of looking at the process (I'm unsure as to which is more efficient for an algorithm) is the pink tile being placed on the corner of the 4x4 pattern (this corner is also the center of the room; in larger rooms this corner is at the center of a subsection of the room), followed by the TL pattern wrapping around the pink tile.

The following process illustrates how to fill a 32x32 room with an empty tile coordinate of (2,19):

Divide the room into fourths and find which fourth the empty square occupies...

Divide that fourth into fourths and find which of those fourths (a sixteenth of the whole room) the empty square occupies...

Repeat that process, finding the empty square's position in a fourth of that sixteenth (a sixty-fourth of the whole room)...

Finally, find the empty square in a fourth of the sixty-fourth (a two hundred fifty-sixth of the whole room).

The reasoning behind finding the empty square's position relative to fourths is that the room is filled via an inverse process. You might find it more streamlined to simply find the empty square in a two hundred fifty-sixth from the start, but the room is still filled by fourths:

You take the empty square and generate a 4x4 pattern around it. This can be done similar to the 8x8 example above. The remainder of the two hundred fifty-sixth that the empty square occupies becomes a tile, then you wrap a 2x2 pattern around that with empty spaces becoming a tile (or have a tile attach itself to the corner of the two hundred fifty-sixth [which corner is determined by being in the center of a sixty-fourth] with other tiles generating around that tile).

From there, you repeat whichever process you use to generate an 8x8 square, followed by a 16x16 square, until you fill the whole 32x32 room.

This process can be used to fill any sized room presented in your problem, but unfortunately I am not so mathematically minded as to translate this process into an algorithm.

(P.S. All of the images in this post were created using MS Paint, so you can take your Photoshop and shove it. )

### In Topic: Support my Acquaintance

23 July 2013 - 11:01 AM

...Awesome.

### In Topic: Support my Acquaintance

22 July 2013 - 11:04 AM

Wait, are you tellin' me that you wrote Barnyard Blast? That's rad.

[/derail]

Saw this earlier on Operation Rainfall, still as poor as I was then.

Though, you might be able to answer, what are the chances of this game getting localized even if they don't reach their \$30,000 goal?

PARTNERS