#game-development

1 messages ยท Page 88 of 1

limber veldt
#

Back in a couple of minutes...

timber kayak
#

Hmm

spiral basin
#

Do you know what circular important means?

timber kayak
spiral basin
#

It mean the module is importing a module that is importing it

#

Aka
Code for module a is:
Import b
But code for module b is
Import a

#

So parts of code that use those modules can't be Initialized

#

U can try to download delete pygame and install again(latest version preferably)

timber kayak
#

Hmm alr

dawn quiver
#

this is because you named your file 'pygame.py'

#

An import basically means that your importing a certain python file

#

so when you import 'requests' your actually basically taking the code from a file called 'requests.py' and using it in your file

#

but when you name your file the same as the file your importing from, it will import the file yourwriting

#

basically

#

just change the name of your file

midnight heart
#

how can i export a pygame game to a apk file?

dawn quiver
midnight heart
#

uh thank you ๐Ÿ™‚

sturdy summit
#

Hey Y'all ... someone to help me a good manner to code with pygame ?

I've used to make 3 easy game with pygame... In the beggining, the code look clean, but at the last, there are a lot of file.py , test.py everywhere and the main.py is look like my room ...

dawn quiver
#

Well

#

i personally sort everything if it gets mess

limber veldt
#

Awesome, how soon can ya get here?

dawn quiver
#

Then importing everything in the main file

#

oten tho if your game is less than 1500 lines theres no need to do this

sturdy summit
#

the mess is when i try to add some new function to the game, i didn't even know where should I put it in the project... and if i find, i try to run, but a lot of bugs ... I'm using Git to fix my error bcs some the time, i'don't even know what's happen (lol)

dawn quiver
#

It must really just be that you arent following good practise ๐Ÿ˜„

sturdy summit
#

roolback to the last modification where the game's run ? '-'

dawn quiver
#

true

#

personally i spam command z

#

but preferances ig

sturdy summit
#

command z only if i remember when i have put modification ...

dawn quiver
#

true

#

github can be useful

limber veldt
#

I'm not sure how long the undo buffer is in VSC by default, but I've never ran out of ctrl z unless I close it

dawn quiver
#

you can undo everything you did when you opened it

#

after that, no

limber veldt
#

Sounds, I've recorded all of the sounds from the game's test mode and cut them all into their own wav files, now to learn how to implement them

dawn quiver
#

pygame has a good sound system

limber veldt
#

I'll start with some basic sounds, shoot first, pew pew pew

limber veldt
#

That was easy

limber veldt
#

And I worked out thruster sound to keep repeating but not keep adding more channels of it when the player holds the thrster key

#

The thruster didn't sound right when simply playing it when the key is held because it kept adding more channels

limber veldt
#

You need a closing ' in that liine: print('you lose srry maybe next time)

#

print('you lose srry maybe next time')like that

#

I don't know where that line is in relation to the code you're showing, but it's correct in the code

limber veldt
marble bison
#

makae this a loading screen

#

its cool how like whens its done loading it just finshes colouring up the whole title

limber veldt
#

It will be an attract screen, sorta like a loading screen

marble bison
#

r u doing this for fun or for actaully making it popular game

limber veldt
#

Shooting enemy alien spaceship before they capture and mutate all the humans

#

Fun

marble bison
marble bison
limber veldt
#

I already have the actual game that I can play any time, but I want to recreate it in Python

marble bison
#

me and my friend wanna create a game but we dont know the idea lemon_pensive

limber veldt
#

Yeah, the game's big on particle effects, like everywhere all the time, particles

marble bison
limber veldt
#

It's a simple game with complex things, the original game: https://www.youtube.com/watch?v=wAKxa5C9jHY&t=2940s

This is Williams Defender green label on MAME, factory settings. On wave 1 I pick up all ten and force 5 through to the top of the screen. This is a bug and I always wondered what happens as they start to crawl down the screen when they reach the bottom. Gary Whittingtham has done this and I wanted to do the same myself. You can see they eventua...

โ–ถ Play video
marble bison
limber veldt
#

Yeah, and I've started adding those too

#

Has ship thruster and bullet sound effects so far

#

They're easy to add

#

Just a matter of time

marble bison
#

๐Ÿ˜” im gonna make a pygame now since im done my 1st ever actaull project

#

probably gonna do snake game

limber veldt
#

Yeah, it's fun if you have something you just have to make

marble bison
#

coding is fun when u get the basics done

limber veldt
#

Or just bored and want something to do, pygame

marble bison
#

@limber veldt where do i put the image files

limber veldt
#

I don't have any for this project but usually I'll put them in a subfolder in the same folder as my main file

dawn quiver
#

damn

#

thats really good

#

im thinking of making an among us clone 4 games later

limber veldt
#

Thanks, that making it in reverse thing is a struggle but I'll get it, just a matter of getting the maths right

dawn quiver
#

already made a doodle jump clone

#

ยฏ_(ใƒ„)_/ยฏ

limber veldt
#

haha, cute

marble bison
#

my 1st pygame so far its basiccly a square u can jsut move around so far im making snake game

#

@limber veldt

#

๐Ÿ˜„

marble bison
dawn quiver
midnight heart
#

TypeError: expected str, bytes or os.PathLike object, not BytesIO

#

what does it mean?

void acorn
#

excuse me what

#

lmao

#

i somehow imported a random project

limber veldt
#

Well, opposite of boom...unboom!

limber veldt
#

All that data you see there and in the minimap is just for the Williams animation and the logo for the attract mode

#

That's a lot of stuff but worth it for the effects

#

My game loads no images from disk, creates them all from scratch

limber veldt
#

Tic tac toe

steady torrent
#

I have a questiin, does unity support python

#

?

marble bison
#

i was making a game through a tutorial help and the guy said after the episode was done now we done something of a little stupid game

#

;-;

dawn quiver
#

@limber veldt how do you record only the python launchers window ThinkButCooler

dawn quiver
#

neither does any popular game engine

#

other than unreal engine

#

or atleast ive heard

dawn quiver
#
collidelist()
test if one rectangle in a list intersects
collidelist(list) -> index
Test whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned.

so ig if i have a list of tiles, i could just use this

#

nvm didnt work

dawn quiver
#

better...

#

issa dragon ๐Ÿ˜ฎ

limber veldt
#

Whatever Windows calls their screenrecorder, it only records the focused window @dawn quiver

#

And those are fun effects when things don't quite work

dawn quiver
#

damn

#

i use mac

limber veldt
#

Looks like you making progress on your mechanics

