
Lv.1
在 大家好,我是新来的,不知道怎样制作游戏,请多多指教 中回复
可以用pygame,pyglet,cocos,pgzero,配置好的话可以用U3D,UE4
2022-02-06T20:21:20 点赞:0
在 说说各位对python的各类第三方库的熟悉程度吧 中回复
pygame会 importpygame,sys pygame.init() screen=pygame.display.set_mode((500,500)) whileTrue: foreinpygame.event.get(): ife==pygame.QUIT: pygame.quit() sys.exit() requests会一点 importrequests importos importtime importrandom print("\t\tAI人脸批量下载器\n图片来自https://thispersondoesnotexist.com/生成\n\t\t\t批量下载器作者:申浩南\n"+"-"*50) path=str(time.ctime(time.time())).split(":")[0]+str(random.randint(1000000,99999999)) url="https://thispersondoesnotexist.com/image" open("a.png","wb") x=input("请输入用于存储图片的文件夹名称(不提供则随机生成)\n") ifx!="": path=x j=int(input("请输入要下载的数量\n")) try: os.mkdir(path) except: path=str(time.ctime(time.time())).split(":")[0]+str(random.randint(1000000,99999999)) os.mkdir(path) print("0%") foriinrange(j): resp=requests.get(url,timeout=30) wit喵en(f"{path}{os.sep}{i+1}.png",mode="wb")asf: f.write(resp.content) print(str(100/j*(i+1))+"%")
2022-02-13T12:32:26 点赞:0
在 怎么涨工作室积分?? 中回复
会Python加入这个工作室吧($b゚3゚b$) https://shequ.codemao.cn/work_shop/11617
2022-02-16T14:23:11 点赞:0
在 Python云工作室火速招人 中回复
2022-02-17T09:39:41 点赞:1
在 Python云工作室火速招人 中回复
2022-02-17T09:40:58 点赞:1
在 【热】Python云工作室火速招人 中回复
2022-02-17T10:24:04 点赞:0
在 【热】Python云工作室火速招人 中回复
2022-02-17T10:24:35 点赞:0
在 【Python作品分享】pygame【求助帖】 中回复
import sys,pygame
from pygame.locals import*
pygame.init()
pygameDisplay = pygame.display.set_mode((800,600))
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
green = (0, 255, 0)
blue = (0, 0, 255)
DISPLAYSURF.fill(white)
pygame.draw.circle(DISPLAYSURF, green, (100, 100), 30, 2)
pygame.draw.ellipse(DISPLAYSURF, black, ((300, 100), (300, 200)))#之前这里少了个括号
# run the game loop
while True:
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
上一行少了个括号
2022-02-17T11:20:57 点赞:0
在 海龟编辑器怎么做画笔渐变色 中回复
import turtle as t
t.colormode(255)
t.pensize(5)
t.hideturtle()
for i in range(0,256,1):
color = (i,min(i*2, 255),255)
t.pencolor(color)
t.forward(1)
t.done()
2022-02-17T12:25:31 点赞:1