# 8-bit Boss

## Introduction and Thoughts

Before this project, I had never coded before, so the first week I spent a lot of time learning different coding words and how the scale works.  I discovered online, that I can change the color of my design and I began trying to code the album cover of Coldplay’s “X & Y” CD.  I knew that the colors couldn’t print all on one design, but I mainly made the design as coding practice.

Looking at all of the cubes, I thought about making an 8-bit video game figure.  Since all of my projects have been related to “The Legend of Zelda” video games, I decided to create another.  I thought about the very first Zelda game and the first dungeon that Link enters and I began searching for images to reference.

I began my code with a basic box structure and added in floor panels.

I began with the main box structure, which was simple to make.

/////main box

translate ([5,16,5]) {

color([1,1,1]) cube([76,4,76]);}

I added a row of cubes going horizontal on the bottom and made the last 3 higher to make it more like the reference picture.  I left a little space between each cube’s position.

/////////box floor 1

translate ([5,15,5]) {

color ([0,1,2]) cube([10,2,10]);}

translate ([16,15,5]) {

color ([0,1,2]) cube ([10,2,10]);}

translate ([27,15,5]) {

color ([0,1,2]) cube ([10,2,10]);}

translate  ([38,15,5]) {

color([0,1,2]) cube([10,2,10]);}

translate ([49,12,5]) {

color([0,2,2]) cube([10,5,10]);}

translate ([60,12,5]) {

color ([0,2,2]) cube ([10,5,10]);}

translate([71,12,5]) {

color([0,2,2]) cube ([10,5,10]);}

I repeated this step horizontally going up the structure until I reached the top.

//////box floor 2

translate([5,15,16]){

color([0,1,2]) cube ([10,2,10]);}

translate([16,15,16]){

color([0,1,2]) cube ([10,2,10]);}

translate([27,15,16]){

color([0,1,2]) cube ([10,2,10]);}

translate([38,15,16]){

color([0,1,2]) cube ([10,2,10]);}

translate([49,12,16]){

color([0,2,2]) cube ([10,5,10]);}

translate([60,12,16]){

color([0,2,2]) cube ([10,5,10]);}

translate([71,12,16]){

color([0,2,2]) cube ([10,5,10]);}

///////////box floor 3

translate([5,15,27]){

color([0,1,2]) cube ([10,2,10]);}

translate([16,15,27]){

color([0,1,2]) cube ([10,2,10]);}

translate([27,15,27]){

color([0,1,2]) cube ([10,2,10]);}

translate([38,15,27]){

color([0,1,2]) cube ([10,2,10]);}

translate([49,15,27]){

color([0,1,2]) cube ([10,2,10]);}

translate([60,12,27]){

color([0,2,2]) cube ([10,5,10]);}

translate([71,12,27]){

color([0,2,2]) cube ([10,5,10]);}

/////////box floor 4

