Over the last two weeks I have been using Python. I've been learning to use computer language to create a game by writing code. I have been using 3 platforms to understand the language so i can give the computer some information to run the code. I understand that the instructions given to the computer makes the command work. This means if I make a mistake like writing it wrong it wont work. So I will have to go back and check the code.
Setting up the game
Setting up the game in the python IDLE window has been a step by step process and I have realised that to make the game work I have to open up IDLE window and use Pygame that is already downloaded on the computer. Once the window is opened I created a new template file which is the basic game
# 1. Pygame template - skeleton for a new pygame project
import pygame
import random
# 2. This code is for setting up the window width, height and there rate that the frames of the group change
WIDTH = 360
HEIGHT = 480
FPS = 30
# 3. Define colors by understanding that the red, green and blue
RED=(255, 0, 0)
GREEN=(0, 255, 0)
BLUE=(0, 0, 255)
Problem solving
I managed to write the code following
Game loop
Using python with 3 different platforms
Subscribe to:
Post Comments (Atom)
Reflection Week 3
This week I learnt about 2 games called Ki O Rahi and Ti Uru. When I was playing Ki O Rahi it got a bit confusing because there was a lot of...
-
This week I learnt about 2 games called Ki O Rahi and Ti Uru. When I was playing Ki O Rahi it got a bit confusing because there was a lot of...
-
Explain your invention: Our invention is a tripwire which is meant to alert people when someone is trying to enter the room. Positives...
-
Today in English we went into 3 groups and went around the work stations. The first one we went to we had to answer questions about video ga...
No comments:
Post a Comment