#game-development

1 messages Β· Page 101 of 1

fallow glade
#

Awesome

halcyon heart
dawn quiver
#

hello I am wondering if anyone in this server would be willing to help us with our project if you are interested please dm me.

simple belfry
dawn quiver
ornate pivot
#

how much python knowledge should i have before starting on a game

#

i do have some code knowledge in java

simple belfry
# ornate pivot how much python knowledge should i have before starting on a game

honestly you should have flexible knowledge of python basics (how to define functions, classes etc) or know where to look for them. Choose a game module of your choice and dive into basics of displaying sprites, some UI. Just enough to know what you are actually doing. And go on! For warm up, make something small, but extended by you in some way, to not just copy the code from a tutorial. Also I would recommend you to make games that you would have fun of playing.

simple belfry
sinful lodge
#

i made the stats count up, now i just need to position them, where should i position the stats?

covert fern
#

Could someone dm me and teach me how to use this

sinful lodge
covert fern
#

Do you guys know good pygame tutorials I can follow.

crimson jackal
#

Check pins

glad socket
#

tbh even pygame docs are fine

zealous void
sinful lodge
grand whale
#

just maked a physics engine added kinactic and static objects!

grand whale
grand whale
sinful lodge
sinful lodge
#

thx πŸ‘

grand whale
#

np!

sinful lodge
steady path
#

I have some sprite of a robot with various mouth designs... I wanted to control it with the given audio. Kinda like a virtual character. At first, I tried forced aligners, but most of those are not available for windows or are pretty complex. So right now I am thinking, of faking it kinda like Talking tom but 2D. Any idea, link .. where I can use spectrum intensity to control sprite. Thank you...

zealous void
#

Oh ok ok good @covert fern

covert fern
#

like very little

#

:l

pallid topaz
#

Does anyone know how to trigger events through toggle on unity

severe vale
#

!rule 6

frank fieldBOT
#

6. Do not post unapproved advertising.

covert jungle
#

So um

#

Anybody have any hints for perlin noise in 3D

#

?

#

I've done basic 2D perlin noise with some nice results, just 3D seems hard to wrap my head around

simple belfry
#

If I will make a game using pygame, is it possible to compile it somehow that it will be possible to play it in browser?

grand whale
hidden eagle
#

Altough the process is a headache and there are uncertainties along the way.

#

Nothing guarantees pygame will work

#

You're better off just not using python

simple belfry
#

Ok thanks, maybe something like Kaboom js will be better

dawn quiver
#

Hi. Ive lost interest in my current project. Hopefully ill come back to it. In the mean time does anyone want to code with me? I like to make games and teach beginners.

#

anyone?

dawn quiver
#

no noobs want to make a game with me?

exotic niche
topaz badger
#

I had no idea there was game developement in python

simple belfry
dawn quiver
#

most game dev you can do is on pygame

dawn quiver
dawn quiver
#

my game is just a clone of a game called puzzle quest

#

a rpg set in fantasy middle ages where you fight monsters

dawn quiver
#

i kinda like it

#

wish i had namespace though

#

I'm still a beginner at python but from what I've read C is pretty hard

#

its not that hard

#

Relatively hard

#

Was it your first language?

#

C++ was

topaz badger
dawn quiver
#

most you can do is 2d games

#

and like basic 3d stuff

topaz badger
#

I saw some guy here make a 3d game with a wand and stuff

#

Cause ive always wanted to make my own game engines cause sometimes i dont like how unity hides all the messy stuff

grand whale
grand whale
#

you can make game engine also in it

#

can you show your level map list?

dawn quiver
grand whale
#

all language devs

#

who use their language to do game dev

dawn quiver
#

I mean c++ is used in unity

grand whale
dawn quiver
#

most you can do with python is pygame

grand whale
tranquil girder
#

I learned Python for gamedev, so yes, you do

grand whale
dawn quiver
#

Blender is a bad game engine

grand whale
dawn quiver
#

think I mixed them up

grand whale
#

we are talking about languages

#

not game engines

#

c++ was never indented for game dev

dawn quiver
#

But we're talking about their usage in game development

#

and C++ as well as C# are a lot more commonly used because they're simply better for game Dev

#

As evidenced by how many games are powered by those languages and how little big budget games are powered by pthon

grand whale
dawn quiver
#

python

tranquil girder
#

I find Python better than those for game development

grand whale
#

python is a lot easier

#

in game dev

dawn quiver
#

Just because it's easier doesn't mean it's better

#

or even a good way to develop games

#

I can't think of any famous games made by python because of how eh of a language it is

grand whale
#

python is recently build

#

c++ is freaking old

#

and c#

dawn quiver
#

Python 2 came out in 2000

grand whale
#

also

dawn quiver
#

Python is not recent.

#

C++ was in the 90s

#

as well as C#

#

Late 90s as well

#

Same age pretty much

#

again there is a reason it is not used with unity and unreal engine

#

It's not a good game development language

#

We'll just end up going in circles and it seems like you're getting offended on behalf of the language

#

so I'll just go

tranquil girder
dawn quiver
#

I just stated above why

grand whale
dawn quiver
#

what

grand whale
#

i am saying

#

why c++ and c# a good gamedev language

tranquil girder
#

I don't think "it's "too new" and "it's eh" are compelling arguments tbh

dawn quiver
#

When did I say it's too new

tranquil girder
dawn quiver
#

And yes I agree it's not a compelling argument

dawn quiver
tranquil girder
#

wait., nvm :P

dawn quiver
#

Can you actually read lol

tranquil girder
#

it was the other guy who said that, sry

grand whale
#

hmm i think this arugment will never end

#

we should stop

#

ok?

grand whale
#

its very great

#

there are very cool ursina user like

#

@tranquil girder

#

ok

normal silo
# dawn quiver I can't think of any famous games made by python because of how eh of a language...

