#game-development

1 messages · Page 70 of 1

patent ruin
#

@waxen nebula If you are thinking of entering the realm of game development, then I suggest you delve into Unity or unreal engine or something similar to that. But coding is fun in python, so yea!

waxen nebula
#

Yeha I’ve used unity before I wanted to get a feel for coding games in python

last moon
#

imo unreal's a nice option with the blueprints and coding without having to learn tons of c++

#

also ursina looks decent

waxen nebula
#

Thanks

patent ruin
#

Pygame is amazing though! Even though it doesn't offer 3D games (I guess you can do it. I saw a reddit post on it), it gives a good headstart to try one's hand on large scale projects. Breaking down your complex imagination into bits of code is rewarding in its own way.

last moon
#

pygame's alright, it's got a couple issues tho, I usually suggest to use arcade instead

waxen nebula
#

Yeah I’m trying to learn to use pygames and it looks interesting to use

last moon
#

it doesn't really encouraged to use OOP which is kinda a fundamental

#

like obviously you can do it without

#

but any other library won't work like that

#

oh also one of the partners rdb is from panda3d and he's in here pretty frequently

patent ruin
#

I actually use oop in pygame. I create multiple files, for instance settings.py, characters.py, mainloop.py and so forth. Later I import my classes from different files into my mainloop. It actually reduces the ambiguity in the code and makes debugging much easier.

#

I learnt pygame the hard way, later switched to oop.

#

Edit: typo- OPP to OOP.

dawn quiver
#

and ?

solar sail
#

I mean, like most things, when you get to a certain level of complexity it's just simpler to use OOP rather than not (even with pygame)

mortal narwhal
#

Does anyone here want to team up and make a Text based online RPG like TornCity? Obviously not exactly the same as Torn but something and bit more mystical and adventurous?

signal root
#

how do u create buttons in pygame?

covert knot
#

the event pygame.MOUSEBUTTONDOWN tells you mouse activation, pygame.mouse.get_pos() returns a couple with x and y of the mouse at all times, with those two you can know when the mouse activates and where, so you can setup a button

buoyant vessel
#

I've been attempting to learn tcod, or libtcod as it used to be called. Its pretty specificly targeted at having roguelike features. What Im mostly interested in is learaning procedural generaation now..

And libsdl2. I'm pretty sure the latter is what pygame uses under the hood. Not sure about arcade. But libsdl2 seems fun. I just cant take it very seriously. Games are a lot of work i you expect people to like them, its stressful.

I'm normally really not into the idea of making games because I dont think I have enough skills to do cover all of it and do it well. But lately Ive been getting into roguelikes, which seem pretty practical to actually make yourself. And you alreaady know thaat 90% of people arent going to play it so no stress lol

And Im curious to do more with it.

#

Its 90

#

90% about not having graphics to play with just thrown at me. Its hard to invest so much time into games without artistic skill or money and prestige imo

woven fog
#

Hello

#

i want help;

frank fieldBOT
versed agate
#

please do ping me

patent ruin
#

@versed agate scales your surface and draws it on the main window.

versed agate
#

@patent ruin ok but what does the last two zeroes do?

#

is it specifying to draw from the 0th x axis till the end and to draw from the 0th y axis till the end?

patent ruin
#

@versed agate If I'm not wrong, the leftmost corner of the surface lies at (0,0). Do verify it by bliting a rectangle onto your main window. Remember that (0,0) means top-left corner.

#

Also, it depends on the size of your surface. If your surface is just 50*50 pixels, it cannot cover your whole window. If you want to play around with this, blit a red rectangle onto a black screen and try out various combinations.

gleaming quail
#

[start]=
player.red.yellow; Room1=100=100;
(player=center)=Room1.(10.=);
(player=body)=((player=center)=Room1)+.((-2=-2)+(2=2));;
[{onW}={1=10}]=((player=center)=Room1)=+.(0=1);;
[{onA}={1=10}]=((player=center)=Room1)=+.{1=0}={0=1};;
[{onS}={1=10}]=((player=center)=Room1)=+.{0=1}={0=1};
[{onD}={1=10}]=((player=center)=Room1)=+.(0=1);;
square=(square=center=Room1)+.((-2=-2)+(2=2));
(box=center)=Room1.(90.=); box=body=(square=box);
[player=body.box=body]=box=-Room1;
player=gun=center=(player=center);
[(LMB)=0.]=(bullet=center)=(player=gun=center);
bullet=center.now=(bullet=center); mouse.now=(mouse);;
[{time}={1=20}]=[bullet=center.mouse]=(bullet=center=+{mouse=(bullet=center.now)});;
[{time}={1=20}]=[mouse.bullet=center]=(bullet=center=+{(bullet=center.now)=mouse});;

#

Rate my programming language

last moon
#

-6

tranquil girder
#

On a scale from cringe to what? :p

gleaming quail
#

I managed to make a programming language without any division, subtraction, or multiplication

#

Or any for loops or functions

#

Or whatever else normal programming languages have

versed agate
#

Also, it depends on the size of your surface. If your surface is just 50*50 pixels, it cannot cover your whole window. If you want to play around with this, blit a red rectangle onto a black screen and try out various combinations.
@patent ruin Thanks!

covert knot
#

what game engine would you guys recommend for a 2d dungeon crawler/roguelite 4-player local coop game ?

#

I'd rather a more robust and flexible game engine that's harder to learn than a more basic but easier to use one

last moon
#

in python?

covert knot
#

yeah

last moon
#

uh maybe arcade and sockets

#

idk how well it'd be able to handle 4 people tho

covert knot
#

why would it struggle with 4 players ?

last moon
#

you're updating 3 other players + stuff affected by those players + your self and the stuff you affect

#

idak if it would be slow or not, I just haven't heard of many multiplayer games in py

rigid quiver
#

what does pos4 mean in pygame

last moon
#

wdym pos4

cold storm
#

upbge 0.2.5

last moon
#

damn I like that, most games don't do it properly

#

like a tripping-type senario usually involves colours and motion blur but this actually looks clean

pallid trail
waxen nebula
#

dang look cool

waxen nebula
#

https://youtu.be/ramSVtHNnnY does anyone know if this type of game style is possible with pygames. @ me if u answer me 😁

Part 1 of a complete walkthrough on Mario & Luigi: Bowser's Inside Story. This gameplay walkthrough will show you all bosses, location-guides and more.

● My Twitter - https://twitter.com/aWiiboOnYT
● Partner with Union For Gamers - https://goo.gl/xSQsdc

Important timestamps:...

▶ Play video
cold storm
#

@last moon this can be used to highlight objects and to outline them

#

I am going to tune it I think to crank out a rainbow from 0-1

#

and then (r = color)

#

g = brightness

#

saving B for line width

pallid trail
#

