Skip to content

Instantly share code, notes, and snippets.

import sys, os, time, random, pygame, math, socket
from pygame.locals import *
from load_image import load_image
pygame.init()
# This is to replace the gmk "all" and also to update everything.
global globalGameObjectList
globalGameObjectList = []
import os
import glob
import pygame
from load_image import load_image
from pygame.locals import *
# This is used later to check all the surrounding pixels of one.
global edgeList
0; 227
12; 25
12; 26
12; 27
12; 28
12; 29
12; 30
12; 31
12; 32
12; 33
import os
import glob
import pygame
from load_image import load_image
from pygame.locals import *
# This is used later to check all the surrounding pixels of one.
global edgeList
import sys, os, time, random, pygame, math, socket
from pygame.locals import *
from load_image import load_image
import functions
from collision import characterCheckCollision, characterHitObstacle
from importMapRects import importMapRects
pygame.init()
# This is to replace the gmk "all" and also to update everything.
import pygame
def importMapRects():
rectList = []
text = open('Maps/Test_wm', 'r')
linesList = text.readlines()
import functions
import pygame
def characterCheckCollision(character, wallmask):
# Check if a the Character has hit the wall:
hasCollided = False
for index in range(len(wallmask)):
def characterHitObstacle(character, wallmask):
newX = character.x
newY = character.y
oldX = character.x-character.hspeed
oldY = character.y-character.vspeed
def characterHitObstacle(character, wallmask):
# THIS IS THE NEW VERSION; STILL WITH x/y
newX = character.x
newY = character.y
hspeed = character.hspeed
from __future__ import division, print_function
import pygame, math
from pygame.locals import *
import random
import function
import character
class Rocket(entity.Entity):