#game-development
1 messages · Page 70 of 1
Yeha I’ve used unity before I wanted to get a feel for coding games in python
imo unreal's a nice option with the blueprints and coding without having to learn tons of c++
also ursina looks decent
Thanks
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.
pygame's alright, it's got a couple issues tho, I usually suggest to use arcade instead
Yeah I’m trying to learn to use pygames and it looks interesting to use
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
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.
and ?
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)
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?
how do u create buttons in pygame?
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
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
Hey @versed agate!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
could anyone explain to me what line 25 does - https://paste.pythondiscord.com/foradaqosa.apache
please do ping me
@versed agate scales your surface and draws it on the main window.
@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?
@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.
[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
-6
On a scale from cringe to what? :p
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
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!
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
in python?
yeah
why would it struggle with 4 players ?
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
what does pos4 mean in pygame
wdym pos4
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
first time making a game using pygame
dang look cool
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:...
@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
why are circular imports not allowed
@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.
Ok thanks any recommendations on another game engine that might be able to do that
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 It's alright. Ping me if you want to ask me questions. Bomberman is a famous platformer game.
@waxen nebula If your ultimate aim is to make games, then I'd recommend you to learn c# and unity
Ok thank you both
I made snake and it was the hardest stuff ever no doubt
which module in python is best for games?????
It depends on your experience level and what you want to make
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
If you are doing 3D maybe look into panda3d
But.. these might be all bad suggestions because we don't know anything about you
this is kind of general, but do you guys have any recommendation for finding sprite sheets somewhere online?
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?
@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 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 🤷♂️
@late depot Great! It makes sense.
Sure (if I can)
and am a bit confused on how I would do that?
the timer is on lines 1109-1137
Can you elaborate a bit?
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?
Timer is the update function?
ya
i am trying to get into pygame but dnt kow where to start
@patent ruin do you understand what im trying to say/do
Yea. I'm reading the code
So basically, when the timer hits zero, you want your int variable to increase by 1
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?
I'll dm you.
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?
okay
nobody needs help here ?
Does somebody know something like an actual dictionary that I can import and then take random words from?
I think you might be able to use NLTK's words corpus for that
or you can download a dataset of words, I'm sure https://www.kaggle.com/ has quite a few
hey can I please get some help with my code
is python good for game dev?
Depends on your requirements
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
so the speed at which you click determines the points?
Hello
Hi!
I am trying to create an autosave feature. Would anybody be willing to help me?
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
Thats OK
anyone can help with a star algo?
like the faster you click the button the more points you get and the slower the fewer points
@somber creek you could probably just usetime.time()for that
start = time.time()
display_button()
if clicked:
total_time = time.time() - start```
ya the faster you click the more points you get snd the slower the fewer points
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 usingasyncio.sleep()for the timing of the loop and call your save function once that finishes
@import numpy as np what does the the disply_button do
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
if you dont understand the code how did you do it?
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
oh so its just example code for how to do it?
basically.. pseudo-code isn't meant to be used, it's meant to demonstrate the logic
ok thanks
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
does anyone in here know how to use tkinter please urgent
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?
hmm
khalil how do you display the first round ?
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/
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?
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
does this give any error
h
wouldn't you want move_ball() after updating the position?
See fixed
Ok
Does everything I wanted it too
What game?
works on android
in pydroid
joystick, worlds
even the coctail skin
is a secret
if you make your name coctail
it will apear
I have no idea what that game is
Ooh cool
And sorry for russian
I'm try and make my pong cam better
is a secret
so much for it being a secret :p
@last moon thx
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
#microcontrollers can work
does anyone know how to update a label more than once in tkinter?
has anyone made a topdown style game using pygame. If so @ me plz 🙂
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?
@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
how wud i access a sprite group from another file in the same directory
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
use pygame but for like lots of words u cud use QT designer
@near sluice u might wanna check this channel out
Oof
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
personally I like to use auto-py-to-exe, it's got a decent ui
It used to be fairly easy to make pygame stuff into exe. Maybe things are a bit different with pygame2?
pyinstaller still refuses to work properly for me idk why
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 😅
I have some from opengameart.org
But I m thinking to change them
I've heard getting it into the google store is hell
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
@dawn quiver
can you help me out?
with making pygame into exe's
please I need urgent help
@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
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
Yes i fixed it dont worry thank you
but uh off topic question
https://marketplace.visualstudio.com/items?itemName=vincentfiestada.cold-horizon-vscode what font is this
yes
but
what font is this in visual studio code https://marketplace.visualstudio.com/items?itemName=vincentfiestada.cold-horizon-vscode
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
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
the full code is here https://pastebin.com/rXae8rrq
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
So I'm making a weird little game, I'm looking for playtesters to give me feedback. Anyone interested?
Hi All - I have a quick question about pygame that someone might be able to help me with
@dawn quiver - I can
Okay cool
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
I NEED help with installing pygame to visual studio code
what do you mean to visual studio code
thats an IDE
you just install the pygame package through your terminal
or cmd prompt
i need help with making a 3 second timer till something is printed
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
so you don't want anything to happen while the timer's running?
indeed
use time.sleep(#ofseconds)
just a timer for something to be printed
thanks alot!
it now says ```NameError: name 'time' is not defined
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
you need to compile it with an external library
pyinstaller or auto-py-to-exe can both do that for you
thanks alot!
np
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
https://stackoverflow.com/a/304896 that might help too
i get this when trying to use pyinstaller
im not even sure if im using it right or not
python noob here, i apologize
type that into the console not python
what did you get from putting it into the console?
ill check them out, thanks
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
@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
thanks soo much!
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?
Hello I need help with an autosave feature in my text game If anyone would like to help me please message me thank you
Hello
randomheart = (random.randint(goodheart1,goodheart2,goodheart3,goodheart4,goodheart5,goodheart6))
how do you choose a random one from all of them?
@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
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
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.
im starting a new game project , hope you guys help me if i have issue
brain do you have any idea how this is fixable?
i could try doing it myself if i know what i should do
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
@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.
the part that you tested in that ss
this one
if inp == "1":
# do something
choose_archive()
huh
and do that for every archive
no need for back anymore
that stuff u have at the end of the code will never be executed
holup wat
ah yes
elif inp.strip() == "exit":
print("Quit archive selection proccess.")
add this
at the end, right?
if inp == "1":
#stuff
elif inp.strip() == "exit:
pass
you can replace the print with pass
pass literally does nothing
alright, i will modify the code now and tell you the results, thanks alot!
ok
show me the code
this one
good
np
@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 ?
idk, but my guess would be using imports
having a main.py file
and then multiple other files like menu.py, inventory.py
and then in main.py they import those files
@kind shuttle
thanks
@dawn quiver , idk where to put the exit code. i keep getting syntax errors no matter where i put it
lemme test again
u can remove it
yeah, try removing it
oh
@@
ohhhh
elif means "If the if statement conditon is not met, do this:"
python 101 but im stupid so i didnt know ¯_(ツ)_/¯
no indent error this time
i did remove the elif at the top
ok im really stupid now im getting a dozen syntax errors
np :)
works perfectly! again, thank you!
@dawn quiver is there any way to make it so you can only access the archives once you press a specific button?
Enter, for example
import keyboard
access = False
while True:
if keyboard.is_pressed("q"):
access = True # allow access to archives
choose_archive()
@wind kernel
i think you need to put this after all of your code
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)
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
im not even a hour ^^
hm, i mean you should know this stuff, but ok
at the end of all the elifs, add this:
i started with discord.py for a discord bot
so i never really learned any of this stuff
at least for the bot i was making
have u guy had something can fast-completed a words program?
else:
print(f"No such archive found! Archives: {", ".join(archives)}. You can exit by typing \"exit\"")
oh great...
whenever i put in something that isnt defined as an answer, it brings up the archive thing
@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 heres the fix
!d f-string
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).
k im open pycharm and hope it has IDE for python
hope dont lag through
so lag
a syntax error
you should change the number
dude
and change the order of code
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")```
not to be mean, but for a week your knowledge of python is kinda bad
@dawn quiver pycharm kinda lag for me
ok
when i create a screen , what kind of units does it count ?
@wind kernel can u help me with this ?
i dunno much myself
i have to code a hangman game but i dont know where i cant start help me!!
@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 ?
i dont understand your question
also, if youre askin about pygame, im clueless
idk how to use pygame
@kind shuttle ]
thank you
@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?
if inp == "exit":
pass
``` @wind kernel
i replace inpt == "back" with it, right?
yes
but this worked till my laptop died so i dont mind using it
@dawn quiver i get a syntax error with this
code?
ah
@dawn quiver ok but
that would raise a keyerror if no such archive exists
nvm u can use a try-except block
works now, thanks
when the two smartest kids in class have different answers:
i really cant understand what y'all are talking about lol
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
lmao
see u soon
thanks alot, from brain
how do i use quotation marks inside a print
print("this "is" nice")
for example
how do i do it
uhh no
@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\"")```
indeed, from brain import small told me in dms
noice
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.
weird pyinstaller worked for me perfectly (I am on windows 10)
On the console?
I can try
can i dm you?
um sure
thanks
np
.
pls check your dm
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
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?
where is a good place to make a game manual and what are some good examples?
@somber creek what do you mean by game manual
but what format would I use since im using a combination of pictures and words
ok
ok
hi, I was wondering if there was a PyGubu esque assistant for PyGame?
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)
sorry i dont know, ive not really done any 3d before, thanks for the answer though
ik UE's blueprints might give you a similar result but it's in c++
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
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
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?
Count me in
@paper raft
i ran a test and now i cant close it help me TT
oh i just closed the cmd and it work
is there anyone use pygame ?
Yup. Using pygame, arcade, pyglet etc. depending on the project
I am learning pygame it is so difficult 😦
PyGame doesn't have auto completions on VSC?
If possible, tell me how to enable it😅
Try to Download a snippet
size has to be a tuple if I'm not mistaken
this is the code
Hi guys. I am a beginner and am thinking to make a cool looking game. How and Where should I start?
@quiet pulsar If you are a beginner I would give arcade a try : https://arcade.academy/
Then you can expand to other things later
Alright thanks
@quiet pulsar https://learn.arcade.academy/ can also be an option if you are beginner, but I don't know where you are in the progression 🙂
I will check both. Thanks for the advice.
There is also an arcade discord : https://discord.gg/ZjGDqMp
Both sites look good as they have chapter-based tutorials
Ok I will join
It's an optional resource
Ok
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)>
what's weird about that
X is a member of gates, which is presumably completely unrelated to event.pos
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?
the combat system is supposed to be the flavor in the game
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
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)
doesn't it have to have an event to get?
Usually huge teams are working on games
In the huge teams there are people who know different languages
Some people do
Some dont
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)
Figured it out finally. But if anyone still has any ideas I'd be happy to hear them
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)]
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
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 :)
oh hi there
Im pretty sure the blender python scripts does not accept any kind of input
so pygame is your option right there
@dawn quiver thanks for ur suggestion (sry if u mind the ping)