why are circular imports not allowed

patent ruin
#

@waxen nebula Really hard. I've made a platformer game with just one scene, one character and a couple of levels, and I could barely manage (fps matters a lot) getting everything right and non-glitchy. In your game, you have to successively change the background screen, change actions of multiple characters, pop-up new dialogue boxes and so forth. My computer would surely curse me before I can blit more than 4 moving characters onto the screen. But then again, it's not impossible. I've seen bomber man code before, so yea not impossible at all.

#

@waxen nebula I suggest you look for some other game engine if your ultimate goal is to make a decent rpg.

waxen nebula
#

Ok thanks any recommendations on another game engine that might be able to do that

patent ruin
#

There's arcade for 2D and Pandas3D for 3d. I haven't used both, so I cannot give any weightage to my recommendation.

#

But learning either of them can be daunting at first sight; so if you are ready to dedicate some time, go for Panda3D. You can make a decent a platformer with either of them, but the latter offers more opportunities (obvious).

waxen nebula
#

Ok thank you

#

Also who is bomber man? @patent ruin

#

sorry if you don’t like pings

patent ruin
#

@waxen nebula It's alright. Ping me if you want to ask me questions. Bomberman is a famous platformer game.

crisp junco
#

@waxen nebula If your ultimate aim is to make games, then I'd recommend you to learn c# and unity

waxen nebula
#

Ok thank you both

woven osprey
#

I made snake and it was the hardest stuff ever no doubt

polar elbow
#

which module in python is best for games?????

potent ice
#

It depends on your experience level and what you want to make

potent ice
#

if you are python beginner and want to play with simple 2d games you can try arcade or pygame

#

Arcade probably easier to start with because they have better docs and tutorials. Things you learn there will translate well to pygame and other game libraries

potent ice
#

If you are doing 3D maybe look into panda3d

#

But.. these might be all bad suggestions because we don't know anything about you

reef path
#

this is kind of general, but do you guys have any recommendation for finding sprite sheets somewhere online?

late depot
#

Probably a really stupid question but im creating a builder for the player and enemy health, power levels, defence etc. but what would that be called? playerenemy_builder? or is there a proper terminology for it?

patent ruin
#

@reef path You can search the gameart2d depository for decent sprite sheets. Free ones are limited, but worth it.

#

@late depot Not sure what you meant by your question. But if you are worried about the name of your class or sprite (in your case builder, I guess) please don't. Use the terminology that you can understand at a glance. playerenemy_builder is a good name, but it's rather long. I prefer long names since it makes debugging easier but not everyone does.

late depot
#

@late depot Not sure what you meant by your question. But if you are worried about the name of your class or sprite (in your case builder, I guess) please don't. Use the terminology that you can understand at a glance. playerenemy_builder is a good name, but it's rather long. I prefer long names since it makes debugging easier but not everyone does.
@patent ruin yeah I’m the same, I prefer names that actually describe the variable/class etc. But for this I’ve just come to the conclusion that it’s an entity_builder 🤷‍♂️

patent ruin
#

@late depot Great! It makes sense.

somber creek
#

hey can I please get some help with my code

#

in tkinter?

patent ruin
#

Sure (if I can)

somber creek
#

and am a bit confused on how I would do that?
the timer is on lines 1109-1137

patent ruin
#

Can you elaborate a bit?

somber creek
#

so basically the rounds are all in functions and the timer is in a function and I want to display the next round the timer hits 0

#

but instead when the timer hits zero the same round is still there

#

do you understand what I mean?

patent ruin
#

Timer is the update function?

somber creek
#

ya

dawn quiver
#

i am trying to get into pygame but dnt kow where to start

somber creek
#

@patent ruin do you understand what im trying to say/do

patent ruin
#

Yea. I'm reading the code

#

So basically, when the timer hits zero, you want your int variable to increase by 1

somber creek
#

no thats another problem but if you understand that you can help with that and ill figure out how to do the displaying next round?

#

which one is better for you/understand more trying to display the next round when the timer hits 0 or when you click the right button it takes you to the next round but the round counter doesnt increase by 1

#

@patent ruin which one do you understand better/is better for you?

patent ruin
#

I'll dm you.

somber creek
#

I would say if you could help me on how to display the next round when the timer is zero it would be better thanks

#

if its better for you ill message you in private?

patent ruin
#

okay

dawn quiver
#

nobody needs help here ?

scenic jacinth
#

Does somebody know something like an actual dictionary that I can import and then take random words from?

last moon
#

I think you might be able to use NLTK's words corpus for that

scenic jacinth
#

alright i'll look it up

#

thanks

somber creek
#

hey can I please get some help with my code

main lotus
#

is python good for game dev?

potent ice
#

Depends on your requirements

somber creek
#

does anyone know how to make a score counter

#

like the faster you click the button the more points you get and the slower the fewer points

idle falcon
#

so the speed at which you click determines the points?

dawn quiver
#

Hello

swift pecan
#

Hi!

dawn quiver
#

I am trying to create an autosave feature. Would anybody be willing to help me?

swift pecan
#

Sorry i just work here, i don't know what to do.

#

Also i strted python like a week ago so sorry i can't

dawn quiver
#

Thats OK

wild light
#

anyone can help with a star algo?

last moon
#

like the faster you click the button the more points you get and the slower the fewer points
@somber creek you could probably just use time.time() for that