dawn quiver
#

idk why its making a new image every time tho

teal ember
#

cause it looks like you are drawing over the previous frame

limber veldt
#

That's what I was gonna ask, my dog needed help out in the rain though

dawn quiver
#

i fixed it

grim abyss
#

@limber veldt I fucking did it man!!!!

#

I can plot each level centered within the window now!

#

took me long enough, lol....

visual bobcat
#

I have no idea what it is but it looks cool XD ๐Ÿ‘

grim abyss
visual bobcat
#

Oh

#

Very cool indeed

#

Hopefully the result will be worth it

grim abyss
#

once I get the plotting down and animation and GUI. I'm going to get into the networked side of it. It's going to get the level information from the idgames ftp site, pull the data to a file on disk and just draw levels at random...

#

then I'm going to put it onto a Raspberry PI and make a "picture frame" thing that hangs on my room wall.

#

it's going to be sick

#

it's going to look like this

visual bobcat
#

Really cool

#

How do you make the lines appear like that?

dawn quiver
#

collision kinda

#

clanky tho

dawn quiver
#

fixed the collision

#

:D

#

but during moving bg it gets fucked

#

hmm

grim abyss
visual bobcat
#

Oh okay

void sleet
#

Do any of you have experience converting your python code to mobile apps?

grim abyss
#

coming along...

void sleet
#

Very nice... looks like a long time to render though.

grim abyss
#

OpenGL? lol

#

this one.....

#

yeah I might be pushing Turtle a bit, lol

wispy topaz
#

jeez that is really cool

void sleet
#

Asking that is like me asking you if you know how to make my car go faster. And then tell you it's a sedan.
Not enough data.
time different parts of the algorithm and find your bottle neck.
Check the assembly code of that part and see if you can write it a different way so that it is more efficient.

wispy topaz
#

and surprisingly detailed

void sleet
#

It is very nice work

grim abyss
wispy topaz
#

im sorry i have no clue what that is

grim abyss
#

it's an 'over-head' view of the level

#

as seen from the auto-map

wispy topaz
#

ahh ok

dawn quiver
#

what is that

grim abyss
#

i'm writing a program that parses the level data within wadfiles and plots it

dawn quiver
#

:0

marble bison
#

my python snake game so far

limber veldt
#

So far so good

marble bison
#

me and my friends are gonna make a sumarai game soon

limber veldt
#

Code for imploding that logopy def implode_row(self, offset, vel_y): loc = [self.x, self.y + offset] vel = [16, -vel_y] rect_x = 0 rect_y = offset loc_x = loc[0] - vel[0] * 100 loc_y = loc[1] + vel_y * 100 for i in range(40): particle = LogoParticle([vel[0], vel[1]], self.surface, [loc_x, loc_y], [rect_x, rect_y, 5, 5]) rect_x += 10 loc_x += 70 vel[0] -= .6 #loc = [self.x, self.y + offset] vel = [4, -vel_y] rect_x = 5 #rect_y = offset loc_x = loc[0] + -vel[0] * 100 #loc_y = loc[1] + vel_y * 100 for i in range(40): particle = LogoParticle([vel[0], vel[1]], self.surface, [loc_x, loc_y], [rect_x, rect_y, 5, 5]) rect_x += 10 loc_x += 70 vel[0] -= .6

#

Particle args: vel, image, pos, blit_rect

#

I should just add another arg to it and pass lifetime, too. LogoParticle() is exactly the same as EnemyParticle() except one has a longer age before it's killed

#

Velocity describes its direction and how fast it's moving, image is the image/surface to make the particle from, pos is where it's born, and blit_rect describes the source x/y/width/height in the image/surface for the particle

#

Since I'm using a surface of 70 pixels height and making 6x6 particles from it, I need to call implode_row() 12 times, once for each row of 6 pixels

#
def implode(self):
        self.implode_row(0, -5)
        self.implode_row(6, -4)
        self.implode_row(12, -3)
        self.implode_row(18, -2)
        self.implode_row(24, -1)
        self.implode_row(30, 0)
        self.implode_row(36, 1)
        self.implode_row(42, 2)
        self.implode_row(48, 3)
        self.implode_row(56, 4)
        self.implode_row(62, 5)
        self.implode_row(68, 5)
dawn quiver
dawn quiver
#

wait wait

#

dont tell me

#

you created an object for each particle

#

anyways

limber veldt
#

It's easier than it seems

#

Well yeah

dawn quiver
#

anyone have any ideas on how to make proper matrix movement

dawn quiver
dawn quiver
dawn quiver
#

if you watch carefully

#

only the image is changing position

#

the object itself(the rectangle) is in the same position

#

thats why he randomely stays in the air

#

because thats where the rectangle is

#
    def draw(self):
        for tile in self.tile_list:
            x = tile[1][0] 
            y = tile[1][1] 
            key = pygame.key.get_pressed()
            if key[K_RIGHT]:
                bx -= 5
            if key[K_LEFT]:
                bx += 5

            tile = (tile[0], pygame.Rect(x+bx, y, 30, 30))
            screen.blit(tile[0], tile[1])
#

this

#

is

#

dumb

#

only lasts for one tile

limber veldt
#

Each particle needs to be a sprite so it can be added to and drawn by the sprite group

#

It's all objects

#

My list of sprite groupspy player_group = pygame.sprite.Group() thruster_group = pygame.sprite.Group() star_group = pygame.sprite.Group() bullet_group = pygame.sprite.Group() enemy_bullet_group = pygame.sprite.Group() particle_group = pygame.sprite.Group() thruster_particle_group = pygame.sprite.Group() tiny_enemies_group = pygame.sprite.Group() enemy_group = pygame.sprite.Group() enemy_spawner_group = pygame.sprite.Group() exploding_enemies_group = pygame.sprite.Group() player_explosion_group = pygame.sprite.Group() coll_rect_group = pygame.sprite.Group() attract_group = pygame.sprite.Group() human_group = pygame.sprite.Group()

#

I have this project setup as to have very little logic outside of objects. My main while loop just checks for keypresses and that's not permanent, since the player is controlled by keys, those belong in the Player() class

#

I'll probably restructure some things and add a main game class to take care of game states

#

Instead of player states

dawn quiver
#

hm

#

well yeah

#

but

#

i thought you kept each particle in a new class lmao

frank fieldBOT
marble bison
limber veldt
#

No idea, it didn't work for me...hung after I pressed a couple of keys

frank fieldBOT
#

Hey @marble bison!

It looks like you tried to attach file type(s) that we do not allow (.exe). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