but ig it does accepts keyboard and mouse inputs, isnt it?
ye kind of
um mhm thanks
hi
Anyone able to make an undertale fight for me? I think it would help me understand how to use pygame a lot better. 🙂
That is a lot to ask for 😉
sorry... the only thing i need is like the main bullet hell thing. like dodging attacks
What's your budget?
wdym? I dont have a budget its a hobby
Hey @quiet pulsar!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
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?
how do I change the background color in the pygame window?
Easy
Search Google
Sorry if a bit late
pygame.init()
Define the colour first
red = [255, 0, 0]
screen = pygame.display.set_mode([800,600])
screen.fill(red)
Hi no one
Please don't randomly ping people 😉
nah
just
u were the only one online
and
i wanted to talk game-development
so are you up for it ?
People will chat here when they have the time. I am working right now.
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
wdym wdym?
well i never heard of guizero
that probably means that i cant help you
more or less
guizero is like tkinter if you ever heard of that
oh ok
then it should be ok
yeah i worked alot with tk
so what does the player has to do
do you want to see the file?
maybe
Idk the exact method but there should be a on_mouse_click or something similar
nah just giv me the result
Im good with the guizero part, i just need a way to do the exchange
You can just have a counter in that method and figure out the rest of the logic from there
like, you can get change for a quarter from 25 pennies, or 5 nickels, etc
do u have the amount of pennies and nickels as vars ?
yep!
if you want to see the code, tell me how i can send it because discord is weird
!code
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.
the thing is my code is around 400 lines
yeah i work hard
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
@urban hare create a button and when the button is pressed augment a counter by 1, handle the conversion in your update method
wait my code is 639 lines lol
wdym? theres no errors
how
im using python idle
yes but what happens when u push "RUN"
not pygame
NFS idk what you're trying to do but if the code isn't implemented, the implementation isn't going to be very helpful
i get 2 windows that work
how to take screenshot on a raspberry pi 4?
i tried [raspberry] printscreen but that didnt work
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
?>
cool
ty
i know how to work buttons
What are you confused with then?
@urban hare so back
the exchange code
u need help with the functions ?
just the many ways to exchange for different currencies
k what does the buttons on the upgrade panel do actually
they change variables that either give you more Clicks per actual click, add backgrounds, et cetera
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
also if u guys ever wanna play it, just ask! 🙂
k
hey, when defining a function, is there a specific way to signify that a parameter is a list?
u want to use an argument from a list ?
yeah, lemme show u some of the code im talkin about
i dont think so
i mean instead of this:
button.hide()
box.hide()
i want this:
list[0].hide()
list[1].hide()
idk
then try it
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```
Hey, I need an opinion on something.
yeah ?
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
i'd choose separate vars
alright! thank you!
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
and im working on a clicker
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
OOF
Yeah one time i had to take a beginning scratch class, while in fact ive been using it for the past 5 years
we don't use that word here because it detracts from the inclusive environment we want to create. Thanks!
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 ?
french janitors be cleaning up Oui oui
i had to
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:
downloading an .sb3 file and opening it on scratch.mit.edu
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 ?