start = time.time()
display_button()
if clicked:
  total_time = time.time() - start```
somber creek
#

ya the faster you click the more points you get snd the slower the fewer points

last moon
#

I am trying to create an autosave feature. Would anybody be willing to help me?
@dawn quiver it depends when you want it to save, whether it be after a function/loop/event but you can just slap a save function after it
if you're doing it on a timer, I'd suggest using asyncio.sleep() for the timing of the loop and call your save function once that finishes

somber creek
#

@import numpy as np what does the the disply_button do

last moon
#

idk it's pseudo(ish)-code

#

you'll have to figure it out

#

ya the faster you click the more points you get snd the slower the fewer points
so take the total time and multiply/divide/whatever it to get the score, I'd suggest using either a modified sigmoid (0,1) (or whatever values you choose), or a modified exponential function. Either way you want to make sure that (unless you implement a max possible time for the button to be displayed (if they don't click it at all)) the player can't get 0 points + on the other side, so there's always room for improvement

somber creek
#

if you dont understand the code how did you do it?

last moon
#

I didn't?

#

if clicked is also not valid

#

what I'm saying with it is, get the time before the button is displayed, display the button -> once the player clicks on the button, get the time again, subtract the starting time from the current time and run it through a function to get your score

#

the pseudo-code's a bit easier to understand then all of that

somber creek
#

oh so its just example code for how to do it?

last moon
#

basically.. pseudo-code isn't meant to be used, it's meant to demonstrate the logic

somber creek
#

ok thanks

last moon
#

regardless of the mathy function you use, you'll want to reflect it across the x axis (x,-y), depending on the function you use, you might have to take the absolute value or smthing along those lines in order to get the values you actually want

#

otherwise you'll get the inverse of what you want

somber creek
#

does anyone in here know how to use tkinter please urgent

runic lantern
#

I have a basic understanding of tik yet

#

Tkinter

somber creek
#

So for my program I am trying to make the next round of my game display when the timer hits zero i was able to do it for the first round but it didnt work for all the other rounds?

runic lantern
#

hmm

covert knot
#

khalil how do you display the first round ?

somber creek
#

here is a recording of my program in tkinter I need help, the problems in it are when the timer hits zero it doesnt display the next round and when you click on the correct color (that matches the background color) the timer doesnt reset and the round counter does not increase by 1 and when the timer hits zero it says X Timeout! but doesnt disappear when the timer resets, can someone please look at any of these problems and help me with any one of these problems that you know how to solve please and thank you!
as I am trying to recreate this game in tkinter http://kolor.moro.es/

pure nebula
#

I have advice I need to ask when starting out in game development or developing applications in general. I checked on google, but I want to reassure myself with experienced programmers before I try this. Which module would be best to use for developing applications with GUI from your experience?

sour tiger
#

Hey I need help with a syntax error

#

My font variable is set and it says syntax error

fallow skiff
#

Trying Pygame for the firsts time and I was following a tutorial but this part of the code doesn't work. could this be an issue with Pygame or my code. ```py
elif event.type is pygame.KEYDOWN:
if event.key is pygame.K_DOWN:
player_speed += 7
if event.key is pygame.K_UP:
player_speed -= 7
elif event.type is pygame.KEYUP:
if event.key is pygame.K_UP:
player_speed += 7
if event.key is pygame.K_DOWN:
player_speed -= 7

# Move Objects
move_ball()
player.y += player_speed
umbral yoke
#

does this give any error

fallow skiff
#

No error at all

#

The player object just doesn't want to move

dawn quiver
#

h

last moon
#

wouldn't you want move_ball() after updating the position?

pliant basin
#

@fallow skiff

#

I'll make a mini code for you

fallow skiff
#

@last moon I fixed it thx for try though

#

@pliant basin Whats it about?

pliant basin
#

oy

#

Its about

#

pygame

#

on mobile

#

MOUSEBUTTONDOWN

fallow skiff
pliant basin
#

Ok

fallow skiff
#

Does everything I wanted it too

pliant basin
#

Oh i foun this code too

#

@fallow skiff I made a gme better

#

moooore better

fallow skiff
#

What game?

pliant basin
#

works on android

#

in pydroid

#

joystick, worlds

#

even the coctail skin

#

is a secret

#

if you make your name coctail

#

it will apear

fallow skiff
#

I have no idea what that game is

pliant basin
#

Tea Survival

#

Its my hame

#

This is a beta

#

so noone have acces to it

fallow skiff
#

Ooh cool

pliant basin
#

And sorry for russian

fallow skiff
#

I'm try and make my pong cam better

pliant basin
#

Language

#

oh ok

last moon
#

is a secret
so much for it being a secret :p

dawn quiver
#

@last moon thx

silent turtle
#

so I've started to make a sudoku app using pygame. Would anyone be able to provide some feedback at all?

#

I've got the very basics and I'm just using a board/completed board for checks

dawn quiver
#

there is no #help-arduino ??

#

must to be

fervent rose
somber creek
#

does anyone know how to update a label more than once in tkinter?

waxen nebula
#

has anyone made a topdown style game using pygame. If so @ me plz 🙂

somber creek
#

solved

#

i am trying to recreate this game http://kolor.moro.es/ and was wondering how I could make the score counter in this game in tkinter?

severe saffron
#

@pliant basin thank you for giving me some good memories of my first time playing with pygame

#

your game really reminds me of it because of the green background

#

mine was a lot simpler, just some rectangles chasing each other round but i was a wee lad

#

and it was lots of fun

pallid trail
#

how wud i access a sprite group from another file in the same directory

wind kernel
#

hello everyone, i'm trying to code an interactive novel but as a python newbie, i have no idea how to make it into an actual game, or give it a GUI i guess, currently ive been doing all my testing in the terminal and im clueless as to how im supposed to make it an actually playable game

pallid trail
wind kernel
#

QT Designer

#

got it, thanks

#

how do i even use Pygame?

pallid trail
#

its a game making module in python

#

it allows u to make games without a game engine

sharp thicket
#

@near sluice u might wanna check this channel out

near sluice
#

later, exams next week

#

during winter vacation imma grind learning python

sharp thicket
#

Oof

crisp junco
#

Spent hours today on trying to turn my pygame into a exe but I'm still stuck , can anybody help me out?
I'm using pyinstaller though

#

do mention me if you wish to help me out

last moon
#

personally I like to use auto-py-to-exe, it's got a decent ui

potent ice
#

It used to be fairly easy to make pygame stuff into exe. Maybe things are a bit different with pygame2?

last moon
#

pyinstaller still refuses to work properly for me idk why

last moon
#

ya that'd explain it

#

didn't know there was a tag

dawn quiver
#

Can we make android games with pygame 🤔

#

There are some new touch events in pygame 2 ig
Not sure though

#

Hmm
But my aim for now is to first compile that into .Apk
Then will think bout publishing it

#

K dude

#

Btw if u wanna try my game I can send u the link

#

It's still in development tho

#

What type is it?
@dawn quiver
Simple bouncy ball type 😅

last moon
#

I've heard getting it into the google store is hell

dawn quiver
#

I have not yet compiled it 😅

#

It's still in development tho
Told ya

#

If u don't mind can I contact u when I'm finished with the game?

#

Thnx

#

Bye

crisp junco
#

@dawn quiver

#

can you help me out?

#

with making pygame into exe's

#

please I need urgent help

rigid brook
#

@dawn quiver Sorry for the ping though

i am in !MAD!'s Team and i made an Exe successfully

#

DM me if you want details

#

I used a Module Named auto-py-to-exe

#

thats a GUI version of pyInstaller

#

Not necessary though

#

make ur game such that it will go to a Folder to look for files name it anything (i name it assets) which will have all the Folders and files

#

compile the game using auto-py-to-exe and then just manually Place the Assets folder in there

#

it works

dawn quiver
#

lol

#

im creating a game called skybourne

#

i want to convert .py to exe

#

and i play music with pygame

#

but with exe pygame doesnt work

#

and you need it installed (python)

#

please help

#

didnt get your question @dawn quiver

#

are you trying to convert a .py to a .exe?

#

if so, you can do:

pip install pyinstaller

and then,

pyinstaller --onefile file-name.py

