#๐Ÿ”’ PYTHON pyxel

33 messages ยท Page 1 of 1 (latest)

silent heraldBOT
#

@obtuse yacht

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

obtuse yacht
#

Could someone finish one of the codes for me please because it's due in a very short time and by the time I do it I won't have the time

#

I am ready to pay if necessary

lament kraken
#

what time is it due @obtuse yacht

#

I can try

obtuse yacht
#

in 2hours

#

do I pay u ?

lament kraken
#

uh I dont have a credit card tho

obtuse yacht
#

i send u the goal ?

lament kraken
#

gift card?

#

well after

lament kraken
#

I need to know the requirements

obtuse yacht
#

I'm sending you the teacher's code (not finished) you can help yourself with that and also that of one of my friends which is finished

obtuse yacht
#

Mandatory
-> personal sprites good
-> beautiful card nn
-> collect objects of at least 2 types
-> set a counter of objects collected
-> put an enemy that changes place from time to time
-> if hit by an enemy -> loss of HP
-> add a PV recharge in the form of an object
-> if VP at 0 then end of game
-> display an image when the game ends

Option -> choose at least 2

-> make a home screen
-> put a secret passage
-> make another level
-> collect a weapon to kill the enemy
-> potion to break walls
-> move the enemy automatically every 5 seconds
-> move the enemy towards the character
-> change the position of objects every 30 seconds
-> set a timer
-> add multiple enemies
-> add a boss
-> play music

SHORT VIDEO (1 min max)

-> make a demo of your game

what I want to do
move enemy automatically every 5 seconds
-> move the enemy towards the character
-> set a timer
add multiple enemies

#

x = x + taille_sprite / 2
y = y + taille_sprite / 2
if ((x - x_e) ** 2 + (y - y_e) ** 2) <= (taille_sprite ** 2 / 2):
return True
else:
return False

def collision_couleur(sprite_x, sprite_y):
if pyxel.pget(sprite_x, sprite_y) == 5:
return True
return False

def collision_couleur2(sprite_x, sprite_y): # Correction de la type
if pyxel.pget(sprite_x, sprite_y) == 14:
return True
return False

def draw():
pyxel.cls(12)
pyxel.bltm(0, 0, 0, 0, 0, largeur_fenetre, hauteur_fenetre, 0)
pyxel.blt(2,110,24,0,8,8,0) # Personnage
#pyxel.blt(, 0, x_v, y_v2) # Monstre vert
#pyxel.blt(24, 8, x_b, y_b2) # Monstre bleu
#pyxel.blt(24, 0, x_d, y_d2) # Diamant
#pyxel.blt(8, 8, x_pi, y_pi2) # Piรจce d'or
#pyxel.blt(32, 0, x_t, y_t2) # Tรชte de mort

def update():
global sprite_x, sprite_y, pv, fin, dernier_deplacement, time, x_v, y_v2, x_p, y_p2, x_pi, y_pi2, x_d, y_d2, x_b, y_b2

sprite_x, sprite_y = deplacement_sprite(sprite_x, sprite_y)

# Gestion des collisions
toucher_v = collision(sprite_x, sprite_y, x_v, y_v2)
toucher_p = collision(sprite_x, sprite_y, x_p, y_p2)
toucher_pi = collision(sprite_x, sprite_y, x_pi, y_pi2)
toucher_d = collision(sprite_x, sprite_y, x_d, y_d2)
toucher_b = collision(sprite_x, sprite_y, x_b, y_b2)

if pv <= 0:
    fin_jeu()

if time == 0:
    fin_jeu()

if time.time() - dernier_deplacement > 5:
    deplacement_ennemi()  # Appel de la fonction deplacement_ennemi
    dernier_deplacement = time.time()

pyxel.text(5, 2, "temps :" + str(time), 0)  # Afficher le timer
pyxel.text(40, 2, "pv :" + str(pv), 0)  # Afficher les PV restants
#

def deplacement_ennemi():
global x_v, y_v2, x_b, y_b2, x_t, y_t2
x_v += randint(-1, 1)
y_v2 += randint(-1, 1)
x_b += randint(-1, 1)
y_b2 += randint(-1, 1)
x_t += randint(-1, 1)
y_t2 += randint(-1, 1)

def fin_jeu():
global fin
fin = 1

pyxel.run(update, draw)

silent heraldBOT
#

Hey @obtuse yacht!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
lament kraken
#

Ok, ill have know tho I have never worked with Pyxel and wouldn't recommend completely relying on me to get this done in 2 hours, but I'll try my best

#

i'll try

#

also I can't really record on my laptop

obtuse yacht
#

I can't send everything here

obtuse yacht
#

can I send u the rest in private ?

lament kraken
#

sure

obtuse yacht
midnight marlin
silent heraldBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

lament kraken
#

oh shoot

#

dang

silent heraldBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.