dawn quiver
#

No but

#

why ping me

marble bison
#

i was showing my game

#

but it delted it

dawn quiver
#

o

marble bison
#

๐Ÿ˜ข

dawn quiver
#

send a .mov file

marble bison
#

how

dawn quiver
#

idk were you sending a-

#

oh

#

you were sending an exe

#

dont send that

marble bison
#

ok

dawn quiver
#

send a screen recording

marble bison
#

ok

#

but i want u to play it

#

๐Ÿ˜ข

dawn quiver
#

No ASKonataCry

#

becaause

#

it could be

#

a virus

#

and macs

#

cant run executables

marble bison
#

yes i totally create virus ๐Ÿ˜ˆ

#

@dawn quiver

#

@limber veldt

#

it hS MUISIC AND SOUnd effects but i had it mute

dawn quiver
#

woah

#

thats nice

#

did you follow a tutorial or do that urself

marble bison
#

tutorial

dawn quiver
#

oh

#

not nice

marble bison
#

its my 1st pygame

#

๐Ÿ˜ข

dawn quiver
#

nvm

#

nice

#

but now

#

i recommend

marble bison
#

yes ik

dawn quiver
#

making your own game

marble bison
#

time to make my own game

#

๐Ÿ’ƒ

dawn quiver
#

mhm

#

lesgo

marble bison
#

im gonna make a sumari game

dawn quiver
dawn quiver
marble bison
# dawn quiver coool!!!

same thing jsut more detailed art by me code by me and my friend(who might not be able to be with me in the summer)

dawn quiver
#

nvm i know another algo the same thing opensource

marble bison
#

im gonna start off by art

#

because we have the plan

grim abyss
dawn quiver
#

mhm

#

art is a good place to start'

dawn quiver
#

wait u didnt use a venv?

#

so i cant just

#

-r requirments

#

?

#

woah thats a pretty big licence

#

do you pay for that ThinkButCooler

frank fieldBOT
dawn quiver
#

bruh wow

#

im seeing so many op tkinter projects today

#

oh wait

#

you used turtle

#

        # DEBUGGING ==========================================================
        # self.debug_points = self.getPoints("vectors.bin")
        # self.canvas.create_line()
        # self._points_toFile("vectors.bin")
        # ===================================================================
        # ============================|
        # These two are set...      # |
        self._wadfile = None        # |
        self.level = None           # |
        # =============================
        # here...                   # |
        self.game = "DOOM"
        self.loadWad("C:\Pydevel\WOS.wad")    # |
        self.loadLevel("MAP03")      # |
        # =============================

comments lvl 100

grim abyss
#

lol, yeah turtle and tkinter. I'm trying to push the new main file. I have a map selection box

limber veldt
#

Very important behavior kind of working! Lander finds human (red block for now), descends, grabs it and head for the top. If he gets there, turns to a mutant

#

Clever use of hidden collision rects

dawn quiver
#

hey

#

@limber veldt how do create a particle

#

i want an explosion effect as well

limber veldt
#

let's see...

dawn quiver
#

i have to fix double jump tho

limber veldt
#

Ok, I'ma show you code that has extra stuff in it...more than necessary for the basic particle, those lines are marked with # not```py
class Particle(pygame.sprite.Sprite): # used by PlayerExplosion
def init(self, vel, pos):
super().init()
self.image = pygame.Surface((3, 3), pygame.SRCALPHA)
self.image.fill(WHITE)
self.rect = self.image.get_rect()
self.rect.x, self.rect.y = pos[0], pos[1]
self.x, self.y = pos[0], pos[1]
self.fx = float(self.x)
self.fy = float(self.y)
self.vx = float(vel[0])
self.vy = float(vel[1])
self.age = 0
self.alpha = 255 # not
self.color = pygame.color.Color('white') # not
self.color_cycler = ColorCycler(['white', 'white', 'white', 'orange', 'red']) # not
particle_group.add(self) # maybe

def update(self):
    self.color_cycler.update() # not
    self.color = self.color_cycler.current_color # not
    self.color[3] = self.alpha # not
    self.image.fill(self.color) # not
    self.fx += self.vx
    self.fy += self.vy
    self.rect.x = int(self.fx)
    self.rect.y = int(self.fy)
    self.age += 1
    if self.age > 60: # not
        self.alpha -= int(255 / 15) # not
        self.alpha = max(0, self.alpha) # not```
limber veldt
#

We need to cast the x and y to and from floats for the math

dawn quiver
#