you should see a dist folder in the directory file-name.py is, open it and youll see the file-name.exe inside

#

i did that @dawn quiver

#

and?

#

but i use pygame.mixer.sound or something

#

and when i convert it to exe

#

my program doesnt work

#

then dont use --onefile

#
pyinstaller file-name.py
#

ok but i use -F and -i

#

what is -f

#

wait

#

ok

#

im not sure

#

@dawn quiver just use

pyinstaller file-name.py
#

ok but i want an icon

#

i dont want to be

#

difficult

#

should i do pyinstaller -i "icon.ico" "name.py"

#

ok

#

use icon

#

ok i try

#

i message you if didnt work

dawn quiver
#

it worked @dawn quiver

#

thank you

#

np

neat jolt
#

Beibe beibe do biruleibe leibe

#

sorry, wrong server

dawn quiver
#

Yes i fixed it dont worry thank you

#

but uh off topic question

#

yes

#

but

#

bruh i just want the font

#

for detail, it looks nice

#

i installed the extension

#

it didnt come with it

#

no people stil use for python??????????????

#

what do you mean

#

i just use python extension

#

anyways can you help me or not

#

GEtTING

#

that

#

font

#

YES IK?

#

IM asking if you know the font

#

so ican use it

#

?? ?? ? ? ?? ? ?? ?

#

OK

late depot
#

I was following a tutorial on asset generation and animations in pygame and im slightly confused of why I have to include a [0] at the end of the get_sprite for tiles but dont have to use it when getting actual character or item sprites.

#
        # Player animations
        self.PLAYER = self.reptiles.get_Animation(2, 'm', 5, constants.PIXEL_SIZE, constants.PIXEL_SIZE)
        # Wall image
        self.WALL = self.wall.get_Sprite(3, 3, constants.PIXEL_SIZE, constants.PIXEL_SIZE)[0]```
#

the tutorial doesnt really explain why i need it there but if i remove it the program breaks

last moon
#

that aint true to any degree, it's popular for c++ because it's super easy to set up, but I started with vsc for python and moved to vs + I know people that use it for c#/java. Vs also has hella support for databases

elfin frost
#

I am still looking for some pybullet dev, to have casual chat

#

😄

dawn quiver
#

So I'm making a weird little game, I'm looking for playtesters to give me feedback. Anyone interested?

cursive apex
#

Hi All - I have a quick question about pygame that someone might be able to help me with

#

@dawn quiver - I can

dawn quiver
#

Okay cool

cursive apex
#

I have made a really basic battleships game that was running perfectly and loading quickly

#

then all of a sudden it will only load 2/10 times

#

the rest of the time python becomes unresponsive and I have to force quick

#

quit*

#

on MacOS

delicate cairn
#

I NEED help with installing pygame to visual studio code

cursive apex
#

what do you mean to visual studio code

#

thats an IDE

#

you just install the pygame package through your terminal

#

or cmd prompt

wind kernel
#

i need help with making a 3 second timer till something is printed

last moon
#

what's it for?

#

like the purpose in your game

wind kernel
#

im tryna make like a "establishing connection" thing

#

but obviously it wouldnt make sense if you can establish a connection instantly, its like a hacker-style interactive novel game

last moon
#

so you don't want anything to happen while the timer's running?

wind kernel
#

indeed

last moon
#

use time.sleep(#ofseconds)

wind kernel
#

just a timer for something to be printed

#

thanks alot!

#

it now says ```NameError: name 'time' is not defined

wind kernel
#

i fixed this problem by using import time

#

thanks

wind kernel
#

hey, need some help. how do i make this game playable outside of the terminal?

#

as in like, a .exe you can use to launch the game and play it

last moon
#

you need to compile it with an external library
pyinstaller or auto-py-to-exe can both do that for you

wind kernel
#

thanks alot!

last moon
#

np

wind kernel
#

im personally on linux and i'd like to have this game playable on linux

#

how would i do that?

#

oo, pyinstaller can do that

#

thanks again

last moon
wind kernel
#

im not even sure if im using it right or not

#

python noob here, i apologize

last moon
#

type that into the console not python

wind kernel
#

i tried both

#

first i tried in the terminal, then i tried in python

last moon
#

what did you get from putting it into the console?

wind kernel
#

pyinstaller: command not found

#

its in the image

wind kernel
#

ill check them out, thanks

wind kernel
#

i need some help, im trying to make a sort of archive section, where there are 10 archives and after you are done reading one of them, you can type Back and go back to the archive selection section

#

you access the archive by putting in the number of the archive, not by clicking a button

#

the way ive been doing it is very inefficient, a series of answer = inputs, each has its own archive section

#

idk how to explain this properly

#

something like this

#

choose an archive to access (1,2,3,4,5)

#

if you choose 1, for example, you can access it, but then go back to that same area by typing in "back"

#

is this possible to make?

#

i dont mind taking the time to do it this way but it is very inefficient and will be harder for me to manage and understand in the long run

dawn quiver
#

@wind kernel i can type out a qucik example, gimme a minute

#
archives = ("1", "2", "3")

def choose_archive():
    inp = input("Choose an archive to access (1, 2, or 3): ")
    inp = inp.lower()


    if inp == "back":
        choose_archive()
    else:
        if inp == "1":
            print('1') # do the function related to the 1st archive
        elif inp == "2":
            print('2') # do the function related to the 2nd archive
        elif inp == "3":
            print('3') # do the function related to the 3rd archive
        else:
            print('There is no such archive!')