Not everybody needs to make a famous game. I did my last game jam with Python (Panda3D) and it was fine (also the one before that with Ursina). I have also used C and C++ for game and game engine development (and game jams), and while those are the "serious" languages for making a game engine (many engines still have another scripting language for making the actual game logic (e.g. Panda3D)), it's not like that really applies to all games. Sometimes you want to make a game in a very high level way without much setup and it won't run fast (many games will run at 60 fps even with Python on modern hardware), but it's a game. Also Python still lets you write shaders so a lot of what will makes a game look good can still be done and will run fast if you are worried about your Python game looking plain.

#

As an individual making a game, your main issue will be content/assets either way. They take a lot of time to make and require another skill set.

#

Also, you can write parts in C or C++ and create bindings to Python if you want/need to do so.

#

(Or Cython's extended Python language)

#

(Or in the case of something like Panda3D, you can easily mix C++ and Python, the API for the engine is almost identical for both)

round obsidian
round obsidian
crystal prism
#

its good btw i use it

dawn quiver
#

just most programmers I know only recommend learning C# or C++

#

For game dev

round obsidian
#

if I was going to learn the basics of state management in a game, I'd rather first learn those concepts by way of a language like Python rather than a language like C# or C++

normal silo
normal silo
#

But also if you learn to make games in Python, switching to something more popular should not be an issue.

dawn quiver
#

Game Dev with python is surprisingly unutilised

#

Granted I'm not deep enough into programming to understand why

normal silo
#

Learning a new language like C# is something that does not take nearly as long as just learning how games are made in general / getting fast at that.

dawn quiver
#

but maybe a big name engine will adopt python some day?

normal silo
#

It's just trends, I would recommend not getting caught up in them.

normal silo
# dawn quiver Meant in modern times

Right now most are focused on Unity and Unreal because they have the momentum / huge community and asset stores (you can basically buy a game in Unity).

#

In the indie space it's doing just fine, but Unity's popularity usually makes most rush to it and it's honestly a bit of a trap.

dawn quiver
#

Those are called asset flips for a reason

normal silo
#

As an indie dev you can use whatever you want, so if you like Python go for it.

#

(Godot is also starting to get big and forming the big three engines out there (popularity), and it technically has Python as an option, especially when version 4.0 is out (plus GDscript is very much based on Python))

sinful lodge
normal silo
#

I like to use game jams to learn a new engine, in this case Panda3D.

round obsidian
sinful lodge
normal silo
sinful lodge
#

nice work

round obsidian
sinful lodge
round obsidian
normal silo
sinful lodge
#

ohh dsa?

#

and ai

normal silo
#

They are closely related so it's one room instead of two.

normal silo
proven iris
proven iris
normal silo
#

(plus all the time for marketing / business / etc)

proven iris
#

Great nice to see somebody doing research

proven iris
normal silo
# proven iris All that is alot of work

Yeah, and right now there is so much progress being made in AI that by the time we would have a nice product out of something and all that, it would already be very behind. Ofc, we need to every now and then stop and spend some time on that to not go out of business.

#

Opportunity cost, it is what it is.

dawn quiver
proven iris
normal silo
#

Which results in things that can actually be used.

proven iris
normal silo
grand whale
proven iris
# dawn quiver what

My workplace was a Microsoft shop and I was already working in the late 90s... back then open source wasnt as strong as it was. During the transition to .net the shop gave us VB.net and C# training prior to that we used VB 6.0 and FoxPro....Python then had Perl as a competitor

#

I taught myself Python and used it for OMR file parsing and processing tool for admin stuff and a Research project that got published in a local Physics Journal

proven iris
sinful lodge
grand whale
#

i feel nostaglia for you lol

cold storm
#

geonodes / modifiers off

unreal river
#

How do I initialize glut in python? because when I initialize it requires 2 arguments but those arguments that are required is almost impossible to get in this function

glutInit()
alpine hare
#

hey guys new to python..and i want to be a game developer

dawn quiver
#

hello everyone I will say it in md someone knows about blender scripting

glad socket
#

i need pygame ideas

#

for beginners

glad socket
whole agate
#

hi, does someone know how can i use tkinter to doa blindtest with python

fleet chasm
#

Hey guys python is good for game development

round obsidian
alpine hare
grand whale
grand whale
sinful lodge
sinful lodge
covert fern
#

How do I do movement code with keys???????

real jetty
covert fern
#

Yes

#

Just curious

#

Cause I tried some yesterday and they never worked

real jetty
#

you have to create an if statement and then use if keys[pygame.K_LEFT] if you want to move leftwards

#

and so the condition would be x -= vel

#

or the velocity of your object

covert fern
#

:l

real jetty
#

and x as in the x position of the object

covert fern
#

Confused

real jetty
#

im pretty new to this stuff but

#

from what i understand

#

you have to set an x coordinate for your object initially to show where it will appear

#

on the screen

real jetty
#

instead of K_LEFT you can use any key

#

like K_RIGHT

#

or even letters like K_d to move left

#

and since the x coordinates decrease going to the left

#

it would be something like this

#

if keys[pygame.K_LEFT]:
x -= vel

#

oh yeah almost forgot

#

you have to set the keys variable to this first

#

keys = pygame.key.get_pressed()

#

hope you understood

#

i might be wrong about some stuff soo yea

normal silo
covert fern
#

I was planning on making a moving game but I want to know how to move with key presses first before making the game

normal silo
covert fern
#

How ...

normal silo
covert fern
#

Idk how

#

K thought you can only move them with keys

normal silo
covert fern
#

No I'm a noob

grand whale
#

i will give you a snippet to draw a rect

#

@covert fern

#

try this

#

wait

#
pygame.init()
back = (192,192,192)
gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption('A bit Racey')
gameDisplay.fill(back)
clock = pygame.time.Clock()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    pygame.draw.rect(gameDisplay,)(255,0,0),[100,100,50,50])
    pygame.display.update()
    clock.tick(60)   
