Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Help with drawing integers.
Post: RE: Help with drawing integers.

(Aug-21-2019, 03:43 PM)metulburr Wrote: Quote: def draw(self, screen): screen.blit(self.scoreboard, (0, 0)) screen.blit(self.team1txt, (500, 500)) You are only drawing one number ...
ghost0fkarma Game Development 4 2,834 Aug-21-2019, 11:55 PM
    Thread: Help with drawing integers.
Post: Help with drawing integers.

import pygame, sys class Scene: def __init__(self): self.team1 = 0 self.team2 = 0 self.font = pygame.font.SysFont('Cosmic Sans MS', 900) self.team1txt = self.font...
ghost0fkarma Game Development 4 2,834 Aug-21-2019, 03:24 PM
    Thread: Help with tic tac toe game.
Post: Help with tic tac toe game.

import pygame, random class Player: def __init__(self): self.speed = 5 self.tick = 0 self.interval = 30 self.rect = pygame.rect.Rect((50, 50, 70, 70)) sel...
ghost0fkarma Game Development 2 2,250 Apr-09-2019, 02:42 PM
    Thread: Setting up a health system.
Post: RE: Setting up a health system. [Solved]

Thank you good sir
ghost0fkarma Game Development 2 2,962 Mar-19-2019, 10:25 PM
    Thread: Setting up a health system.
Post: Setting up a health system.

import pygame, sys, random from pygame.locals import * from pygame_functions import * class CrocSprite(pygame.sprite.Sprite): def __init__(self, group): pygame.sprite.Sprite.__init__(self...
ghost0fkarma Game Development 2 2,962 Mar-19-2019, 02:14 PM
    Thread: Help with collisions.
Post: RE: Help with collisions.

(Mar-10-2019, 08:08 PM)Windspar Wrote: Tip. Convert images to pygame format. It will help with speed and pygame doesn't have to do it on the fly. boatIMG = pygame.image.load("boatIMG.png").convert()...
ghost0fkarma Game Development 5 6,037 Mar-10-2019, 10:26 PM
    Thread: Help with collisions.
Post: RE: Help with collisions.

(Mar-10-2019, 08:08 PM)Windspar Wrote: Tip. Convert images to pygame format. It will help with speed and pygame doesn't have to do it on the fly. boatIMG = pygame.image.load("boatIMG.png").convert()...
ghost0fkarma Game Development 5 6,037 Mar-10-2019, 08:11 PM
    Thread: Help with collisions.
Post: Help with collisions.

import pygame, sys, random from pygame.locals import * from pygame_functions import * pygame.init() clock = pygame.time.Clock() fps = 30 DisplaySurface_Width = 480 DisplaySurface_Height = 640 Displ...
ghost0fkarma Game Development 5 6,037 Mar-10-2019, 07:42 PM
    Thread: Help making enemys?
Post: RE: Help making enemys?

(Mar-07-2019, 05:12 PM)metulburr Wrote: get a random location on the x axis, and create a bullet object that increases Y value to drop down. Thank you for the response and help! I have finally man...
ghost0fkarma Game Development 3 2,504 Mar-08-2019, 02:10 AM
    Thread: Help making enemys?
Post: Help making enemys?

import pygame, sys from pygame.locals import * pygame.init() fps = 30 fpsClock = pygame.time.Clock() DisplaySurface = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Boat Game") wh...
ghost0fkarma Game Development 3 2,504 Mar-07-2019, 03:41 PM
    Thread: AttributeError?
Post: RE: AttributeError?

Problem Fixed! Thank you!
ghost0fkarma General Coding Help 4 2,603 Feb-13-2019, 02:23 AM
    Thread: AttributeError?
Post: RE: AttributeError?

Sorry to be a bother but I still don't understand. I keep receiving the error Error:AttributeError: 'tuple' object has no attribute 'player_is_attacked'.
ghost0fkarma General Coding Help 4 2,603 Feb-13-2019, 02:02 AM
    Thread: AttributeError?
Post: AttributeError?

class player: def __init__(self, name, health): self.name = name self.health = health def player_is_attacked(self, dmg_taken): return self.health - dmg_taken def ...
ghost0fkarma General Coding Help 4 2,603 Feb-13-2019, 12:50 AM
    Thread: Int object not callable error!
Post: RE: Int object not callable error!

(Nov-14-2018, 02:59 AM)metulburr Wrote: remove the parenthesis on QUIT if event.type == pygame.QUIT: Thank you very much!
ghost0fkarma Game Development 2 7,189 Nov-14-2018, 03:02 AM
    Thread: Int object not callable error!
Post: Int object not callable error!

import pygame pygame.init() gameDisplay = pygame.display.set_mode((800,600)) pygame.display.set_caption("Simple dodging game") clock = pygame.time.Clock() crashed = False while not crashed: for ...
ghost0fkarma Game Development 2 7,189 Nov-14-2018, 02:52 AM
    Thread: Need help with simple guessing game!
Post: RE: Need help with simple guessing game!

(Nov-02-2018, 10:13 PM)j.crater Wrote: That's because in if/elif statements you call game() without numGuesses parameter, which means it will always be 10 (default). So instead do this game(ranNum,...
ghost0fkarma General Coding Help 2 2,803 Nov-03-2018, 01:19 AM
    Thread: Need help with simple guessing game!
Post: Need help with simple guessing game!

import random def game(ranNum, numGuesses=10): pick = int(input("Enter a number ----> ")) if pick > ranNum: print("Too high try again. " + str(numGuesses - 1) + " trys remaini...
ghost0fkarma General Coding Help 2 2,803 Nov-02-2018, 10:06 PM
    Thread: Need help with simple calculator.
Post: RE: Need help with simple calculator.

Thank you good sir :)
ghost0fkarma General Coding Help 3 2,743 Sep-11-2018, 07:29 PM
    Thread: Need help with simple calculator.
Post: Need help with simple calculator.

def main(): choice = input("Add or Sub? ") if choice == "Add": Add1() else: Sub1() def Add1(): addchoice = str(input("Pick a number. ")) addchoice1 = str(input("Pi...
ghost0fkarma General Coding Help 3 2,743 Sep-11-2018, 07:06 PM
    Thread: Help With Pygame
Post: RE: Help With Pygame

Thank You Good Sir
ghost0fkarma Game Development 2 4,719 Jan-25-2018, 01:50 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020