Super Mario Galaxy

This is the Super Mario Galaxy community. TAS and Non-TAS videos posted on this forum. Created and run by Giraffecheetah A.K.A. generalmarioY.


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 I am making my very own Video Game! on Sat Oct 22, 2011 4:49 pm

My game is called Caracal. I am using Pygame, which is a programming language that allows you to make video games.

Download it here:
pygame.org

There is a bug with this code (frames per second), but I will fix it soon.



Code:
import os, sys
import pygame
import time
import math


pygame.init()
screen = pygame.display.set_mode((699, 500))
pygame.display.set_caption("Caracal")


pygame.font.init()
pygame.font.get_fonts()


#Loads everything.

caracal = []
caracal.append(pygame.image.load("Images/Caracal/caracal_stand_right.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_run_right.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_run_right_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_jump_right_f1.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_jump_right_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_down.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_right_f1.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_right_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_right_f3.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_right_f4.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_stand_left.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_run_left.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_run_left_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_jump_left_f1.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_jump_left_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_down_left.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_left_f1.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_left_f2.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_left_f3.png"))
caracal.append(pygame.image.load("Images/Caracal/caracal_sleep_left_f4.png"))
caracal_loc = caracal[0].get_rect()

menubackground = pygame.image.load("Images/Backgrounds/menubackground.png")
menubackground_loc = menubackground.get_rect()


pressentertoskip = pygame.image.load("Images/Text/pressentertoskip.png")
pressentertoskip_loc = pressentertoskip.get_rect()

run = True
menu = True
f = 1



if not pygame.mixer:
  print "Warning: Sound disabled!"




while run == True:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      run = False
    keypresses = pygame.key.get_pressed()
    mousebuttoninput = pygame.mouse.get_pressed()
    if keypresses[pygame.K_RIGHT]:
      pass
  if menu:
    pygame.time.delay(100)
    if f == 0 and pygame.time.delay > 100:
      f = 2
    elif f == 2 and pygame.time.delay > 100:
      f = 0
    screen.blit(menubackground, (0, 0))
    screen.blit(caracal[f], (320, 270))
    pygame.display.flip()
[img][/img]

View user profile http://supermariogalaxy.forumotion.com

2 Re: on Tue Apr 17, 2012 11:05 pm

It looks like you are very clever . So , have you repaired it now ? Mario Mario

View user profile http:// http://www.beats-by-dre-headphones.us/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum