Inspiration
Major League Hacking is my inspiration.
What it does
It is a one button game using Python.
How we built it
I built it with Python.
import pygame
import sys
pygame.init()
res = (720,720)
screen = pygame.display.set_mode(res)
color = (255,255,255)
color_light = (170,170,170)
color_dark = (100,100,100)
width = screen.get_width()
height = screen.get_height()
smallfont = pygame.font.SysFont('Corbel',35)
text = smallfont.render('quit' , True , color)
while True:
for ev in pygame.event.get():
if ev.type == pygame.QUIT:
pygame.quit()
if ev.type == pygame.MOUSEBUTTONDOWN:
if width/2 <= mouse[0] <= width/2+140 and height/2 <= mouse[1] <= height/2+40:
pygame.quit()
screen.fill((60,25,60))
mouse = pygame.mouse.get_pos()
if width/2 <= mouse[0] <= width/2+140 and height/2 <= mouse[1] <= height/2+40:
pygame.draw.rect(screen,color_light,[width/2,height/2,140,40])
else:
pygame.draw.rect(screen,color_dark,[width/2,height/2,140,40])
screen.blit(text , (width/2+50,height/2))
pygame.display.update()
Challenges we ran into
It was a fun challenge.
Accomplishments that we're proud of
I am proud of taking this challenge.
What we learned
I learned how to build one button game.
What's next for Create a One Button Game
definitely adding more features to it.
Log in or sign up for Devpost to join the conversation.