pygame.quit()
quit()```
covert fern
#

Oh thanks

#

I can't really do it now but thabks

grand whale
#

np

dawn quiver
#

@grand whale guess who's trying to make a game in python after talking all that shit about it

#

so uh just wanted to ask where I'd start if I wanna make a basic 3d one

grand whale
#

if you want to challemge yourself use pygame

dawn quiver
grand whale
#

wow then use pygme!

#

i have mked a rotating 3d cube in pygame

#

and opengl

dawn quiver
#

I see

#

I'll try my hand at that

#

I wanna render a room you could say

grand whale
#

you want code : )

dawn quiver
#

just enough for a boomer shooter

#

Nah, can you give me resources for how to 3d render

grand whale
dawn quiver
#

thanks for the offer though

grand whale
#

use ursina for that type for stuff

dawn quiver
#

I'll check ursina out

sinful lodge
echo ledge
#

Hi. I have a question. If you use this:
Example_Question = input("Hi! Go left or right?")
And then,
Print Example_Question
if Example_Question == ("Left"):
And now, you put in some code,
elif Example_Question ==("Right")
Then, you survive and you put this in a loop if they give the correct answer.
After a while, the game just ends even when there's more code.

grand whale
plucky saffron
#

hi guys I have a large 3d scene with roughly 2000 stars/orbiting planets and am looking to use an octree spatial query structure to improve performance. I am using django with three js on the front end; from my understanding I cannot import modules/libraries and can only import within html tags linking to a hosted text doc. The following library looks great, however I do not see a relevant html tag https://github.com/vanruesc/sparse-octree. Am I correct in my understanding, that I need an html tag? Is there a way to create one? Alternatively, is there another appropriate library that does have an appropriate html tag? Thanks in advance.

normal silo
proven jolt
#

Hi so basically I'm trying to play audio using the pygame library, everything works fine up untill now, however I can't seem to change the volume of the audio*? I have a vague idea of why it doesn't work but I don't know how to solve it.

This is the code I'm using:

    def set_volume(self, vol: float) -> None:
        # self.volume = round(vol * 100) <- this part does not matter
        self.pmixer.music.set_volume(vol)

        return

There is no error.

I think the problem is that I try to change the volume immediately after I start playing the audio. For example if I freeze my script using time.sleep() for as much as 0.1 second, or even less, I am able to change the volume. Does anybody know how to solve my issue? (Note: Yes I do need to be able to change the volume immediately after starting the loaded file.)

dawn quiver
#

Everything about the game explained on README.md (on github)

normal silo
dawn quiver
#

how?

normal silo
dawn quiver
#

Im executing the code in IDLE shell, so it don't work for me xD

#

but thanks anyways

#

πŸ˜„

normal silo
#

You can try making the game more suspenseful since it's a slot machine. I recommend printing whether or not you won AFTER you print the slots and adding a delay between printing rows.

#

(you can use time's sleep for the delay between rows)

#

Also btw: ```
[0][0][0] is a row

[0]
[0] is a column
[0]

regal badger
#

how do you make a transparent rectangle with pygame.draw.rect?

dawn quiver
#

set the alpha of the current drawing color to something like 100

unreal river
dawn quiver
#

yeah i was wrong i think

regal badger
#

Thank you

dawn quiver
#

Does anyone know how to get a list of all the red pixels on a screen in pygame?

#

Red being (255,0,0)

sinful lodge
dawn quiver
sinful lodge
#

take it or leave it

#

alternatively use threading

fast basalt
#

I tried To make a start screen for a 2D game using pygame by using this function
def game_intro():

intro = True

while intro:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()

        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_c:
                intro = False

        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_q:
                pygame.quit
    screen.fill(WHITE)
    draw_text(screen, "Hello", 75, WIDTH / 2, 10)

    pygame.display.flip()
    clock.tick(15)

but when I press c my screen flashes to the game and then flashes back to this white screen. What do I do to fix it?

dawn quiver
#

Does this make sense? A simple game might look like this

running = True
state = 1
while running:
  for event in pygame.events.get():
    if event.type == pygame.KEYDOWN:
      if event.key == pygame.K_c:
        state = 2
      if event.key == pygame.K_q:
        state = 0
  if state == 1:
    menu_render()
    menu_update()
  else if state == 2:
    game_render()
    game_update()
  else if state == 0:
    running = False
  pygame.display.update()
#

I hope this helps

fast basalt
#

It helps a lot, thank you so much

dawn quiver
#

You could even have the event loop inside a call to menu_update

#

instead of having it outside

#

this way you can have the a key trigger the play game in a menu then the a key does something different in game

#

this is all very simplified but its something to get you started

dawn quiver
#

Indicators:

  • Y1, Y2, Y3: 1st, 2nd, 3rd column is the same
  • X1, X2, X3: 1st, 2nd, 3rd row is the same
  • Z1-Z3, Z3-Z1: Diagonal from X1 to X3 and from X3 to X1
dawn quiver
#

it has something interesting logic behind it

#

what do you mean by bejeweled?

#

candy crush

#

ooooo i see

#

match 3 games

#

i'm not familiarized with pygame or tkinter at all xD

#

i wouldnt use tkinter

#

id use pygame

#

but one day I will try to learn those, so I can add graphics to that

dawn quiver
#

i made all the algortihms for it

#

maybe one day ill tie it all together

#

do you have it on github or whatever?

#

or just on your computer? xD

#

its in C and SDL2 so im not sure if youd gain much from looking at the code

#

but i have it on github yes

#

ohhhhh

#

i thought it was on python

#

you can make it in python if you want to though

#

I mean, i don't understand a single line of C lmao

#

theres not much difference

dense forge
#

you guys good with classes?

dawn quiver
#

what do you need help with specifically

dawn quiver
dawn quiver
#

ok, thanks!

dense forge
dawn quiver
#

the source is very messy

#

thank you

#

if you have any questions about how i did anything you can ask

#

sure πŸ˜„

#

@dawn quiver

#

never mind

dawn quiver
#

your gonna need to find the path to a c compiler

#

maybe try which cc in your terminal

#

thanks for finding that bug ill have to update the cmake file in the future

unreal thistle
#

hey

#

im using pygame

#

i have 720x720p

#

but when i blit my image

#

i just dont see it

#

i put the image on coordinates 0 0

dawn quiver
#

Try an open gater.

dawn quiver
dawn quiver
mighty plank
#

hey guys

#

im just asking what are the paramiters of the rect method in pygame

