You are a great man...I have been looking for this for MONTHS!!! 😀😀😀
@baraltech2 жыл бұрын
Thank you so much! Glad I could help!
@amultitaskingperson8 ай бұрын
i cudve taught you :(
@hasanchaker95743 жыл бұрын
from ursina import * app = Ursina() window.color = color.white dino = Animation('assetes\dino', collider='box', x=-5) ground1 = Entity( model='quad', texture= 'asset\ground', scale=(50,0.5,1), z=1 ) ground2 = duplicate(ground1, x=50) pair = [ground1, ground2] cactus = Entity( model='quad', texture= 'assets\cacti', x = 20, collider='box' ) cacti = [] import random as r def newCactus(): new = duplicate(cactus, x=10+r.randint(0,5)) cacti.append(new) invoke(newCactus, delay=2) newCactus() label = Text( text = f'Points: {0}', color=color.black, position=(-0.6, 0.4) ) points = 0 def update(): global points points += 1 label.text = f'Points: {points}' for ground in pair: ground.x -= 6*time.dt if ground.x < -35: ground.x += 100 for c in cacti: c.x -= 6*time.dt if dino.intersects().hit: dino.texture= 'assets\hit' application.pause() sound = Audio( 'assets\\beep', autoplay=False ) def input(key): if key == 'space': if dino.y < 0.01: sound.play() dino.animation_y( 2, duration=0.4, curve= curve.out_sine ) dino.animation_y( 0, duration=0.4, delay=0.4, curve = curve.in_sine ) camera.orthographic = True camera.fox = 10 app.run()
@manangupta32852 жыл бұрын
Thank you for the code.
@btsfangirl5422Ай бұрын
Thank you so much
@WhatsInYourHead_8 ай бұрын
I added all the image files to my game folder and the screen is still black. Explanation? Also I am using an IDE called replit.
@SubStudios993 ай бұрын
Did you add pygame.display.flip()
@FrantišekBaran12 жыл бұрын
Hi! How can I make jump to be smooth?
@Mask_Masked7 ай бұрын
I know I'm abit late however to smooth out the game and visuals add the following code to the end of your pygame screen line like so: screen = pygame.display.set_mode((1280, 720)) ↓ screen = pygame.display.set_mode((1280, 720),pygame.HWSURFACE | pygame.DOUBLEBUF | pygame.SCALED, vsync=1)
@BlackkPool38693 жыл бұрын
I also subscribed to you. What fine content! Bravo! Bravo!