u/Ghost01002

i'm making a Doodle jump video game inspired to improve.
i have no clue what to do to spawn platforms, can you help me with that please ?

import pygame
import sys
import random
from joueur import 
Joueur
from plateforme import 
Platforme


pygame.
init
()


WIDTH = 1300
HEIGHT = 800
FPS = 60


pygame.display.
set_caption
("Invasion de blocs")
screen = pygame.display.
set_mode
((WIDTH,HEIGHT))
clock = pygame.time.
Clock
()
joueur = 
Joueur
()



#here is the part where i need your help
'''plateforme = []
for i in range(10):
    p = Platforme(random.randint(0,WIDTH-100),HEIGHT -(i*100))
    plateforme.append(p)'''  
#probleme sur la partie avec les platforme 


running = True
while running == True:
    for event in pygame.event.
get
():
        if event.type == pygame.QUIT:
            running=False
    
    screen.
fill
((25,25,25))
    pygame.draw.
rect
(screen,(225,0,0),joueur._rect)
    joueur.
mouvement
()
    joueur.
velocity
()
    pygame.display.
flip
()
    clock.
tick
(FPS)
pygame.
quit
()
sys.
exit
()

thank you for those who help me !

reddit.com
u/Ghost01002 — 16 days ago