worm
A graphical puzzle game written in Java based off of the game "snake" (github).
This was a group project for a class in high school. I wrote all of the graphics code for it.
Each level consists of a 2d array of tiles, and each type of tile has a table of images used for its texture (shown below for the "dirt" and "grass decoration" tiles). For each tile, the following process is used to determine what 32x32px image should be drawn to the screen:
- The surrounding tiles are analyzed to see how the current tile should connect with them.
- The correct table column and rotation are determined.
- A row is randomly selected
This makes the tiles appear as if they're "connected together".
A similar process is used to render the worm.