dawn quiver
mighty plank
#

im done with that

#

now my problem is that it lags

#

as in when im pressing left it moves left but it disapears and teleports to the left

#

and then moves normaly

mighty plank
dawn quiver
#

show your code

dawn quiver
#

either use a paste site or put it here in code blocks

mighty plank
#

okie

dawn quiver
#

```py

code goes here

mighty plank
#
import pygame

def updt():
    pygame.display.update()


pygame.init()
root = pygame.display.set_mode((750,600))
pygame.display.set_caption("Spectrum")
root.fill((150,225,150))
updt()

fps = 60
clock = pygame.time.Clock()
ingame = True

x = 10

vel = 20

while ingame:
    root.fill((150,225,150))
    character = pygame.draw.rect(root,(255,155,200),(int(x),int(300),int(50),int(50)))
    for evnt in pygame.event.get():    

        updt()
        if evnt.type == pygame.QUIT:
            ingame == False()

    pygame.time.delay(65)

    keyinpt = pygame.key.get_pressed()
    if keyinpt[pygame.K_a]:
        x -= vel
    if keyinpt[pygame.K_d]:
        x += vel
dawn quiver
#

you are delaying a second i think

#

you want to limit the framerate to 60 frames per second

#

in place of this pygame.time.delay(65)

#

do pygame.time.Clock().tick(60)

mighty plank
#

okie lemme try

dawn quiver
#

a frame is one loop of your game loop

#

so you want 60 of those per second

mighty plank
#

its still lagging

#

instead of smooth movement

#

it just teleports to where its suppose to be

dawn quiver
#

post your code again . . .

#

ohhhhh

mighty plank
#
import pygame

def updt():
    pygame.display.update()


pygame.init()
root = pygame.display.set_mode((750,600))
pygame.display.set_caption("Spectrum")
root.fill((150,225,150))
updt()

fps = 32
clock = pygame.time.Clock()
ingame = True

x = 10

vel = 5

while ingame:
    root.fill((150,225,150))

    character = pygame.draw.rect(root,(255,155,200),(int(x),int(300),int(50),int(50)))

    for evnt in pygame.event.get():    

        updt()
        if evnt.type == pygame.QUIT:
            ingame == False()

    pygame.time.Clock().tick(fps)
    
    keyinpt = pygame.key.get_pressed()
    if keyinpt[pygame.K_a]:
        x -= vel
    if keyinpt[pygame.K_d]:
        x += vel
dawn quiver
#

your calling pygame.display.update() in the wrong place

#

call it at the end of your game loop

#

not where you handle events

mighty plank
#

...

#

thanks

#

hahahahahahha

dawn quiver
#

also updt is a bad name for a function

#

it should be descriptive

#

and why that function at all

mighty plank
#

easier to type

dawn quiver
#

it only calls the pygame update function

#

so might as well use that

#

well you only need this function a few times

#

and very lil times the case is that you need something to be easier to type

#

compared to easier to understand

#

the function as far as i see it is uneeded indirection

#

functions are good to have but when they serve a purpose

mighty plank
#

okie

dawn quiver
#

glad i could help

mighty plank
#

i deleted the functuin

#

thanks

#

there is collision in pygame right?

dawn quiver
#

um maybe im not sure

dawn quiver
mighty plank
#

cewl cewl ok

dawn quiver
#

tried to make mario like physics

#

but i think this is far from it

#

i make him move in the air more freely by incressing the horizontal force applied when pressing left / right while in the air

#

so i like the freedom of movement

#

maybe his speed should also affect how long he jumps

normal silo
# dawn quiver tried to make mario like physics

Super Mario Bros is a classic NES game with great controls and movement. This deep dive into its game feel will break down its motion in hopes of understanding why it feels so satisfying. If you're designing a platformer, there's a lot you can learn from Mario.

Sources:
"You say jump, I say how high?" Martin Fasterholdt: http://martinf.dk/jump/...

β–Ά Play video
#

Despite Mario being an old game, it's a bit more complex than it might seem.

#

To make the gameplay feel good.

normal silo
#

Mario falling faster with the increased gravity effect is especially important because platformers tend to often suffer from "floaty" physics (lot's of other physics based games do too).

dawn quiver
#

enough time to react in air

#

right?

#

oh right falling

#

faster

#

then jumping

#

alright

dawn quiver
#

Hi

#

@normal silo we have to do this

#

Right

dawn quiver
#

The game

dawn quiver
#

i mean . . .

#

if you want to replicate marios physics sure

#

πŸ‘ πŸ‘

#

Thanks for answering this question

mighty plank
#

sooo

#

i want my object to stop after hitting something

#

like the edge of the screen

#

or any objects i want to add

#

how would i do that in pygame

#

!paste

mighty plank
#

nvr mnd

#

now

#

can i put a bool in the

pygame.time.Clock.tick()
plucky saffron
# normal silo <#366673702533988363> But also, you can just load the javascript from your own s...

thanks for your response can you expand on what you mean? At this point in time, the project does not use node. Is there a way to host js without node? I am currently trying to implement node, however it is preferable not too set up the project again as we have all the connections to the database etc (I have not really been involved in the backend) in place. Do you have any comments on this?

mighty plank
#

u can put self in the paramiters of a function right?

mighty plank
#

how do i fix this

#

my jump motion is too fast

dawn quiver
#

oh my gosh im so sorry i didn't disabled ping

mighty plank
#

its fine

#

i wouldnt have seen this message if i wasnt pinged

dawn quiver
#

so, what was your problem with your game?

#

if it was the delay to walk i fixed it ^^

#

its kinda smooth now

#

i just did what vaxeral#100821 said

#

if you want me to send it, i send

#

the "Spectrum" one

normal silo
#

In short, you can download whatever javscript library (given that the license permits) you want and put it on your own web server.

grand whale
dawn quiver
#

or dt = clock.tick(fps)*0.001 * fps

#

if you have a fps variable

dense forge
#

whats the best place to get a bunch of 2d game assets?

dawn quiver
#

google

dense forge
#

any websites u recomend ?

#

cause i can't find anything good thats free

tranquil girder
#

kenney

deft nexus
#

Sup guys have someone made a Minecraft plugin in python? I have read that it is possible via spigot.

rocky elbow
#

which is the best module in python for game development?

deft nexus
rocky elbow
dawn quiver
#

?

rocky elbow
dawn quiver
#

Pygame is literally the only one game developement python module

rocky elbow
#

and what if I want to make fre fire in python

proper peak
dawn quiver
#

you cant

proper peak
#

!pypi arcade

frank fieldBOT
rocky elbow
#

ca I make it using pygame

dawn quiver
#

freefire is 3d

rocky elbow
#

do python cant make 3D games

proper peak
#

depending how you define "game engine", also panda3d, pyglet...

dawn quiver
#

thats hard

#

with a lot of effort you can

rocky elbow
#

yeah and champions only do hard work

proper peak
#

!pypi panda3d I mean...

frank fieldBOT
rocky elbow
#

thats why they are caled champions

#

getting that error

#

please help

dawn quiver
#

...

deft nexus
rocky elbow
#

yeah

#

..please help..

#

PLEASE................................................

#

I want to study python gaming

deft nexus
#

Well try another browser

rocky elbow
#

I tried

#

I asked it from google

deft nexus
#

What OS do you have

rocky elbow
#

windows 7 32 bit

#

😦

dawn quiver
#

hes trolling

rocky elbow
#

no

#

man I really need help

deft nexus
#

Download Linux then

rocky elbow
#

I have but

#

kali linux 1.1

dawn quiver
#

you installed discord, can take screenshots, know what OS you have but dont know how to bypass that error lol

rocky elbow
#

yeah

#

coz I am a nooob

dawn quiver
#

also to have kali linux you need access its website and download it manually

#

nah ur trolling

deft nexus
#

With Kali you should already hack the whole pypi

dawn quiver
#

^

#

lmao

rocky elbow
deft nexus
#

Probably you have already done it and corrupted their certification authority server lel

rocky elbow
#

there are alot of errors in linux coz of an older version

#

no man

dawn quiver
#

ok cool

rocky elbow
#

I tried to study some Ehacking but I am having a series of errors

#

thats why I cant study it

#

😦

forest lichen
#

hey does anybody in here know ursina

forest lichen
deft nexus
#

I don't know what it is

snow hill
#

(quite fast for a Python program... πŸ˜… Python )

kind flare
#

is it possible to hack fivem using python?

potent ice
mild oar
mild oar
forest lichen
mild oar
#

It that like joe mama joke?

forest lichen
mild oar
#

Idk it

forest lichen
#

ok

mild oar
forest lichen
mild oar
#

It’ s powered by python

#

Doesnt sound too performant

dawn quiver
#

so i'm writing an evolution simulator, and i'm wondering, how tough would it be for me to link into something like pygame at a later point to handle rendering it?

lost hound
#

Shouldn't be too bad

#

When I get game developing I often have the logic and rendering done separately of each other (This is often in C++ however the same applies to pygame in python)

#

Then once the rendering is up and running I shouldn't really need to mess with it and I can just worry about physics/logic behind the objects

dawn quiver
#

That's how I also plan to tackle it πŸ˜„

sinful lodge
snow hill
sinful lodge
snow hill
#

is it done with Panda3D ?

sinful lodge
deft nexus
#

Usrina seems too easy to work with

half obsidian
#

i am working on a game with infinite world generation

frank fieldBOT
half obsidian
#

why?

#

cant i paste one

#

@latent stone

latent stone
#

Hello there

#

You should use the code pasting service the bot asked you to

#

We don't allow file attachments like that because it can be hard to moderate and in any case most people prefer not to have to download something directly to view

#

(also next time there's no need to ping random helpers; if you have a question about why things are the way they are you could ask @light nest or #community-meta 🍏)

glossy wren
#

Hi. I'm building a pygame game similar to the Chrome Dinosaur game and I need side-facing character icons (similar to the dinosaur) for my character. I've searched for icons online but I can't find good side-facing icons. Do anyone of you know where I can get some good side-facing icons?

fallow glade
#

There are sites with free assets as well as asset giveaways usually on itch.io

grand whale
radiant sage
#

python game development is a waste of time

robust snow
#

what

#

the hell

radiant sage
#

?

robust snow
#

no

#

it aint a waste of itme

#

time

radiant sage
#

what makes you say that?

deft nexus
#

@radiant sage cuz u will skill up your python skills

#

I learned python via pgzero and then switched to pygame

radiant sage
deft nexus
#

Yea u cant have A title games via python

#

But it's really worth it

radiant sage
#

you cant really publish your project though

#

aka someone with 0 python experience cant run it

normal silo
normal silo
plush scarab
#

Apparently eve online is made with python

radiant sage
#

im raising a controversial point

#

not everything has to be perfect

normal silo
#

You went into a Python channel which is about development of games in Python and then implied that everyone here was wasting their time with it. I'm not a mod, but that's ban worthy.

radiant sage
#

am I not allowed to raise points or do i have to compy, nod, and salute?

round obsidian
dreamy dove
#

it makes you not rely on tools provided by other people

chrome copper
#

hey im trying to figure out how to have my python game be compile which i think will allow people to play even without python downloaded. py2app wont work for me.

#

also it there a way to make it so they cant edit and read the games data?

#

im currently making a text based rpg style game

plush scarab
#

@chrome copper pyinstaller?

chrome copper
#

havent heard of it ill take a look

#

ok it wouldnt work i use 3.9 python it says it only supports 2.3 up to 2.7

dawn quiver
#

well i think there is another one i cant remeber the name

#

worse case is you will have to do it yourself

#

just mimic what they do

chrome copper
#

ok

#

i guess i could make a hidden folder with everything needed. then have it so there a script which opens the game

dawn quiver
#

yep

#

id look into python enviorments too

chrome copper
#

ill just have to make sure either python is installed in the folder or just tell people to install python

chrome copper
dawn quiver
#

so that once you install a module it will install it locally

#

instead of you having to find the module and copy it over

#

im not sure

#

just a guess

chrome copper
#

well i use pycharm and i code using a virtual environment

dawn quiver
#

cool

dawn quiver
#

gonna try and teach them git

chrome copper
#

that cool have fun

dawn quiver
chrome copper
#

no isnt yet

#

should prob be a week or two before I have i have alpha 1

dawn quiver
#

Cool im interested in helping

chrome copper
#

it a bit of a solo thing sadly. has it part of something bigger i have planned and it just 1 key to a lock

#

but anyways it is based of my old 2019 game

#

but with better python skill can 100% make it so it works

#

if my language skill doesnt ruin me

dawn quiver
#

Using pygame?

round obsidian
chrome copper
#

nope due to it just being a text game which is mainly using input

#

and i simple saving system

#

with variables like health, mana, etc

#

though i should prob look into pygame

dawn quiver
sinful lodge
sick eagle
#

hey i am doing big project in a server with some other people to help improve our skill. we are making a cool terreria sorta game just for fun to expand our horizons and learn new skills! if you would like to try to learn stuff like that or you just need help with your own thing, dm me! πŸ˜„

pseudo rivet
#

@sick eagle what framework/software do you use

sick eagle
#

pygame

#

using either pycharm or visual code

#

i prefer visual code

flat aurora
#

I can’t speak to using it with Pygame, but I’ve personally used it with Arcade on 3.10 and it works fine.

glossy wren
deft nexus
#

@radiant sage with pgzero nope. But with pygame u can use pyinstaller. Or better. Atuo-py-to-exe. I use it and I pack all files into one exe.

#

Auto*

#

@radiant sage and you have to deal with it. Pygame forces you to refactor and optimize your code. And i believe that for 2D games it is more than sufficient.

#

@chrome copper I am using python 3.8.8 and auto-py-to-exe don't have any problems with it. And it is a gui which runs script with pyinstaller..

next estuary
#

Spooky game I'm making :)

sinful lodge
dawn quiver
sick eagle
sick eagle
#

so good

sick eagle
deft nexus
#

@sick eagle https://youtu.be/GFadq39XJqY
I learned it via this tutorial.

The solution to this is a little tricky, but if you follow this video you will get it finally. I tried different solutions and put it into practise... so let's see how to make one exe file containing our code for a python app, including the images into the exe file... cool!
The post for this topic: https://pythonprogramming.altervista.org/auto-...

β–Ά Play video
weary haven
#

i have a problem with top down collisions every time my object collides from the left or right stops ok so far we are good but if i press the w to go up it just teleports to the bottom any suggestions ?

sick eagle
#

can someone help me with this

#

when i open the exe it says this

weary haven
#

i fixed it (i think )

#

def h_m_c(self):
player = self.player.sprite
player.rect.x += player.direction.x * player.speed_x
for sprite in self.tiles.sprites():
if sprite.rect.colliderect(player.rect):
if player.direction.x < 0:
player.rect.left = sprite.rect.right
elif player.direction.x > 0:
player.rect.right = sprite.rect.left

def v_m_c(self):
    player = self.player.sprite
    player.rect.y += player.direction.y * player.speed_y
    for sprite in self.tiles.sprites():
        if sprite.rect.colliderect(player.rect):
            if player.direction.y < 0:
                player.rect.top = sprite.rect.bottom
            elif player.direction.y > 0:
                player.rect.bottom = sprite.rect.top
sick eagle
#

hm idk

next estuary
dawn quiver
#

is that python

potent ice
dawn quiver
#

?

hasty parcel
#

why is pygame not opening files when i have the exact directory and it worked 10 sec ago but now it does not

next estuary
#

Yeah it's Ursina and a lot of math

dawn quiver
#

I don't know in which channel I can post this but as it's based on pygame, I'll post there.
So I'm currently in a project at my own called SHooK (SynnK Hook), it's a "Toolbox" of windows components (such as buttons, text renders, input boxes and in future, many more) but using vanilla pygame.
That's what I did so far!

I'm posting it here because I don't have anyone to tell this.
This project was supposed to innovate PyGame application creation with different components which you cannot access with pure PyGame.

# output of the next image
>>> 'button will print this text'
#

So if you want to help me to continue this project, please check out my github!
https://github.com/storm772
Source Code of this GUI, Input Box / Button components on my GitHub

hasty parcel
dawn quiver
#

yep i am

hasty parcel
# dawn quiver yep i am

But one question em for input boxes and buttons I think Tkinter is better but you can use pygame if it is easier

dawn quiver
#

Those components are used for games in PyGame, e.g: You have a game that when it starts the game wants you to input your username, but you can't do it with normal pygame, so you could use SHooK Input-Box for that

hasty parcel
#

Ohhhh that makes more sense

dawn quiver
#

Tkinter is 100% better than PyGame in question of GUI components, of course. But Tkinter is not designed for games

hasty parcel
#

Ye

#

I made a cps counter in tkinter but now learning pygame to make space invaders

#

and snake and tetris and all that lot

dawn quiver
dawn quiver
dawn quiver
#

@dawn quiver you there?

sinful lodge
#

hmm i should make some prefabs for pygame

#

like an inputbox and all that

dawn quiver
dawn quiver
#

!paste

frank fieldBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.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.

dawn quiver
#

Let me know what you think πŸ˜„

wind basalt
#

guys! I got a golden idea!

#

what if we make a game engine with pygame!?

civic oyster
#

You could,

wind basalt
#

but I'm too dumb

dawn quiver
#

i made a lil gui button just now

wind basalt
#

cool

#

what if we make a game together?

#

just tell me the title, let's work together

dawn quiver
#

i gotta sleep soon. What is your timezone? Its 1:29 am for me

#

id be interested in making a terraira clone

wind basalt
#

3.02 PM for me

#

I'm from Sri Lanka

wind basalt
dawn quiver
#

you know how to work with git?

wind basalt
#

no 😦

#

are you new to pygame>

dawn quiver
#

lol im kinda new to it

#

i like to teach people

#

but ill try to let you do your own thing too

#

have you made anything in pygame?

dawn quiver
wind basalt
dawn quiver
#

kla

compact raptor
shadow stirrup
#

I would like to do game development

#

not sure if I should start c# tho

next estuary
#

Try ursina if you don't want to learn something new

dawn quiver
dawn quiver
#

poo

hasty parcel
#

poo what?

dawn quiver
hasty parcel
#

Hmmm ok

plucky saffron
sinful lodge
#

some updates to map editor

  1. you can now clear the map
  2. you can rotate direction blocks
  3. the block outline becomes red if the block is in an illegal position
crisp junco
#

looks cool

#

seems like no one uses pygame these days πŸ˜”

#

ursina is the talk of the town

sinful lodge
sinful lodge
#

ursina isnt that widely known

crisp junco
#

oh

#

been months since I last used pygame

dawn quiver
#

But i mostly use it to teach beginners and make projects with them.

sick eagle
#

!paste

round obsidian
grand whale
#

Lol

wind basalt
#

I use pygame

#

I'm trying to make a game engine

#

but i need help

#

somebody tell me how to do this automatic code generation thing

round obsidian
#

@wind basalt that's not really something that can be conveyed in a message or two

grand whale
#

can you elabrote?

steady cairn
#

yo

#

I'm new to python

scenic wyvern
steady cairn
#

ok thanks for details

sullen wagon
#

!warn 809865354603397141 do not post chainmail in this server

frank fieldBOT
#

:incoming_envelope: :ok_hand: applied warning to @deep yew.

frigid pewter
#

Hey!, can someone help me with a tkinter project in python?

#

Hey!, can someone help me with a tkinter project in python?

#

!warn 809865354603397141 Hello!

rare basalt
#

what

#

is

#

the

#

best

#

way

#

to

#

become

#

better in coding

normal silo
sinful lodge
#

what happened to this channel in the last 5 hours lol

sinful lodge
#

are you talking to me?

dawn quiver
#

ah sorry

sinful lodge
#

yeah

#

maybe wrong reply lol

dawn quiver
# rare basalt what

once you have learned the basic of a language ie variables, control flow, functions, data structures, classes, variable scope then start to learn programming concepts and modules. Like how do i open a file? How do i read a file line by line and store it in a dictionary? How do i read a file that stores an array of map data. How do i store that data?
Id recomend making hangman. Its a simple game that can be played entirely in your terminal / CommandPrompt

dawn quiver
sinful lodge
#

lmao

cold storm
#

Hello all

#

How goes py game dev?

#

(tag me if it takes a while to get back to me)

#

I have been having lots of fun, implimented A* by redblob vs evaluated blender mesh and made a bunch of geonodes stuff

thin marsh
#

Hey everyone, looking to dive back into game dev after a one year hiatus. Any new python libraries/engines that might be suitable for 3d multiplayer game dev before I sell my soul to a large engine?

dawn quiver
#

ursina

#

or pandas3d

dawn quiver
thin marsh
#

panda3d last time I checked was very very undocumented

#

ursina I was actually looking into right when you mentioned it!

#

ursina lookin pretty fly not gonna lie

#

anything to avoid selling my soul to unity3d

#

is really

normal silo
thin marsh
#

damn, guess I just had a bad time

normal silo
#

Ursina is Panda3D with some simplifications / work done for you.

thin marsh
#

I barely made a rotating panda and moved on lol

#

im a web dev by trade

#

I did however see Toontown lol

normal silo
#

Panda3D's docs kind of assume you know in general the pattern of how most game engines work.

#

They all follow a similar design like React vs all its competitors.

thin marsh
#

ahh, that explains my confusion then

normal silo
#

Imagine learning Vue without knowing React first. Or the other way around. Clearly if you know in general how it goes it will be much easier.

thin marsh
#

I didn't have my basics down

normal silo
#

One thing though is that games are very very complex in that they can contain anything in them, including an entire web browser in some cases.

#

So there is a bottemless bucket of individual ideas / features. So for basics it's more about knowing the system that ties it all together (e.g. Entity/GameObject/Scene systems).

#

And ofc, they all have rendering in common, so graphics programming knowledge is universal too.

#

Things like that.

normal silo
#

I would recommend Ursina over Panda3D for beginners though. And since Ursina is technically Panda3D you can learn parts of Panda3D bit by bit and mix it with Ursina / go lower level.

dawn quiver
#

Hey guys

#

I made my first game with pygame

#

I want to convert it into an exe file so that I can share it with my friend

#

But I don't know how to do that

#

?

vernal copper
#

I'm a pixel artist and I have a show at a gallery coming up. I had this idea to make a small game and set it up on a projector almost like a slideshow for people to flip through. I'm envisioning a simple 2D platformer where each room is one of the art pieces. Given that I'm kinda OK with python, what's the fastest way I can make this?

main brook
#

You can use ursina for 3d graphics

mighty plank
#

haw haw

#

i was just wondering where the x and y coordinates are in a square in pygame

#

is the x left?

#

or center

#

is y top or center

midnight escarp
mighty plank
#

top left okie

#

yall have pygame code to detect collision of objects

dawn quiver
dawn quiver
agile thorn
#

!code

frank fieldBOT
#

Here's how to format Python code on Discord:

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

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

mighty plank
flat aurora
#

You can bundle it all into a self extracting EXE file or you can create the executable and ship the static files alongside it. The bundled EXE will have a slower startup but for a majority of projects it’s probably negligible

hardy hollow
#

How do I install pyGame?

rare basalt
hardy hollow
#

I remember watching a video saying I need pip, but I don

#

Don't have it

rare basalt
#

what OS are you using?

hardy hollow
#

Win10

#

Is that what you mean?

rare basalt
#

try to reinstall the python interpreter

rare basalt
hardy hollow
#

Ok

hardy hollow
rare basalt
#

go to python.org and download the latest python interpreter

sharp escarp
#

I've been told that Python is not the best programming language for making a game. Assuming that the desired target was a 2D game that uses many different 2D sprites and stores a lot of variables in the form of "statuses", would Python be an acceptable programming language, or would it be better to consider a different programming language?

round obsidian
#

@sharp escarp Also note you can use C to speed up crucial aspects of game performance if needed

sharp escarp
#

Do you mean using both C and another language such as Python at the same time?

round obsidian
#

@sharp escarp Python is itself built atop C, and allows you to integrate C code into Python.

sharp escarp
#

oh right

round obsidian
sharp escarp
#

let's say that there are about 400 different "states" that a character can have, though a character is only going to have about 5 to 10 applied at the same time in most circumstances. There are about 60 or possibly more characters that may need to be present at the same time.

round obsidian
#

60 objects is nothing

#

if by "states" you mean things like choices from a sprite sheet, that's not going to affect performance much either.

sharp escarp
#

The states don't have unique sprites or anything it's just background states that adjust character stats or capabilities

round obsidian
#

That should all be fine, although you do want to get live measurements of performance

#

(profiling)

sharp escarp
#

Okay. Thank you for the insight.

round obsidian
#

Glad to help

dawn quiver
#

Hello can anyone help me make a .py file .exe? My command prompt thing with the pip install uses different commands and im confused.

#

for example

lean cosmos
dawn quiver
#

I thnk i want to work on something similar to terraria or starbound

dawn quiver
#

!paste

frank fieldBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.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.

lean cosmos
#

@dawn quiver well if you need help just dm me😁

dawn quiver
dawn quiver
lean cosmos
#

No not as of right now but when the project get more complete I will release version of it

#

But I’m hoping to release the game as a game of itch or steam

dawn quiver
#

ah then maybe a private repo if you plan to sell it. Or even just a local repo using git would be good.

lean cosmos
#

I don’t plan on selling it but maybe or dlc for it but that’s way in the future for now all the servers for online will be hosted by me 😁

dawn quiver
#

git is basically history to revert on for your project. It also allows you to collaborate. I wonder if you can use git in conjunction with your own server.

lean cosmos
#

Not a bad idea tbh

#

I would not mind collabing will people

#

It’s going to be a big project

dawn quiver
#

why not host it on github then?

#

hmm its alright

#

anyways im gonna work on my terraria clone. Im tired of helping python beginners

lean cosmos
#

Heck yea what all you got done

dawn quiver
#

just pygame boilerplate

#

and scenes

lean cosmos
#

Have any screen shots

dawn quiver
#

nope not yet

dawn quiver
#

also fade in and fade out transitions and maybe other stuff

#

instead of swapping the scenes which might be expensive i could just have an index that keeps track of where the current scene is but then id lose the ability for scenes to render together for fades and stuff

#

and pause menus that partially show the game

#

or just simply assign the currect scene to the scene found with the appropiate name

#

since they are references

#

im gonna make something to show

lean cosmos
#

I might you this in my project is you don’t mind well the idea of doing it that way

dawn quiver
#

sorry i didnt understand what you are trying to say.

#

You might use my code? Thats fine

thin marsh
#

So one thing I'm wanting to know, and I'm having trouble looking up, is how should I format my game code in projects? currently using Ursina. I'm familiar with MVC with web dev, but don't really want to accidentally make spaghetti code. If you have any advice, or guides for me, I would love that.

dawn quiver
lean cosmos
#

Sorry I was doing something will texting I meant Is I okay if I use your way of dealing with scenes

dawn quiver
lean cosmos
#

I think I understand it idk how your like setting the scenes up but I think I can figure it out

#

Now is each on of these scenes a separate pygame screen

dawn quiver
#

No its not a seperate pygame screen. they are just containers for data and have callback functions that the Game class calls.

#

i have one main loop that is ran. In the game class there is a method called run which runs its update and render functions

#

these call into the current scenes update and render functions

#

At the bottom of scene.py there is a quick example scene that im using currently. When the scene gets added or made current it executes the scene init function.

#

then in the main loop the current scenes update and render functions are called

#

This is sort of an complictaed concept so dont feel bad if you dont quite get it

#

but id look over the code and try to understand it

#

hmm its broken as of now

#

for some reason the window is not resizing even though i pass in the resizable flag

lean cosmos
#

I got you well later I’m going to write this well something like this into my engine I have and see what it does

dawn quiver
lean cosmos
#

Yep let me get home to my computer real quick and I go over it with you if you don’t mind

hasty rover
lean cosmos
hasty rover
#

thanks

dawn quiver
#

phew made a lot of commits to my repo

hasty rover
dawn quiver
# hasty rover yes i did use Ursina

nice 3D can be hard to start with if you dont know the math. Ursina made it easier but to make something else might be more involved. So i might try out pygame to make 2d games

plucky mural
#

hello you can made minecraft using ursina engine

hasty rover
#

yes

dawn quiver
mighty plank
#

help please

#

trying to use this as a wall collider

sinful lodge
# plucky mural hello you can made minecraft using ursina engine

not again... why does everyone want to make minecraft with ursina? yes it's possible, but it's not that simple to implement terrain generation, cave generation, ore generation etc. also you'd have to come up with a way to chunk up blocks and come up with alot of performance optimizations.

#

it's not easy

sinful lodge
#

pretty sure you got ripped off

#

found it

mighty plank
sinful lodge
mighty plank
#

ye

#

but htat just checks if your colliding wih soimethin

#

not what direction

tranquil girder
dawn quiver
tranquil girder
#

yup

dawn quiver
lean cosmos
dawn quiver
#

Cool.

scenic dome
#

I am a bit of a noob with game engines, but I use Panda3D and the performance isn't that great for high-poly meshes. How can I get down and dirty with the GPU (tessalation, instaincing, GLSL, etc) in Panda3D?

dawn quiver
#

Is there a way to tell python to stop keeping track of some memory?

#

I know that python keeps references to the objects and if all objects are not set to None there will still be memory not freed

#

id like to load and unload stuff from memory in python

olive parcel
#

Normally the biggest cause of performance issues isn't the number of polygons, but the number of geometry batches (individual Geom objects in Panda)

#

You can also look at normal mapping for creating the illusion of detail under the effect of lighting, you can "bake" the high detail into a normal map that is applied to a low detail version of the model

rain dome
#

How do fix this?