The graphics core that you should use is detailed here.

Packet Formats

Your solution will communicate with the server to request puzzles to solve. This is the format of the messages that you should send.

The server is at IP on port 51100Remember to use your IP address.

Request Puzzle

Send this to the server to request a puzzle. 

Size1Between 2 and 10 inclusive and is the width and height of the puzzle. i.e. Set size to 3 for a 3x3 puzzle
Random4A big-endian 4 byte integer (see below). If set to 0 then the generator will respond with a random puzzle. If not 0, then the generator will use the value as its random seed, so you will get the same puzzle each time.

Puzzle Response

The server will respond as follows:

Size1Set to whatever you requested.
Random4Set to whatever you requested.
TilesSize*Size*4The tiles of your puzzle. See below.

Each tile is four bytes, and there will be size squared number of tiles. For each tile the first byte is the top edge, then the right-hand edge, then the bottom edge, then the left-hand edge. For example, these tiles are encoded as follows: 0x03, 0x01, 0x04, 0x03, 0x01, 0x02, 0x01, 0x06


If you can't remember endianness from first year, these diagrams show how big and little endian numbers are stored.

Images from Wikipedia.

  • No labels