translate([5,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([16,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([27,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([38,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([49,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([60,15,38]){

color([0,1,2]) cube([10,2,10]);}

translate([71,15,38]){

color([0,1,2]) cube([10,2,10]);}

///////////box floor 5

translate([5,15,49]){

color([0,1,2]) cube([10,2,10]);}

translate([16,15,49]){

color([0,1,2]) cube([10,2,10]);}

translate([27,15,49]){

color([0,1,2]) cube([10,2,10]);}

translate([38,15,49]){

color([0,1,2]) cube([10,2,10]);}

translate([49,15,49]){

color([0,1,2]) cube([10,2,10]);}

translate([60,12,49]){

color([0,2,2]) cube([10,5,10]);}

translate([71,12,49]){

color([0,2,2]) cube([10,5,10]);}

//////////box floor 6

translate([5,15,60]){

color([0,1,2]) cube([10,2,10]);}

translate([16,15,60]){

color([0,1,2]) cube([10,2,10]);}

translate([27,15,60]){

color([0,1,2]) cube([10,2,10]);}

translate([38,15,60]){

color([0,1,2]) cube([10,2,10]);}

translate([49,12,60]){

color([0,2,2]) cube([10,5,10]);}

translate([60,12,60]){

color([0,2,2]) cube([10,5,10]);}

translate([71,12,60]){

color([0,2,2]) cube([10,5,10]);}

Last row!

/////////////box floor 7

translate([5,15,71]){

color([0,1,2]) cube([10,2,10]);}

translate([16,15,71]){

color([0,1,2]) cube([10,2,10]);}

translate([27,15,71]){

color([0,1,2]) cube([10,2,10]);}

translate([38,12,71]){

color([0,2,2]) cube([10,5,10]);}

translate([49,12,71]){

color([0,2,2]) cube([10,5,10]);}

translate([60,12,71]){

color([0,2,2]) cube([10,5,10]);}

translate([71,12,71]){

color([0,2,2]) cube([10,5,10]);}

Once I finished the final row and adjusted the main box to the box layers, I made four walls surrounding the structure.

///////////walls

color([0,0,1]) cube([5,20,81]);

translate([5,0,0]) {

color([0,0,1]) cube ([76,20,5]);}

translate([81,0,0,]){

color([0,0,1]) cube([5,20,81]);}

translate([0,0,81]){

color([0,0,1]) cube([86,20,5]);}

Even though I haven’t made the dragon yet, I wanted to add the flames to get a reference of where they would actually be on the structure for the final print.

////////fire

translate([40,15,50]){

color([2,0,0]) sphere([5]);}

translate([40,15,40]){

color([2,0,0]) sphere([5]);}

translate([40,15,30]){

color([2,0,0]) sphere([5]);}

/////////dragon

I added two doors to the structure that are in the reference picture.

//////////doors

translate([38,3,5]){

color([0,0,0]) cube([10,12,1]);}

translate([80,3,38]){

color([0,0,0]) cube([1,12,10]);}

I wanted to be certain that the design would be able to print cleanly, so I did a test print without Link or the Dragon boss.

The first print turned out great and it looks very clean.  I looked back at my reference picture and noticed that my design’s box size was not completely accurate.  I updated the design into a rectangle instead of a square and also added in the hero Link and the dragon boss.  I used the picture below as a reference while coding Link into the design.

I worked from the bottom up and made lines across going horizontally.  Also, in the very last piece of code, I added an eye above the structure to make it pop out.

translate([30,14,35]){
cube([5,1,1]);}
translate([30,14,36]){
cube([4,1,1]);}
translate([27,14,37]){
cube([10,2,1]);}
translate([28,14,38]){
cube([9,1,1]);}
translate([27,14,39]){
cube([10,1,2]);}
translate([37,14,40]){
cube([1,2,3]);}
translate([38,14,40]){
cube([1,1,3]);}
translate([39,14,41]){
cube([1,1,2]);}
translate([40,14,38]){
cube([1,1,9]);}
translate([27,14,41]){
cube([10,1,1]);}
translate([28,14,42]){
cube([9,1,1]);}
translate([30,14,43]){
cube([7,1,1]);}
translate([37,14,43]){
cube([1,2,7]);}
translate([38,14,45]){
cube([2,1,1]);}
translate([29,14,44]){
cube([8,1,1]);}
translate([28,14,45]){
cube([9,1,2]);}
translate([26,14,46]){
cube([1,2,2]);}
translate([27,14,47]){
cube([10,1,1]);}
translate([27,14,48]){
cube([10,2,1]);}
translate([38,14,48]){
cube([1,2,1]);}
translate([29,14,49]){
cube([8,1,1]);}
translate([30,14,50]){
cube([4,1,1]);}
translate([36,13,45]){
cube([1,1,1]);}

I coded the dragon next and worked the same way that I did with Link, by coding horizontally starting from the bottom and working up to the top.  Just like Link, I added an eye to the dragon above the structure to make it pop out.

Dragon Code:

```//////dragon
translate([67,14,26]){
cube([5,2,1]);}
translate([67,14,27]){
cube([6,1,1]);}
translate([68,14,28]){
cube([5,1,2]);}
translate([77,14,26]){
cube([5,2,1]);}
translate([77,14,27]){
cube([6,1,1]);}
translate([70,15,27]){
cube([1,1,15]);}
translate([81,15,27]){
cube([1,1,15]);}
translate([78,14,28]){
cube([5,1,2]);}
translate([68,14,29]){
cube([16,1,2]);}
translate([67,14,31]){
cube([17,1,2]);}
translate([66,14,33]){
cube([18,1,1]);}
translate([66,14,34]){
cube([19,14,2]);}
translate([67,14,36]){
cube([18,2,2]);}
translate([68,14,38]){
cube([17,1,1,]);}
translate([69,14,39]){
cube([16,1,1]);}
translate([70,14,40]){
cube([6,1,2]);}
translate([71,14,42]){
cube([4,1,1]);}
translate([71,14,43]){
cube([6,1,1]);}
translate([71,14,44]){
cube([7,1,1]);}
translate([71,14,45]){
cube([6,1,1]);}
translate([70,15,46]){
cube([1,1,8]);}
translate([70,14,46]){
cube([7,1,1]);}
translate([63,14,47]){
cube([15,1,1]);}
translate([63,14,46]){
cube([4,1,1]);}
translate([64,14,45]){
cube([2,1,1]);}
translate([64,14,44]){
cube([1,1,1]);}
translate([63,14,48]){
cube([16,2,1]);}
translate([64,14,49]){
cube([14,1,1]);}
translate([66,14,50]){
cube([11,1,2]);}
translate([67,14,52]){
cube([10,1,1]);}
translate([68,14,53]){
cube([6,1,1]);}
translate([71,14,54]){
cube([5,1,1]);}
translate([72,14,55]){
cube([5,1,1]);}
translate([65,14,52]){
cube([2,1,2]);}
translate([64,14,54]){
cube([1,1,1]);}
translate([63,14,55]){
cube([1,1,1]);}
translate([68,14,50]){
cube([1,1,1]);}
translate([77,14,40]){
cube([3,1,1]);}
translate([78,14,41]){
cube([1,1,1]);}
translate([81,14,40]){
cube([4,1,1]);}
translate([81,14,41]){
cube([1,1,1]);}
translate([83,14,41]){
cube([2,1,2]);}
translate([82,14,43]){
cube([2,1,2]);}
translate([81,14,44]){
cube([1,2,1]);}
translate([82,14,45]){
cube([1,1,1]);}
translate([68,13,51]){
cube([1,1,1]);}

```

I readjusted the original flames and I moved the bottom door over and made it wider to make it look similar to the reference picture.  Once I had everything adjusted correctly, I made the file into an STL and printed it.

This is probably my favorite design of the semester.  The print looks amazing and turned out so well.  The coding took many hours, but it was worth it for the final product.

Full Final Code:

```/////main box
translate ([5,16,5]) {
color([1,1,1]) cube([109,4,76]);
}
/////////box floor 1
translate ([5,15,5]) {
color ([0,1,2]) cube([10,2,10]);
}
translate ([16,15,5]) {
color([0,1,2]) cube([10,2,10]);
}
translate ([27,15,5]) {
color ([0,1,2]) cube ([10,2,10]);
}
translate ([38,15,5]) {
color([0,1,2]) cube([10,2,10]);
}
translate ([49,15,5]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,5]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,5]){
color([0,1,2]) cube([10,2,10]);
}
translate ([82,12,5]) {
color([0,2,2]) cube([10,5,10]);
}
translate ([93,12,5]) {
color ([0,2,2]) cube ([10,5,10]);
}
translate([104,12,5]) {
color([0,2,2]) cube ([10,5,10]);
}
//////box floor 2
translate([5,15,16]){
color([0,1,2]) cube ([10,2,10]);
}
translate([16,15,16]){
color([0,1,2]) cube ([10,2,10]);
}
translate([27,15,16]){
color([0,1,2]) cube ([10,2,10]);
}
translate([38,15,16]){
color([0,1,2]) cube ([10,2,10]);
}
translate([49,15,16]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,16]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,16]){
color([0,1,2]) cube([10,2,10]);
}
translate([82,12,16]){
color([0,2,2]) cube ([10,5,10]);
}
translate([93,12,16]){
color([0,2,2]) cube ([10,5,10]);
}
translate([104,12,16]){
color([0,2,2]) cube ([10,5,10]);
}
///////////box floor 3
translate([5,15,27]){
color([0,1,2]) cube ([10,2,10]);
}
translate([16,15,27]){
color([0,1,2]) cube ([10,2,10]);
}
translate([27,15,27]){
color([0,1,2]) cube ([10,2,10]);
}
translate([38,15,27]){
color([0,1,2]) cube ([10,2,10]);
}
translate([49,15,27]){
color([0,1,2]) cube ([10,2,10]);
}
translate([60,15,27]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,27]){
color([0,1,2]) cube([10,2,10]);
}
translate([82,15,27]){
color([0,1,2]) cube([10,2,10]);
}
translate([93,12,27]){
color([0,2,2]) cube ([10,5,10]);
}
translate([104,12,27]){
color([0,2,2]) cube ([10,5,10]);
}
/////////box floor 4
translate([5,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([16,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([27,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([38,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([49,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([82,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([93,15,38]){
color([0,1,2]) cube([10,2,10]);
}
translate([104,15,38]){
color([0,1,2]) cube([10,2,10]);
}
///////////box floor 5
translate([5,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([16,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([27,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([38,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([49,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([82,15,49]){
color([0,1,2]) cube([10,2,10]);
}
translate([93,12,49]){
color([0,2,2]) cube([10,5,10]);
}
translate([104,12,49]){
color([0,2,2]) cube([10,5,10]);
}
//////////box floor 6
translate([5,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([16,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([27,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([38,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([49,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,15,60]){
color([0,1,2]) cube([10,2,10]);
}
translate([82,12,60]){
color([0,2,2]) cube([10,5,10]);
}
translate([93,12,60]){
color([0,2,2]) cube([10,5,10]);
}
translate([104,12,60]){
color([0,2,2]) cube([10,5,10]);
}
/////////////box floor 7
translate([5,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([16,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([27,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([38,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([49,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([60,15,71]){
color([0,1,2]) cube([10,2,10]);
}
translate([71,12,71]){
color([0,2,2]) cube([10,5,10]);
}
translate([82,12,71]){
color([0,2,2]) cube([10,5,10]);
}
translate([93,12,71]){
color([0,2,2]) cube([10,5,10]);
}
translate([104,12,71]){
color([0,2,2]) cube([10,5,10]);
}
///////////walls
color([0,0,1]) cube([5,20,81]);
translate([5,0,0]) {
color([0,0,1]) cube([114,20,5]);
}
translate([114,0,0,]){
color([0,0,1]) cube([5,20,81]);
}
translate([0,0,81]){
color([0,0,1]) cube([119,20,5]);
}
////////fire
translate([55,15,50]){
color([2,0,0]) sphere([5]);
}
translate([55,15,40]){
color([2,0,0]) sphere([5]);
}
translate([55,15,30]){
color([2,0,0]) sphere([5]);
}
translate([30,14,35]){
cube([5,1,1]);}
translate([30,14,36]){
cube([4,1,1]);}
translate([27,14,37]){
cube([10,2,1]);}
translate([28,14,38]){
cube([9,1,1]);}
translate([27,14,39]){
cube([10,1,2]);}
translate([37,14,40]){
cube([1,2,3]);}
translate([38,14,40]){
cube([1,1,3]);}
translate([39,14,41]){
cube([1,1,2]);}
translate([40,14,38]){
cube([1,1,9]);}
translate([27,14,41]){
cube([10,1,1]);}
translate([28,14,42]){
cube([9,1,1]);}
translate([30,14,43]){
cube([7,1,1]);}
translate([37,14,43]){
cube([1,2,7]);}
translate([38,14,45]){
cube([2,1,1]);}
translate([29,14,44]){
cube([8,1,1]);}
translate([28,14,45]){
cube([9,1,2]);}
translate([26,14,46]){
cube([1,2,2]);}
translate([27,14,47]){
cube([10,1,1]);}
translate([27,14,48]){
cube([10,2,1]);}
translate([38,14,48]){
cube([1,2,1]);}
translate([29,14,49]){
cube([8,1,1]);}
translate([30,14,50]){
cube([4,1,1]);}
translate([36,13,45]){
cube([1,1,1]);}
//////////doors
translate([63,3,5]){
color([0,0,0]) cube([15,12,1]);
}
translate([70,15,5]){
color([0,0,0]) cube([1,1,1]);
}
translate([113,3,38]){
color([0,0,0]) cube([1,12,10]);
}
//////dragon
translate([67,14,26]){
cube([5,2,1]);}
translate([67,14,27]){
cube([6,1,1]);}
translate([68,14,28]){
cube([5,1,2]);}
translate([77,14,26]){
cube([5,2,1]);}
translate([77,14,27]){
cube([6,1,1]);}
translate([70,15,27]){
cube([1,1,15]);}
translate([81,15,27]){
cube([1,1,15]);}
translate([78,14,28]){
cube([5,1,2]);}
translate([68,14,29]){
cube([16,1,2]);}
translate([67,14,31]){
cube([17,1,2]);}
translate([66,14,33]){
cube([18,1,1]);}
translate([66,14,34]){
cube([19,14,2]);}
translate([67,14,36]){
cube([18,2,2]);}
translate([68,14,38]){
cube([17,1,1,]);}
translate([69,14,39]){
cube([16,1,1]);}
translate([70,14,40]){
cube([6,1,2]);}
translate([71,14,42]){
cube([4,1,1]);}
translate([71,14,43]){
cube([6,1,1]);}
translate([71,14,44]){
cube([7,1,1]);}
translate([71,14,45]){
cube([6,1,1]);}
translate([70,15,46]){
cube([1,1,8]);}
translate([70,14,46]){
cube([7,1,1]);}
translate([63,14,47]){
cube([15,1,1]);}
translate([63,14,46]){
cube([4,1,1]);}
translate([64,14,45]){
cube([2,1,1]);}
translate([64,14,44]){
cube([1,1,1]);}
translate([63,14,48]){
cube([16,2,1]);}
translate([64,14,49]){
cube([14,1,1]);}
translate([66,14,50]){
cube([11,1,2]);}
translate([67,14,52]){
cube([10,1,1]);}
translate([68,14,53]){
cube([6,1,1]);}
translate([71,14,54]){
cube([5,1,1]);}
translate([72,14,55]){
cube([5,1,1]);}
translate([65,14,52]){
cube([2,1,2]);}
translate([64,14,54]){
cube([1,1,1]);}
translate([63,14,55]){
cube([1,1,1]);}
translate([68,14,50]){
cube([1,1,1]);}
translate([77,14,40]){
cube([3,1,1]);}
translate([78,14,41]){
cube([1,1,1]);}
translate([81,14,40]){
cube([4,1,1]);}
translate([81,14,41]){
cube([1,1,1]);}
translate([83,14,41]){
cube([2,1,2]);}
translate([82,14,43]){
cube([2,1,2]);}
translate([81,14,44]){
cube([1,2,1]);}
translate([82,14,45]){
cube([1,1,1]);}
translate([68,13,51]){
cube([1,1,1]);}```