#game-development
1 messages · Page 43 of 1
I can send an image of the keyboard
sure, thats what i was asking
ohh
so yours is the one that has a ?
click the one that looks like ` ?
do three backticks
then py
then your code
then three more with no py
maybe you can see better like this
Oh alright then
do you have any other keyboards?
the on-screen keyboard?
No the one on the pc
I dont have a computer like one with a case and all that
I only have a pc
So it has its own keyboard
ohh, do you have a laptop?
Yeah
But i think it doesnt have a backtick either
ill tell you where it is
send me a picture of your laptop keyboard
ill check for you
Here it is
same layout
you dont have a backtick
if you can
order a US model 60 or 75% keyboard off of amazon or walmart
or go to the store and buy one
I think i know what to do
see if it has something like this one it `
Since i have two screens
its a ` ~ key
I could put a digital keyboard on the second that i never use
do you use windows (specifically 10 or 11, i'm not too sure of older versions)?
11
I think the problem might be italian layouts
Because the digital one doesnt have it either
So if i just change it to american i might fix it
Yooo i got it
Thank you sm man
I know the basics of python, no pygame so just text, no visuals, and I want to test my skills. However, whenever I start a project I realize I am not at the level to do a project of that scale, and I was wondering if anyone had any basic game ideas I could try to make (no tutorial) so that I am able to practice my skills but not attempt something way above my knowledge level.
i just finished making a simple dice game. all input and print tho. its my first program. you could try that?
That's basically the type of game I'm looking to make
How exactly did it play?
/what was the objective
called bones, ten thousand or 1's and 5's. i have a file outlining the game i wrote before i coded anything, i could drop that file here if you want
Sure
Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.
exciting game when played in real life lol
if you code it id love to compare code
Sooo…. I made mobile control joystick…
Click here to see this code in our pastebin.
Any suggestions
handle hotplugging : connect/disconnect/reconnect of stick properly with JOYDEVICEADDED JOYDEVICEREMOVED and send real stick events to the game loop, ideally the mock should be able to drive the standard joystick test https://github.com/pygame-web/showroom/blob/main/src/test_pad.py
also multitouch option would be great to handle two analog hats at the same time
this could be really usefull with a html/svg bezel and pygame web mobile games which actually suffer from actually requiring a bt keyboard
sorry for not responding, phone died and I forgot. I think I'll start with rock paper scissors and try to add some flair to it, if you have any ideas that would be great, but if not ill send my code when im done
Awesome. No ideas yet but if something pops I'll pass it on. The "rock paper scissors" game would fit into an RPG nicely tho as a side thing. The dice game would too. Like a little game room at the local inn.
here's a game i made, its v3 at the moment. If you have any suggestions, let me know
There was an error uploading your paste.
So i have a whole game that only uses 2 dualsense controllers to play and its a 2-4 player game... but the organization is almost destroyed when I couldn't figure out why both controllers are viberating, only one was
I thing if u make two instance of joystick class, on right and another on left it'll workout
Also i added direction and vector output to it in the new code
Y'all made a game 👀
My Game Engine in OpenGL
looks good enough for grassblades atm
def create_grass_blade_image():
k = pygame.Surface((32, 32), pygame.SRCALPHA)
blade_surface = pygame.Surface((8, 32), pygame.SRCALPHA)
pygame.draw.ellipse(blade_surface, "green", (0, 0, 8, 32))
# Straight blade in the middle
k.blit(blade_surface, (12, 0))
# Left tilted blade (rotated 20 degrees)
left_blade = pygame.transform.rotate(blade_surface, 20)
k.blit(left_blade, (2, 0))
# Right tilted blade (rotated -20 degrees)
right_blade = pygame.transform.rotate(blade_surface, -20)
k.blit(right_blade, (14, 0))
return k
grass_blade_image = create_grass_blade_image() #TODO: change to a png later
https://www.youtube.com/watch?v=zVawmPZEwU0&ab_channel=tokyospliff
something on that level
Next stream will be Friday May 30th 10pm AEST.
Wanted to do something special for it, so I comissioned a kangaroo model, a few animations, and knocked up a ragdoll. I don't have much of plan besides I want this thing to chase and kill me and I want it to die.
My band This Is A Robbery is going to do a 20 minute acoustic set around 12am also.
some improvements for now
dont question the scaling of the money just for testing purposes
Import "pygame" could not be resolved can someone help???
@coral sparrow Did you install the package with Pip?
Heya idk if this is breaking rules bc idk if this is off topic or not since it is kinda on the topic of game dev and I don't know if I should put this in the help section since I do need help but this isn't on python or anything so I wanna get pico 8 for free so I found this free git hub version but idk if the file has any virus or smthing I need help finding out if it is a virus or not bc I want to make a game using pico 8 here's the file: https://github.com/drerx/PICO-8_free
Anyone that can Help me make my game? I still have the wish but since ive gotten my pc taken away, i need help from ppl to help me
Let’s make a iOS game where you collect boxes kinda like pokemon cards each box has a fun unique value inside 😮💨. Boom billion dollar franchise
Hey Guys! I'm a newbie here, if anyone would be kind enough to tell me from where I can start in this domain, I mean it has been an interest and now I want to pursue it full time.
Please count me in when you get started on this😅
https://www.w3schools.com/python/default.asp You can use this website for basics
Thanks Mate ! But it seems I wasn't clear about the domain, I was specifically talking about game development😅
Okay, so I would have to explore pygames. Thanks
from start i rather to make games in terminal something like this
import random
while True:
yesorno= random.randint(1,2)
question= input("ask question: ")
if question== "end":
break
if yesorno== 1:
print("No")
if yesorno== 2:
print("yes")
to know the basics
but if you want to make games in pygame
you need to install it
The guessing games, yeah I have tried them
Like where we try to guess the numbers within certain attempts no?
this game is something like ouija board
you ask and the program tells you
so you want to do games in pygame?
Yeah but I think for sometime I should work on some terminal ones too
Nice!
okay you need to install pygame you know how?
Okay
terminal python
it's good
hey im new to coding
ive only done the basics but i want to try to make a game
i was wondering how to start and which language would be the best for new coders
It Really depends brother what kind of you want to build
I'm also moving in that direction, I'm also a beginner so I have thought about exploring pygames first
Oh looking for ideas, Nice !
pygame probably the best for understanding the underlying game logic and puzzles u have to figure out
ts like a good foundation for using a game engine, but some ppl prefer going straight into an engine like unity or something that uses C# iirc
Im making my first ever game for a project and I want to make a game without watching a full blown how to make a game tutorial. Could anyone recommend me how to figure out things like how to jump in a game or should I just watch a tutorial on those sorts of things
Will do brother 😅, also glad to see your getting into the py game ecosystem of game dev, very glad to have ya here
Thanks mate ! I'm Glad to connect with you
hii
the simplest way would be to use docker as described here https://gist.github.com/emersonmx/c5bba202506e3c3d2d828ad278a8d5fe
and the simplest way to run pygame-ce on -all- mobiles is packing the game for webview with pygbag
@vagrant saddle ok
are we allowed to talk about gdscript (it has a lot of functions and things similar to python)
would suggest godot, it has a simple ui with very easy ways to make game objects that can be reused (eg platforms, spikes) and the scripthing language (gdscript) is easy to use
ight thanks
your welcome
I just thought I would leave this here. It gave me a laugh when it took me off guard
oh miss this game
i downloaded this a few years back and i still do have it on my computer. so as far as my experience, its safe and works! both on linux and windows
YIPPEE tysm dude!
no problem bro!
how do y'all go about promoting your game
i have made a dual joystick which works for both(finger touch and mouse) but i don’t really know it works with finger or not… so any suggestions?
Click here to see this code in our pastebin.
I made this in replit.com, because I am not able to use VS code for sometime now
If anyone has uploaded a app onto the apple app store using react native please message me.
very giant code blocks
https://paste.pythondiscord.com/BE3A i made a fangame of DX243's doodle jump clone
there are a few new difficulties
an important one is World's End
on World's End you spawn with 800 health this time
on grandmaster+2 you spawn with 1000
on grandmaster+1 you spawn with 1100
https://paste.pythondiscord.com/4WAQ update: also on worlds end you lose hp 1.08x faster
DX243 if you're reading this you can also add these to your game
What about it?
not how i would code, or many others
maybe its a python thing that you can only do with giant code blocks
Are you new to it?
no i program in c.
Oh
Doesn't it uses class for like everything?
I tried to learn C# for unity but focused on pygame more
Btw I made the code in Ipad 💀
Are there libraries available that implement geodesic walking on an STL surface, given some travel direction? I know there are libraries that can calculate the geodesic distance between 2 points, but what if you don't know the endpoint in advance?
Huh, that's an interesting question. I think if you only have a direction, you can walk by repeatedly making small steps in the given direction and then projecting onto the surface (and projecting the walking direction onto the tangent plane at the new position). For that you'd need to be able to find normals to the surface at any point.
what?
Like if u need to code in C++ or in object orented and compiler programming u need to create a class... right? For ex. In c# (I think) you have to do void name(); and then write code inside for it to work... Right?
Yeah, that's what I was thinking, do you think floating point accuracy would present a problem eventually?
And also crossing edges seems tricky
Accuracy is probably not an issue unless you're calculating distances or something? Edges are indeed a problem, specifically I think this algorithm can't handle an edge with a turn of more than 90 degrees.
Hey, I have made blackjack in python, and now would like to display it nicely in the terminal. I'm considering the cursus module or rich/textual. Any recommendations?
which terminal , nowadays most of them support pygame/panda3d display ( you still have to do vt input yourself though )
vt100 is semi-graphic / vt420+ can handle graphics
for semi-graphics this one is more game oriented than Textual/rich https://github.com/salt-die/batgrl
Yeah, I was just thinking about printing the cards in the terminal if you get what I mean
Nothing too complicated reslly
im making one but it's still in WIP
more like game libraries but you have Pygame-ce , raylib-cpython-ffi, Panda3D and Harfang3D
aye dude that is ambitious , hope you make bro
for libraries i have heard but i was wondering if their is a game engine like godot or something that uses py
that could probably be awfully specific and expensive or not open source
Harfang Studio , UPBGE maybe
and not sure you can see/change/add python code, they are higly integrated but please try and tell about
afaik godot 3.x supported python scripting
well, there was a plugin that added python support. and then godot 4 dropped and this plugin is to this day slowly getting ported: https://github.com/touilleMan/godot-python/issues/407
there's also the alternative https://github.com/niklas2902/py4godot
tbh GDScript is probably about as close as you can get to scripting "in python"; the syntax and features are similar.
seems well still a lot of bugs its an old project im retrying. changes rn are instead of the user needing to set up certain stuff in there code it get the window of the process using win32 and embed it in the pyside application.
further improvement i would want to implement is smoother transtition on the embed entering and exiting the window and make the embedding more stable cause in some edge cases this can happen
the embed entering and exiting the window and make the embedding more stable cause in some edge cases this can happen its in the frame but not showing correctly
Hello, I'm new to python and learning a lot. I have constructed two games with pygame and actually enjoy the game development aspect. I started looking into Godot and Unity to work my way into learning those after I make a few more games with pygame to get a better understanding of things.
For a beginner trying to learn and work to making more complex games over time, would you recommend Godot or Unity?
I looked into Godot and tried to play with it but it is still a bit confusing to me, I have not tried fiddling with Unity yet.
Hi Guys i just finished my frist full game on python i would appreciate u guys if u would test it for me and look in the code for bugs
I am looking for help which I detailed in this post: https://discord.com/channels/267624335836053506/1397050189197344768
I am trying to read a linux device file for a Belkin Nostromo n50.
Linux recognizes the device as a joystick.
How do I resolve this message:
Traceback (most recent call last):
File "~/.config/pystromo/./pystromo-remap.py", line 51, in <module>
output = devices.OutputDevice()
File "~/.config/pystromo/lib/devices.py", line 665, in __init__
self.node = ioctl.OutputNode()
~~~~~~~~~~~~~~~~^^
File "~/.config/pystromo/lib/ioctl.py", line 243, in __init__
self.createDevice()
~~~~~~~~~~~~~~~~~^^
File "~/.config/pystromo/lib/ioctl.py", line 313, in createDevice
encoded_data = [bytes(item, 'utf-8') for item in USER_DEVICE_DATA]
I do not possess sufficient understanding of what this code does, nor know what to study for developing a comprehensive understanding.
What should I study to develop comprehension?
unix ioctl and device drivers, and in your case probably specifically linux udev and permissions
theres alot of #Chatgpt in code
OK
did whole code come from gpt or?
aha ok
like the snaks list food and water
its a simple game
i mean im not that pro
you wana try a game i made?
yh
check dm
ok
depends on your python skills i guess, pygame-ce is great for starting 2D, Panda3D for everything here's some pygame-ce stuff to test https://itch.io/c/2563651/pygame-wasm
anyone expert in code can help with game auto script?
I play an io game, I need an automation script to play game faster
which io game
is'nt it against the game spirit and maybe against the game terms
idk
i can't help with that
this game has top clan which do script 24 hour
the creator doesn't care
me and my teammate already developed basic scripts....but we want powerful script like that clan
1 min lemme check
um so i checked and i found out that even though explicitly stated it could be a bannable offence and is considered bad proactices
practices*
in paper yes, but, in actions not that much
well i cant help
nvm, thanks for the help
your welcome
Hi guys please suggest to me what I should add in my GitHub profile
No idea!
cool! have you though about turning it into a GUI?
some of your most thourough and professional projects
I think he’s looking for ideas of small projects to do to fill out his github
Things where he can show off small flourishes in code, im sure he wouldn’t be asking if he had thorough and professional projects to list lmao
Is there a way to manipulate pygame mouse pos on startup
Cause its only updating when your on the window focused and starts at 0,0
can i get help here #1035199133436354600 my question is about adding 3D objects. This is the question here https://discord.com/channels/267624335836053506/1398124794813218916
Adding 3d objects to what?
to nothing, and that's a bit of a problem doing 3D with pygame-ce. It does not have a scenegraph ready to use unlike Panda3D.
can i get help, my question is about adding 3D objects. This is the question here
https://discord.com/channels/267624335836053506/1398305894520848434, I asked the same question yesterday but i went to sleep and couldnt see all your answers so im opening a new one
@vagrant saddle
Making my own storage language with custom syntax highlighting I know firebase and MySQL but I wanted to do my own and when downloading the file it’ll be encoded in my own language thought son the syntax highlighting ?
ask on pygame-ce it won't be closed so soon, there are only few people who do 3D on pygame seriously. tbh go Panda3D right now
go software 3D with https://github.com/rkibria/pyrasterize/ or start fresh with Panda3D you won't be disappointed it can even run on web see https://itch.io/c/3724091/panda3d-wasm
@vagrant saddle well would you reccomend panda3d and if yes could you link to some tutorials. btw does panda3d have raytracing?
The most important in Panda3D is not what it could do ( because MIT + PR welcome), but more what it already does.
can. you explain
it is beginner friendly but you can go up to commercial games ( proven ) . Begin to master it, don't chase nice features that actually only some people have on their (very) expensive gpus. Seeking extra feature and updates would distract you from the most important : acquire required skill to make the game.
thank you for your help
@vagrant saddle is Ursina engine better than panda3D for my use case?
Ursina is more high level and built on top of Panda3D. I'd check both out and see which one clicks more for you.
How can I make this type of animation? Is there library for 3d linkages
My python/pygame game finally has a demo after all these years :3
Mr Figs is a challenging top-down action puzzler where you play as Mr Figs - an adorable squid-like humanoid.…
To be announced
W
You could look into DearImgui Bundle it has a 3d plotting library
How to create deltatime?
How long did it take?
👋 Hey everyone!
I’m Abdelrahman – a student from Egypt 🇪🇬 learning Python by building desktop games.
I just launched my first public project:
🎮 A bundle of 3 small desktop games built with PySide6 (Python GUI)
✅ EXE builds
✅ Full source code
✅ Bilingual README (English + Arabic)
I’d love to hear your thoughts or feedback 🙌
🔗 https://www.producthunt.com/posts/python-games-bundle
(Let me know if anyone else here has built games using Python!)
4 year on/off so far. About 1 year and a half of that was very full on with the rest being quite casualk
❤️
How many files and imges did u used? Cause in opinion it's amazing
Couldn't give an exact number but there's roughly 20k lines of code and I use 4 different sprite sheets, one per area in the game
Did u ever get performace issues?
Can anybody suggest a beginner friendly game you develop in python
pong , snake
Little text based RPG im working on. Its not the best i only started learning python acouple of months ago but i do have alot of background in C++ understanding the massive syntax change has been a messy situation
Hi everyone i finally create my open source game engine after 9 month* in python.
https://pypi.org/project/hpe/
pip install hpe
Man, I’m impressed of You doing the entire thing in one file while having a class inside of a function that is inside of a another class 😛
Ok
Show me when you make one i would like to see how it goes
yes , the pronounce YEARS is wrong i hate the keyboard AUTO fill, it was MONTH.💀 🤣
I was just thinking about it
How do I create audios for my game? I don't wanna use stock audios
You record them with a microphone
what about audios of vehicles, guns, etc
you can use procedurraly generated sounds but they rarely feel natural
at all ... eg https://pmp-p.ddns.net/pygbag/wip/nova-car-sim/build/web/ (pygame-ce + nova physics )
have you saved both files before running
and are u importing the correct file
yes and it is still not working
youre getting the exact same error?
C:\Users\casti\AppData\Local\Programs\Python\Python313\Lib\site-packages\pygame\pkgdata.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import resource_stream, resource_exists
pygame 2.6.1 (SDL 2.28.4, Python 3.13.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
it hasent made the window
any ideas?
there is an issue on github to this https://github.com/pygame/pygame/issues/4313
either try creating a pytest.ini file with this in it-
[pytest]
filterwarnings =
ignore::DeprecationWarning:pygame.*
or try degrading your setuptools version
fixed it forgot the type
#screen
for color in colors:
screen.fill(color)
class Health_bar:
def __init__(self, x, y, w, h, MAX_Hp):
self.x = x
self.y = y
self.w = w
self.h = h
self.hp = MAX_Hp
self.MAX_Hp = MAX_Hp
def draw(self,surface):
# calculate health ratio
Health_ratio = self.hp / self.MAX_Hp
pyg.draw.rect(surface, "red", (self.x, self.y , self.w, self.h))
pyg.draw.rect(surface, "green", (self.x, self.y , self.w * Health_ratio, self.h))
could someone test this code?
Is there a way of making a developer mode so if something is reportedly wrong or to test the game it runs?
check out this game we made ini the GMTK2025 game jam!!
https://mafia-studios.itch.io/in-or-out
i would love to work on an rpg game with somone are you still working on it?
Lowkey why does this need testing it's pretty self explanatory
Yes
tryed it early
Huh?
in earlyer projcts it broke
How so, what broke about it?
i dont know it was just broken dont know how or why
Yeah but like what was the issue, syntax error? Not drawing correctly? Not sliding with variable?
Because most issues probably come from where it's being used not the code itself
wait i can make games in python? i thought it was a web development and coding to contoll your computor kinda laungage
how? what are some codes for inputs and making sprites move
If you're determined enough, you can make quite literally anything in any language
oh i see
Do you know about pygame
no not at all im new new
Pygame is an SDL wrapper which allows you to make graphical stuff likes games
You can check that out
thank you i will
You can also check out ursina if you're looking for a game engine type library, you'll have to do quite a decent amount of document reading since there arent many yt tutorials of it
okay i might have to look up a couple tutorials
.
Yeah im still working on it.
Im down to start a newTextRPG project with you if you want
i love this kind of projects.
For code review, do I just post my github link here?
i think you can if it is about making games.
I am working on a game I am just making sure I can post screenshots here or only certain people can post here I am wanting to get feedback on how to expand and improve my game
Yeah, made a post in python help and was directed here so just making sure of the rules
is it a python game?
it is
It's okay to share screens here, I've done it quite a lot, even some short vids
common post it , i want to see.
Hi! Finally got Github to cooperate, so now I’m looking for review on my first full on project with coding.
I’ve done Python and Html in bits for a few years now, but only with codecademy book learning, never a full on project. So I built this mini game (Kritikal Maze) using Python
Admittedly, I did use Chatgpt as a resource as I’m new to many of the concepts it introduced and I had it take me step by step as my goal isn’t to just throw stuff together for me to copy and paste, but to actually learn, so everything is typed and I tried commenting for better understanding of some lines, so if there’s anything that’s just wrong or impractical, please let me know!
All feedback/criticism welcome
The idea of the game is to promote critical thinking in a fun way, primarily for the youth, but many adults these days lack what I consider basic critical thinking so just something small.
Lol I try to keep my names concise
i want a text RPG MEDIVAL but with 2d OR 3d art included, do you know anyone who can done that?
it sucks right now becase i used a code bot for brainstorming and seeing what functions would be good for the game
there i had to find it in my files lol i forgot my snippits go to my documents
I’m essentially new to the whole industry so I couldn’t give any accurate info tbh
what’s the game about?
i have some questions do you know how i could move the gun to the side of him and make a blood partical effect when you click/shoot him maybe get an actual gun object instead of a moving png
it is a clicker game where you shoot kenny
a southpark character
well im creating A complete free open source python based game engine and i aiming to make first game with my game engine and i love this kind "TEXT BASED RPG" but with a little art or assets added as well.
i dunno the copyright stuff so i aint gonna release it for awhile if at all unless i replace stuff
do you want to see the game from my screen
it is VERY buggy
its so messy but it could have potential.
I made a hangman game using tkinter, in that i had to set the location of stuff so possibly in your code you change the margins it’s placed?
and 5000 lines i was wanting to see if it was possible to shorten the code and still have everything work the same
it is in tkinter
That’s interesting. I’m wanting to do something with my maze game that makes it more appealing and accessible in the future as I build on it, and someone mentioned a mobile game might be the way to go for it. Still work in progress, the code I shared is just baseline
also my one gripe with it so far is that the characters have white boxes with them becase the way they were added they are pngs
DUDE WHAT ARE YOU DOING , this is only 4000 lines.💀 😂 (a complete open source game engine.)
I’m not even close to considering myself well versed so I will refrain from giving any advice lol
oh i thought it was too long and unessacary
ig i was wrong i had no idea how long the lines of code would be
I love that, may i borrow your idea?
i wanna find people to work with too
i have a friend but he isnt serious about it
he wants to do it but not take the time to learn it
he is like that is too hard
it is sometimes.
i cannot do it my guy you cannot do it unless you try
he does about 5 lines at a time before quiting
what is your main idea?
make a funny clicker game
with about whatever comes to mind pretty much
i just aint creative what what i come up with
i got most of every idea from roblox
I def wanna get a few people together to do random projects with and eventually an actual game we can sell on steam for example. Right now I’m still in the basic learning stages before I decide to tackle that
yo hit me up we can work together
i can understand what code does pretty well just not writing it really
i love clicker games too
he me up too
that is all the game is atm
i added a mining side area
a wip boss button that brings you to a crab boss from the show
and i have a terrible inventoy system i dunno if it is that bad though i just dont like it
i made it more interesting with pressing i for inventory
i got a game menu which is suppost to play the main southpark themesong but it broke during the development
i have settings in it save files and the play button for starting the game
we want to creat a website too, a website like steam BUT with digital coins like tether and bitcoin to pay and sell games, im looking forward to populate front store.
like i said very buggy for example autosave plays a looping save noise
you need to orgonize your work .
in order to progress.
I’d be down. Not quite yet since I wanna get my feet wet a little more first, see if I can determine what I’m best at/enjoy the most in the process
just accept my friend request when your ready
Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.
Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.
Sounds sick, when do you think it will be useable?
right now you can use it.😉 
pip install hpe
Whole engine in 1 py file is crazy
yup it is and its working well.
this is really great
is this a py engine u made by ur own?
I just discovered this 20 game challenge thing, so reading into Godot right now
yes it is, its PURE python with some optimizations.
am sure u used customtkinter
what else u used?
Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.
I’m about to start this Dodge the Creeps! project in godot as an entryway into me doing the 20 game challenge
whats it about?
The challenge or the dodge the creeps?
Just simple 2d game where you move the char around the screen dodging the enemies
thats cool! can I be a tester?
Starter thing before I try to figure out how to make Pong
Sure. Getting the mood set right now lol
i tred then failed then stoped because I relized I was coding in C# and not python
Yippy
I only recently made my first ever full project in Python. Nothing crazy, just a maze game with tkinter where you’ll sometimes run into walls with critical thinking questions
i...displyed text after 3 hours...of tortorials
https://github.com/Andredabeast/Game-Portfolio
if you wanna take a look
ill look at that when I get home my laptops almost dead
Gotta start somewhere. I decided to dive into the deep end after numerous attempts at taking the book learning route
yea I know im going to ty again with some simple displays and things
Which game engine uses python for its game dev lang?
I know unity is only for c# and only py extections but i don't know about others
I haven't been able to find one so pretty sure there isn't one
But
^
Hi my game engine is pure python plus its open source and i will add many features as long as the end user did not get lost in the middle of thousand of tools.
.
Ursina
ursina is on top of panda 3d and panda 3d is based on warping C++ inside python.
Its not really python based originally at the end.
not exactly Panda3D is a really cpython version dependant module and tightly integrated with cpython refcounting, it is not some C++ library slapped with cffi and average bindings
as a consequence you will not find easily other integration than cpython
same goes for pygame(-ce)
Ya but its really like pygame but 3d
its still a game engine but doesnt have your typical gui features you'd expect to have like in unity or godot, etc
Agreed
Thx... I will try it out!
Hey guys I am trying to import the image but for some strange reason it couldn't recognize the file despite having it in a same dicrectory.
try double slashes for the directory
c://projects//...
No luck 
yeah I had a same error just try open the file in command prompt
(sorry for ping)
Welcome to the can’t import image club.
idk to fix this error try to pip command
or search on google
pip install image
Could potentially work for updating since I assumed that it must’ve been a bug in python. But I suggest useing a different python editor.
idk
You've put the wrong path
It's "Galaxy warz/spaceship_yellow.png"
Idk from where you got the photos directory from that image
Just a tip: whenever you face a bug it's 99.99% YOUR fault. Blaming the bug on the programming language is a HUGE take which is extremely rare to happen
anyone wanna team up
i am feeling dumb rn
bc i cannot figure out where to start with coding i watched so many videos and i still cannot figure out what i should type out first even though i know how the code works
Well what do you want to make
a clicker game
What module are you gonna use
i was using tkinter
For game dev I recommend pygame
For pygame, I recommend pygame-ce, the Community Edition
https://youtu.be/y9VG3Pztok8?si=BOmgfuAZdsQE1VmT this a good video on where to start it's what I used and you can also use the docs after https://www.pygame.org/docs/
In this video I will explain how to get started in Pygame from scratch.
This is aimed at those who have not used Pygame before and will go through the steps of installing Python, installing Pygame as well as looking at a few different editor options.
Then I will explain the basic structure of a game and put together some simple code to demonst...
What's pygame-ce do differently?
It has a couple of extra methods that are really handy, like get_frect() and both key and mouse get_just_pressed() among other updates
Fully backward compatible with the original pygame so old projects will work with it just fine
And it's made by much of the same people
Does it have subpixel rendering?
That I don't know
Floating point rect right?
Yes
This way position updates on the rect can be floats, and reading it returns floats
Yeah I just don't get why it needs that If there's no subpixel rendering
Makes it easier to do physics
I see, physics are pretty easy already might check it out still tho
Like your physics says some sprite needs to move some non-integer amount in some direction, say 2.5 pixels along the x axis, so you add that amount to the sprite.rect.centerx. Now if you check the position of the sprite with the old rect, it will have lost that .5, but with frect, it won't
Yeah but visually there's no difference and you can handle the physics either external floats and just round them into the rect after, same thing
I guess it's easier tho
Which is why without frect, one usually needed to keep a position attribute as a float and do all your physics on that then just update the rect where losing the float doesn't matter any more because the position is tracking it anyway
Yeah, it's not a huge change but it's a nice qol improvement, I use it for everything that moves
I'll check it out for sure just probably won't use it unless it adds some things I really need
Hi everyone im looking for a place where I can find a developer for my project, is there any channel in this server where it is allowed?
The get_just_pressed() methods are pretty cool too. You can check for keys or buttons outside of the event loop
Regular pygame has get_pressed() which checks for held keys or buttons, get_just_pressed() checks any that were pressed during the current frame
Why would you need this tho?
do you guys like the game idea
clicker?
Yea
!ban 987029906561056828 nazi stuff
:incoming_envelope: :ok_hand: applied ban to @eager scarab permanently.
What 😭😭😭
Guys in PyGame when drawing a rect or a circle does it come with a collision?
when hosted in a sprite class, yes https://pyga.me/docs/ref/sprite.html#pygame.sprite.collide_rect
No I made it like this:
pygame.draw.rect()
Nice try buddy, I tried that a billion times with different variations of the code including yours and I still have the error. Yes I moved the images to the file for importing the image.
Should be just spaceship_yellow.png since your cwd is Galaxy wars and the png is in that folder
Or at least that's what the screenshot shows, I can't exactly know how you've changed things
Try removing "Galaxy wars", from the string, so it's just the image name, this screenshot doesn't show your cwd but I assume it's still Galaxy wars
IT WORKED!!
Like, if your current working directory is Galaxy wars, having that in the load is redundant and wrong
I see
Thanks man
That would be looking in Galaxy wars/Galaxy wars/spaceship_yellow.png too many Galaxy wars in the path
No problem
If unfamiliar with current working directory, this line shows it
Ts ain't game development get out 😭🥀
What is Ts
This shit
Define Ts.
And no offense but you are gatekeeping a ball pit. Maybe graduate from pygame if your goal is trash talking lmao.
Here's my terrible game though, I did post in the wrong channel earlier so my bad on that. Its also C++ but you probably could make it in pygame. I'd rather be sharing stuff than talking shit because validation comes from users and dollars and jobs.
I was trying to build an engine for a falling sand simulator + some other stuff. Like more complicated simulations on a smaller scale in a snowglobe or a container. I REALLY wanted to try and revolutionize it to get these kinds of fluid dynamics in there, but I've been told its just not possible to get those more complicated simulations with live input working. But on a smaller, contained scale, I could maybe get it done.
Like this one.
This isn't mine just a sample from an italian guy.
Anyway I needed to try and produce some money so I have put it off for this tarkov tool.
Reason its not possible supposedly is because cellular automata you would normally rely on to keep operations low on a falling sand simulator, doesn't apply here. It uses D2 Q9 for flow simulation and https://docs.tclb.io/models/flow/d2q9/d2q9/ basically the direction is transferring between pixels, which is a lot more expensive than just checking your position, nearby pixels, and then moving (falling sand). Exponentially more operations per pixel and 10x+ the total memory. So I could maybe setup a jar with liquid and then have the overall system respond to changes in the jar, without complicating the simulation and making it bigger than 10-20 pixels wide. idk. Have to make money so I can "retire" and work it out.
Also could just make more boring particle simulation where particles dont interact, like a basic snowglobe, lights, etc...
The guys who made Noita put out a lot of content on the topic though so if anyone is interested you could check them out and he goes through in detail pretty well on their whole development process.
It says game development
Not game play
And not only is this not python it's not even good, so please. Don't get salty and think ur the shit.
And it isn't trash talk.. sorry I hit a nerve 🥀
wrong channel
Yes thank you, I've been hearing that. Apologies.
Yeah I had a bit of "who's on third" when reading your messages related to "this shit". Thought you were just calling it not game development AND garbage.
But yeah "not even good" was implied when I said you could make it in pygame 😂 The goal wasn't to make the best falling sand simulator. It was to make a falling sand simulator that incorporated fluid dynamics with up to millions of pixels or in a at least 1000x1000 pixel window. So C++ or Lua were the main options to build it to try and maximize efficiency. But as I said since then I've been disabused of the idea that it would be possible without some near genius mathetmatical breakthru.
i dont just use pygame and i dont just use python btw
Ok. I think even if you did that wouldn't really determine the quality of what you were making, and I wouldn't trash it outside of a miscommunication error on my part. My b
and there are still a bunch of newbies that don't realize python can be compiled or GPU accelerated
hardly miscomunication you crashed out because i said it wast game dev
No I thought Ts meant something else, and then when you said "this shit" I assumed you were just referring to my post, not explaining what "ts" referred to.
but definitely crashed out
I mean you can but why? Cython and Nuitka come to mind but they are like workarounds to getting to C. Are there better options?
pythran , codon , numba ....
I am not up to date on most things python, so I was more asking if they were using anything new to accomplish that. Off a quick google it looks like the main addition in the past decade has been GPU acceleration. I'm sure with that + the compiliation it's near the same level of performance but just seems like hassle compared to the existing tools that are already that fast.
Whats the draw in your opinion
I guess main reason would be staying connected to the python ecosystem, but that's always the answer I come to with using python. I wouldn't be using it on my app if it weren't for openCV.
Idk just seeing a lot of caveats the more I read about pythran and codom and numba
import pygame as pyg
# import stuff from settings
from settings import Game_Running
from settings import game_colors
from settings import window_dimentions
#game assets
# import from entitys
# indecator bars
from player_bars import Health_bar
from player_bars import Hunger_bar
from player_bars import Thirst_bar
from player_bars import Experiance_bar
#===[init]===#
pyg.init()
#screen dimentions
screen = pyg.display.set_mode(window_dimentions)
dt = 0
clock = pyg.time.Clock()
pyg.display.set_caption("jhon")
while Game_Running:
for event in pyg.event.get():
if event.type == pyg.QUIT:
Game_Running = False
dt = clock.tick(60) / 1000
pyg.quit()
https://glyph.twistedmatrix.com/2022/02/a-better-pygame-mainloop.html (also web compatible )
I got it fixed
you could import multiple stuff from a library using ,
(e.g from x import y,z) if it got out of hand you could also wrap them with () and separating in new lines like a tuple
Well you're going to have to use classes depending on what you want for monster player etc you don't have to but it's easier it keeps it more contained
I do use classes for entities but like the main peice of code?
Like:
class game:
Def init(self):
Self.screen = pygame.display.set_mode((200,200))
Def run(self):
While true:
...
Really depends on the project for me
Example?
I have some projects that use a Game class, simple little projects usually don't
Usually just experiments that don't get a Game class, actual games, I start with my own Game class template and go from there
Ok
Like these bubbles https://paste.pythondiscord.com/QBKQ
Just messing around there
Entities made from a class but lacks any Game class
This is my game template, not really a template but a good starting point https://paste.pythondiscord.com/VZYA
@limber veldt thx really helped a lot
No problem
And an example of a little game from that start https://paste.pythondiscord.com/RWPA
Can some explain me Vector2 cause its confusing
A way to store coordinates and provides methods to do math with them
As for how to use them, that's a bit more complicated
Say I have object and I want to know how far/in what direction for it to move to get to a different position or coordinate, with vectors, we can get both of those, distance and direction
This playlist covers vectors well, not specifically pygame.Vector2, but in general https://www.youtube.com/watch?v=fjOdtSu4Lm4&list=PLImQaTpSAdsArRFFj8bIfqMk2X7Vlf3XF
Primarily for my students at FutureGames - I will only read chat/superchats during breaks!
Find out more about the school at https://futuregames.se/
❓ FAQ ❱ https://acegikmo.notion.site/FAQ-8b62a1634746473db702565d890dd3dd
💖 Support me on Patreon ❱ https://www.patreon.com/acegikmo
📺 I usually stream on twitch ❱ https://www.twitch...
I also like the Nature of Code series from youtube's Coding Train, not python but his white board explanations are excellent
A "2D number." It has an x and a y. You can think of it as a point (x, y) or an arrow going from (0, 0) to (x, y).
I learned how to make games when I learned how to use vectors, pretty important concept
Oh
Definitly will check it out
Can I have some help with a class please
The classes for player movement but also monster movement so I don't have to go to a separately I was going to go to those separately but might as well make a main class that can inherit some parts of a file
A little quiz game I coded in Python
Click here to see this code in our pastebin.
There's renpy
If I'm not wrong ddlc was made using that
Ddlc is python??
Yep
Wild
o/
can someone help me update some code? I've been spending hours with chatGPT to try and get this to work, and no solutions provided actually work
I'm not actually sure if this is the correct channel - essentially I need to update one of the files in DougDoug's code because he uploaded his code a year ago, and old usages no longer work. It was way too difficult to try and get everything to work with the older versions of the requirements
Can anyone here know about ursina engine! I want to build a car racing game! How can I build this
If you don't know where to start, try breaking the problem into smaller problems you can solve.
Ok! I will start small
Make rectangle, make rectangle move forward, give rectangle gravity, make floor, make test track, make acceleration, fine tune
Can someone explain decorators in simple terms?
I saw many examples but still didn't understand
it is just syntaxic sugar ```py
def decorator(fn):
def decore():
return f'decorated-{fn()}'
return decore
<3 @ syntax
@decorator
def fun():
return 'funk'
print( fun() )
del fun
but without @ syntax it is not pretty
def fun():
return 'funk'
vars()['fun'] = decorator(fun)
print( fun() )
They are a pretty complex concept unless you’re from a certain programming background. You can think of them as ways to ‘modify’ or ‘wrap’ functions, by applying a new operation that gets called in place of the thing it decorates.
Where do I start when considering getting into game dev?
Start by thinking what your goals are. Job in the industry? Making stuff for fun? Making stuff to potentially sell? Those questions tend to shape the technology you need to learn. Then the type of game you want to make and the technology you’re using helps to determine the skills you need to learn.
today i add simple but working Terrain Sculpting tools we also hit 2k downloads!🎆
i look forward to anyone who wants to contribute and help us in this project.
pip install hpe
https://github.com/lolgg313/HPE
import sys
import pygame
pygame.ini()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Pygame!")
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
screen.fill((255, 255, 255))
pygame.display.flip() How does this code not work? please help
first that's pygame.init() not pygame.ini()
once you got it working read this https://glyph.twistedmatrix.com/2022/02/a-better-pygame-mainloop.html which is pygame-ce friendly and web compatible
ok thank you
I put pygame.ini() that doesn’t work
And that doesn’t work
did you build that engine yourself because im just starting to build my own while importing my pixel edit software
does anyone have any tips for my game engine like how to import my previously made software and integrate it into building the users own characters?
hi yes , it was a long long story , i have created many game engines not one , in fact 8 game engines with only 3 of them was successful including 2D engine as well.
Thats really cool im on my first game engine for2d games im not too experienced in python but im sitting at 4 months of experience but so far its pretty easy.
good i create 28 softwares only in python that helping people creating 2D and 3D art for their games, i think we can help each other DM me.
Mainly stuff just for fun
Maybe pick up something like Arcade - https://api.arcade.academy/en/stable/# - and go through the tutorials there.
Thank you on that.
How did u created these engines?
is anyone here free to make a realky good project with me?
yeah, i 'm here.
ur making a game creater using python?
why?
MOSTLY , i just love the process ....My Scripting knowledge + AI + Game Engine Articles
Yes
Because i HATE game guru & game guru Max , They promised many things and deliver nothing Even their company is even older than UNITY 3D.
hie!!!!
hi
Even as an engine that completely created inside python it loads pretty complex models very fast and i am proud of it.Plus we have daily / weekly updates for both github And PyPi website keep fixing remaining Bugs and adding new features.
if am honest it looks great
however im not sure how good itll be since u know there are some limitations
sure it is, but limitations are JUST about optimizations, the engine file builds will grow large about 1-2 GB but instead they run fast and the main code is read-able because of python nature.If some one wants both (fast and not large files in final builds) they should change to RUST or C native , python is NOT the way.
Im a developer tired of EMPTY PROMISES and the paid engines floating with bugs OR if they are bug less , they are very old OR hard enough in scripting to write thousand lines of code to simply move a single object, im aiming to create an engine and a community that everyone can create any fps games with ease.(even supporting third person out of box.)
@narrow marsh
that is great mate
thanks!👌🏻
https://paste.pythondiscord.com/JUBQ
trying to challenge myself to make a game in tkinter. the code is too long to post so i put it here
pip install opencv-python is required
fyi it does use ur webcam at a part (to spook u) nowhere near finished. only the very first part finished. It is a horror/puzzle game
can anybody give me advice on how i can better format this? its pretty poorly formatted right now ive never made a game before
What is the basics of raytracing?
My explanation of how to render 3d computer graphics with raytracing.
this is a video that might be of help
Thanks
But how do i create it? Like a 2d to 3d raytracing in pygame?
I made a ray tracer(path tracer) from scratch in python. This video is much more laid back in terms of editing and animations than the other ones, so tell me if you like it more!
although I forgot to mention it in the video, this would not be possible without: Ray Tracing in One Weekend
https://raytracing.github.io/books/RayTracingInOneWeekend....
maybe this can help i scanned through it and looks solid
you could also maybe get the logic explained in c++ or c# and try to translate it yourself to python since its an equation anyway
once you get the logic you should be able to apply it
In its most basic form it's very simple, easier than other rendering methods. The hard part is not having it be slow at scale.
(Just ray to X intersection testing (so you need some linear algebra for the camera and the intersection))
(If you are starting out with game development you will need to learn some of this math first)
Be warned that it’s going to be terribly slow to do raytracing in Python.
(At a high resolution, tiny window will work, it's quadratic scaling with size)
(Or to a tiny surface which is then stretched across the screen (low resolution, but not a tiny window))
Sure, it’s not like it’s not possible to implement, just that you’re limited as to the number of pixels you can realistically render. I love Python but anyone strongly interested in rendering tech probably needs to consider a more performant environment.
Yeah, that would be on the GPU. Which you can do without leaving Python if you really want to.
Totally. But then you’re having to learn shaders alongside Python. Personally I’d approach this by doing it on the CPU in C++. Easier to learn when there’s only one language in the mix. Just an opinion though.
Or just use Taichi.
That’s new to me. Could be interesting to a new learner, certainly.
There are a lot of Python libraries out there to do things a lot faster without leaving Python, since Python itself comes with a parser for itself.
And now has type hints which can be used to actually statically type stuff too by these libs.
Needing to leave Python is rather rare for most people's cases.
(Before even going to Taichi, simply using Numpy will get you a decently small resolution, ray tracing is simple but just wants a lot of number crunching compute and is really easy to parallelize making stuff like Numpy, Taichi, etc work really well)
I guess it depends on what you mean by 'most people'. For most realtime raytracing needs you're going to want maximum performance throughout and Python isn't going to cut it, no matter what you do.
It's different for ML where Python just sets up the batches; it works well there.
I am going based on what projects are being made. It's very rare to have a project that tries to get maximum ray tracing performance. In which case things get really complicated by probably only being able to target specific Nvidia GPUs with hardware support and all that. Something like Taichi will match and in many cases outperform doing it "by hand" (unless a lot of care is taken by the writer) (due to its memory layout optimizing features).
I can only think of one game engine that even tries to do this to max performance and do only raytracing for all the visuals. The rest are often not really game engines, more meant for film.
I mean, all game engines are going to try and maximise performance where possible. They're not going to be using Python in their graphics code.
They don't really, they usually have some set of hardware they target and they need to kind of fit that as best as they can. Then they often are spending their time on other things, it's not super high priority. They are not using Python in their graphics code, yes, but they could...
Not saying it's even the ideal language for this / a good idea, but it's not really the problem.
If you already know shader languages and have an engine setup to do all the plumbing work and such, you can just use that, no need to try to make Python work.
Python won't make that significantly better (probably a bit worse (shaders languages are designed for the problem)).
But at the same time, if you use something like Taichi, it won't really be holding you back.
Whether it holds you back depends on what you are trying to achieve, which is what I said before. I've been using Python in games for almost 20 years now. It's rarely the right tool for the job. That's no criticism of Taichi - it might be great for other applications.
Python mostly fails as the right tool for the job for games due to CPU performance, not really rendering though since that is its own separate thing that just needs the CPU side to invoke it. There is some CPU side stuff for the graphics, like if you are building acceleration structures CPU side, but Taichi solves that part too.
The other big issue is just distribution.
(Other than other debatable issues about the languages itself, like dynamic typing at scale)
(This is also assuming CPython)
As I said twice already 😄 it depends on what you are doing.
If you are doing real time rendering then you need to be servicing the GPU 60 or more times per second. That's CPU intensive and you can't get out of that. Doesn't matter how many threads you have or how much parallelism you can use. It's hard enough to do it well in C# which in theory is more performant than Python.
If you're doing batch rendering though, e.g. for film CGI or whatever, then sure! Python isn't going to hold you back at all and will likely speed up your workflow.
Right, the context here was that someone was asking about raytracing in Python. And so I was considering that they can do that, and stay in Python for a really long time (if they want to).
I just realized I need help with RAYCASTING not ratracing
In pygame, just create a 1x1 rect object and use that as a ray
Not a line?
A line?
You create an object, send it in a direction then retrieve data you need
Distance colour ect
I finished it this morning!
It has joysticks too for mobile
@spring zealot its running avg of 60-80 fps (when i put the tick at 120)
60-80 is pretty good but if you need some optimasations take a look at https://glyph.twistedmatrix.com/2022/02/a-better-pygame-mainloop.html
Thx, I'll check it out
So basically two ways. The first method is that you basically have a vector pointing in some direction that you want to go and you keep adding to it one step at a time to walk in that direction. At each iteration you check if your current vector (position) is inside something / passed something. If it is you can back out to the previous position and try to find exactly where you crossed into the object between those two points. You can do this in multiple ways. One is to start taking even smaller steps, and then back out and even smaller, and repeat until some stopping condition. The second is basically binary search, where you choose the mid point, see if it's inside (like binary search in an array). For the iterative method there are also many things you can do to improve the performance where you take extra knowledge about how the scene is structured into account (that lets you skip a ton of empty space quickly). The second method is when you have nice simple shapes that you are checking intersection with that let you have a non-iterative solution. For example if you are checking against a simple axis-aligned bounding box you can do line to box intersection math simply (using algebra to solve for when they intersect). If all your things you can intersect with are simple shapes like circles, rectangles, line segments, then consider the second method. I will give an example of ray to line segment. https://www.desmos.com/calculator/33gvuytldh
I think i used the second method
What are you doing the raycasts for?
To create a 3d type game
I do need help with displaying textures at walls which doesn't contains horizontal lines
i wanna make smth unique your welcome to give ideas or reccomendations for gameplay or visuals
what language ur using?
python
pure?
like pure python
no other language implemented
sure
I don't know what ur making ngl gng 😭🙏
Just a raycast
It works at 60-80fps with goodamount of rays and if i add better horizen it goes to 20-30fpd
Better horizen is a setting(or a var) that i made
so it said ray tracing is possible?
Even on raw opengl in python?
You would be using Python to dispatch a shader (program that runs on the GPU) to do the tracing.
That shader in this case would probably be written in GLSL.
hmm i see, can we render the final result without loosing quality inside customtkinter window?
The quality would be unaffected.
All you need is an OpenGL context for that window.
good, im currently working adding blue print scripting language to my game engine, before this i tried so hard to add ray tracing but i failed, my game engine main progress is above 80%.
i think we need your help or someone expert enough to solve the problem, when i try add ray tracing everything goes blank.
can you be more specific with "adding" and it going blank
it will set to the average color of the scene, our engine is open source and had a pip also.
https://github.com/lolgg313/HPE
pip install hpe
Is openGL better in performance than pygame?
They are not mutually exclusive. OpenGL is a graphics API for GPUs. Pygame (last time I checked) renders via CPU, which is much slower than the GPU (which is made for graphics). But for 2D games this CPU rendering is often fast enough, CPUs are really fast, especially modern ones. But you can also tell Pygame to give you an OpenGL context (since Pygame is a wrapper around SDL (now with a bunch of extra stuff)).
Wait so if i make my raycast in opengl it will run faster?
Btw my raycast is running at 110+ fps
If you are casting many rays in parallel, for graphics, then yes.
What do u mean by parallel
The results of one ray does not depend on another, they can all run at the same time.
Parallel is when you physically have multiple programs running at the same time.
Oh ok
CPUs and GPUs have multiple cores, which can run things at the same time.
The GPU has a ton of these very tiny simple cores, so it's designed for massively parallel tasks, where each task is simple.
(And it was designed exactly for this kind of problem (like raytracing))
(In fact new GPUs have specific hardware support for just raytracing)
Is raytracing even possible in pygame/opengl
Yes.
If you using any other game engine/library that uses OpenGL (or other graphics API), it's going to be doing the same things, just different styles basically, but they all go through a graphics API to tell the GPU what work to do.
Go to http://brilliant.org/BranchEducation/ for a 30-day free trial and expand your knowledge. The first 200 people will get 20% off their annual premium membership.
Have you ever wondered how video game graphics have become incredibly realistic? How can GPUs and graphics cards render such incredibly detailed scenes? Well, in this video we'r...
Go to http://brilliant.org/BranchEducation/ for a 30-day free trial and expand your knowledge. Use this link for a 20% discount on their annual premium membership.
TV and Movies have a ton of Computer Generated Images [CGI] to create fantasy worlds with dragons and castles, futuristic intergalactic civilizations, or historically accurate cities ...
Interested in working with Micron to make cutting-edge memory chips? Work at Micron: https://bit.ly/micron-careers
Learn more about Micron's Graphic Memory! Explore Here: https://bit.ly/micron-graphic-memory
Curious about AI memory and HBM3E? Take a look: https://bit.ly/micron-hbm3e
Graphics Cards can run some of the most incredible video...
Basically whether you choose to use Pygame/Python or C++/Unreal, their job is pass data (and code) to the GPU and it does the heavy lifting.
I did watch how to create raytace in unity
If you have OpenGL setup (like Pygame gave you a window with an OpenGL context), you are all set, anything visual (any graphics), you can do, no different from any massive game engine. It's just more work, the game engines have a lot of stuff done for you. If you use OpenGL raw you will be making graphics from scratch (not really, it's still high level, but relative to game engines), but since you are asking about raytracing I am going to assume this is what you want anyhow.
How do i incoporate in pygame?
I am not that smart to create a raytracing but a raycast should be good
A lot of resources on that online, it's a common thing to do: https://stackabuse.com/advanced-opengl-in-python-with-pygame-and-pyopengl/
PyOpenGL is a standardized bridge between OpenGL and Python. PyGame is a standardized library for making games with Python. In this article, we'll leverage the two and cover some important topics in OpenGL with Python.
This tutorial gets you a simple spinning cube, with regular rasterized graphics (not raytracing).
Sure i'll check it out
Hmm, actually I don't really like that one, it's using ancient OpenGL. Let me see if I can find another.
OpenGL has multiple versions, go for version 3 or above if you are looking for resources.
(Or at least 2.1)
i made this while in an airplane 😮
Is .. is that roblox
roblox but cooler
What did u used?
panda3d
I found this and seems like a good option, here a library called "moderngl" is being used in addition to Pygame, it's making the OpenGL context for the window too, it's a convenience wrapper on top of OpenGL to make it a bit more pythonic to work with: https://www.youtube.com/watch?v=LFbePt8i0DI
Shaders aren't natively supported in Pygame, but with ModernGL and some tricks, we can add OpenGL shaders using GLSL to any Pygame game!
Related Documentation:
https://pyga.me/docs/ref/display.html#pygame.display.set_mode
https://moderngl.readthedocs.io/en/latest/
Code Written in Video:
https://dafluffypotato.com/static/scripts/pygame_shaders....
You will need another resource on learning OpenGL itself though.
Most of those will not be using Python (probably C++), but if you know Python well you should be able to follow along (they don't use complex C++ features).
Learn OpenGL . com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners.
I don't have resources on hand, I learn by just reading the documentation of whatever i'm interested in (or its source code) or books. Maybe someone else can give you resources that they used.
So I don't know how good these resources actually are. But I do know that DaFluffyPotato is experienced in this and sometimes shows up in this chat too.
who wanna play boxlofe49.minehut.gg with me?
I learned python like that
What do u mean by not using python?
Most game engines have been made in C++, so the resources for things like graphics programming tends to use C++.
(Or C)
So i will right the code in python but the itegeration is on cpp
Both your Python code and the C++ code play the role of passing data to/from OpenGL here. This can be any language.
Calling OpenGL functions and such.
So when you read some resources that are about OpenGL but using C++, you can kind of just translate that directly to Python (with something like PyOpenGL or ModernGL).
Ohhhh. Ok
The beginning of such resources usually have a part where they open the window, get input/output, a main game loop, get the opengl context (basic setup). In your case that is done with Pygame and you can reference that video I linked (or find another reference).
These resources just need to choose some language (to do anything), and so they go with the most common one for game engine development.
But the focus is really about OpenGL (and graphics programming in general (OpenGL is one of many options too)), not the chosen language to interact with OpenGL. Nor the library used to get the window, main game loop, input/output, setup stuff.
does 3d work in pygame?
i added animations to my roblox clone in python
im gonna try to add multiplayer and stuff
What are u using ursina?
panda 3d
Would love your feedback
does anyone know how to add shadows to panda3d?
bruh can you add the oof sound effect?
yes
face
nice
i think you can make your own pipe or whatever it is called with ctypes tho no ?
You can.
hey guys very quickly, I have made a small RPG in python and want to package the entire project as an .exe? how do I go about doing this? do i need to use pyinstaller? (this is a repost from another channel because idk if it is more relevant here)
Yes and mostly no
It's made for 2d games but tricks like raycasting(which i am working on) or using math to create points on the 2d screen can help you create 3d but you have to really pay attention of performance
But if you want to create a 3d game you can use ursina or panda3d which uses cpp to get amazing performance and 3d
Btw you are writing the code in python
Pyinstaller or nuitka
so i need ursina right?
If you want to make a 3d renderer. For the most part basic 3d graphics are pretty easy to program with pygame
Yes, you could...just write pip install ursina
And its fairly easy to use
im new to python and i want to make a game and idk how too.
ngl if its a simple one even turtle can do the job :)
Hey is anyone interested in making mobile games with python ?
tbh i dont think its so easy to do yes ive seen games that use it but mostly just to do some calculative text or to connect to a db never really saw it get used in the full scope
pygame is not fully optimized for mobile i think lemme check
you could take a look at pgs4a its outdated tho, also you would need to parse Touch input (swipes, taps, pinches) to desktop values that pygame uses
No pgs4a or buildozer required, use anvpy
oh that is a new one
It's like a platform for creating cross platform apps and games.
You can use kivy, pygame or Crysta UI to make it
It has everything just like a complete platform code, run and build your project in seconds
your website is a little broken
none of the resources links work
Yeah its not updated but anyways it does not matter, as it is available in Google play
pay attention with
Rule 6
Do not post unapproved advertising.
install pygame and find some tutorials online
We don't allow ads, but if you'd like feedback, open a help thread #❓|how-to-get-help and tag it code review
If you want to create a 2d game with decent performace you could use pygame, or you can use opengl to get good performance but is a little harder to use. BUT if you want to make a 3d game use panada3d or ursina
Install pygame-ce ... its just better
I did add mobile support to my 3d raycaster... i just made a rezise func to resize all the elements on the screen and added a simple mobile joystick
I think the main issues can be making it an .apk or whatever IOS uses
i dont think you can because i tried but to be honest im quite shit with turtle
either way pygame is a much better module for this
you can its just complex objects are a struggle
that is true
ive found it way too slow, i started my 3d renderer on turtle and it was janky and slow still not sure if thats just my code tho
it can be decent till a certain point
You can, if you are ok with making an old school low poly 3D game with no textures (solid color triangles).
Not that this is a good idea unless it's for learning or as a challenge.
Hi guys, can somebody explain what does and why is "target" perimeter important here and why is it relevant?
import random
class Person:
def __init__(self, name, age, occupation, health, dmg, min_dmg, max_dmg, is_defending=False):
self.name = name
self.age = age
self.occupation = occupation
self.health = health
self.dmg = dmg
self.min_dmg = min_dmg
self.max_dmg = max_dmg
self.is_defending = is_defending
def Background(self):
print(f"{self.name}, Age: {self.age}, Job: {self.occupation}")
def attack(self, target):
dmg = random.randint(self.min_dmg, self.max_dmg)
print(f"{self.name} attacks {target.name} for {dmg} damage!")
target.health -= dmg
def defend(self):
self.is_defending = True
print(f"{self.name} is defending!")
# Create characters
Player = Person("You", 25, "Bartender", 100, random.randint(2, 5), 2, 5, False)
GarbageMan = Person("James Morphy", 32, "Garbage Man", 50, random.randint(1, 4), 1, 4, False)
def battle():
while Player.health > 0 and GarbageMan.health > 0:
print(f"\n{Player.name}: {Player.health} HP")
print(f"{GarbageMan.name}: {GarbageMan.health} HP")
print("---------------------------------------")
print("1. Attack")
print("2. Defend")
choice = input(">> ")
if choice == '1':
Player.attack(GarbageMan)
elif choice == '2':
Player.defend()
else:
print("Invalid choice!")
if GarbageMan.health <= 0:
print(f"{GarbageMan.name} has been defeated!")
break
# Enemy AI
enemy_choice = random.choice(["attack", "defend"])
if enemy_choice == "attack":
GarbageMan.attack(Player)
else:
GarbageMan.defend()
if Player.health <= 0:
print(f"{Player.name} has been defeated!")
break
battle() ```
!code
I don't see any target nor a ny perimeter in this code
it was in here:
dmg = random.randint(self.min_dmg, self.max_dmg)
print(f"{self.name} attacks {target.name} for {dmg} damage!")
target.health -= dmg
well, target is the target, the thing that get attacked
self is the attacker, target the defender
i dont understand and i cant explain 😭 thanks bud
like, this method is called when a person attack another
self being the person which attack (the object whose method is called)
target being the person attacked
nothing more to understand
ohhh i get it now, since Player.attack(GarbageMan) is called:
yep
got it, thanks man
here, self is Player and target is GarbageMan
tysm!!
Voxels are 3D pixels (volumetric + element (pixel = picture + element)). So just like a 2D image, you have a grid of them, and they each hold a value (or multiple values).
A voxel engine refers to a game engine that revolves around voxels as one of the core mechanics for rendering data (and gameplay).
So u can make a game of minecraft using it
Minecraft's engine would count as voxel engine, yes.
Its primary feature is having large voxels on purpose to give a blocky feel and editable terrain that feels a bit like legos in terms of large blocks.
However voxels need not be large, nor must the entire game be made of them, they are used for many things.
For example, the smoke in counter strike 2 is using voxels. It may not look like it, but the voxels are there and count as either holding smoke or no smoke in that volume.
Small voxel example: https://www.youtube.com/watch?v=1R5WFZk86kE
Follow me on Twitter for more updates: https://twitter.com/ProgrammerLin
It took a bit longer than expected, but the fluid simulation design from a few months ago has been implemented in our voxel project. It uses the same cell/particle hybrid method and is therefore fully volumetric with no height range limit beyond the 0-4095 y world boundary...
(This uses something called a sparse voxel octree, it's more complex than a simple grid like with Minecraft)
You would use OpenGL to render the voxels (to render everything in the game). In Minecraft's case this involves looping over all the voxels and generating a cube mesh (the model) for each voxel (not including the sides the player can never see because they are facing inside the chunk).
The cube's texture is determined by the block type (stored in the voxel).
When a player edits the world, they change the data in the voxels. The mesh is then regenerated for the chunk.
This is why the world is split into chunks, so you don't need to regenerate the entire world for every block edit (and also so you can load/save it in parts).
!warn 947170036857057280 Don't advertise
:x: The user doesn't appear to be on the server.
@normal silo do i need to use pygame to work with opengl or i could use it independly
you can use it without pygame is just used for the interacting with keyboard and windows creation
OpenGL is a graphics API. If you want you can manually make your own window with an OpenGL context and get input and do audio by interacting directly with the operating system. Pygame just is a layer above that (it's using SDL2 which does this stuff). Doing it yourself at least once is not a bad idea for learning how the operating system works and such. But usually this is just tedious work that someone has done for you (stuff like SDL) and for each operating system.
Hello everyone, which game engine do u guys use for game development. I started with Pygame.
I usually use pygame but I am thinking towards using morderngl as well for better performance
Depends on your use case. For very simple game, pygame works well. For things more complex, you can even go with Godot
hi hi
hi guys (:
hi
Hi
hello
hello
Someone help me pls iam begging for help
I need to run my old script and update it to new gui and the old script and the features of it I need it to working again ple
does anyone have ida pro by chance?
my friend i used to work with passed away and I was mooching off of the mf
working on another project he would have loved to have seen done and I would like to get it done in a timely manner
I am really just looking for an iv for a save in an exe. I don't have the entire game only the exe maybe some guidance with the free version of ida?
Rest of the process is visible due to openssl/bcrypt but I am having a hard time finding the nonce itself
im new to python put i used to work on lua (a bit...)
and can somone explain it to me???
i like makeing games
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
k
It's an interpreted programming language
?
U said explain it
oh
Unless you wanted me to paste the python docs here
It was a joke
what?
ya
Scissors = 3
and
Made this in class
Why?
Why are there 3 integers for r p and s all just incrementing 1 from 1
ok then oyu tell me what to do then
I don't get it
YOU*
That looks confusing tbh
gimmi a sec
is that better
?
Random is a module that let's you get random number ie a number to determine the computers choice in the game