i was asking the conce[t

#

i can implement the code myself

dawn quiver
#

so you mean a random position?

limber veldt
#

That part is necessary to understand what I'm doing

dawn quiver
#

Hm

limber veldt
#

That's JUST the particle

dawn quiver
#

but are each of the particles images or pygame pixels? ThinkButCooler

limber veldt
#

You have to give it a starting position and a velocity

dawn quiver
#

got it

#

then?

#

make it move towards the ending position?

#

im curious about

limber veldt
#

Look at the code, it's a Surface of 3x3 pixels, make it anything you want though

dawn quiver
#

how to make that particle

limber veldt
#

We're getting there

dawn quiver
#

tis surface

#

haha i was going to use this

#

oof i cant find a pic

#

but

#

basically

limber veldt
#

Now on tto making an explosion of them...

dawn quiver
#

i was going to make frames for each of the particle explosions haha

#

this is better tho

limber veldt
#

This is way better

dawn quiver
#

definetly

#

@limber veldt pygame.SRCALPHA whats this?

limber veldt
#

Sets the surface to handle RGBA colors

dawn quiver
#

:0

limber veldt
#

Instead of just RGB

dawn quiver
#

i need to make a red particle explosion

#

cause blood

#

hmm

#

thanks

#

this was a good idea

limber veldt
#

Color values will be 255, 255, 255, 255

dawn quiver
dawn quiver
limber veldt
#

For an alpha surface

#

No

dawn quiver
#

okok

limber veldt
#

For an alpha surface, four values

#

pygame.color.Color are all alpha colors

dawn quiver
#

so i have a a question

#

is arcade for performant than pygame?

#

actually it doesnt matter, solo dev, not a big diff

limber veldt
#

Like pygame.color.Color('white') is (255, 255, 255, 255)

dawn quiver
#

wait

#

isnt it

#

(255, 255, 255)

limber veldt
#

Nope

dawn quiver
#

:0

limber veldt
#

Four values for pygame.color.Colors

dawn quiver
#

ic

limber veldt
#

You can choose to ignore the fourth value, it defaults tto 255

dawn quiver
#

hmm

#

ohh

#

you create a particle sprite group

#

icic

limber veldt
#

Now, onto this explosion...

dawn quiver
#

particles are interesting

dawn quiver
#

that ill just get a center point (zombie pos) and then

#

make a random lenght from 10 to 15 pixels

#

and make a random number of particles from 12 to 23

limber veldt
#

So what you need is a partticle generator that gives them a random velocity and direction

dawn quiver
#

and make them scatter from that center point to the lenght

#

but i dont get

limber veldt
#

We have the particles, just need the generator

dawn quiver
#

why you need velocity

#

gravity shoudnt affect these particles

limber veldt
#

Because all particles going the same speed just makes an expanding circle

dawn quiver
#

:0

#

aight ima sleep

limber veldt
#

Right?

dawn quiver
#

nice talking with you!

limber veldt
#

So we have tto randomize their speed

dawn quiver
#

random lenght

#

and

#

yes

#

random speed

#

OHH

limber veldt
#

Yeah

dawn quiver
#

i forgot what velocity was

#

haha

#

i thought it was gravity

#

f

limber veldt
#

Velocity is speed

dawn quiver
#

because i used vel_y for my gravity

limber veldt
#

acceleration doesnt' changes for particles

dawn quiver
#

ofc gravity = g = 9.8 ms

#

which is acceleration

limber veldt
#

Right

dawn quiver
#

altho

#

acceleration for these particles

limber veldt
#

If you want to apply gravity then you can use that

dawn quiver
#

would be nice

#

0_0

limber veldt
#

So you apply that gravity in the Particle class itself...

dawn quiver
#

hmm

#

well

limber veldt
#

For the particle generator, I'm using this...

dawn quiver
#

i was thinking

#

more in the terms of

#

accelerating within the direction

limber veldt
#
class PlayerExplosion(pygame.sprite.Sprite): # used by Player
    def __init__(self, x, y):
        super().__init__()
        self.image = pygame.Surface((1, 1))
        self.rect = self.image.get_rect()
        self.x = x
        self.y = y
        self.initx = x
        self.inity = y
        self.numSparks = 30
        self.age = 0
        self.exploding = False

    def update(self):
        #if not self.exploding:
        randDir = 0
        for i in range(0, self.numSparks):
            self.exploding = True
            randDir = random.uniform(0, math.pi)
            #randDir += math.pi / 4
            randSpeed = random.uniform(-5, 5)
            #randSpeed = 8 # random.uniform(-5, 5)
            xv = randSpeed * math.sin(randDir)
            yv = randSpeed * math.cos(randDir)
            particle_group.add(Particle([xv, yv], [self.x, self.y]))
        self.age += 1
        if self.age > 20:
            pygame.sprite.Sprite.kill(self)```
dawn quiver
#

so it will start from random speed x

#

and it will accelerate to y

limber veldt
#

xv and yv are the key

dawn quiver
#

yk what i mean

dawn quiver
#

well

#

i dont use the math module

#

hopefully i dont need to use it here

limber veldt
#

You'll need cos and sin where ever you get it

dawn quiver
#

normally when i see the math module in pygame, i immediately feel like this is a tutorial scam haha

dawn quiver
#

there are other ways

limber veldt
#

Yeah

dawn quiver
#

oh nvm

#

lmao

limber veldt
#

Of course there are other ways

dawn quiver
#

i used cos and sin for my rotation game

limber veldt
#

I said no matter how you get it

dawn quiver
#

direction man

#

thats whats confusing

#

okay i shud sleep now

#

cya!

limber veldt
#

So you don't believe in doing math with something but you import a library/module for other things

marble bison
#

sneak peak at one of the good guys in my upcomming games

limber veldt
#

That's quite a thought

dawn quiver
#

they just use it and be like "uh yeah this is what you need to type to make this happen"

limber veldt
#

Well that may be the case, doesn't make the methods any less useful

#

Calculators have sin and cos keys, damn hackers!

dawn quiver
#

gn! gotta sleep fr now

marble bison
limber veldt
#

Go back to school and learn how to calculate them yourself, slackers

marble bison
limber veldt
#

As a rough draft, that's fine, but he'll need some work before final production

limber veldt
#

That's quite a complex enemy. The lander grabs humans, tries to mutate them and if I shoot them on the way to the top with a human, it let's the human fall. During that fall, if the player collides with him, he will be caught by the player until gently returned to the ground

marble bison
#

@limber veldt @dawn quiver like it now

limber veldt
#

Yeah, that's prettty good, nice cartoon attitude

marble bison
marble bison
#

@limber veldt thinkmon

subtle vessel
#

so, btw, anyone has used other python game engines

#

like pyxel, for example...

frozen knoll
#

Arcade

limber veldt
#

I can catch them if they're falling and deliver them safely back to the ground

#

I don't like how squishy the humans are due to its later than player position updates

#

Like if I fly fast or slow, the human 'slides' back and forth down there

#

Best thing to do to fix would be to update the human's position in the player object which means the player object needs another flag variable to indicate whether or not he's carrying humans

#

And if so, which humans

#

So that it knows which to update

#

I'll just make the human, who knows that he's been caught by the player, saypy player.human_cargo_list.append(self) then the player will have them in its own list

#

Player that is, not human list

#

That's a brilliant idea

#

Then, I can get the len of that list to know how many bonus points to increment score when player delivers human(s) to the ground

grim abyss
#

@limber veldt that game looks legit. cool!

#

the 'minimap' is neat too

limber veldt
#

Thanks

#

Yeah, gotta have that

grim abyss
#

are you using arcade or pygame ?

limber veldt
#

Pygame

#

It's a lot of work but if it really was, I wouldn't do it, it's fun

grim abyss
limber veldt
#

That's hobby coding for ya

#

Some people 'get it' some don't, like addictions

grim abyss
#

lol, good analogy...

limber veldt
#

My game's a remake of an old classic so I can't take all the idea credits but this python implementation is all mine

grim abyss
#

for sure

limber veldt
#

Eugene Jarvis, head writer of the game at Williams Electronics in 1980 gets all the idea creds

#

Just imagine, he was doing this shit on a 6809 8-bit 2 or 3 mhz CPU with a 6808 co-processor

#

In assembly! no less

grim abyss
#

yeah, it's wild. i bet the workflow sucked...debugging..

limber veldt
#

I can read that code, at least a little of it and make some sense out of it but I can't find a complete disassembly only a partial one

#

I wish it were better documented

#

And more complete

#

But whatever, I can make do with out it

grim abyss
#

@limber veldt so there's a website with alot of 'levels' created by the community that I would like to download the .zip's from and extract them in memory and plot them. Would the library 'requests' be the best forthis? This is the site: https://www.doomworld.com/idgames/levels/doom2/g-i/

#

the site doesn't have any kind of 'API' exposed..

limber veldt
#

Oh man, no idea, ,never used requests or web stuff

neon horizon
#

is there a simple way to organize several sets of stats so they can be called on for encounters? (e.g. the player bumps into the goblin's overworld sprite and has to fight X many goblins + Y many slimes where X and Y are random positive integers)

grim abyss
dawn quiver
#

in turtle how can i use WASD instead of my arrow keys ?

#

heres my code

#
onkey(lambda: change(10, 0), 'RIGHT')
dawn quiver
#

you should

#

Look at the turtle docs

#

instead of asking it here

limber veldt
#

Looks like I have all the states worked out for my humans and landers

#

Humans have these states: self.walking, self.caught_by_lander, self. falling, self.caught_by_player

#

Landers have these: is_alive, is_dropping, is_searching, found_human, descending and ascending

#

My landers have two additional collision rects. One to detect humans under it, the other to detect ground and keep the lander flying just above the ground and following the terrain

#

But when he detects a human underneath, it overrides the ground collision

#

So the sprite.collision methods return a list of group objects colliding with a sprite and we can get the group sprite with [0], like sopy human_hits = pygame.sprite.spritecollide(self.human_rect, human_group, False) if human_hits: self.human = human_hits[0]

#

In my case, I'm only interested in the first item in the list even if it has multiples

#

Because a lander can only pick up one human at a time

#

All sorts of nuances to tthis though

#

Wttf is with my t key

#

Like if a human is already being picked up, other landers need to ignore it....or anytthing else. That's why I needed the walking state for the humans, they can only be picked up if they're walking

#

The landers will need more states too because they're not always searching, sometimes they just fly and shoot at player

#

And when they lower down to snag a human, they hover just above for second or two firing a barrage of bullets at the player then takes off with him

paper sandal
#

hi, i need some help...

#

this is my script

#

...

#

and i keep getting this error

#

if you see this message and know how to help, pls ping me

#

I'm a beginner btw, i thought i'd let you know...

limber veldt
#

line 10 or sopy p.initshould bepy p.init()

limber veldt
paper sandal
#

oh thanks

#

lemme change that

limber veldt
#

Try that, see if it works

paper sandal
#

nope :/

#

it says that the error is on line 22

limber veldt
#

Ok, leave it as the corrected version, it needs the ()...

paper sandal
#

IMAGES[piece] = p.transform.scale(p.image.load("images/" + piece + ".png"), (SQ_SIZE, SQ_SIZE))

#

it says that line has an error :/

limber veldt
#

Oh, ok

#

So you need to find the file you're trying to load

#

This is likely wrongpy p.image.load("images/" + piece + ".png")

#

That need to point at the file you're trying to load and apparenttly it doesn't

paper sandal
#

ok...

#

how do i correct it?

limber veldt
#

Just to try something, you can saypy IMAGE[piece] = p.Surface((10, 10)) IMAGE[piece].fill(p.color.Color('red')) instead of the line that's giving you the error and you should get a red square for the piece and no errors. How to fix it to use the images you have depends on where you put those images on your harddrive and in relation to the file you're running

#

You could use an absolute path to the images but that's not best practtice

paper sandal
#

ok

#

so do i try that code?

limber veldt
#

I mean, can if you want but the real fix is to point that line at the correct location of your images

paper sandal
#

ok

#

so do i just put the location of the images there?

limber veldt
#

This not the path: "images/" + piece + ".png"

paper sandal
#

ok

#

C:\Users\Shyaam\PycharmProjects\Chess\Chess\images

#

like that?

#

??

limber veldt
#

Yes, but change all the \ to /

paper sandal
#

ahh ok

#

do i put it in quote marks??

limber veldt
#
p.image.load("C:/Users/Shyaam/PycharmProjects/Chess/Chess/images\" + piece + ".png")```
paper sandal
#

ohhhhh

limber veldt
#

That should work

#

Maybe not

paper sandal
#

p.image.load("C:/Users/Shyaam/PycharmProjects/Chess/Chess/images/" + piece + ".png") did you mean that?

limber veldt
#

oops, I mistaked and didn't change your \ to /

paper sandal
#

ok

limber veldt
#

Corrected up there^

paper sandal
#

ok

#

i did

#

and i didn't get any errors

#

but

limber veldt
#

Notice the last one stays a \

#

No errors

#

Nice

#

But now there's something else?

paper sandal
#

the pygame which pops up is just blank :/

#

its shud look like a chess board with pieces on it

limber veldt
#

I don't know why my t key want to intermittently repeat

paper sandal
#

just so you know, this is meant to be a chess game

#

but I've only programmed to draw the board so far...

desert orbit
#

you can save the image in the same folder as that of your code which is used to execute

#

then you won't have to write the full path

#

just the image name and extension

paper sandal
#

yeah I did

#

the images are in the file itself....

limber veldt
#

Ok, so you're running main() but I don't see where main() is calling drawGameState()

#

Or drawBoard, for that matter

paper sandal
#

oh

#

so what do I do in that case?

#
"""
This class is responsible for storing all the information about the current state of a chess game. It will also be
responsible for determining the valid moves at the current state. It will also keep a move log.
"""
class GameState:
    def __init__(self):
        #board is an 8x8 2 dimensional list, each elements has 2 characters.
        #The first character represents the color of the piece, 'b' or 'w'.
        #The second character represents the type of the piece, 'K', 'Q', 'R', 'N', 'B', or 'P'.
        #The string "--" - represents an empty space with no piece.
        self.board = [
            ["bR", "bN", "bB", "bQ", "bK", "bB", "bN", "bR"],
            ["bp", "bp", "bp", "bp", "bp", "bp", "bp", "bp"],
            ["--", "--", "--", "--", "--", "--", "--", "--"],
            ["--", "--", "--", "--", "--", "--", "--", "--"],
            ["--", "--", "--", "--", "--", "--", "--", "--"],
            ["--", "--", "--", "--", "--", "--", "--", "--"],
            ["wp", "wp", "wp", "wp", "wp", "wp", "wp", "wp"],
            ["wR", "wN", "wB", "wQ", "wK", "wB", "wN", "wR"]]
        self.whiteToMove = True
        self.moveLog = []
#

thats another part of the whole chess engine

#

its in another seperate python file...

limber veldt
#

Line 39 sayspy clock.tick(MAX_FPS)just before that line and at the same indentation level, put apy drawGameState()

paper sandal
#

ok

limber veldt
#

Oh, you need params...

#

Let me look

vague veldt
#

i know is againts to rules to pay for work but i was wondering is there a server i can join to pay someone to make a script for a compress file ?

limber veldt
#
drawGameState(screen, gs)```
paper sandal
#

oh ok

#

i was just bout to say that i got an error

limber veldt
#

You drawGameState is expecting those to be passed, we better pass them

paper sandal
#

ok

#

again some errors... :/

limber veldt
#

Ok, let's comment out the drawPieces() line from drawGameState(), like sopy def drawGameState(screen, gs): drawBoard(screen) #draws the squares on the board #add in pieces highlighting or move suggestions (later) #drawPieces (screen, gs.board) #draws the pieces on top of the squares

#

So we can just deal with getting the board drawn

#

Forget players or pieces, just get the board drawing

paper sandal
#

yeah ok

limber veldt
#

You should work t hrough these things as you do them, don't move on to the next until the first is working.

paper sandal
#

pog no errors

#

ok sure

#

but still i get a blank screen...

limber veldt
#

I'm not sure what p.Color() is but maybe you needpy p.color.Color('white') and py p.color.Color('gray') although it should be giving an error for the way you're doing it, try that way

paper sandal
#

ok

#

nope :/

#

still a blank screen...

limber veldt
#

This a perfect project for a grid class but that's beyond what we trying to do here...

paper sandal
#

oh ok

#

thank you very much for helping me

#

you were done right?

#

or is there anything else we can do??

limber veldt
#

I'm trying to get it running here to draw the screen or see why it's not, but you have imports that I'm not willing to install, so working around that

paper sandal
#

ahh ok

limber veldt
#

Your corrected drawBoard()....

#
def drawBoard(screen):
    colors = [p.Color("white"), p.Color("gray")]
    for r in range(DIMENSION):
        for c in range(DIMENSION):
            color = colors[((r+c)%2)] 
            p.draw.rect(screen, color, p.Rect(c*SQ_SIZE, r*SQ_SIZE, SQ_SIZE, SQ_SIZE))```
paper sandal
#

mhm

#

oh ok

#

1 sec

limber veldt
#

p.Color is correct, I see you're importing them

#

That draws the board

paper sandal
#

well

#

still a blank game :/

limber veldt
paper sandal
#

wait whatt??

#

hold one

#

what are you using?

#

are you using pycharm or something/

#

?

limber veldt
#

VSC

paper sandal
#

oh k

#

im on visual studio

limber veldt
#

Same here

paper sandal
#

yeah

limber veldt
#

VSC = Visual Studio Code

paper sandal
#

hmmm

limber veldt
#

Let me share the complete file I have here...

paper sandal
paper sandal
limber veldt
#

!paste

frank fieldBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

limber veldt
paper sandal
#

ok

#

yayy

limber veldt
#

So maybe you can work from that

paper sandal
#

mhmm

limber veldt
#

I want you to notice what I changed in that drawBaord() function though

paper sandal
#

ok

#

i will see that

limber veldt
#
# your code....
colors = [p.Color("white"), p.Color("gray")]
    for r in range(DIMENSION):
        for c in range(DIMENSION):
            colors = [((r+c)%2)] 
            p.draw.rect(screen, color, p.Rect(c*SQ_SIZE, r*SQ_SIZE, SQ_SIZE, SQ_SIZE))
limber veldt
#

You're assigning colors twice

paper sandal
#

yeah

#

so the first one for white and second one for gray

#

?

limber veldt
#

When what you really need ispy color = colors[((r+c)%2)] to assign colors to color and use color in the draw.rectt()

#

Damn t key

paper sandal
#

ok

paper sandal
limber veldt
#

I like that way of oscillating the variable though

paper sandal
#

ty

#

OKay

limber veldt
#

(r+c)%2

paper sandal
#

tysm for helping (:

#

ill figure out how to place the pieces now.

limber veldt
#

No problem, onward to getting those pieces drawn, good luck

paper sandal
#

thanks

limber veldt
#

That's the most fun of making your own game, you can spawn as many or as few of anything and be invincible, lol

#

Wanna test landers and humans capturing/releasing/falling, whatever interactions, just spawn hundreds of them

#

If there's a bug, it'll show

#

Like that one

dawn quiver
#

does anyone know about ursina?

dawn quiver
limber veldt
#

I give the bullets a random target on a 120x120 pixel area around the player

#

No need to shoot straight at the player, just toward

dense creek
limber veldt
#

Doesn't matter, if everything scales, it all scales but no, it's not resizable

dense creek
dense idol
#

hi guys just a noob question here, can you make kind of complex 2d games such as old rpgs in python or can u not

limber veldt
#

I had some extra particles being thrown into the particle group from my bullets and their particle effects, removed those and it def made a difference in performance

dense idol
#

oh thats great

#

i really want to make some games i have lots of ideas

dense creek
limber veldt
#

The performance of python starts to suffer heading into 3d games but for 2d, even with lots of things, python handles it fine

dense creek
#

such as arcade

dense idol
#

i just started a week ago u see

dense creek
dense idol
#

oh ok

dense creek
limber veldt
#

That sure is appealing, the hardware rendering in Arcade

dense creek
#

after some experience, you might want to move to arcade

dense idol
dense creek
#

in pygame?

dense idol
#

no

#

it doesnt say anything about that

#

i have watched videos about pygame though

#

this may be a stupid question but are 2d games such as hollow knight and undertale doable on python

dense idol
#

really thats cool, i was told python isnt ment for games

dense creek
dense idol
#

c++ is what i was told is

dense creek
dense idol
#

oh nice

#

how did you learn to code

#

you seem like a very knowledgeable person

dense creek
dense idol
#

oh sorry

#

thanks for the answers

dense creek
cold crow
#

can somebody look at my game?

frank fieldBOT
#

Hey @cold crow!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

cold crow
#

!code-blocks

frank fieldBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

paper sandal
#

hai

#

I need help...

#

again

#

.

#

I'm making a chess engine

#

and right now

#

Im drawing a chess board and the pieces that go on the chess board

#

however

#

I've been trying for like 3 hours

#

but I still couldn't fiigure out how to get the pieces onto the board..

#

this is my script

#

scroll down to line 69

paper sandal
#

pog i got it

#

I dont need help anymore yay

limber veldt
#

Lovely

#

e2

#

to e4

#

So....I made an attribute called self.captor in my human class. My enemy landers search and find the humans. In the lander code, I get a reference to the human from the sprite/group collision. But the human doesn't get a reference to the specific lander that grabbed him

#

And he needs one. So in the lander code, since I have a reference to the human, I can assign an attribute from the lander

#

The reference of the captured human is called self.human in the lander. So I just say self.human.captor = self

#

But there must be a better way

#

The humans can be shot and killed by the player and if that happens, the lander is going to need to know about it so during the human kill() method, it can tell the lander to go back to attacking or searching

#

Basically to stop mutating

#

Wait just a minute

#

Upon further inspection of the game, when the human is killed, they continue to mutate anyway

fresh cave
#
if __name__ == "__main__":
    main_pygame = pygame_instance((200,200),"HP")
    main_pygame.inst()
    screen = sys.modules['__main__'].main_pygame.screen
    print(type(sys.modules))```
Would it be bad practice to access screen like this from other modules? Or just in general python usage?
grim abyss
#

finally have a File menu to open wadfiles...

#

a 'progress' bar is surprisingly hard to implement. I guess you have to spawn it in a new thread and poll something. I don't even know. Gave up on it after about 45mins.... I'll get it working eventually....

limber veldt
#

Almost exactly the same as the game it copies

limber veldt
#

Doom couldn't really do 3d

#

So rooms or floors atop one another weren't really possible

#

But you could fake it with clever switching player locations

grim abyss
#

yeah, really the only reason I'm working on this application is because I've been messing with it, literally since I started programming with Python. It's time to finish it now and move on to something else. There's alot of work left though. I want to add in some kind of file browser from the ftp.idgames site and remotely display wads from the zipfiles on the ftp site...

grim abyss
#

from the ASM source?

limber veldt
#

Yes, but not really from source. The source I posted is useless to me since it's incomplete

#

From visual reference

grim abyss
#

ahhh cool

dawn quiver
winter scarab
#

Hello everyone, I have a super basic question. I was trained in matlab for my degree as my first/most frequent code that I have used. I am following a tutorial on how to create your own version of Space Invaders and want to use some numpy arrays to keep track of vertical and horizontal movement. But the code is not working. Should I abandon my use of arrays or is there a way to put said arrays in the following function?

enemy_pos = np.array([0, 0])

%%Function I am calling to put in enemy position
def enemy(pos):
    screen.blit(enemyImg, enemy_pos)

%%Game loop
While (condition that i know works)
      %%Controls code
      %%Movement code
      enemy([enemy_pos])
#

I started on Sunday with pygame

proper peak
winter scarab
supple eagle
#

!pypi progress

frank fieldBOT
supple eagle
#

!pypi better-progress

frank fieldBOT
teal ember
pliant elbow
#

I am new at game development

#

will you all see something?

#

please

dawn quiver
#

uhh how do i make my py file into an exe, dmg and debian

pliant elbow
#

using auto-py-to-exe?

#

you have to do some simple steps:

#

Execute the Following commands in the terminal:```
pip install auto-py-to-exe
auto-py-to-exe

#

then just select the options you want

#

and It will do the trick

dawn quiver
#

thx mate

pliant elbow
#

can u please test my game?

#

(its just a menu right now)

frank fieldBOT
#

Hey @pliant elbow!

It looks like you tried to attach file type(s) that we do not allow (.zip). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

pliant elbow
#

please run the main.py file if you do want to

dawn quiver
#

hmm i will try it out after i upload my game

dawn quiver
#

what is prople,

#

m

#

m

#

@dawn quiver

limber veldt
#

You forgot =

#

Just before your highlighted selection, the letter p in pygame, put =

#

self.screen has to equal something, it's an assignment, you need the = for that

#

Question: If you have and are using only one instance of a class, is it more appropriate to use class variables for some data than instance variables?

#

Or even global variables, for that matter

#

They're constants

frozen knoll
grim abyss
sick sierra
#

Yandere Simulator would prolly run better in Python, and if it had good programming like dear god

limber veldt
#

Recently did something similar in pygame with sweeping clock hands

paper sandal
#

hi

#

i need help again

limber veldt
#

Chess right?

#

I don't

paper sandal
#

mhm

limber veldt
#

Well, I do

paper sandal
#

sry

#

typo

limber veldt
#

But well beyond the scope of the help I can get here : )

paper sandal
#

ok

#

well

#

im tryna get pieces to move

#

ive done the prgraamming

#

but i cant figure out how to fix some of the errors :/

#

@limber veldt

limber veldt
#

What do you mean when you say move?

paper sandal
#

no

#

when i drag and drop the piece

limber veldt
#

Disappear from one place and reappear in another or actually animate them sliding on the board?

paper sandal
#

sliding them

#

just dragging them and dropping them

limber veldt
#

Right

paper sandal
#

gimme a sec

#

ive made changes to the chess engine file

limber veldt
#

Get a reference to the image or surface that you want to move and find how to drag it around the screen

paper sandal
#

wait whats that link for me to upload the script?

limber veldt
#

That's step one

#

No, just a basic clock code I made

paper sandal
#

oh k

#

so whats the next step?

limber veldt
#

Constraining the pieces to grid squares on the board

paper sandal
#

right

limber veldt
#

I can think of how I would do it but it's totally different than how you're doing any of it

paper sandal
#

oh k...

#

would you mind seeing the changes i made?

limber veldt
#

My board would be a grid of separate objects with attributes like x, y and image

limber veldt
#

When you click on one of the objects with an image, that image follows as you drag then, when you drop, the image changes location from old to new

paper sandal
#

yeah thats why I did this:
if len(playerClicks) == 2:
move = ChessEngine.Move(playerClicks[0], playerClicks[1], gs.board)
print(move.getChessNotation())
gs.makeMove(move)
sqSelected = ()
playerClicks = []

limber veldt
#

That keeps the images perfectly centered in the square, too

#

Ask questions about games or share what you've learned or whatever

paper sandal
#

this is a coding server

#

...

#

thhere are several coding languages..

#

do you know any?

#

if not, you might want to learn some basics...

#

this server is specifically for the python coding language..

#

hmmmn

#

you can search some tuttorials on youtube...

#

im not the right person to ask here

#

but

#

like I said before

#

and from there some other members will be able to help you (:

frozen knoll
proven fractal
#

Hi, me and my friends want to create a monopoly game but we hesitate between python and java

#

What do you think is the best language for this?

#

We also think of developing the game with new features like income from stock exchange in game

solid meteor
wicked lintel
#

i have a question about pygame:
is there a way to use polygons for collision detection instead of rectangles?
because i'm coding a car game, and i want the car to be slower when touching grass, but when going diagonally the rect is giant and always touching grass, which is why i wuold like to use 2 polygons at the cars edge instead of one giant rectangle. is this possible to do?

#

code for collision detection:

    def update_drag(self, screen):
        pxa = pygame.PixelArray(screen)
        tl = self.rect.topleft
        pxa = pxa[tl[0]:tl[0]+self.rect.w, tl[1]:tl[1]+self.rect.h]
        # t0 = time.time()
        # if (np.any(np.isin(pxa, 25885))):
        #     self.roll_resistance = self.grass_roll_resistance
        # else:
        #     self.roll_resistance = self.street_roll_resistance
        # print("time np = " + str(time.time() - t0))
        
        #this is acutally faster then using numpy for some reason
        if (25885 in pxa):
            self.roll_resistance = self.grass_roll_resistance
        else:
            self.roll_resistance = self.street_roll_resistance
dawn quiver
#

can someone help me with making a menu in pygame? I made it so when you click a button it does a function where it makes the screen red. But it only makes it red for a split second...

frozen knoll
#

@wicked lintel You can use the "shapely" library to manage polygon collisions. It includes functions for that. It is pretty quick too. (If you aren't married to Pygame, the Arcade library automatically makes polygons off a sprite for more accurate collisions without the effort Pygame requires.)

wicked lintel
#

I'm completely new to making games using python. In the past, i used java and in it none, then greenfoot, then a self written one.
so i'm open to new things
maybe i'll take a look at the arcade libary

frozen knoll
wicked lintel
#

thanks :3

#

the linux installation stage is bugged...

south slate
#

Oops maybe question is unclear because there is no question mark: What does True do in line 52 of the code?

#

an example of the program when it is running

#

Thanks in advance for anyone willing to give me a hand.

frozen knoll
#

Commentator, What's bugged on it? Want to make sure it gets fixed.

pine marlin
#

Im making a flappy bird game in pygame having some issues where if the user escapes to the menu screen then clicks to play, the pipes do not appear as expected and creates an impossible game. Any ideas how i can resolve this issue, or what might be causing it?

frank fieldBOT
#

Hey @pine marlin!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

pine marlin
pine marlin
#

any help would be appreciated, thanks in advance

limber veldt
#

65 sprite objects in my game, many of them having multiple instances during game play O.o

#

Some of them tiny, like the background stars, they're only a couple of pixels, or the ground cells which are nine pixels, but there are thousands of them

dawn quiver
#

obviously there will be impossible ones to solve

#

what you need to do is randomize with limits

#

make the values your randomizing based on the current situation of the player

#

and makes sure its possible to go there

#

for example

#

if player is in pos (100, 100)

#

then make sure that the random value at which the gap is, is somewhere between random(x-some value, y-some value)

#

that way it will always be possible to solve

#

also keep a uniform distance between each of those poles

glossy quarry
#

can anyone give me some games project I can try to do by my own as a python beginner?

glossy quarry
glossy quarry
dawn quiver
glossy quarry
glossy quarry
#

I see

dawn quiver
#

altho

#

nvm

glossy quarry
dawn quiver
#

No

#

You can

#

but its not going to go long term

#

and it gets slow

glossy quarry
#

I see

dawn quiver
#

pygame is okay

glossy quarry
#

so in order for the game to run smoothly

dawn quiver
#

tkinter is good for UI

glossy quarry
#

I should just use pygame?

dawn quiver
glossy quarry
#

oh ok

dawn quiver
glossy quarry
#

I see, thx for the info

dawn quiver
#

๐Ÿ‘

#

because pygame was made with the SDL library in C

#

so its faster

glossy quarry
#

ohh

dawn quiver
#

:>

#

tkinter is good tho

#

dont let anyone tell you that pyQt5 is just way better and you cant do shit with tkinter

#

search up thonny

#

it was made with tkinter

#

pyQt5 is good

#

im not saying its bad

#

but tkinter is also very powerful

#

for making apps

glossy quarry
#

oh alright

dawn quiver
#

desktop apps

glossy quarry
#

I only learnt how to use tkinter for apps so

dawn quiver
glossy quarry
#

but probably will try those you mentioned in the future

dawn quiver
#

ive made a lot of games with it

#

anyways

#

im more into system design, ML and all

glossy quarry
#

cool

dawn quiver
#

so im doing that

glossy quarry
#

I see

dawn quiver
glossy quarry
#

eh

dawn quiver
#

in system design

glossy quarry
dawn quiver
#

You need to draw blocks and explain how different services interact with each other, for example, the app, location, payment service ect

dawn quiver
glossy quarry
#

oh I see

dawn quiver
#

Using OOP is a good way to both minimize and organise your code

glossy quarry
#

ok got it

limber veldt
#

Those long lists of datas, I moved them to a separate file and import them. Nice having all that out of my way in the main file

limber veldt
#

Watching a video of a streamer coding pygame and he's complaining that the pygame docs suck...they kinda do. Like I understand that docs are docs, not tutorials, but is there anywhere that actually teaches how to do those things besides youtubers who could be right or wrong about what they're showing?

heady pine
#

Hi, someone has been using Ursina? I want to detect when an entity with a MeshCollider collides, ive been searching for hours but there is no tutorial about it on the internet

buoyant sequoia
#

Hi, with the turtle module, how would you go about adding a pause function, which method or function would you use?

dawn quiver
#

i mean

#

you just make

#

the fps as 0

#

ยฏ_(ใƒ„)_/ยฏ

#

@buoyant sequoia

teal ember
#

how would you listen for key events then?

#

unless you do that in another thread

dawn quiver
#

yeah

#

threading

#

actually

#

multiprocessing is faster

#

its best to maximize speed

teal ember
#

but just making a boolean to decide if you are paused or not is better imo, but i dont know how turtle works and i have never used it so i dont know how would that go for it

dawn quiver
#

yep technically flags are the best

#

@teal ember is right

#

ยฏ_(ใƒ„)_/ยฏ

buoyant sequoia
#

@dawn quiver@teal ember ok thank you will try that thank you ๐Ÿ™‚

#

I will

teal ember
#

just make a variable which stores True if you want stuff to be paused or False if not, if the variable is False draw your usual stuff, and if its True draw the pause screen

buoyant sequoia
#

thx for help

limber veldt
#

And toggle your variable between True/False with the key you want to use for pause, like if variable is named 'paused', just do paused = not paused