What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-22 05:12:11
pygame.mixer.music.queue
import pygame import time from tkinter import * root = Tk() c = ["music1.mp3","music2.mp3","music3.mp3"] #you_can_add_more x= 0 def music(): pygame.init() pygame.mixer.init() pygame.mixer.music.load(c[x]) py... Add solution -
Python 2021-11-21 18:20:13
how to make a backround color in pygame
#getting pygame and another library we need for setup import pygame, sys #setup(for starting the pygame i'm pretty sure) pygame.init() #making the screen width = 1280 height = 960 screen=pygame.display.set_mode((width,height)) #this is the color I want... Add solution -
Javascript 2021-11-20 23:44:09
node sleep
// one liner await new Promise(resolve => setTimeout(resolve, 5000)); // or re-usable `sleep` function: async function init() { console.log(1); await sleep(1000); console.log(2); } function sleep(ms) { return new Promise((resolve) => { ... Add solution -
Python 2021-11-20 21:42:21
pygame for loop for draw shape
import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0,32) class Rectangle: def __init__(self, pos, color, size): self.pos = pos self.color =... Add solution -
Python 2021-11-20 19:26:20
python libraries for game development
import pygame pygame.init() win = pygame.display.set_mode((500,500)) pygame.display.set_caption("First Game") x = 50 y = 50 width = 40 height = 60 vel = 5 run = True while run: pygame.time.delay(100) # This will delay the game the given ... Add solution -