#game-development
1 messages Ā· Page 99 of 1
if the player which si the gun is moving left, then ```py
def degToRad(self,player_angle):
return self.player_angle * math.pi / 180
def fixAngle(self,player_angle):
if self.player_angle > 359:
self.player_angle -= 360
if self.player_angle < 0 :
self.player_angle += 360
return self.player_angle
if keys_pressed[pygame.K_a]:
ray.player_angle += 5
ray.player_angle = ray.fixAngle(ray.player_angle)
ray.pdx = math.cos(ray.degToRad(ray.player_angle)) * 5
ray.pdy = -math.sin(ray.degToRad(ray.player_angle)) * 5
if keys_pressed[pygame.K_s]:
ray.player_x -= ray.pdx
ray.player_y -= ray.pdy
if keys_pressed[pygame.K_d]:
ray.player_angle -= 5
ray.player_angle = ray.fixAngle(ray.player_angle)
ray.pdx = math.cos(ray.degToRad(ray.player_angle)) * 5
ray.pdy = -math.sin(ray.degToRad(ray.player_angle)) * 5
im sorry, i couldnt be fucked explaining it
but if your mouse moves left then you plus the player angle and then you use that fix angle function which makes sure the angle is a valid integer for being a angle
and then you calculate your pdx and pdy
is it just me or is there some weird indentation of the 2nd and 3rd blocks in that code?
yeah its from a class
i just rpped it out cos its a external use method
bro there's also a pygame.rect.rotate
im gonna look into that as well
player.image = pygame.transform.rotate(player.image, 45)
thats like such a better solution xD
im stupid
XD, nah mate, at least you know how to code unlike me
if you run that code that i have, its a ray caster, its a totally different thingo.
but nah you should stick to the simpler things, they are done so you worry about the main part, the creativity
its a sprite
if the png is just being rotated clockwise or counter clockwise it may look a bit silly
its a tilt
im sure the gun is gonna move left and right
but the tilt is gonna be like offsetted to like .5 degree per x offset from the center of the screen
thats what i was thinking, it moves in 2 dimensions so its going to literally rotate?? or am i mistaken somewhere?
tilting is rotating
you can rotate it in a small amount so that it gives a tilting look
i think i see it, like it just rotates to accommodate for vertical movement?
horizontal
š¤·āāļø i would have to see this in action i think
to understand
i can imagine sliding the sprite back and forth for horizontal crosshair movement and rotating it for vertical crosshair movement
left offset is width/2 and right offset is width
i just can't imagine how you can rotate a gun sprite to account for horizontal crosshair movement without making more sprites?
idk, it's not my project lmao doesnt really matter
?
seems like you've never made a game with pygame
by that i just meant i don't gotta bug you about it
sdl2 is amazing and pythons simplicity has made it insanely easy to just create a plethora of builtins for pygame
there's alot you can do
this isnt 3d, its 2d, altought, he could map left, middle and right sectors of the screen to certain sprites so that the images tilt accordance to thier corrdinates but the images change to show the perspective
the middle is a stright back of the gun, the left and right are left and right tilted views of the gun
see that makes sense to me, changing the sprite
but the builtin you're talking about using is altering a sprite on the fly to make it look like it's turning left and right?
im gonna go make coffee
i had coffee this morning after like 3 months of break from caffine. i was on fire
yup
that sounds great, but also im sorry
ive been trying to get off caffeine for like 10 years but it always pulls me back in
anyway
when i had my finals like 4 months go, i was popping about 400-600 mgs of caffine....
Hello everyone! How can i run some code when my app finishes loading? (like on start of application) in kivy
I wanna some animation playing after application starts
that wouldnt be this channel
Note: I have an Screen widget with this label
i think that would be user-interfaces
or software design
eh, who am i to judge what a graphics library is being used for
i think kivy isnt just for game development
yeah but none of the above can run natively on android
also kivy is a graphics library.
.
i know how to make an animation, i just need to run it on some kind of event
i tried it on_start and on_enter
im not familiar with kivy
how does a application run persay
what command makes it run
wdym
class TelepatMessengerApp(App):
def build(self):
return kv
if __name__ == '__main__':
TelepatMessengerApp().run()
kv is the UI
okay, so from the moment telepatMessengerApp().run() is executed
yes
which im assuming build function runs
you could start a clock which is the amount of time your animation takes
you can figure out where things start to get rendered and sneak your loading animation in before any of the components load
start a clock for the time it takes for your animation ot run
and then continue with rendering your landing page or whatever it is you're rendering
does that make sense or would that not work with kivy
I wanna some animation playing **after **application starts
i dont think so
well, in principle thats how i would imagine a load up animation would work
How can I possibly make animations in PyGame?
helper duck needs help
YeS
all you have to do is understand your issue. hypothise how it would work
understand the resources you have and thier abilities
map the resources and your solution together
yo @raw shadow so i found a better way to kinda achieve the effect i wanted
instead of trying to move a 2d image on the 3rd dimension (which now that i think about is completely retared), i just decided to move the gun itself
thats what i was saying that whole time
thanks for the help mate
animation with nothing else going on:
load all the images of the animation, put them all in a list, iterate through the list and display.
animation with other stuff going on:
use a thread to toggle animation state variables, change given sprite's current image based on that variable
that's how i did it
How about animation when the character in the game and other stuff are moving and still running in the background.
see "animation with other stuff going on"
Oh wait
i represent the player, npcs, animted objects in general as instances of classes, with "current image" attributes that can be changed according to a global "animation state" variable
i change the state variable in a thread so it can run at all times
this is for like, idle animations
surely not the best method but that's the one i came up with for my stuff at the time
Hi
I don't know if somebody remember me
but for the people who forgot or aren't award
i'm currently working on a video game engine
and i have publish an update who introduce
basic networking for creating multiplayer game
so here's my git hub page if you are interest : https://github.com/ModAndThink/BaguetteEngine/tree/0.0.3
I'm developping my own little rpg and how would you guys pass the MyBoss class into the Bite skill, so I can do actions with the Bite skill while accessing Myboss attributes?
#bosses.py
class MyBoss(Boss):
def __init__(self):
self.skills = [skills.Bite(),]
#skills.py
class Bite(Boss_skill):
def __init__(self,<<<MyBoss>>>)
self.source = <<<MyBoss>>>
def action(self):
# Do stuff with MyBoss class through self.source
hmm
i don't see a reason to pass the Boss to the skill?
Just let the boss have Bite as one of its skills
seems like you're referencing them both to each other? you only have to do it in one direction
lets say my bite skill changes boss attributes, how do I make Bite() access them?
i would give each skill certain numbers, like say, the damage it does
then write a function that takes the skill's damage and subtracts it from the boss's health
does that answer the question?
here's the spell class i wrote for my rpg
# spell.py
# Define spell class for use in Goblin Hero
# Author: Jackie P, aka TheDataElemental
# Spells to be cast by player
# Spell_type = heal, attack, status...
# Value = amount of damage, health, etc
class Spell:
def __init__(self, name, spell_type, value, animation, mana_cost, \
element):
self.name = name
self.spell_type = spell_type
self.value = value
self.animation = animation
self.mana_cost = mana_cost
self.element = element
self.target = None
# Carry out effects of spell
def effect(self, target):
self.target = target
if self.spell_type == 'Heal':
self.target.hp += self.value
elif self.spell_type == 'Attack':
# Check for elemental advantage
if target.elemental_type == self.element.advantage:
# Deal advantage damage
damage_dealt = self.value * 2
self.target.hp -= damage_dealt
# If no advantage, deal standard damage
else:
damage_dealt = self.value
self.target.hp -= damage_dealt
return damage_dealt
Is this good practice?
#bosses.py
class MyBoss(Boss):
def __init__(self):
self.skills = [skills.Bite(self.__class__),]
self.hp = 100 # for example purposes
#skills.py
class Bite(Boss_skill):
def __init__(self,boss_class)
self.source = boss_class
def action(self):
self.source.hp += 50 # Bite heals skill owner
ah so i was thinking you were attacking the boss maybe
i made a basic example
class Enemy:
def __init__(self, hp):
self.hp = hp
class Attack:
def __init__(self, damage):
self.damage = damage
def deal_damage(enemy, attack):
print("HP before attack:", enemy.hp)
enemy.hp -= attack.damage
print("HP after attack:", enemy.hp)
tackle = Attack(3)
monster = Enemy(10)
deal_damage(monster, tackle)
i don't 100% understand what's going on w your code but it seems unnecessarily complicated maybe
let me adjust my example now that i know the skill belongs to the boss
ah so it looks like,
you're making a special kind of attack, that has a special effect (life steal)
what you can do is have each skill have a "type" attribute, and dictate behavior based on that
okay here
class Character:
def __init__(self, name, hp, skills):
self.name = name
self.hp = hp
self.skills = skills
class Skill:
def __init__(self, damage, skill_type):
self.damage = damage
self.skill_type = skill_type
def attack(user, target, skill):
print(user.name, "HP:", user.hp)
print(target.name, "HP:", target.hp)
print(user.name, "attacks", target.name, "for", skill.damage, "damage")
target.hp -= skill.damage
if skill.skill_type == "life steal":
user.hp += skill.damage # todo: add code to divide by 2 and round
print(user.name, "HP:", user.hp)
print(target.name, "HP:", target.hp)
# Make skills
bite = Skill(3, 'life steal')
stab = Skill(5, 'standard')
# Make characters
player = Character('Player', 12, [stab])
boss = Character('Boss', 10, [bite])
# Boss attacks player (example)
attack(boss, player, bite)
this should have the effect you want
does that make sense?
Should I use classes while making a game or global variables?
update: it worked š
use classes when you're trying to simulate a thing that has certain attributes (for example, color, size or whatever)
what did?
i wouldnt make a different class for every enemy or skill though
that's a mistake i made myself early on
Okay
Is classes faster than global?
having a ton of global variables is generally a bad practice to avoid as much as possible
you wanna keep your stuff in neat little boxes when you can
i'm doing like this, because Bite() can be accessed by more than one Boss, and I want bite.effect() to have boss attributes available to them inside bite
best to generalize your code as much as possible but that might be too advanced for right now
keep on coding, you'll get there
Which is better?
class loop:
def __init__(self,lvl1,lvl2):
self.lvl1 = lvl1
self.lvl2 = lvl2
or
global lvl1
global lvl2
lvl1 = True
lvl2 = False
I guess it depends on what youāre trying to achieve
Are you planning on having multiple different types of loops with different attributes? Then use a class
Are lvl1 and lvl2 one-time values you donāt plan to ever change? Then i guess define them once as global variables and move on
If i want them to be deciding the game loops. Like: ```py
while lvl1:
pass
And also a second question. How can I improve the performance of PyGame?
I donāt see any reason to use a class here from the limited context i have
I am asking these questions to get the best performance in my game.
Okay.
I donāt think performance should really be an issue but here
And how can I possibly make the games so that every player would move in the same speed without it depending on the performance of the computer.
probably this is a matter of choosing a framerate and updating the screen based on that
set an fps constant to 30 or 60 or whatever, then add a line to your game loop to wait for the clock to tick
Okay.
i mean this is for normalizing game speed on one local machine
if you mean online multiplayer, idk anything about that
Local
if you want you can use my basic system of server/client
would it be possible to make a Gameboy Advance game in python and then crosscompile to ARM Assembly? I read something saying as long as you can compile/convert it to ARM Assembly you can make a GBA game in almost any language
Not sure
The assembly that use your computer is not same that a gameboy use
I think itās more likely that you wouldnāt be able to traduce it using program
Just by the fact that your computer use an assembly that has function who doesnāt exist in a gameboy
Also it wouldnāt be very optimized if itās possible
If anyone wants to test and give an opinion https://github.com/Gabriel018/Python-Games
nice
The short answer is not really, the long answer is much more complex than a simple yes/no.
Most GBA development is done with C, thereās probably some kind of way to use Rust or something, but even still performance tuning generally needs manually done with assembly
kk thanks
In some instances, it can actually be easier to build an emulator for a retro console than to build the games themselves
And that can definitely be done in Python(though itās not the most performant choice for that)
yeh I used to have my own gb emulator in python but it was really slow
Normal, your gb use an assembly in format 8 bits and python use an assembly 64 bits
Thatās why iām making a ānes styleā game instead. Didnāt feel like learning assembly
has anyone tried to use wgpu in pyodide? Does it work?
I managed to micropip.install() it from wheel in the REPL (https://pyodide.org/en/stable/console.html). I can import wgpu but
from wgpu.gui.auto import WgpuCanvas, run
both fail
edit: nvm I think I found the answer - https://github.com/pyodide/pyodide/issues/1911
Has anyone used Godot with "python runtime support" by chance?
is there any engine for python
does godot supports python?
i thought it supports gd script, visual script and c#
I believe there are some level of third party runtimes which add varying levels of support for Python, but it isnāt an officially supported language as far as Iām aware
For Python thereās Arcade or Pygame for 2D, and Ursina is popular for 3D. Thereās also Pyglet but that tends to be a bit lower level(more like a multimedia framework than a game engine)
wait godot has a module for python
@vivid bone this game me so many fun ideas for practice thanks for posting
Oh ty!
I heard it can but I'm not sure if it completely replaces gdscript. People just keep telling me to learn gdscript instead of python but the only reason I even consider godot is for python practice.
I am goinf to learn gd script instead of using python in godot
Hey @gusty path!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
The thing with this implementation is that i will have LOTS of different boss skills, with some characteristics that are specific to that skill, like dots, hots, passives, actives which means that eventually, i will have lots of "skill_types" which will need its specific block:
if skill.skill_type == "life steal":
user.hp += skill.damage
altough i like the idea of having my skills being made like this:
# Make skills
bite = Skill(3, 'life steal')
stab = Skill(5, 'standard')
for sure, yeah that's the idea, having a block of if statements, one for each unique skill type
i'm sure there's a better way of doing it, but i feel that's still better than having a new class for each type of skill?
the if statements would take up less space
right now i have a Boss_skill() class that has methods like resolve_skill() that triggers the skill effect and find_priority_target(), and all my boss skills inherit from Boss_skill()
then i just have a single skills.py
with ALL my skills that any boss would use
then I just have a bosses.py
with all bosses having a list of whatever skill class they use
either way you'll have to dictate that behavior for each skill type somewhere, yeah
if you have a system that works then that's good
worry about optimization later maybe
class Bite(Boss_skill):
def __init__(self, boss: Boss, targets: list[Player]) -> None:
super().__init__(boss, targets)
self.name = "Bite"
self.cast_time = 2
self.spell_power = 1.2
self.description = r"Life Steals 20% damage of damage done"
self.targeting_type = 'tank'
self.current_target = self.find_taget(self.targeting_type)
def effect(self):
dmg = calc_tick_dmg(self.source.attack,self.current_target.defense,self.spell_power)
self.current_target.take_damage(dmg)
self.source.heal(0.2 * dmg)
here's how it looks
but now that i talked with you i think that it would be better to pass stuff like cast_time and spell_power as a parameter into the Bite class, so that different Bosses can have different values on a Bite skill
it's great to have someone else to share ideas, thanks a lot!
oh ty, yeah it's def helpful for me too to discuss code w people
Hello everyone, is it a way to create a rpg in a browser with python? I heard about pyjs
Yo what kinda code would i do to see if a player has a certain role or not
Like
For role in msg.author.roles:
If role == āvipā:
. . .```
Isn't that discord.py or something?
django is a popular python web framework? but when i think browser game, i think javascript. but to be fair i havent done much browser stuff at all
Yes it's javascript, but Im not going to learn Javascript when I already know Python š I'm sure in the future we could convert any programming langage in another , Pyjamas is a Python converter to javascript for this use, I was asking if some of you knew another way or if some people already tried pyjs for making a game
question : anybody know how to open file with a custom format for extract value
Anyone know?
can you give more context?
Basically im trying to look and see if a discord member has a like vip role or smth so that they have access to extra commands or smth
a
Like you mean load it?
no
i would like to get value from it using a special format
but for your question i advise to ask it i the discord-bot channel
Would it be a .py file? And u wanna get a variable from it?
nono
Oh lol i thought i was in that one
Oh wait do u wanna have a file with a variable that nobody can see?
do you know how format work?
Ohhhh
for example with pdf the programs made for this format would scann the file for find the things he is schearching
wait
https://www.youtube.com/watch?v=VVdmmN0su6E here's a great video
Let's explore what a file format is, and provide a different view on it. We dive into polyglots, file format research and the impact on security.
Funky File Formats Talk: https://www.youtube.com/watch?v=hdCs6bPM4is
corkami/mitra tool: https://github.com/corkami/mitra
Guessing vs. Not Knowing featuring Steganography: https://www.youtube.com/wat...
I am learning pygame and till now I have successfully added a backgroung image to the game window. Now I want to add the player image but it is too large in size. How can I crop it?
NVM guys I got it
just learn js. It will only make you a better programmer and js teaches you a lot of things that you most likely won't learn using python. It's also really good on a job app.
`def checkCollision():
for pipe in pipe_list:
if square.colliderect(pipe):#Problem
print("collide")
if square.bottom >= 900 or square.top <= -100:#This works fine
print("Collide")`
Collision is even detected between two bodies when they are not touching. Please help.
Use euclidean distance
Learn C, C teaches you way deeper things than JS
Yeah but thats only if you really care about low level stuff or learning. I want to learn C but i just don't have any use for it
You can use it to create Linux drivers, you can use it to control levels of computer hardware that would be harder with high level languages, you can even use it to create efficient apps and games
You can even use it for cyber security
You can use it to create Linux drivers, you can use it to control levels of computer hardware that would be harder with high level languages, you can even use it to create efficient apps and games
that's quite a lot of extremely niche stuff š
Yes but i don't create any of those. If i wanted to make apps i could use C# or python. JS has electron. Theres also GTK for a number of languages, all of which is just easier to write than C. I could use GDscript or C# for games. Cybersecurity is a strong point in C which it excels at although Go is starting to rise because it's much easier to write.
Python is based on C, C# is just a rip off of Java by Microsoft and not a lot of people use Go compared to C
not sure about cybersecurity, even. If you mean high-performance cryptography algorithms, sure, if you mean writing safe software - something like Rust might be nicer
You can test malware written in C on computer hardware
so?
they didn't imply C# is similar to C somehow, though, they said it's a good choice for making apps, which is true.
its mainly good for microsoft development and Unity
it's what it's designed for
but it has the same downsides as C.
just generally harder to write than a lot of newer languages
At least harder than C
thats different
thats because of Unreal engine
it does not use C
i never said it did
C++ is high level in general
ok i'm not arguing
ask anyone and they will say newer languages are easier to write than C
yeah and we are in a python server talking about different languages
if you know C then great but telling someone to learn a language they most likely will never use and forget after a month of not using it isn't the right thing to do.
If I would tell someone which language to learn first, I would just say Python
Assembly would be even worse in that case unless if you are a hardware engineer
Iāve been using python for a year but might jump to js just bc i hear there are more jobs for it
do what you love best as long as there are good outcomes out of it
I like python fine and feel like iām decent at it now but still canāt find work with it
So iāll shift to web stuff ig
Iād still like to finish my python rpg since i worked on it for like⦠nine months
I have a turtle object which is appearing behind another turtle object, and I want it first one to be visible on top of the second one, can anybody help me out?
My skills in game development end at creating a platformer game
personnaly i dont even know how to use turtle for video game
Can i get help implementing online player collisions for my game. i have collisions between the players and the map but not between the players
How is collision between players different from collision with the map?
insert code to check for adjacent players before executing the movement process
you can use absolute value and subtraction to calculate distance
maybe but this is kind of vague, can you provide more context?
for my game, i have a list of current entities in the scene, iterate through them and blit them to the screen one at a time
if entities are stacking in the wrong order, you can just rearrange their position in the list
whatever image is blitted to the screen last will appear on top
hope that helps
C is the lingua franca of the programming world, it is what it is. Learn C, C++, Python, JS, and C#. The more of them you learn, the faster you can learn a new one.
(A lot of the new ones you learn are just a variation of what you already know)
Iād like to do more C stuff for sure
(C++ is C with more tools but a couple of downsides that are subtle, it's still good though)
(Also don't forget that there are many other options now, like Rust, D (D has improved a lot over time), Zig, Odin, etc)
I like programming but it would be nice if someone would pay me for it lmao
(But C will be around for a very very long time, because the OSs use it and every language uses it to communicate with the OSs and each other, etc)
Seems fine, a scripting language, a web language, and a systems programming language.
neither js or c look particularly intimidating after working with python for a year
JS is a lot better than it used to be. C is still C, but slightly nicer over time (C11 latest, they don't like to change a lot / keep it simple).
i messed with js a little and a lot of my python experience seemed to port over
Yeah, Python will set you up for success with many other languages (because it's straight forward and not esoteric really).
it's all just code with some quirks here and there huh
Yeah, some new languages are trying to minimize those quirks.
Smooth out the edges.
Which new versions of JS have for example.
Yes, but I think it makes more sense after learning JS.
makes sense
Kind of how Rust makes more sense if you know C++ (you understand the intent behind the design).
foundations first, then variations
Starting directly on TS can be confusing š
If you learn JS first you will understand and appreciate typescript and why it does what it does (what problem was it trying to solve in JS).
Same with C++ and Rust.
pygame seems to be really useful ? @tired aspen
Im new to it
Pygame mostly is just a couple functions for stuff like displaying an image at a given location, making a screen object and refreshing it
Thereās like a time delay function
Even w pygame you have to build all the features of your game yourself
Even low level stuff like scrolling text or menu navigation, you gotta build that
Good code practice tho
So i run pygame sheets on tkinter canvases??
So that i can give some buttons and all
Im not able to get the layout of things
I havent used tkinter myself
I donāt use the mouse, itās all arrow keys like a console game
@tired aspen Me
Iām creating a video game library and I use tkinter for displaying. I have recently implemented basic ui. The button and the label
Here itās the project
k thx
@tired aspen wait i would post a example of 2d game
https://github.com/ModAndThink/Ponc here's the game i made
with a system of multiplayer
is it possible to rotate shapes when you draw them in pygame? So perhaps something like pyg.draw.rect(screen, color, (left, top, x, y), angle = 50)?
or maybe
rect = pyg.draw.rect(screen, color, (left, top, x, y))
pyg.transform.rotate(rect, angle)
You need to use a transform I think.
The former works with the arcade library, but not pygame.
Congrats! Start small.
Does anyone know how to change a arcade window name?
I thought this would do it but it didn't.
You need to pass the screen title to the window constructor, there's a few ways but depends on how you're starting a window. If you are subclassing window then pass that SCREEN_TITLE variable into the constructor like super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
Yup. Check the API docs : https://api.arcade.academy/en/latest/api/window.html#arcade.Window
only the first two parameters are positional
Okay thank you.
I'm having trouble installing pygame on a Raspberry Pi. I've updated to Python 3.8, upgraded pip, but when I try to install pygame I get ERROR: Command errored out with exit status 1: python setup.py egg_info
Do you guys know how to make builds from the game, if I have it as a PyCharm project, using images, json files, and multiple codes? (pygame game)
use bulldozer
Buildozer can barely do anything - You can't even use it on windows, let alone the fact it can't even build for windows
@light jacinth How can I make your code so that it stops when it collides with the ground? I'm the guy you helped in #help-dumpling.
Please help me.
the if self.y > 400 was the check for whether we hit the ground
so you can change that to work with other surfaces ig
maybe have a list of collideable objects and check for each one
I did it but when the player falls it goes through the ground.
hmm
Like thispy def model_grav(self): dt = time.time() - startdt acc = 3000 #if self.y > 400: for event in pygame.event.get(): if self.p.colliderect(ground.g): acc = min(acc,0) self.vel = min(self.vel,0) self.y = 400 self.isjump = False self.vel += acc*dt self.y += self.vel*dt
you wouldnt want to set y to 400 then
or actually nah that would be fine since its still the same position
because i want that i have multiple platforms on the screen
@light jacinth ||sorry for pinging||
k
because i havent done game dev in ages
k
self.model_grav()
def model_grav(self):
dt = time.time() - startdt
acc = 3000
if self.on_ground():
acc = min(acc,0)
self.vel = min(self.vel,0)
self.vel += acc*dt
self.y += self.vel*dt
def on_ground(self):
if self.y > 400:
self.y = min(self.y,400)
return True
for x1,x2,h in platforms:
if x1<=self.x<x2 and abs(self.y - h) <10:
self.y = min(self.y,h)
return True
return False
platforms = [(0,100,300)]
``` here's what i did
but like, doesnt sound very pygame to me
its working for me but ill admit there are definitely better ways of doing it
okay
might wanna wait for someone from here to help because this isnt my territory
for fun i made a few visible platforms, but the hacky way i wrote platform collision isnt helping
rn if i walk off a platform and immediately go back i end up half under the platform š¤·
intended game design ofc
how can i get started with pygame and will i need to used other programmming languages\
You only need python and the docs : https://www.pygame.org
There is a "getting started" section
Hey just a general question out of interest but are there more efficient ways to program a game-bot except making use of openCV and pyautoGUI because there arent much resources available on youtube and the internet has the tendency to not explain certain mechanisms ...thx in advance (Bot is meant for a PvE-Game and some experience in automation )
Anyone here know pygame proficiently dm me
Does Anyone Know How To Game Devolopment In Pygame?
There are so many resources on pygame out there
Free videos, books, tutorials etc etc
In my 2022 list of stuffs I want to learn game development is one of it. Somehow please recommend me from where to start ?
monogame c#
My game engine: https://github.com/ModAndThink/BaguetteEngine/tree/0.0.3
@hidden eagle Can you tell more. I'm the guy you helped in #help-bagel (#help-bagel message)
can anyone help me pls? im new to pygame and for some reason my background image not showing in pygame window
What is your code?
@vast hedge did you create a display surface? Once that object i.e. screen is created you can blit something on it.
Not me haha
All done in Python š

Here's the source code: https://github.com/harfang3d/dogfight-sandbox-hg2
and happy new year everyone !!!! š
Wow thats very very impressive, good job with this!
I am actually amazed by this! I didn't know Python is capable of that, nice job!
... I'm bookmarking this to show people what's possible when they say Python isn't suited to 3D games, because that is a big fat lie :D
It's definitely super hard if pure python, but we do have C extensions so we can hook into neat stuff š
sickkk
can someone please help with this problem
gd scripts are not really something we can help with here I think
oh ok
hey some one have a 32x32 pixels or more tileset with grass, stones and water???
You can probably find something here : https://www.kenney.nl/assets
thanks!!!!
I am new to python and pygame and I am having a problem making leader board in pygame can anyone help me ?
GD script is not Python šš
This is very helpful I think : https://www.pythondiscord.com/pages/guides/pydis-guides/asking-good-questions/
A guide for how to ask good questions in our community.
thank you
Also, smaller very specific problems are easier to deal with here. If you have a larger problem you are better off breaking things down into smaller parts.
noted
I think this applies pretty much anywhere
Can someone help me with this.
https://www.toptal.com/developers/hastebin/osuwojizom.py
There are no errors but when I move/walk/run in the game my character becomes blank and doesn't show on the screen until I stop moving in the game. Why is this?
Hello just another lost soul stumbling into game dev. I just wanna make a console text based game with single key input without pressing "Enter" but i also need to get string input sometime like names and so on. How should i get do it? is it right place to ask questions like that or shld i go to help channels? Thank you in advance.
thanks
what is this ide?
It's Godot
This is a demo of the Python Arcade Library, check it out here:
https://arcade.academy
Source code for demo, written as just one big program:
https://github.com/pythonarcade/demo
Want to learn to program with Python and Arcade?
https://learn.arcade.academy
New demo video for the Arcade library, in celebration of its 6th birthday!
very cool! was angry birds really made using this?
Clearer Code, a YouTuber has a really good pygame introduction on his channel. It's about 4 hours long, but after the 1-2 hours you should be able to make the leaderboard.
Is there anyway to make a character move on the terminal. Im trying to create a rpg text game that runs in a terminal
Anyone familiar with openvr here?
I'm trying to call the PollNextEvent function within Python using the Python openvr package
But I can't since I don't know what parameter to put in there
Looking at the usage of that function in the library itself, it's used like this:
event = openvr.VREvent_t()
has_events = self.hmd.pollNextEvent(event)
so you create an empty event and pass it to pollNextEvent to be filled.
Oh wow thank you so much
This is the way you do a lot of things in C, and it's a bit of a yikes that this wrapper does it the same way as the upstream library, instead of a more pythonic way.
I searched pollnextevent in their github and found a usage of that function in one of their tests:
https://github.com/cmbruns/pyopenvr/blob/df96c8f50937188fbbfd3a1596d8ffaba05e5b1e/src/samples/glfw/hellovr_glfw.py#L402
src/samples/glfw/hellovr_glfw.py line 402
has_events = self.hmd.pollNextEvent(event)```
Thanks. Didn't expect to get help this fast!
Yeah it was super confusing. We don't write values to pointers in python nor do we need to specify the length... hence we can only guess what these documents (in C#) shall translate to Python code
yeah, I'm afraid with a thin wrapper like that you'll have to keep one eye at the docs of the original library, and the other at the bindings' source code š„“
they didn't even bother autogenerating some docs, even though they totally could have
otherwise you might want to look at https://github.com/harfang3d/tutorials-hg2/blob/master/scene_vr.py
Thanks. Not really trying to make a game from API though. I do have a plan for making a VR game but I'll definitely use a game engine instead.
I'm currently working with the API directly because it's a non-game project and can't use game engines š
I guess I can. It's just not super convenient. I'm making a tool that allows custom mapping from VR controllers to mouse/keyboard input, so that I can use my VR controllers to navigate my PC desktop when I get my PC connected to my living room TV. As you can imagine, sending direct calls to create mouse/keyboard actions within a game engine is either complex, or probably just impossible when the game window isn't in focus.
You donāt even need a rendering window
Yeah no
š
how do u create a game using python?
ya do
Create mechanics, sprites, a game theme and bam
@wind birch you can look at https://arcade.acadmy for samples.
Thank you, would definitely watch it
Anybody have a good example of training bots to play games? I want to teach an AI to play the Catan clone I'm making
nice !!!!
What 3D engine are you working with ?
where can i get help with pygame
i need a non judgemental person cause i made some weird sh*t
Ursina
how weird we talking
lol 18+?
lmfao
but not a sex game
damn
i'm 15 tho
its not porn
its just 16-rated meme culture sort of
nvm i found the solution
Hello I have a pygame question. I am trying to make asteroids and wanted to get the harder stuff out of the way first. How can I make a triangle (ship) point at where the mouse is on screen?
https://stackoverflow.com/questions/10473930/how-do-i-find-the-angle-between-2-points-in-pygame
Adapt the answers here to make the ship point at the mouse
from math import atan2, degrees, pi
dx = x2 - x1
dy = y2 - y1
rads = atan2(-dy,dx)
rads %= 2*pi
degs = degrees(rads)
This will let you calculate the angle between two points
o ok ty
Can anyone please help me in pygame??
You just ask the question. Never ask to ask. Some good tips here : https://www.pythondiscord.com/pages/guides/pydis-guides/asking-good-questions/
A guide for how to ask good questions in our community.
Thank you lots
No prob! Good luck on your pythoning adventure
Thanks figured I could practice some solid OOP with asteroids and I enjoy pygame so I said why not
Hi. Anyone there?
gonna need some vector maths for that and maybe some trigonometry. Not too hard to learn.
How make???
Hello guys, should i learn pygame or c++ for game development
Rn I'm doing pygame
If you are just learning, I'd recommend something like pygame or Arcade to start. Then jump to unreal or unity. Godot is pretty good too.
Pygame is good
hey
whats wrong with this code, why is it throwing errors-
what is the error in this C code -
include<stdio.h>
include<stdlib.h>
int main(){
//2d arrays
int nums[3][2] = {
{1,2},
{3,4},
{5,6},
};
int i, j;
for (i= 0, i<3, i++){
for(j=0, j<2, j++){
printf("%i", nums[i][j]);
};
printf("\n");
};
return 0;
C is very off topic here unless it's related to python C extensions (different channel for that)
If i do this as an example would the program basically stop until i return Lol?
Lol = hehelol(LOL)
Lol += 2
Print Lol
Depends what the hehelol function does
In the two for() statements, replace all the , by a ;
And there is a missing closing bracket in the end
But really the compiler should tell you that already:)
can someone help me make a menu
Iām trying to write my first pygame game and having an issue loading a png and was hoping someone could help or point me in the right direction. I am using pygame.image.load(os.path.join(āgraphicsā,āSky.png)) and every time I run my script it says āpygame.error : File is not a Windows BMP fileā I have looked at the docs and I believe I am loading the png the right way
Can I ask a question please? :))
I am learning pygame and I want a sprite move toward another, I have done a few search but no result. Thanks for all helps!
do you wan to control your sprite using arrow keys. Or have it move on its on?
try putting the image in your project file. Then do pygame.image.load(your image)
@spare phoenix thanks for the advice. That didnāt work either. Turns out when I installed pygame into a venv something got all messed up. Tried reinstalling it into an venv a couple times but it wasnāt seeing python3-dev packages so I ended up installing it globally and it all works now.
Thatās interesting. Glad it worked out for you.
Question, so I want to make a python ai that is able to play TF2 and beat other bots (on my own server)
Any idea as to modules I can use. Would be cool if I could do similar sorta things with other games
Unity
can please with pygame collision detection
any ideas
are you experienced with unity?
because Idk why the hell my avatar isn't showing up, when I click the + it just says none and drag and drop doesn't work either
why isnt pygame movement working when in a class?
i have a function and everything but it wont move it
I'm fairly new to pygame and I'm trying to make a 2D plaformer but I don't know how to change the image of my character, any ideas?
Instead of drag and drop u could press the small dot next to the filling space it will show u what u can insert there
oo
Best python module for 3D games imo
yeah that didn't work either but I figured out what the problem has been already, still thank you!
Hi! I want to learn about pygame but I'm not quite sure where to start off, any suggestions?
realpython has a great starting course that I used to get the basis. Many other resources of course but this is simply the one I know
https://realpython.com/pygame-a-primer/#:~:text= Basic Game Design 1 Importing and,control gameplay. ... Every cycle... More
Ur welcome š š
hii
depends on what you what you plan to make and how much time you have...
but if you want to learn the basics of pygame and or game devlopment then the freecodecamp on where i learned
Making game with python š
Does anyone have tips for improving the performance of Pygame and Python? 
It depends on the specific game being made. More information is needed.
Profile your game and then ask a question about the slow parts.
Moving is slow, as in your character controller does a lot of work?
Yeah, i guess so.
Let's not guess. Profile your game.
Yeah then
A platformer should not be slow unless you have a lot of entities or particles or something like that.
Well, i think that the animations are making it slow.
The player's animations? All animations?
Player animations.
hi
hello š
would you like to see what ive been working on?
How are you doing animations?
sure!!
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
looks cool
hey guys, so i want to make a game in js right, whats a js library that most resembles pygame such as its resemblance to the structure of pygame and the way things are done in a sense
why use js instead of python?
and are you zixtry?
i need to have the game on the web
what?
ok nevermind i guess not. your pfp looks similar to someone i know
Just rendering images after each other.
Should not be slow then.
Maybe a bug.
Need some code to be able to tell.
@stiff bronze Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!
Our server rules can be found here: https://pythondiscord.com/pages/rules
hey, is there any lightweight game engine which uses python(insstead of commonly used c++) like unity, godot.... which can make both 2d and 3d games?
Unity does not use Python, Godot can use Python, and can do both 2D and 3D.
but godot uses gd script right?
i-i mean pygame is only for 2d right?
Godot uses many languages, gd script is the recommended built in language (C# is also fully supported as an option).
Pygame is for 2D games (though you can do 3D if you try really hard, but I don't recommend it).
so we can use python in it also?
also if you know any more lightweight free game engines pls tell me
There is not really any lightweight 3D game engines that have more than the bare bones in terms of features.
ohk
(Because 3D is complicated)
yeah
i was asking similar to godot
if not can u suggest some sources where we can use python in godot
If you mean beginner friendly, and has Python, then I recommend either Ursina or Godot (with Python extension, but you can also just do gd script since gd script is very Python-like).
some youtube tutorials mabey
yeh yeh beginner friendly
Ursina is pretty straight forward, the community for it is very helpful. It lacks the giant community of something like Godot or Unity, but it gives the easiest, fastest access to making 3D games with Python.
oh thanks
gotta check that out
Anyone wanna be my teammate for pygame??
I also want some experience so that's why too
do want a teammate for a mini-project or you need help to solve a bug...
?
I jst want for a mini project and we gonna gelp each other too anytime
ok, actually i cant be your full-time teammate...
but still...feel free to ask-out for help...
UPBGE? it uses python, but I've never tried it
It takes less than an hour for learning gdscript it's damn easy, godot's your best shot :)
im using SDL2. When running my game my texture blur together like in the image.
its hard to tell but on my screen its definitely there
im rendering to texture first then i render it to the screen.
Make sure you set the texture mode to "nearest" if you don't want interpolation
thanks
wait actually this still doesnt do anything
i tried setting it with a sdl2 hint
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");
!warn 902273081744166953 Please don't post unrelated content in random channels
:incoming_envelope: :ok_hand: applied warning to @sly topaz.
Hii
Anyone wanna be my teammate in makin games?
no reply...
how i could import tilemap from a json file (exported from tiled) in pygame?
i can
Then dm me
Pygame code
I am making a clicker game but when i press the key then it jst goes and goes and goes
https://paste.pythondiscord.com/hasetudaca.properties
I want to make a clicker game
So i don't want that
I want like
When i click or even hold w the playerYChange should only go up by 1
No matter how much time i hold it i gotta click it another time to get it to 2
I'm surprised SVGs aren't used for hame development and PNGs are widely adopted
if i pip install pygame
does that version of pygame has type annotations?
i am using pygame.font.SysFont() to display text.
name for the font can be None, but it seems like pyright doesn't like it,
it shows this
1. Argument of type "str | None" cannot be assigned to parameter "name" of type "str | bytes | Iterable[str | bytes]" in function "SysFont"
and SysFont signature seems to be
(function) SysFont: (name: str | bytes | Iterable[str | bytes], size: int, bold: Hashable = False, italic: Hashable = False) -> Font```
in the source code
def SysFont(name, size, bold=False, italic=False, constructor=None):
i can't find anyplace where types are written
am i missing something?
That means it's likely using a stub file
search for a file with a pyi extension in the package
what do you mean?
name can also be None plus others
I don't see where in this type hint it says that name can be None.
yes it doesn't
but if it is None it uses default font
but it isn't in the type annotation
The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.
I don't see the docs mention it can be None either
so if it is the case, it's not documented
should i open an issue or something?
yes
then yeah, make an issue that this behaviour isn't documented nor reflected in the typehint
okay, thanks for the help
I made that for school and because I'm a complete no-life I'd like to share it with you, 100 times more experienced internet folks
Suisse ou franƧais?
Your text is in french
indeed
which are good certificates for game devel, for employment specifically? I am doing CS degree rn. Thanks!
C#, C++, Java
This is Kal who has much experience in full stack & blockchain & game development
I implemented several P2E games on blockchain and Defi, marketplace and DAO projects.
If you are interested in, please feel free to DM me
Here are my skill sets.
[BLOCKCHAIN]
āŖ NFT marketplace, Defi, Solidity, Web3.js, Ethers.js, Ethereum, Solana, Algorand
[FRONT END]
āŖ React, Next, Vue, Nuxt, Tailwind CSS, Bootstrap, Material UI, Styled Component
[BACK END]
āŖ Node.js, Express, Nest, Laravel, Python,
[DATABASE]
āŖ MongoDB, MySQL, Firebase,
Pygame code
I am making a clicker game but when i press the key then it jst goes and goes and goes
https://paste.pythondiscord.com/hasetudaca.properties
I want to make a clicker game
So i don't want that
I want like
When i click or even hold w the playerYChange should only go up by 1
No matter how much time i hold it i gotta click it another time to get it to 2
Put py PlayerYChange = 0at the end of the while True loop
hwo should i start gam dev
nice
very cool. try to make it editable through your program.
o/
Ola
good luck š
making isometric game in python
Is it possible to learn python by coding in mobile? (With the Pydroid app)
Tag me for reply
yea
i learned it from that app
nostaglia
old days
when i doesnt have an computer
but lots problems will come with indentations
@solar raven
but then also u can learn
Oh wow, glad to hear that from someone who coded from mobile! Thanks a ton man! Time to start python soon then

do you see my isomtric game
?
Yes, it looks amazing!
thx
How many lines of codes it took?
2k or 1k
lines
You can finally counter the classic āget off your phone and get to work ā
Dayummm
Hahaha yeaa
hello guys sorry to interrupt, just wanted to ask, if i wanna get into game dev, should i go for C# or python (pygame), or C++
All of them.
Roll a die.
what should i start with?
Python, this is a python server.
For those who are curious, I did a one hour one man game jam https://xtaloid.itch.io/blaster
Good for an 1 hour game :)
I thought so!
U only showing code
Yea
wait
Bye
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
one punch man is cool
Can anyone show the search bar in the exploxer file when it's hidden?
My game library is now in opengl, so you can make steam game with it. Here's the url : https://github.com/ModAndThink/BaguetteEngine/tree/0.0.4
why are you using relp.it?
thats almost as disgusting as using spaces
Does this have to do with game-development or just your math homework?
ohh no wrong channel
Ok
is there a more concise way of writing this?
int edge = MATCH_GEM_BOARD_EDGE_NONE;
int index = gem - state;
int left = 0, right = 0, top = 0, bottom = 0;
if(index % columns == 0)
{
left = 1;
}
if(index % columns == columns - 1)
{
right = 1;
}
if(index / columns == 0)
{
top = 1;
}
if(index / columns == rows - 1)
{
bottom = 1;
}
if(top && left)
edge = MATCH_GEM_BOARD_EDGE_TOP_LEFT;
else if(top && right)
edge = MATCH_GEM_BOARD_EDGE_TOP_RIGHT;
else if(bottom && left)
edge = MATCH_GEM_BOARD_EDGE_BOTTOM_LEFT;
else if(bottom && right)
edge = MATCH_GEM_BOARD_EDGE_BOTTOM_RIGHT;
else if(top)
edge = MATCH_GEM_BOARD_EDGE_TOP;
else if(bottom)
edge = MATCH_GEM_BOARD_EDGE_BOTTOM;
else if(left)
edge = MATCH_GEM_BOARD_EDGE_LEFT;
else if(right)
edge = MATCH_GEM_BOARD_EDGE_RIGHT;
else
edge = MATCH_GEM_BOARD_EDGE_CENTER;
you can do top = index / columns == 0for example, at least in python
oh yeah your right thanks
Hey @mental sun!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
https://paste.pythondiscord.com/otaroqajej.php guys help this lok creative pls
Hi, I have some trouble with pygame so I need help. I don't know if i'm in the right channel sry. I think I have a beginner level. Sorry for my bad English, I'm french š
You should just ask your question, don't ask to ask
in what language
Python
I have another one also written in Python: https://xtaloid.itch.io/xtaloid
how long did that take
I've been working on it for months, on and off (mostly off as I have been doing other things)
thats so cool
im assuming you're in the job market
no, I do this for fun
not even a student?
oh, I have a job, sure
but not in tech
Not directly. I work for a company that publishes stuff for a tech audience
that sounds enjoyable
it's fun! and I get to write about this kind of stuff
quit
Is it a text game or a pygame lol
Text game
Whats the simplest way to get keybinds? Like if I press A to do something
Using what library?
Well tkinter won't do the job (Minecraft's window takes priority in full screen mode)
I know that from experience
realtble LOL
import pygame_gui
from pygame_gui.elements import UITextBox
pygame.init()
pygame.display.set_caption('Multi-coloured Text')
window_surface = pygame.display.set_mode((800, 600))
manager = pygame_gui.UIManager((800, 600))
background = pygame.Surface((800, 600))
background.fill(manager.ui_theme.get_colour('dark_bg'))
text_block = UITextBox('<font size=5>Enjoy a '
'<effect id=spin>'
'<font color=#fc2847>R</font>'
'<font color=#ffa343>A</font>'
'<font color=#fdfc74>I</font>'
'<font color=#71bc78>N</font>'
'<font color=#0f4c81>B</font>'
'<font color=#7442c8>O</font>'
'<font color=#fb7efd>W</font></effect>'
' of colours with Pygame GUI</font>',
pygame.Rect((275, 140), (250, 120)),
manager=manager)
text_block.set_active_effect(pygame_gui.TEXT_EFFECT_TILT, effect_tag='spin')
clock = pygame.time.Clock()
is_running = True
while is_running:
time_delta = clock.tick(60)/1000.0
for event in pygame.event.get():
if event.type == pygame.QUIT:
is_running = False
manager.process_events(event)
manager.update(time_delta)
window_surface.blit(background, (0, 0))
manager.draw_ui(window_surface)
pygame.display.update()```
basic code of pygame_gui
hopefully this helps you
btw install the pacake
*pacage
pakcage
oh
yea
its very easy
are you new to game dev?
i can help you
are making minecraft title screen?
or smthing else?
can you send a image
sorry i didnt understand it
is there a way to make a 3d game?
Ursina
hey i have idea for insane game but i am not skilled in programming, i need programmers to script game and i model game with blender
late reply, but yes - it'll be painful though.
try getting a pc asap
U also coded in mobile
nah
Mostly because of indentation
I started learning on a pc, but ive tried coding on a phone and it isn't as bad as people make it to be
def main():
global game_speed
run = True
clock = pygame.time.Clock()
dino = Dinosaur()
cloud = Cloud()
game_speed = 14
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
SCREEN.fill((255, 255, 255))
userInput = pygame.key.get_pressed()
dino.draw(SCREEN)
dino.update(userInput)
cloud.draw(SCREEN)
cloud.update(userInput)
pygame.display.update()
clock.tick(30)
it tell me that cloud.update() takes one input, but 2 where given
nvm
i tried running it, is that all of it?
sorry i fixed it
i send u friend request
turns out i forgot to put userInput in the cloud.update
tbh i have no idea what that means
ok i tried running it again, and all that pops up is the python shell
ill just send u the code
thanks man, your really cool for doing thisš
Neither.
Both.
@dawn quiver
e
i legit just blocked him for it
Turn your phone into a wireless game controller for Call of Duty game.
All the setup and source code available at GitHub repo (Give a star if you like).
GitHub Repo : https://github.com/YashIndane/Call-of-Duty-
My Linkedin Profile : https://www.linkedin.com/in/yash-indane-aa6534179/
Source code and explanation-
Hi all, I just made this new text adventure! I'm really new to python so this is a really big step for me. I really want some feedback on how I can make this better.
No one learns anything from this. Be more specific about your negative experiences with these libraries.
Ok. So you think it was too hard to learn.
I'm not quite following. You'll bump into difficult things regardless of language.
Hi Guys
I am Bash, I have made a Project Using Computer Vision, and A.I, and i would like to show it to you.
Is this game related?
Yeah it's like an AI
app
and it has one game in it too which i will add
like that is a game which finds the distnace bwteeen your pc and your hands
THIS IS HOW THE UI of the app looks like
I still don't see how this is fully game related š
like you can see hand distance right
it is a game, it finds the disntace between ur hand and pc camera
at diffrent positions in the game
Nice work. I guess at the very least we can say that these are tools that can be used in games. I think that is acceptable š
??
yea
but not that hard bro
he used mediapipe to make it
it very easy libray
anyone can make it
its a childs play
chucky : childs play LOL
hey anyone has worked with RenāPy
why do you ask?
Hey, i have a very nice idea i want to share (still no development), if u wanna know more dm me
its a pretty cool project
...
We try to keep things out in the open here. You should share a bit more about your projects or I would take this as a concealed attempt to sell bots. There is a lot you can say about your project without revealing too much.
what do you all think about this? its my first big project. and im fairly new to python
hello i am syed
Age- prefer not to say
Hobbies- Games Art Collecting Money
Dislike- Bad words people not believieng me
Hey PyGame folks - anyone know why when TensorFlow loads pygame keeps opening? I'm getting lots of
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame 2.1.2 (SDL 2.0.18, Python 3.9.9)
I have my pygame init protected by a if __name__ == "__main__": check
the pygame init, sure, but the import too?
it's protected in my main.py entry point but not modules
Turns out I needed to call https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support
guys why i get this error in my game loop? RecursionError: maximum recursion depth exceeded in comparison
i also get this error. RecursionError: maximum recursion depth exceeded while calling a Python object
?
hmm its a game dev channel
Can you
@dark mango i don't believe you, lol
looking for devs btw
I was reading back out of sheer interest in what you guys are doing in gaming with Python and.. this is one of the most bizarre channels in this Discord server.
What are some game engines you use? I use Panda3D but I do not know how limited it is.
How do I have an idea to make a 3d lol game you want too much memory from the server?
on web
they are trying to make a 3d lol (league of legends) game and are wondering how much memory the servers should have
for a bit of context transferred from web-development channel
yes
+-
@azure atlas If you're interested in working on a project with other people, please discuss the details here. We aren't too keen on members asking other members to DM them, as it puts our members at risk of scams and exploitation.
I've been fairly lenient so far in allow you to discuss this, as we do have rules against promotion and recruitment.
If it is an offer of a paid role, it is explicitly not allowed.
its not lol
Do you have a GitHub repo for this project? <- An example of information you could provide.
But I'm going to have to say no more "DM me for info" posts please.
yeah
That project doesn't have a license. It basically means you have exclusive right to all the code.
That is a major red flag if this is supposed to be an open source project
I would suggest MIT or BSD license to make it simple š
i need help ;c
can someone explain the "invalid destination position for blit" error for pygame for me? I googled it and still don't understand /:
can you add me on disc please :) @modern scarab
Hey I need help with pygame
here is my window. The bigger white box is a something like a hitbox I am making. I was wondering how I can get the player image in the center of the white box instead of in the corner.
R u using get_rect
is there a kind of code which sees if the first letter of the input of user is a certain letter ?
Yes u can
If text[0] == 'Letter':
pass
s.startswith(c)
Let me tell you
do like this
screen.blit(image,(100,100))
@leaden glacier
I figured it out lol, I was blitting them to list items as coordinates, but instead of doing 2 at a time, I was using every number in the list
Howfully this helps you :)
Thanks though!
Oh
I'm used to Tkinter errors that say like "Expected 2 arguments, got 14" or something, which is much different than pygame
Flappy Bird-like in a zombie-ish world
all in Python :>
Hello, I'm looking to make a Catan universe mock up, and was wondering if anyone in here could lead me in the right direction of which programming language or libraries I should use
It's a 2d board game.
@barren halo hello, I've been working on a catan implementation in python using the Ursina Engine,
https://github.com/LyfeOnEdge/Hexplorers-of-the-Grid
It's still very WIP but I hope it is useful to you!
What is this masterpiece my guy 
Wdym? It's not even finished lol.
Your jesus, I've never seen a game in its demo version this good
This is even making me blind