I created a sprite for a box. Using a random locator and rect codes.
In this section I learned about classes and made a code using the person class
This identifies nancy and bob as persons in the game.
Today I learned basic code for drawing shapes
I made this code for making arcs to create an eclipse
pygame.draw.arc(screen, GREEN, [100,100,250,200], PI/2, PI, 2)
pygame.draw.arc(screen, BLACK, [100,100,250,200], 0, PI/2, 2)
pygame.draw.arc(screen, RED, [100,100,250,200],3*PI/2, 2*PI, 2)
pygame.draw.arc(screen, BLUE, [100,100,250,200], PI, 3*PI/2, 2)
This week I learned about looping and made an example code for a basic loop.
for i in range(5):
print(“I will not chew gum in class.”)
This will output a basic string 5 times saying you will not chew gum.
At this point I learned about if and else statements.
For this I have made a code for a logic puzzle that uses if and else
#Logic puzzle from
print (“During a recent police investigation, Chief Inspector Stone was interviewing five local villains to try and identify who stole Mrs Archer’s cake from the mid-summers fayre. \nBelow is a summary of their statements \nArnold: it wasn’t Edward
\n it was Brian.\nBrian: it wasn’t Charles \n it wasn’t Edward.\nCharles: it was Edward \n it wasn’t Arnold \nDerek: it was Charles\n it was Brian. \nEdward: it was Derek\n it wasn’t Brian.
It was well known that each suspect told exactly one lie. Can you determine who stole the cake?”)
user_name = input(“Who stole the Cake? “)
if user_name.lower() == “Charles”:
print (“You are correct! Great work!”)
print (“You are wrong.”)
This week I began learning python in order to eventually code a game for my raspberry pi.
I sourced my information from http://programarcadegames.com/index.php?chapter=foreword&lang=en#section_0
I worked on a very basic project where I essentially created a tax calculator. I used basic calculating functions and use of variables and an integer function.
tax = 1.12
price = input(“Insert Price Here:”)
price = float(price)
total = price * tax
print (“Your final price is:”, total)
Now you should be done with building the cabinet. From this point you will be installing the retro pie OS onto the raspberry pi 2. I recommend downloading the retro pie image from the official retro pie site.
First you will want to reformat you sd card using http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml
Then you will need to put the image file onto your micro SD card.
At this point you should get your roms from whatever website you will be using. And put the roms into the directory folder in the SD card.
After this you will need to start up the Raspberry Pi 2. Assuming that ends up working you will then have the emulator working from there I recommend checking that all the buttons are working and if not recheck the control board to see if anything became loose.
- Make sure you have completed the cabinet and have all the components in.
- Reformat your sd card
- Add the image file and the roms.