choose_archive()
``` @wind kernel 
there
wind kernel
#

thanks soo much!

sand granite
#

What is the best method to store my maps in tile based game when I want to use chunks? Currently I have text files and I load these maps reading squares of data (16x16 bytes) but I need to read a lot of useless data only to find next new line char and load next row of chunk. So I wonder if there is a more efficient method?

dawn quiver
#

Hello I need help with an autosave feature in my text game If anyone would like to help me please message me thank you

dawn quiver
#

Hello

#

randomheart = (random.randint(goodheart1,goodheart2,goodheart3,goodheart4,goodheart5,goodheart6))

#

how do you choose a random one from all of them?

wind kernel
#

@dawn quiver hey, i just got home and tried out the code

#

it works really well, thanks alot. but i have one small issue

#

every time after i choose an archive, the script ends

#

idk how to say it

#

a pic would be better, hold on

dawn quiver
#

ik

#

wait

#

its because it only prints the number

#

i told you to use whatever you want to happen when that archive is selected

#

i also realised that the back function wont work how you meant it to

#

sorry, im too lazy to fix it

#

@wind kernel

wind kernel
#

oh

#

no problem, ill fiddle around with it myself

#

actually i have no idea how to fix this lol

#

welp, guess im back to square one. thanks for your time.

kind shuttle
#

im starting a new game project , hope you guys help me if i have issue

wind kernel
#

brain do you have any idea how this is fixable?

#

i could try doing it myself if i know what i should do

kind shuttle
#

oops im new and not sure what u're doing

#

ill name it after

#

can i take my file into a shard then import it

wind kernel
#

@dawn quiver sorry for the tag, i tried putting some code after the archive code, and what happened was it basically, it basically proceeded to use that code and completely ignored this code, again, it'll be more easily understandable in a picture.

#

kinda bad at explaining, sorry.

dawn quiver
#

can you show me the code

#

?

wind kernel
#

for sure

#

all of it or just part of it?

dawn quiver
#

the part that you tested in that ss

wind kernel
#

idk why archives was highlighted at the top

dawn quiver
#

everything works

#

what exactly is the problem

#

@wind kernel

wind kernel
#

the problem is, you cant look through all the archives

#

only one of them

dawn quiver
#

oh right

#

hold on

wind kernel
#

then it continues on with the code

#

alright

dawn quiver
#
if inp == "1":
  # do something
  choose_archive()
wind kernel
#

huh

dawn quiver
#

and do that for every archive

wind kernel
#

alright

#

lets see

dawn quiver
#

that will repeat the code

#

but also

wind kernel
#

no need for back anymore

dawn quiver
#

that stuff u have at the end of the code will never be executed

wind kernel
#

holup wat

dawn quiver
#

because its outside of the function

#

maybe i can figure out a way to make it execute

wind kernel
#

hmm

#

lemme try it

dawn quiver
#

ah yes

#
elif inp.strip() == "exit":
  print("Quit archive selection proccess.")
#

add this

wind kernel
#

at the end, right?

dawn quiver
#
if inp == "1":
  #stuff
elif inp.strip() == "exit:
  pass
#

you can replace the print with pass

#

pass literally does nothing

wind kernel
#

alright, i will modify the code now and tell you the results, thanks alot!

dawn quiver
#

ok

wind kernel
#

so

#

now i get this

dawn quiver
#

show me the code

wind kernel
#

i havent added in the last part yet

dawn quiver
#

you forgot to indent

#

indent the choose_archive

wind kernel
#

ooh yeah

#

no errors

#

lets see.

#

alright good, now it works

dawn quiver
#

good

wind kernel
#

now i just gotta implement the exit thing

#

thanks alot man

dawn quiver
#

np

kind shuttle
#

@dawn quiver hi , im seeing people take their file game into small part like : menu.py , character.py , etc so how they can make it work together ?

dawn quiver
#

idk, but my guess would be using imports

#

and then multiple other files like menu.py, inventory.py

#

and then in main.py they import those files

#

@kind shuttle

kind shuttle
#

thanks

wind kernel
#

@dawn quiver , idk where to put the exit code. i keep getting syntax errors no matter where i put it

dawn quiver
#

weird

#

the syntax error is in inp = inp.lower()

#

but im not sure why

wind kernel
#

lemme test again

kind shuttle
#

u can remove it

dawn quiver
#

yeah, try removing it

wind kernel
#

lemme move it down

dawn quiver
#

elif can only be used after an if

#

yes

wind kernel
#

oh

kind shuttle
#

@@

wind kernel
#

ohhhh

dawn quiver
#

elif means "If the if statement conditon is not met, do this:"

wind kernel
#

python 101 but im stupid so i didnt know ¯_(ツ)_/¯

#

i did remove the elif at the top

#

ok im really stupid now im getting a dozen syntax errors

dawn quiver
#
elif inp == "3":
  # code
elif inp.lower().strip() == "exit":
  pass
#

put it there

wind kernel
#

ok thanks

#

no ident or syntax errors

#

i cant thank you enough man!

dawn quiver
#

np :)

wind kernel
#

works perfectly! again, thank you!

kind shuttle
#

txt file and py file has the same image

wind kernel
#

@dawn quiver is there any way to make it so you can only access the archives once you press a specific button?

dawn quiver
#

wdym

#

what button

wind kernel
#

Enter, for example

dawn quiver
#

you'd need to use msvcrt or mscvrt, whatever its called

#

hold on

kind shuttle
#

hey i found a ways to make these part works together

#

import then loop!

dawn quiver
#
import keyboard
access = False
while True:
  if keyboard.is_pressed("q"):
    access = True # allow access to archives
    choose_archive()

@wind kernel

wind kernel
#

thanks

#

at the top of the code, correct?

dawn quiver
#

i think you need to put this after all of your code

wind kernel
#

alright

#

will try it out right now

dawn quiver
#

also

#

in the def choose_archive(): line

#

add a param called access

#

def choose_archive(access)

#

then, to every if and elif statement add this:

if inp == "1":
  if access == True:
    #code
    choose_archive(access)
  else:
    print("Access denied!")
    choose_archive(access)
wind kernel
#

alright thanks

#

sorry for all the questions, by the way

dawn quiver
#

its no problem

#

im bored anyway

wind kernel
#

arent we all, lol

#

ive been having this problem and ive been putting it off but im gonna ask here if anyone can help

#

whenever i put in any answer to a question that isnt the defined answer/s, the script ends

#

because im terrible at explaining, a screenshot would be better

dawn quiver
#

btw, how long have you been learning python for>?

#

also i understand your problem

wind kernel
#

around a week now

#

very slow learner, but im enjoying it

kind shuttle
#

im not even a hour ^^

dawn quiver
#

hm, i mean you should know this stuff, but ok

#

at the end of all the elifs, add this:

wind kernel
#

so i never really learned any of this stuff

#

at least for the bot i was making

kind shuttle
#

have u guy had something can fast-completed a words program?

dawn quiver
#
else:
  print(f"No such archive found! Archives: {", ".join(archives)}. You can exit by typing \"exit\"")
wind kernel
#

whenever i put in something that isnt defined as an answer, it brings up the archive thing

dawn quiver
#

@kind shuttle any IDE has intellisense (intellisense is an auto-completer for words in a program)

#

so you can use VSCode, PyCharm, etc.

wind kernel
#

thanks

#

i saw it

#

im putting it in rn

dawn quiver
#

!d f-string

frank fieldBOT
#
f-string```
String literals prefixed with `'f'` or `'F'` are commonly called “f-strings” which is short for [formatted string literals](reference/lexical_analysis.html#f-strings). See also [**PEP 498**](https://www.python.org/dev/peps/pep-0498).
dawn quiver
#

thats why i added an f before the string

#

f"string"

kind shuttle
#

k im open pycharm and hope it has IDE for python

dawn quiver
#

pycharm is MADE for python

#

even the name, its PyCharm

kind shuttle
#

hope dont lag through

wind kernel
#

but i dont know how to make it right

kind shuttle
#

so lag

wind kernel
#

a syntax error

kind shuttle
#

you should change the number

dawn quiver
#

dude

kind shuttle
#

and change the order of code

dawn quiver
#

no

#

everything is so jumbled up

#

your indents are wrong again

#
if inp == "1":
  if access == True:
    # code
  else:
    print("access denied to archive 1")
elif inp == "2":
  if access == True:
    # code
  else:
    print("access denied to archive 2")
elif inp == "3":
  if access == True:
    # code
  else:
    print("access denied to archive 3")```
wind kernel
#

thanks

#

lemme try it

dawn quiver
#

not to be mean, but for a week your knowledge of python is kinda bad

kind shuttle
#

@dawn quiver pycharm kinda lag for me

dawn quiver
#

use vsc

#

i use vsc

#

because pycharm is complicated

#

@kind shuttle

kind shuttle
#

ok

worldly olive
#

game devloper in blender!

#

or what

kind shuttle
#

when i create a screen , what kind of units does it count ?

#

@wind kernel can u help me with this ?

woven fog
#

Hello

#

i want help

wind kernel
#

i dunno much myself

woven fog
#

i have to code a hangman game but i dont know where i cant start help me!!

kind shuttle
#

@woven fog i think you should start with coding the menu cause it easiest but easily affected to the others part

#

so that the place where u can start

#

@dawn quiver can you help me of what kind of units does it count when i create an screen ?

dawn quiver
#

i dont understand your question

#

also, if youre askin about pygame, im clueless

#

idk how to use pygame

#

@kind shuttle ]

kind shuttle
#

thank you

wind kernel
#

@dawn quiver sorry man, im an idiot and let my laptop die without saving and this is the last copy of the code i have, how do i implement the exit function again?

dawn quiver
#
if inp == "exit":
  pass
``` @wind kernel
wind kernel
#

i replace inpt == "back" with it, right?

dawn quiver
#

yes

wind kernel
#

idk im a noob in python, i dunno much

dawn quiver
#

hm

#

how?

wind kernel
#

but this worked till my laptop died so i dont mind using it

#

@dawn quiver i get a syntax error with this

dawn quiver
#

code?

wind kernel
dawn quiver
#

I. N. D. E. N. T. A. T. I. O. N

#

lol

wind kernel
#

ah

dawn quiver
#

@dawn quiver ok but

#

that would raise a keyerror if no such archive exists

#

nvm u can use a try-except block

wind kernel
#

works now, thanks

#

when the two smartest kids in class have different answers:

#

i really cant understand what y'all are talking about lol

kind shuttle
#

nah i search youtube to help me with some point and it make me a mess , i think i will clear all the code and try again later

#

also i found a book that explain 'bout pygame

dawn quiver
#

lmao

kind shuttle
#

see u soon

wind kernel
#

thanks alot, from brain

#

how do i use quotation marks inside a print

#

print("this "is" nice")

#

for example

#

how do i do it

proper coral
#

print("this is nice")

#

also for general doubts, this is not the channel

dawn quiver
#

@wind kernel wdym

#

what are you trying to do

wind kernel
#

oh sorry

#

can we talk in DMS

proper coral
#

uhh no

severe saffron
#

@wind kernel you can use ' quotes for the outside

#

or you can use a \ to escape the quotes inside the string

#

these are all valid:

print("Hi, isn't this cool?")
print('Hi, isn\'t this cool?')
print('My name is "Seagull"')
print("My name is \"Seagull\"")```
wind kernel
#

indeed, from brain import small told me in dms

severe saffron
#

noice

crisp junco
#

I need an urgent help

#

can anybody help me out to make pygame exe?

#

I've been trying for almost 2+hrs but with no luck

#

tried pyinstaller,cx_Freeze,auto-py-to exe , but none worked for me

#

pls do mention me if you're willing to help

#

there's just a single script, without any images,audio files etc.

lethal turtle
#

weird pyinstaller worked for me perfectly (I am on windows 10)

crisp junco
#

It's keeps on giving error Failed to execute your script

#

@lethal turtle

lethal turtle
#

On the console?

crisp junco
#

IF I SHARE YOU THE FILES COULD YOU PLS CONVERT IT INTO AN EXE

#

PLEASE I REQUEST YOU

lethal turtle
#

I can try

crisp junco
#

can i dm you?

lethal turtle
#

um sure

crisp junco
#

thanks

lethal turtle
#

np

last moon
#

@crisp junco are you using unix?

#

if you are do you have the shebang?

crisp junco
#

what's unix?

#

@last moon

#

ah that os, nah I'm not on Windows

last moon
crisp junco
#

pls check your dm

last moon
#

I don't know anything else about linux systems other than that you need the shebang

#

Most people here (myself included) would perfer to talk about it here sorry so I don't do dms

cyan trail
#

Hey, Im working on a pygame script that uses speech to text as an input. What would be the best way to have the screen refresh loop continue while running the speech recognition? Should I use threading or Multiprocessing for this?

somber creek
#

where is a good place to make a game manual and what are some good examples?

karmic void
#

@somber creek what do you mean by game manual

somber creek
#

i mean like the a manual showing the instructions of a game

#

@karmic void

karmic void
#

Yes

#

Use Word

#

Create a Word document

#

Or google docs

somber creek
#

but what format would I use since im using a combination of pictures and words

karmic void
#

You can wrap text

#

In word

#

Right click the picture and press wrap text

somber creek
#

ok

karmic void
#

But nothing special is needed here

#

Just a normal Word document should do fine

somber creek
#

ok

last moon
#

or LaTeX 🙃

#

it's like programming a word doc

zenith crown
#

hi, I was wondering if there was a PyGubu esque assistant for PyGame?

last moon
#

not that I've heard of

#

speaking of apps tho, what are some of the more popular programs for 3d physics models/animations (not specfically for python)

zenith crown
#

sorry i dont know, ive not really done any 3d before, thanks for the answer though

last moon
#

ik UE's blueprints might give you a similar result but it's in c++

paper raft
#

Hello, I have a Python Problem. It is to create a game called Oregon Trail but a Canadian Version. I have done most of the code but I want to see how others do it. If anyone is interested in trying to make this game please DM me on Discord. I have the starter code and the instructions. It would be much appreciated. Thank you :)

Discord: MIKASA23 #2466

shrewd galleon
#

hello, I would like to make python speak, how could I do that? thanks

#

without using an mp3 file but switching from text to audio

somber creek
#

hey after I finished my project i was told to make a short paragraph (aim for about 200 words) describe the programming process that took place while coding this project.
Does anyone know what this means?

kind shuttle
#

i ran a test and now i cant close it help me TT

#

oh i just closed the cmd and it work

kind shuttle
#

is there anyone use pygame ?

potent ice
#

Yup. Using pygame, arcade, pyglet etc. depending on the project

dawn quiver
#

I am learning pygame it is so difficult 😦

ionic tundra
#

PyGame doesn't have auto completions on VSC?

#

If possible, tell me how to enable it😅

maiden egret
#

Try to Download a snippet

kind shuttle
#

@dawn quiver oh sorry i was busy . can you help me with this

last moon
#

size has to be a tuple if I'm not mistaken

kind shuttle
last moon
#

you're missing size all together

quiet pulsar
#

Hi guys. I am a beginner and am thinking to make a cool looking game. How and Where should I start?

potent ice
#

Then you can expand to other things later

quiet pulsar
#

Alright thanks

potent ice
quiet pulsar
#

I will check both. Thanks for the advice.

potent ice
quiet pulsar
#

Both sites look good as they have chapter-based tutorials

quiet pulsar
potent ice
#

It's an optional resource

quiet pulsar
#

Ok

zenith crown
#

somthing strange is happening with my collision logic, for some reason, an image in the middle of the screen is returning as being in the top left

                x, y = event.pos
                for X in gates:
                    print(x, y, X.sprite.get_rect())
#

436 337 <rect(0, 0, 85, 78)>
269 173 <rect(0, 0, 85, 78)>

severe saffron
#

what's weird about that

#

X is a member of gates, which is presumably completely unrelated to event.pos

hybrid blaze
#

games take years of development

#

sometimes

somber bramble
#

guys!!

need help!

i'm designing an space game without graphics, only tables, but the combat system is becoming a little more complex than I've imagined.

Any tips on how to make 2 fleets fight using only arrays?

somber bramble
#

the combat system is supposed to be the flavor in the game

elfin frost
#

or real pain

#

depending on the game 😂

last moon
#

Do you think you need to know multiple coding languages to develop a game
@hybrid blaze realistically you could get away with only knowing c# or c++ (or python), most of your mechanics can be done with them. If you've got a high score system or something where you need to store data and access it over a connection that's where a database language would come into play. If you've got a server/multiplayer component usually python and c++ are used for it

#

Then again you could have done tons of work in c++ and not have a clue how to approach game dev, like other fields it's got its own required experience and 'language'. As an example would be to look at arcade or pygame, even if you have tons of python experience, that's only a part of what you need to make the game run

#

For the bigger games, if you're working on it alone, you definitely need to be passionate about it otherwise you'll burn out pretty quick - also most AAA games aren't done solo, they've got huge teams working on each component

#

*from what I've seen, I've literally got 0 experience so I could be wrong

strong trail
#

I'm having problems with https://paste.fuelrats.com/ukiwenatih.py where cells that I've killed reappear when the batch is redrawn, is this the correct way to remove them from the batch? (You can see the behaviour by adding/removing cells or by double clicking and then pressing a button to redraw)

pallid trail
#

why is the for loop not run everytime the update function is called

last moon
#

doesn't it have to have an event to get?

cosmic knoll
#

Usually huge teams are working on games

#

In the huge teams there are people who know different languages

#

Some people do

#

Some dont

silver radish
#

Need some advice, I'm trying to make space invaders in pygame. It's my first game I'm making in pygame. I'm having trouble thinking of a way to change shooters when the one on the bottom row dies. Any tips would be appreciated

#

My enemies are all currently made up in a child class from ship parent class with basic attributes (x, y ... etc)

silver radish
#

Figured it out finally. But if anyone still has any ideas I'd be happy to hear them

dawn quiver
#

how to program a simple rps game (rock paper scissors):
from random import randint

t = ["Rock", "Paper", "Scissors"]

computer = t[randint(0,2)]

player = False

while player == False:

player = input("Rock, Paper, Scissors?")
if player == computer:
    print("Tie!")
elif player == "Rock":
    if computer == "Paper":
        print("You lose!", computer, "covers", player)
    else:
        print("You win!", player, "smashes", computer)
elif player == "Paper":
    if computer == "Scissors":
        print("You lose!", computer, "cut", player)
    else:
        print("You win!", player, "covers", computer)
elif player == "Scissors":
    if computer == "Rock":
        print("You lose...", computer, "smashes", player)
    else:
        print("You win!", player, "cut", computer)
else:
    print("That's not a valid play. Check your spelling!")

player = False
computer = t[randint(0,2)]
steep canyon
#

Hello dears, i would love if someone could help me with algorithm for five in a row or criss cross game. I am trying to learn python using this one and i got stuck on it for quite some time.

Thanks in advance

rough yacht
#

hi all, i know some intermediate python and wants to go for game dev.
Question: should i go with pygame or should i go with blender and its bge?
Thanks in advance...u can ping me if u reply :)

dawn quiver
#

oh hi there

#

Im pretty sure the blender python scripts does not accept any kind of input

#

so pygame is your option right there

rough yacht
#

@dawn quiver thanks for ur suggestion (sry if u mind the ping)

dawn quiver
#

a the ping is nothing

#

and ur welcom

#

e

rough yacht
rough yacht
dawn quiver
#

ye kind of

rough yacht
#

um mhm thanks

placid sonnet
#

hi

urban hare
#

Anyone able to make an undertale fight for me? I think it would help me understand how to use pygame a lot better. 🙂

potent ice
#

That is a lot to ask for 😉

urban hare
#

sorry... the only thing i need is like the main bullet hell thing. like dodging attacks

tranquil girder
#

What's your budget?

urban hare
#

wdym? I dont have a budget its a hobby

frank fieldBOT
quiet pulsar
#

Im getting an error

#

It says win32canvas is not defined

potent ice
#

Better to copy the exact error.

#

I think that it might means your computer doesn't support opengl 3.3

#

I know windows 10 don't have good drivers for older integrated gpus like HD4000 etc

#

(But they work in win 7 and 8)

#

... or did you a simpler example to run?

dawn quiver
#

how do I change the background color in the pygame window?

dawn quiver
#

Easy

dawn quiver
#

Sorry if a bit late

ruby saddle
limpid gyro
#

hello

#

no one here

tranquil girder
#

Hi no one

limpid gyro
#

bruh

#

ur a pygamer ?

#

hello ?

#

@potent ice

potent ice
#

Please don't randomly ping people 😉

limpid gyro
#

nah

#

just

#

u were the only one online

#

and

#

i wanted to talk game-development

#

so are you up for it ?

potent ice
#

People will chat here when they have the time. I am working right now.

limpid gyro
#

oh sorry

#

[me falling on people who are at work this moment]

#

ur up ?

#

Louis 4

urban hare
#

Hi! I am developing a clicker game (using guizero btw) and I have to implement multiple currencies to exchange to and from- and I need you guys's help to do it. The currencies (and exchange rates) are as follows:

500 clicks -> 1 penny
5 pennies -> 1 nickel
and et cetera. any help would be greatly appreciated

limpid gyro
#

?

#

@urban hare wdym

urban hare
#

wdym wdym?

limpid gyro
#

well i never heard of guizero

#

that probably means that i cant help you

#

more or less

urban hare
#

guizero is like tkinter if you ever heard of that

limpid gyro
#

oh ok

#

then it should be ok

#

yeah i worked alot with tk

#

so what does the player has to do

urban hare
#

do you want to see the file?

limpid gyro
#

maybe

last moon
#

Idk the exact method but there should be a on_mouse_click or something similar

limpid gyro
#

nah just giv me the result

urban hare
#

Im good with the guizero part, i just need a way to do the exchange

last moon
#

You can just have a counter in that method and figure out the rest of the logic from there

urban hare
#

like, you can get change for a quarter from 25 pennies, or 5 nickels, etc

limpid gyro
#

do u have the amount of pennies and nickels as vars ?

urban hare
#

yep!

limpid gyro
#

then

#

u need functions that makes conversions

urban hare
#

if you want to see the code, tell me how i can send it because discord is weird

limpid gyro
#

!code

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.

urban hare
#

the thing is my code is around 400 lines

limpid gyro
#

oh

#

heck

urban hare
#

yeah i work hard

limpid gyro
#

so u have a zone

#

where u can click

#

and each click adds a penny to ur variable

#

shi-

#

adds 1 to ur var named pennies

last moon
#

@urban hare create a button and when the button is pressed augment a counter by 1, handle the conversion in your update method

urban hare
#

wait my code is 639 lines lol

limpid gyro
#

imaging adding a penny to a variable

#

can u show us the result of ur code

urban hare
#

wdym? theres no errors

limpid gyro
#

nah

#

just show me the ui

urban hare
#

how

limpid gyro
#

wdym

#

ur making a game

#

an interface

#

no ?

urban hare
#

im using python idle

limpid gyro
#

yes but what happens when u push "RUN"

urban hare
#

not pygame

last moon
#

NFS idk what you're trying to do but if the code isn't implemented, the implementation isn't going to be very helpful

urban hare
#

i get 2 windows that work

limpid gyro
#

yeah

#

take a screenshot of them

#

and send

#

i just wanna know how it looks like

urban hare
#

how to take screenshot on a raspberry pi 4?

limpid gyro
#

oh

#

idk rlly

urban hare
#

i tried [raspberry] printscreen but that didnt work

limpid gyro
#

k

#

there's an actual python code that takes a screenshot of ur screen

#

and saves it as an image

#

i just dont remember what it is

#

@urban hare ?

#

u here

#

?>

urban hare
#

yea sorry

#

i got a screenshot

#

lemme find it

limpid gyro
#

cool

urban hare
#

ty

last moon
urban hare
#

i know how to work buttons

last moon
#

What are you confused with then?

limpid gyro
#

@urban hare so back

urban hare
#

the exchange code

limpid gyro
#

u need help with the functions ?

urban hare
#

just the many ways to exchange for different currencies

limpid gyro
#

k what does the buttons on the upgrade panel do actually

urban hare
#

they change variables that either give you more Clicks per actual click, add backgrounds, et cetera

last moon
#

So send the button to an input that has pennies += 1 and add if/Elif statements to check if the number of pennies/different coins have reached a certain value

#

If so, add 1 to the next level up

urban hare
#

the problem is the exchange thing is manual

#

oh, i get it now!! thanks!

limpid gyro
#

mhm

#

seems we had some backend problems

urban hare
#

also if u guys ever wanna play it, just ask! 🙂

limpid gyro
#

k

urban hare
#

hey, when defining a function, is there a specific way to signify that a parameter is a list?

limpid gyro
#

u want to use an argument from a list ?

urban hare
#

yeah, lemme show u some of the code im talkin about

urban hare
#

i mean instead of this:

#
    button.hide()
    box.hide()   
#

i want this:

#
    list[0].hide()
    list[1].hide()
limpid gyro
#

isn't that possible ?

#

never tried it so asking abt it

urban hare
#

idk

limpid gyro
#

then try it

last moon
#

Ya you can typehint your arguments

#
def foo(var: int, lst: list):```
#

You can do the same with the return type

def bar() -> int:
    return 1```
urban hare
#

Hey, I need an opinion on something.

limpid gyro
#

yeah ?

urban hare
#

Should I have separate variables and indicators for the pennies, nickels, dimes, quarters, and dollars, or should I just make one big indicator that shows the total value

limpid gyro
#

i'd choose separate vars

urban hare
#

alright! thank you!

limpid gyro
#

np

#

nice

#

wassup

#

wanna talk ?

#

ok

#

im just creating a game'

#

a complicated one

#

with simulated work

#

like doctor, pilot, fireman, ...

#

2d

#

pygame

#

but im just at the start

#

also 3d is bad in python

#

ig

#

and i called the game Visenvia

#

cuz vis in via in latin means "the way you want"

#

u shouldn't be giving a description

#

everyone knows this good old game

#

this one too

urban hare
#

and im working on a clicker

limpid gyro
#

wait'

#

1987 ?

#

or something like that

#

i meant 1990

#

ok

#

or ya know what

#

@dawn quiver choose

#

my game

#

will be:

#

just a car game or a whole job game

#

i think ill make it a car game for the moment

#

yes

#

frustrahsihfvusl

#

i still have some hw to do

#

and another hw about scratch

#

im obliged to do what other pupils are doing

#

they're still learning scratch

urban hare
#

OOF

limpid gyro
#

im at python high deving

#

and at java basics

#

?

#

wdf

urban hare
#

Yeah one time i had to take a beginning scratch class, while in fact ive been using it for the past 5 years

limpid gyro
#

oh my god lord of the skies

#

exactly

unkempt wren
#

we don't use that word here because it detracts from the inclusive environment we want to create. Thanks!

limpid gyro
#

oh sorry then

#

i wanted to use a word else than that but i also had the wil to send the message in parallel

#

nice

#

is anybody following r/ProgrammerHumors

#

they have some good memes coming off

#

k

#

nah nah

#

im programming well

#

dont need any help for the moment

#

im used to pygame

#

oh ok

#

oh btw

#

@dawn quiver well first are u french ?

urban hare
#

french janitors be cleaning up Oui oui

i had to

limpid gyro
#

so

#

today i had school

#

irl

#

( with masks )

#

k

#

and

#

yeah

#

like i stopped at one time

#

with only online class

#

and now its both

#

online class and irl school

#

and

#

we had technology

#

with scratch

#

and

#

i had to help half of the class in:

#

this is heck

#

its like helping 6 yo with the same problem

#

me too

#

definitely

#

but i used it a bit when i started programming

#

but that was just with what school learned to students

#

i was learning python in parallel at home

#

nah

#

like wdym

#

does python or any languages costs money ?