#game-development

1 messages · Page 47 of 1

slow nexus
#

Ok guys I can’t say the idea but bro it’s an RPG game

slow copper
#

Bros gatekeeping

slow nexus
#

I wanna tell you but I can’t bc I have to like gain ur trust bro :3

royal pumice
#

Is game development hard to learn ?

slow copper
normal silo
#

It also depends heavily on what kind of game.

#

Making Pong is clearly not the same as making 5D chess.

#

(And the complexity can be arbitrarily ramped up)

summer vortex
#

Guys im looking for a good developer for making a mobile game

#

I want to learn by working together

#

😊 if anyone interested please DM me 😊

#

Also which software is better for making a puzzle like game

#

Mobile game

royal pumice
royal pumice
slow nexus
#

I’ll tell u one day ☺️

slow nexus
empty geyser
#

i want to learn very low level things like how code interacts with the cpu and in its registers and all that can someone provide a course or learning material or something so i can learn it better?

normal silo
# empty geyser i want to learn very low level things like how code interacts with the cpu and i...

Go to http://brilliant.org/BranchEducation/ for a 30-day free trial and expand your knowledge. Use this link to get a 20% discount on their annual premium membership.

Have you ever wondered how CPUs work? Well, in this video, we take a 3D animated tour of a Central Processing Unit and see exactly how it works. Central Processing Units, or CPU...

▶ Play video
empty geyser
royal pumice
royal pumice
#

@normal silo what games did u make?

torn grove
#

thats my actual game and my first. im 14 years old and code this together with my cousin. some complex parts are coded by GitHUB copilot. if you have improvements, pls DM them to me

rich wraith
#

Yooo

#

I experience alot of FileNotFoundErrors and NameErrors when trying to make my game. I try to find what I did wrong and correct it, but it still doesn't work. I was lost and when closing my pygame window I saw a flash, I recorded and it and slowed it down and I noticed how everything is behind a layer on my window. I ended up deleting due to being overwhelm, now I want to start a new game project, what would you suggest me to do before and during coding? I use Visual Studio Code btw.

shut tulip
#

FileNotFoundErrors means you are looking for a file that do not exist, so if you had that, it means you try to load assets that are not where you think they are

#

My suggestions is to be rigourous and take your time

#

I also suggest doing things slowly and step by step

rich wraith
slow copper
vivid halo
rich wraith
finite yoke
#

I guess you're a beginner, what's the game you're making btw?

rich wraith
mystic wasp
finite yoke
#

Are you using pygame?

mortal pulsar
#

hey guys just wawnna know that, I have been learning the coding since 2 years, I have leaned till the loops, but should i have to learn more basic about python? and witht the scripting like the os module like that.

#

should i focus on basics or the scripting, I am gonna make a game with my friends so which is more important now basics or scripting?

rich wraith
uneven bridge
mortal pulsar
#

No i have'nt learned it yet.

mystic wasp
rich wraith
uneven bridge
uneven bridge
#

not obligatory but its definitly reccommended

rich wraith
#

Alright

rich wraith
uneven bridge
#

?

rich wraith
#

Have you made any projects?

limber veldt
#

Classes are so useful in pygame. Like, I usually tell people, start pygame with a solid foundation in python basics and be ready to start learning classes

#

Also, general game making advice. Learn how to use delta time/framerate independence in your animations

mystic wasp
mystic wasp
limber veldt
#

Yeah, it's important especially if sharing your games

uneven bridge
rich wraith
#

Alright, but what you working on

limber veldt
#

How to use vectors, another must-learn concept

#

Those are not directly python related but are certainly necessary for making games, no matter the language

uneven bridge
wintry marsh
#

hi, everyone

empty geyser
uneven bridge
#

"I use arch btw" ahh

short tapir
#

hey im writing a fpv in moderngl using quaternions for the rotations. im running in the old issue of -z = backwards for opengl. im fine with opengl wanting that, but rn it seems like the only way to fix that is to invert my objects local forward axis - which is completely unacceptable because i cannot write physics code in that reference frame

#

is there any solution?

short tapir
#

ok i fixed it

dawn quiver
#

hello..

#

I need some help installing pygame

mystic wasp
dawn quiver
#

i made the game using pygame

#

and it was working

#

i reinstalled windows yesterday

#

had to freshly install python and vscode

#

now when I try to install pygame

#

i get SSL Certificate verficitaion failed

#

everything else is working, installed pandas too with no issues

#

just not pygame

uneven bridge
#

(I know its not your question but its objectively better)

dawn quiver
#

what is that ?

#

I'm sorry I'm a beginner

uneven bridge
#

Pygame but maintained by the community

#

Your normal pygame code should still work and pygame-ce adds new features and gets constantly updated

mystic wasp
slow copper
#

It still lacks support from 3.11+

#

Pygame-ce is the actual maintained library from the community

#

Oh mb I read it wrong

uneven bridge
#

Yeah

humble spoke
#

Hello bois, so what games have you guys done with python?

mystic wasp
mystic wasp
humble spoke
#

Just curious, I'm only here because I know game development using Godot

#

But interested to see the creations that can be done through Python

mystic wasp
humble spoke
#

Maybe I'll contribute to pygame-ce one day

mystic wasp
humble spoke
#

Shit you

#

You're serious?

#

Would have to learn alot then, to contribute.

limber veldt
#

I've done a few arcade classics with pygame-ce

mystic wasp
humble spoke
#

Yeahh, looking forward to fix those small bug fixes, I realized a term for it is called goodfirst issue

limber veldt
#

I'd still like to refactor those little guys

#

They're close to the og behavior but not quite

humble spoke
mystic wasp
limber veldt
#

Even with the disassembled rom and some ability to read it, I can figure out exactly how they did it

limber veldt
#

Games like that, say old arcade before about 1992 or so, pygame is perfect for

mystic wasp
limber veldt
#

Look at some of DaFluffyPotato's youtube for even better stuff, he's amazing

mystic wasp
limber veldt
#

He's using more than just pygame these days though

#

Lighting effects are one of my wishlist for pygame

humble spoke
limber veldt
#

Can just learn moderngl and make my own

humble spoke
limber veldt
#

An OpenGL wrapper for python

#

pygame-ce can do opengl windows too

humble spoke
limber veldt
round obsidian
#

Magnificent

humble spoke
limber veldt
#

lol

#

Yeah, the noise is noisy

round obsidian
#

The whole game is psychedelic

limber veldt
#

Fun stuff, old games are an almost never ending source of inspiration

#

I think without game dev and pygame, I probably wouldn't have stuck with python like I did

mystic wasp
round obsidian
#

Old games also present solid challenges to modern players without actually being very computationally expensive

limber veldt
#

Like a lot of people can do a lot with python, I've pretty much only done game dev

round obsidian
#

you don't need tons of compute to create a good game

mystic wasp
limber veldt
#

It's a great hobby

#

I've been at it for decades

humble spoke
mystic wasp
#

decades is wild, got any favorite retro games that still inspire you

limber veldt
#

Yeah, some platformers

#

Kid Chameleon

#

For one

round obsidian
#

that Robotron clone, with all the stuff moving around - the actual compute time for each frame is miniscule on Python

limber veldt
#

That's impressive too, there's a lot going on there

round obsidian
#

Python is not that slow :D

#

also, it looks like a lot

mystic wasp
round obsidian
#

with Xtaloid, the Conway's Life stuff is computationally expensive, so I pushed that off to a small Cython module of about 100 lines

#

but the rest is pure Python

limber veldt
mystic wasp
limber veldt
#

I'm not sure how many

round obsidian
#

"how many?" "yes"

limber veldt
#

But clearly thousands

#

lol

mystic wasp
round obsidian
#

also, it's not like you have to do each-to-each collision detection

limber veldt
#

Yeah, I don't get the python is slow stuff either. It always depends on what you're doing

round obsidian
#

I did a fun little game that had each-to-each collision and I wrote a quick BSP algorithm to handle it efficiently

limber veldt
#

Now...boids, I had a much harder time with many of those

round obsidian
limber veldt
#

That's where boids slowed me down, the each to each physics

#

Needs a quadtree

round obsidian
#

yeah, that's where BSP came in handy, because then you only have to check each object's nearest neighbors

limber veldt
#

I think, specifically, rebuilding the quadtree for every frame was slowing me down the most

humble spoke
#

I heard that 1993 Doom used BSP to make smooth

round obsidian
#

I wasn't doing that - I had what amounted to a dict with coordinate tuples as keys

#

each time one of an object's four corners showed up in one of the partitions, the object would get a reference under that key

#

so you'd take the object you want to check, and look for any neighbors in the quadrants it occupied

limber veldt
#

Well, makers of Doom

#

John Carmack specifically

limber veldt
round obsidian
limber veldt
#

I still have that one game that I can't finish

#

Well, I can but just not sure how to do it yet

#

Needs a total rethink of its data model

#

The first level of that game, Robot Odyssey. Use logic gates to build circuits inside robots to solve puzzles through 6 levels. The first level comes with robots pre-wired to solve the puzzles of that level, from there, it gets much harder. I'm stuck at saving the game state since the each level is like an editor where objects can be placed anywhere

mystic wasp
limber veldt
#

It is

mystic wasp
# limber veldt It is

maybe try mapping all object positions into a coordinate based dict and using json

limber veldt
#

The robots are rooms inside rooms, like you can go inside them and they can have robots inside them too. That's where I got stuck, parsing the nested rooms and saving them in a way that makes sense

mystic wasp
limber veldt
#

My attempt so far, is give every object .write_ref() and .read_ref() methods where I can iterate the groups, calling each object with a dict into which it writes its relevant attributes for saving or reads them for loading

#

Then of course, save that dict

mystic wasp
limber veldt
#

So using json or even pickle isn't the struggle, the data is

mystic wasp
limber veldt
#

Yeah, have those, was thinking about refactoring some of that data too

#

I really explored subclasses with that project

#

It's a huge project and I kinda painted myself into a corner with it. All the functionality is there, the levels, the tutorials, prototype chip wiring and burning to small chips, all the base logic gates, buttons and switches. I should have put more thought into how to save the game before I got this far

uneven bridge
#

np

dawn quiver
#

I vibe coded this game and made adjustments to it and it worked fine upto a moment and then became completely unworkable 😭

random prism
#

When you say vibe did you use AI? to help?

hearty quartz
#

is this elite ball knowledge

shut tulip
#

No sir this is a screenshot

tropic ibex
#

does anyone here have experience in lua and c# modding?

#

Im thinking of doing something incredibly difficult for my coding knowledge but would help me incredibly because Im trying to get hired as a coder at some point, Im not currently doing any anki which is frustrating me so I'd wanna kill 2 birds with one stone, integrate anki into hades 2, lock each boon choice in the game behind a kanji or phrase from my anki (I would wanna sync it to my current deck) each boons rarity scaling up the anki difficulty common boons being easy cards that I already know

hearty quartz
#

python is so cool

hearty quartz
shut tulip
#

Id want to talk about game dev you can do it, but if you are only trying to showcase your work, we have another channel for that

hearty quartz
#

i'm more showcasing my progress as i attempt to recreate doom in python

shut tulip
#

Feel free to open a shocase thread then

mighty pagoda
#

Yo

mighty pagoda
#

Lol

tropic ibex
tawny talon
#

Can pygame code be cythonized?

elder folio
#

My game window keeps closing itself. I think it's because it cannot locate a file but there may be other issues. Can anyone help plz? Here's the code I'm using rn (I'm following a tutorial but it doesn't work for me for some reason)

uneven bridge
#

it says it cant find world.tmx

#

honestly, no idea why

tawny talon
#

hmm, hey try moving it into the same folder that contains the file that's referencing it

elder folio
#

main and world.tmx are in the same folder but it still doesn't work. I've changed the code to only look for the world.tmx because they're in the same file but IDK why it doesn't see it still

tawny talon
#

how is the path described for world.tmx?

#

in the code

elder folio
#

The path the purple stuff right? Here's the latest error message

#

Sorry I'm not fully familiar with the terminology yet

#

This is what I'm working with. The tutorial said that it should be join("data", "maps", "world.tmx"), but that doesn't work and I moved world.tmx into the same folder as the main.py anyways

tawny talon
#

that last image yes

elder folio
#

this is the self.import_assets() , to make things clearer. The variable coveres it up

tawny talon
#

idk, but a shot in the dark is "../folder_name/world.tmx"

elder folio
#

Nope. Same problem.

tawny talon
#

pytmx module right?

elder folio
#

Yeah. You think I should re-install it?

tawny talon
#

no, the error comes up in multiple files. are they all in the same folder?

elder folio
#

I don’t know actually, I’ll try to track it down

#

l searched for pytmx and these came up. First image is from the search, the other two are the contents of the folders. One seems to be the code while the other (the dist-info) seems to be data for the program.

uneven bridge
#

May I ask what pytmx is?

limber veldt
#

It's a python lib to read files made by Tiled, a map editor

#

I'm not entirely sure, but I think @elder folio is following this tutorial https://www.youtube.com/watch?v=fo4e3njyGy0

Thanks to Brilliant for the support, you can find them here: https://brilliant.org/ClearCode/

A RPG that is inspired by Pokemon and Final Fantasy in Python. We will use pygame-ce to create it and in the process you will learn database management, ui design and how to handle a really complex project.

Find/support me on other channels
Patreon...

▶ Play video
#

Clear Code has a discord server, too, with a couple of helpers who know the projects quite well

#

He has a couple games/tutorials using Tiled maps

#

A link to his discord can be found in the description of that video

elder folio
#

Yeah I’m following that tutorial! Thanks a lot!

limber veldt
#

np

cerulean nimbus
mighty pagoda
#

Yoo guys

mighty pagoda
#

Can anyone help me

#

I am making a game

shut tulip
#

People may have helped you 23 hours ago if you told us what you need help with

rotund wyvern
trail zodiac
mighty pagoda
#

Any suggestions

wispy portal
wispy portal
limber veldt
#

So you come to another channel and continue breaking the rule, nice one

gritty warren
#

bro look my basic game gamehttps://github.com/Atesthecoder/pygae3e2.git

GitHub

Contribute to Atesthecoder/pygae3e2 development by creating an account on GitHub.

hidden peak
junior lake
#

just some simple styling can make it look less chopped

lusty pine
#

Hey everyone!

#

I made Snake in Python in 10 lines of code!

junior lake
lusty pine
#
def g(s):
 R=r.randint;c.curs_set(0);s.timeout(99);H,W=s.getmaxyx();S=[(H//2,W//2)]*3;v,u=0,-1;F=R(1,H-2),R(1,W-2)
 while 1:
  if(n:={258:(1,0),259:(-1,0),260:(0,-1),261:(0,1)}.get(s.getch(),(v,u)))[0]+v|n[1]+u:v,u=n
  h=S[0][0]+v,S[0][1]+u
  if h in S or h[0]%(H-1)*h[1]%(W-1)==0:s.addstr(H//2,W//2-4,"GAME OVER");s.refresh();c.napms(2000);break
  S=[h]+S;h==F and(F:=(R(1,H-2),R(1,W-2)))or S.pop()
  s.clear();s.border();s.addstr(0,1,str(len(S)-3));[s.addch(*p,35)for p in S];s.addch(*F,64);s.refresh()
c.wrapper(g)```
junior lake
#

when just going up it kills the player

#

as an example

junior lake
junior lake
#

sorry if it looks like nitpicking just wanted to point some things out after testing it 👍

lusty pine
#

But thank you so much for pointing out the bugs!

junior lake
lusty pine
#

:)

lusty pine
#

The semicolons on lines 8 and 9 of this current version are doing real compression work byte-wise, but they're not reducing logical line count in any honest sense.

junior lake
#

i got it to 604 with the bug fix

#

i think i can find a 570 version

#

will have to do a different aproach probably

#
import curses as c,random as R
def g(s):
 c.curs_set(0);s.timeout(100);H,W=s.getmaxyx();S=[(H//2,W//2)]*3;v,u=0,-1;F=(R.randint(1,H-2),R.randint(1,W-2))
 while 1:
  k={258:(1,0),259:(-1,0),260:(0,-1),261:(0,1)}.get(s.getch(),(v,u));v,u=k if k!=(-v,-u)else(v,u);h=(S[0][0]+v,S[0][1]+u)
  if h in S or h[0]in[0,H-1]or h[1]in[0,W-1]:s.addstr(H//2,W//2-4,"GAME OVER");s.refresh();c.napms(1500);break
  S=[h]+S;h==F and(F:=(R.randint(1,H-2),R.randint(1,W-2)))or S.pop();s.clear();s.border();s.addstr(0,1,str(len(S)-3));[s.addch(*p,35)for p in S];s.addch(*F,42);s.refresh()
c.wrapper(g)
``````pwsh
-a---  587 24 Feb 21:50 test.py
lusty pine
#

I got it in 14 lines, no semicolons!!!

#
def g(s,c=__import__('curses'),R=__import__('random').randint):
 s.nodelay(1) or c.curs_set(0)
 S=[((H:=(t:=s.getmaxyx())[0])//2,(W:=t[1])//2)]*3
 v,u,F=0,1,(R(1,H-2),R(1,W-2))
 while 1:
  if(n:={258:(1,0),259:(-1,0),260:(0,-1),261:(0,1)}.get(s.getch(),(v,u)))[0]+v|n[1]+u:v,u=n
  h=S[0][0]+v,S[0][1]+u
  if h in S or h[0]%(H-1)*h[1]%(W-1)==0:s.addstr(H//2,W//2-4,"GAME OVER") or s.refresh() or c.napms(2000) or exit()
  S[:]=[h]+(S if h==F and(F:=(R(1,H-2),R(1,W-2)))else S[:-1])
  s.clear() or s.border()
  s.addstr(0,1,str(len(S)-3)) or s.addch(*F,64)
  [s.addch(*p,35)for p in S]+[s.refresh()]
  c.napms(99)
__import__('curses').wrapper(g)```
lusty pine
#

the bounds? Like the edges are bugged?

#

how are they bugged for you?

junior lake
lusty pine
#

what operating system are you on?

junior lake
#

modulus aint a good one use h in S or h[0]in[0,H-1]or h[1]in[0,W-1] instead

lusty pine
# junior lake modulus aint a good one use `h in S or h[0]in[0,H-1]or h[1]in[0,W-1]` instead

Does this work?

 s.nodelay(1) or c.curs_set(0)
 S=[((H:=(t:=s.getmaxyx())[0])//2,(W:=t[1])//2)]*3
 v,u,F=0,1,(R(1,H-2),R(1,W-2))
 while 1:
  if(n:={258:(1,0),259:(-1,0),260:(0,-1),261:(0,1)}.get(s.getch(),(v,u)))[0]+v|n[1]+u:v,u=n
  h=S[0][0]+v,S[0][1]+u
  if h in S or h[0]in[0,H-1]or h[1]in[0,W-1]:s.addstr(H//2,W//2-4,"GAME OVER") or s.refresh() or c.napms(2000) or exit()
  S[:]=[h]+(S if h==F and(F:=(R(1,H-2),R(1,W-2)))else S[:-1])
  s.clear() or s.border()
  s.addstr(0,1,str(len(S)-3)) or s.addch(*F,64)
  [s.addch(*p,35)for p in S]+[s.refresh()]
  c.napms(99)
__import__('curses').wrapper(g)```
junior lake
#
def g(s,c=__import__('curses'),R=__import__('random').randint):
 s.timeout(1);c.curs_set(0)
 S=[((H:=(t:=s.getmaxyx())[0])//2,(W:=t[1])//2)]*3
 v,u,F=0,1,(R(1,H-2),R(1,W-2))
 while 1:
  if(n:={258:(1,0),259:(-1,0),260:(0,-1),261:(0,1)}.get(s.getch(),(v,u)))[0]+v|n[1]+u:v,u=n
  h=S[0][0]+v,S[0][1]+u
  if h in S or h[0]in[0,H-1]or h[1]in[0,W-1]:s.addstr(H//2,W//2-4,"GAME OVER");s.refresh();c.napms(2000);exit()
  S[:]=[h]+(S if h==F and(F:=(R(1,H-2),R(1,W-2)))else S[:-1])
  s.clear();s.border()
  s.addstr(0,1,str(len(S)-3));s.addch(*F,64)
  [s.addch(*p,35)for p in S]+[s.refresh()]
  c.napms(99)
__import__('curses').wrapper(g)
#

if you do stuff like s.clear()or s.border() just replace it with s.clear();s.border()

#

3chars into one 😄

#

but for a no semies good work 👍

junior lake
# lusty pine Does this work? ```def g(s,c=__import__('curses'),R=__import__('random').randin...
(c := __import__("curses")).wrapper(
    lambda s: (
        r := __import__("random").randint,
        c.curs_set(0),
        s.timeout(100),
        S := [((H := (t := s.getmaxyx())[0]) // 2, (W := t[1]) // 2)] * 3,
        v := 0,
        u := -1,
        F := (r(1, H - 2), r(1, W - 2)),
        [
            (
                k := {258: (1, 0), 259: (-1, 0), 260: (0, -1), 261: (0, 1)}.get(
                    s.getch(), (v, u)
                ),
                k := k if k != (-v, -u) else (v, u),
                v := k[0],
                u := k[1],
                h := (S[0][0] + v, S[0][1] + u),
                (
                    (
                        s.addstr(H // 2, W // 2 - 4, "GAME OVER"),
                        s.refresh(),
                        c.napms(2000),
                    )
                    if (h in S or h[0] in [0, H - 1] or h[1] in [0, W - 1])
                    else (
                        S.insert(0, h),
                        (F := (r(1, H - 2), r(1, W - 2)) if h == F else F),
                        S.pop() if h != F else None,
                        s.clear(),
                        s.border(),
                        s.addstr(0, 1, str(len(S) - 3)),
                        [s.addch(*p, 35) for p in S],
                        s.addch(*F, 42),
                        s.refresh(),
                    )
                ),
            )
            for _ in iter(int, 1)
        ],
    )
)
#

ive been busy .....

#

hahahahhaa

lusty pine
junior lake
# lusty pine What's the benefit of writing it like this? lol
(c := __import__("curses")).wrapper(lambda s: (r := __import__("random").randint,c.curs_set(0),s.timeout(100),S := [((H := (t := s.getmaxyx())[0]) // 2, (W := t[1]) // 2)] * 3,v := 0,u := -1,F := (r(1, H - 2), r(1, W - 2)),[(k := {258: (1, 0), 259: (-1, 0), 260: (0, -1), 261: (0, 1)}.get(s.getch(), (v, u)),k := k if k != (-v, -u) else (v, u),v := k[0],u := k[1],h := (S[0][0] + v, S[0][1] + u),((s.addstr(H // 2, W // 2 - 4, "GAME OVER"),s.refresh(),c.napms(2000),)if (h in S or h[0] in [0, H - 1] or h[1] in [0, W - 1])else (S.insert(0, h),(F := (r(1, H - 2), r(1, W - 2)) if h == F else F),S.pop() if h != F else None,s.clear(),s.border(),s.addstr(0, 1, str(len(S) - 3)),[s.addch(*p, 35) for p in S],s.addch(*F, 42),s.refresh(),)),)for _ in iter(int, 1)],))
#

this XD

#

1 line

junior lake
scenic olive
#

i mean i be writting like this too sometimes

junior lake
# scenic olive PEP 8's biggest enemy
(c := __import__("curses")).wrapper(
    lambda s: (
        r := __import__("random").randint,
        c.curs_set(0),
        s.timeout(100),
        t := s.getmaxyx(),
        h := t[0],
        w := t[1],
        S := [(h // 2, w // 2)] * 3,
        y := 0,
        x := -1,
        f := (r(1, h - 2), r(1, w - 2)),
        [
            (
                d := {258: (1, 0), 259: (-1, 0), 260: (0, -1), 261: (0, 1)}.get(
                    s.getch(), (y, x)
                ),
                d := d if d != (-y, -x) else (y, x),
                y := d[0],
                x := d[1],
                p := (S[0][0] + y, S[0][1] + x),
                (
                    (
                        s.addstr(h // 2, w // 2 - 4, "GAME OVER"),
                        s.refresh(),
                        c.napms(2000),
                    )
                    if p in S or p[0] in [0, h - 1] or p[1] in [0, w - 1]
                    else (
                        S.insert(0, p),
                        f := (r(1, h - 2), r(1, w - 2)) if p == f else f,
                        S.pop() if p != f else None,
                        s.clear(),
                        s.border(),
                        s.addstr(0, 1, str(len(S) - 3)),
                        [s.addch(*q, 35) for q in S],
                        s.addch(*f, 42),
                        s.refresh(),
                    )
                ),
            )
            for _ in iter(int, 1)
        ],
    )
)
```i think pep 8 made it worse 😸
scenic olive
# junior lake ```py (c := __import__("curses")).wrapper( lambda s: ( r := __import...
def __init__(self, operation, file_paths, password, custom_ext=None, output_dir=None, new_name_type=None, chunk_size=CHUNK_SIZE, kdf_iterations=1000000, secure_clear=False, add_recovery_data=False, compression_level="none", archive_mode=False, use_argon2=False, argon2_time_cost=ARGON2_TIME_COST, argon2_memory_cost=ARGON2_MEMORY_COST, argon2_parallelism=ARGON2_PARALLELISM, aead_algorithm="aes-gcm", pbkdf2_hash="sha256", usb_key_path=None, archive_name=None, compression_detection_mode="legacy", entropy_threshold=7.5, parent=None):
#

see i ain't any better

#

at times

junior lake
scenic olive
#

this some older code i had

#

had to dig up some old ass commits icl to find this

junior lake
#

tbh this is how my internschip partner codes atm

#

and i hate it

#

T^T

scenic olive
#

i dunno how i managed to do these one liners

junior lake
#

tomorrow imma do some rebase to make it more understandable without losing functionality

scenic olive
#

i mean i still do them at times

#

but my GOD

#

horrific to look at

junior lake
#

well if it can make you laugh 2 days ago i had something like

#
def knowledge_distillation(
  student, teacher, alpha_mode, alpha_val, alpha_start, alpha_stop, weight_decay, lr, patience, save_path, name, onnx_shape, dummy_input, ...
):
#

and some more

junior lake
scenic olive
#

same for my __init__

#

till i kinda had to force myself to write cleaner looking code

junior lake
#

welp in the rebase i made it to

def kd(student, teacher, params): ...
junior lake
scenic olive
#
self.detection_mode_combo.setToolTip("Detection mode\n\nWe use the detection mode to check for already compressed\nfiles with PyKryptor. Each one written in C has it's own\nlittle quirks...\n\nLegacy - only checks for certain file extensions and skips\nthose when compressing.\n\nMagic bytes - we use said signatures; as used;\nto check if the file has compressed data or markings too.\n\nEntropy heuristic - samples around 8KB of a non-determined file to see if\nthe compression ratio is worth, or not.\n\nMagic bytes + Entropy - combines 2nd and 3rd methods into one, most accurate.\n\nNone - disables skipping entirely; always attempts compression.")
#

this my longest one-liner

#

that i got

#

and i meannnn

#

it's not THAT bad to look at...

junior lake
#
self.detection_mode_combo.setToolTip(
  "\n".join([
        "Detection mode\n",
        "We use the detection mode to check for already compressed",
        "files with PyKryptor. Each one written in C has it's own",
        "little quirks...\n",
        "Legacy - only checks for certain file extensions and skips",
        "those when compressing.\n",
        "Magic bytes - we use said signatures; as used;",
        "to check if the file has compressed data or markings too.\n",
        "Entropy heuristic - samples around 8KB of a non-determined file to see if",
        "the compression ratio is worth, or not.\n",
        "Magic bytes + Entropy - combines 2nd and 3rd methods into one, most accurate.\n",
        "None - disables skipping entirely; always attempts compression.",
    ])
)
#

this could be more readable

scenic olive
#

yeah it is

#

but i mean

#

prob never gonna change that tooltip anyways

#

so who knows

#

¯_(ツ)_/¯

junior lake
#

btw maybe lets go to OT or add eachother cause we are cluttering the game dev channel

#

T^T

scenic olive
#

oh yeah true

sharp musk
#

Hey what types of games we can dev using python?????

normal silo
sharp musk
sharp musk
#

Hey, I am intermediate in python, so can u guy give any tips??? To learn from were and how to progress fast and build real stuffs

shut tulip
#

!res

frank fieldBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

sharp musk
shut tulip
#

Read the bot message

sharp musk
shut tulip
#

I triggered a command so the bot drops the link to our resources, as you asked for from where to learn, idk why you reacts like this

cerulean nimbus
raven kernel
#

@frank field bot's embedded messages carries useful information, learning how to navigate it is an important first step

sharp musk
bleak ginkgo
#

quick tip for people who use snippets, do this
“```python
print(“Hello, World!”)

#
“””
After the first ``` write python ```python
“””
#

bruh it doesn’t work

#

`python

royal pumice
#

or unity

normal silo
#

Nor does Unity.

royal pumice
normal silo
#

That would be a modified form.

normal silo
#

It would be unusual to use Python with either of those engines.

#

The intended languages are Blueprints and C# respectively.

#

Although Unreal also now has Verse but IDK if it's ready yet.

royal pumice
#

have mu made any games?

umbral sorrel
#

Hi I am making a pygame-ce game engine ( more like rendering engine) and I need some people to test it

#

On py pypi.org it’s called skyport-engine

uneven bridge
normal silo
#

C++ is fast, but it's also pretty difficult to work with unless the user learns a lot about it. It's also slow in terms of iteration speed, due to long compile times.

#

So while core systems are written in it, the game itself, in a sense, would be mostly in Blueprints.

#

Pretty much all game engines themselves are written in C++, due to often being the best option for various reasons. There are other viable options now though.

#

This means that technically you could just use only C++ if you wanted to for most of them (in a very direct way, no bindings).

#

What language you can use with a game engine is not really a fundamental limitation. It's about what the engine developers intended you to use, and also whether whatever language you choose to use actually makes sense for game development. For example if you want to make your game with Unreal engine and lolcode, you could do that. Whether that will be productive is another matter.

uneven bridge
#

I meant actual scripting

cerulean nimbus
#

So far looks decent but maybe minimize your project description

#

It feels more like a doc instead of a quick overview on what it has to offer

#

(Btw this is what i find so dont fully listen to it just my feedback)

cerulean nimbus
brave swan
#

can someone tell me the most popular ways to make gui games and menus. i want to build sprite animations for game testing

vagrant saddle
brave swan
vagrant saddle
brave swan
vagrant saddle
#

maybe but pure C for making gui is probably a footgun or time wasted that could be redirected to game polishing

hard mulch
#

Hii everyone I'm new here

brave swan
hard mulch
#

I want to impress my crush plz guide me

vagrant saddle
# brave swan i been using raylib for a bit with python but was hopeing to not have to use pyt...

nb you can do very clean and reactive in-game gui with python eg, not raylib bindings but panda3d also python https://www.youtube.com/watch?v=Y3r4JrTHZAA so i would not risk to premature optimize by going C++ ( also raylib is C not C++, Panda3D is C++ )

brave swan
vagrant saddle
#

yes you can

brave swan
#

dang that panda gui looks smooth as butter, how cool!

vagrant saddle
#

there's one even smoother but it requires gpu shaders

brave swan
#

how to market without giving away the source code?

vagrant saddle
#

mypyc / nuitka etc ... all kind of python compilers around

brave swan
brave swan
junior lake
hard mulch
#

Guyzz how can I impress my crush

vagrant saddle
lusty pine
#

Would anyone be interested to see code golfed Tetris?

junior lake
#

close enough

junior lake
junior lake
# junior lake

point of the thing is to send out waves from the camera outwards on moving (at the moment its continuous )

lusty pine
#

fully featured tetris

junior lake
lusty pine
#

I hope so!! lol

junior lake
#
Traceback (most recent call last):
  File "C:\game-yet-to-be-named\test.py", line 28, in <module>
    __import__('curses').wrapper(g)
  File "C:\Program Files\Python310\lib\curses\__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "C:\game-yet-to-be-named\test.py", line 25, in g
    [s.addch(r+1,BX+c+1,ord('#')if B[r][c]else ord('.'))for r in range(H)for c in range(W)]
  File "C:\game-yet-to-be-named\test.py", line 25, in <listcomp>
    [s.addch(r+1,BX+c+1,ord('#')if B[r][c]else ord('.'))for r in range(H)for c in range(W)]
_curses.error: addch() returned ERR
junior lake
#

yes

lusty pine
#

okie dokie give me a few mins

#

@junior lake I have updated the Pastebin, try it now! It should work

#

you may also want to make your terminal window taller

junior lake
#

sorry working on my 3d game atm

lusty pine
tired reef
#

How can I go through a list of colors empire game because it won't let me iterate within a list I do have an idea of what I could do but how exactly like it

junior lake
#

fluff

#

that aint what i wanted

junior lake
#

im confused

tired reef
#

For a python list because I'm trying to make something that looks like a haze effect and python won't let me iterate through tuples within a list so my my best idea was to do RGB and have them what's in a each piece within a list but I don't exactly like that like idea

junior lake
#

OMG its pretty

junior lake
junior lake
#

hehehhe

tired reef
#

Can you just put x y and z in the same for loop instead of nesting a loop within a loop?

junior lake
#

maybe convert it to a numpy array i think they handle that well

shut tulip
lunar venture
round obsidian
junior lake
round obsidian
junior lake
#

i thought it was ursina first cause most of the time when i see people do ursina to start it always has the same grey ish layout

#

how big of an file can i send here

round obsidian
#

Don't know

junior lake
round obsidian
#

Yeah, shaders are my next thing to learn

#

I already implemented some basic spatial hashing collision detection

junior lake
#

shader is complete (the ring delay is software wise cause i coded it bad)

round obsidian
#

Neeeeat

junior lake
#

😭

round obsidian
#

Shaders are a step beyond

cerulean nimbus
bitter stream
#

Has anyone looked into Cave?

uneven bridge
cerulean nimbus
uneven bridge
#

yeah but thats not really my point...

cerulean nimbus
uneven bridge
#

its something that would maybe get me banned if I mention it

#

not really sure tho

#

but there is a big possibility

cerulean nimbus
#

....

#

Then maybe dont mention it

#

Plus i think you just need to think more maturely... (not meant rude)

round obsidian
neon canopy
round obsidian
tired reef
#

What would you say would be the scariest monster in an RPG kind of sandbox

short tapir
lusty pine
#

I'm working on fixes for windows atm

#

This one should hopefully be cross platform and mostly bug free

short tapir
#

Sick

dawn quiver
#

about the type of game

#

then i will provide input

#

your theme in game should help with the elements to make your "monster" scarier

#

if its just like classic rpg like no gimmicks, i recommend just honestly going for that one big guy with wings and one eye or something

#

lol, that always works for me hahaha

tired reef
#

Why mean is wooden a monster with an AI for a brain be scary because if it's a 2d game within us means and then they are it has multiple regions how to hunt has a pack you have to deal with an entire pack of monsters

round obsidian
#

Fun discovery: that 3D shmup I made in Python for an experiment is spending vastly more time in the draw call portion of the program (the GPU) than the actual game logic. Probably due to Pyglet not yet supporting instanced rendering.

strange bone
round obsidian
#

I understand Pyglet may be adding instanced rendering in the next revision, so I plan to exploit that, but if I can figure out how to get it working on my own I may do that as an example

round obsidian
#

Code's messy but slowly getting cleaned up as I go along.

lusty pine
#

I just made a shmup too!

#

I made a fully functional Shoot'em Up, with two enemy types, procedurally generated levels, and parallax star background in seven lines of code

rotund wyvern
lusty pine
# rotund wyvern Very esoteric

I posted my code golfed tetris in another programming server, and someone hits me back with "It's 225 with formatting technically"

#

-_-

round obsidian
#

we all know LoC is a terrible metric

lusty pine
lusty pine
#

OH

#

lmao sorry I am

#

a lil dense

lusty pine
#

I just rewatched that show last month with my wife for the first time in 25 years

#

during the winter storm

lusty pine
#

I made a couple of websites!

#

For playing my code golfs!

lusty pine
#

Has the source code on the page

cerulean nimbus
lusty pine
cerulean nimbus
round obsidian
#

Eventually I plan to make this into something I can whip out and point to as an example of how Python is not too slow for 3D games :D

round obsidian
#

Things like complex physics involving objects with big meshes, etc. are best pushed to the GPU anyway, but there's a lot you can do before you get to that stage to make things interesting.

royal oar
ripe valve
round obsidian
ripe valve
#

nice

ripe lake
#

i dont know if this is the right place to put this but im just gonna put this here
i need help setting up a emulation frontend for a raspberry pi ds project (so natively runs on debian)
all i need is it to be able to boot a .nds file in melonds and for it to display coverart on the top sceeen, games on the bottom screen, and ill design the backgrounds myself
also i will be designing my own controller so that will need to be coded 2
and the screeens are both 480x320 (i believe)
essentially i just need someone to tell me what files i need where in the project, and what components i need (i.e plugins, code editors (i use kate rn) and stuff like that.
i also may need some help with tthe code as i am still learning python
thanks for reading all of this.

#

(if its not obvious melon ds is an emulator)

#

(and the coverart is just a png for each game)

onyx sparrow
#

Hey everyone o/
I am not sure if this fits in the channel but I didn't find any other channel that suits my request 🙂
I want to get more practice in Object Oriented Programming and for this I wanted to program the card game scoundrel (for reference here are the rules (http://stfj.net/art/2011/Scoundrel.pdf)

Before continuing with the game logic and implementing PyGame, I'd appreciate if someone could review my code so far, tell me what I'm doing wrong or could do better.
https://pastebin.com/sn26RmgM

Thanks in advance for taking the time 🙂

harsh panther
#

Haha that's funny I just coded scoundrel a few days ago. Not OO by a long shot, in my case. Though I do use a namedtuple which means technically there is a subclass definition in my module

#

I will have a look at your code ASAP

harsh panther
#

your player.attack() method looks off or I'm not understanding something.

    def attack(self, monster):
        armed = input("weapon or fists?: ")
        if armed == weapon and self.weapon.can_attack(monster):
            ...

how are you getting a weapon instance from input()? did you mean string literal 'weapon'?

#

furthermore, if the weapon is stronger than the monster, why are you damaging the player?

        if armed == weapon and self.weapon.can_attack(monster):
            self.weapon.register_attack(monster)
            self.health -= abs(weapon.value - monster.value)
        else:
            self.health -= abs(weapon.value - monster.value)

i think what you mean is self.health -= max(monster.value - weapon.value, 0)

#

and in the case there is no weapon used (either by choice or because there is no (usable) weapon), just self.health -= monster.value

#

also, before you use self.weapon you have to check if it's not None

#

quick rewrite

    def attack(self, monster):
        armed = input("weapon or fists?: ")
        if armed == 'weapon' and self.weapon and self.weapon.can_attack(monster):
            self.weapon.register_attack(monster)
            self.health -= max(monster.value - weapon.value, 0)
        else:
            self.health -= monster.value
#

also, it's debatable if the rules allow your health to go negative. In my version I've chosen to allow health to go below zero for the purpose of scoring a lost game (health minus remaining monster values)

harsh panther
#

Card.__repr__ return value f-string is missing an f and self.color does not exist.

stuck crow
#

anyone know how to get a sprite? so i can put a character

dense ridge
stuck crow
#

Yeah I wanna make a 2d platformer but idk how to put the character into the game like the bird for flappy bird

dense ridge
#

well that depends on the game engine you are using (if you are using one).

if you look at the pinned posts on this channel there are some tutorials. Sprits is usually like the 2nd thing you learn after setting up a window/game loop.

stuck crow
#

Ok

#

I'm using vscode

#

So hmm

#

Is it the pygame tutorial series?

dense ridge
#

No I mean are you using pygame, or godot, or python arcade for example.

stuck crow
#

Pygame I'm pretty sure

dense ridge
#

Yes, thats the tutorial. DafluffyPotato is a master with pygame and has been making games for many years.

His tutorials are great.

stuck crow
#

I don't know much about python ducky_australia

dense ridge
#

same. I'm just learning too. Just stick with it and it gets easier.

I'm also tinkering with pygame. That's why i happen to be looking at the chat lol.

stuck crow
#

Nice

dense ridge
#

i can make 2 sprites and setup collision rectangles around them. Thats as far as i got 🙂

stuck crow
#

I really only can remember like one thing from learning python last week 😭

dense ridge
#

programming is like a muscle. you gotta use it constantly. Its not about memorizing syntax but the concepts.

good luck on the game. progress is progress.

stuck crow
#

Thx u too

onyx sparrow
# harsh panther Haha that's funny I just coded scoundrel a few days ago. Not OO by a long shot, ...

Haha what a coincidence 😄
Thank you for your input and taking your time looking at my code 🙂

Regarding the input() for the weapon -> This is just a placeholder, as i want to let pygame create 2 buttons where you can choose between armed and unarmed but as I am not that familar with pygame right now I don't know how pygame will return those values so i just took it as plain text at this point 🙂

Also I'm concerned if my method - usage is right like I defined the method can_attack inside the weapon class but using self.weapon from the player class and using the method on self.weapon kinda feels wrong but I actually think it is right 😅

harsh panther
#

Gotcha regarding the placeholder.

I think your structure is fine. can_attack is a property (not in the technical sense) of a weapon and requires information about a monster, so it's normal that it's a method on the weapon instance

#

When you start implementing more of the game logic you might discover that you need a few adjustments to the structure but for now it looks good. I must say I'm not an OO wizard so I might be overlooking something

#

What data structure are you planning to use for the 'rooms' of the dungeon? I used a library for the cards and deck (pydealer) but now that I saw your implementation I think my approach is overkill

onyx sparrow
#

I am not sure about the rooms right now I am stuck between making them a class on it's own or letting the game logic handle creating rooms, but as I am typing this the class approach seems way more convenient as i can define what can happen with a room in it's class.

Haven't heard about pydealer yet, but I am still a freshman when it comes to programming so I don't know maybe your approach is better ? 🙂

harsh panther
#

another thing I thought of: are you going to treat card values as the numbers 2 through 14 and let the UI translate that to cards 2 through Ace? because i had to do a little bit of ugly math to handle that. pydealer supports jokers so the values are mapped 0 (joker), 1 (card 2), etc through 13 (card Ace). pydealer basically returns cards as a tuple ("Diamonds", "Jack") and provides a dict to map "Jack" to 10. I had to add 1 to the result.

#

all in all, I think pydealer is not necessary, your Card and Deck classes already take care of a lot of the functionality you'll need

round obsidian
#

I'm looking deeper into the possibility of doing something a little more substantive over time with that FPS game. I want to make the core of it into a simple library for building one's own games like that, and then use that to build something formally releaseable. One frustrating temptation I have is that I could very easily use genAI tooling (running locally) to generate some of the very specific assets I have in mind, at least as placeholders. But I can always use free itch.io stuff or just scrawl something in the meantime, too.

#

The game mechanics I'm also mulling: One of the things I like in Robotron: 2084 is how you have to balance survival and greed. The more humans you pick up without getting killed, the bigger a reward you rack up. I'm thinking of similar mechanisms here: e.g., you have unlimited ammo, BUT every time you fire AT ALL your bonus for rescuing bystanders gets cleared. So the more people you can rescue without shooting, the bigger the payoff.

burnt sail
#

Self-promotion of libraries isn’t allowed here, right?

#

I’ve built a library that makes it easier to add multiplayer to games. It works with basically any framework that has a main game loop. I thought it might be useful to someone here

round obsidian
burnt sail
#

Great, thanks

round obsidian
#

Now adding textures to the FPS, although Pyglet 3.0 apparently has far better support for textures at scale so I'm going to try that soon.

amber crystal
# stuck crow Pygame I'm pretty sure

First you need to define your texture

texture = pygame.image.load("path/to/image")

Then you need to blit your texture

scr.blit(texture, (0, 0)) #> arg, texture, rect style
onyx sparrow
boreal canopy
#

i learned how to program an aurdiuno

#

so far

#

WW

#

int tempPin = A0;
int ledPin = 13;
float voltage, tempC;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}

void loop() {
voltage = analogRead(tempPin) * (5.0 / 1023.0);
tempC = (voltage - 0.5) * 100.0;
Serial.println(tempC);
if(tempC > 99){
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(1000);
}

#

measures temprature

#

if its higher then 99c then the auriuno turns on a led

#

signaling its bad

cerulean nimbus
#

Been a while i used an arduino tho

#

Also check out #microcontrollers instead might be more helpfull then game dev channel :)

shut tulip
lusty pine
#

yo, would anyone be interested in seeing a recreation of conway's game of life? I created a procedural pattern generator that uses the base85 encoded pattern library to procedurally generate new patterns

round obsidian
#

(Conway's Life as an 8-way shooter)

lusty pine
#

do tell more

round obsidian
lusty pine
#

oh now THIS is cool

round obsidian
#

Pure Python save for a small bit of Cython code for the CGOL computations

lusty pine
#

wild concept

#

i use a subprocess of pypy3 to accelerate procedural pattern generation 😄

#

otherwise pure python

round obsidian
#

I got a crash course in Cython to speed things up, and it was worth it

#

I'm now working on 3D

lusty pine
#

3D is a huge hurdle for me, i have a hard time expanding into the extra dimensions in multiple ways

round obsidian
#

I looked at some existing examples and just began incrementally customizing them to fit my needs.

lusty pine
#

i figure maybe i could do a little research, i'm just disappointed by my previous attempts at 3D

#

true 3D at least

#

and not pseudo3D raycasting stuff

round obsidian
#

Yeah, I'm using Pyglet (with a 3.0 on the way) to do genuine OpenGL 3D

lusty pine
round obsidian
#

Yeah, my ambition is to create a mini toolkit for creating FPS games in Python. Nothing too advanced, just enough for people to get the idea.

lusty pine
#

I think that will be a great addition to the community! I myself would be interested in taking a look at it

round obsidian
#

Right now I do have spatial hashing for 3D collision detection, so it's pretty snappy

#

I'm going to experiment with using an octree, so that you could have objects of any shape (not just whatever fits comfortably into a cell of some defined size), but it might be fun to use a fixed sized cell and provide LEGO-like building blocks for your scenes

#

(a la Minecraft)

#

you'd have a bunch of common predefined shapes, each with its own descriptor for how to detect a point within it. A sphere is super simple, a cube a little more complex; I haven't done a prism or pyramid yet. But you'd use that to do collision detection.

#

You'

lusty pine
#

I'd be interested in doing a voxel particle simulator with particles that interact with one another, kinda like the sand game from the 90s/early 2000s

lusty pine
random prism
#

@lusty pine OH nice, is that Conway's game of life?

round obsidian
#

Adding textures and non-AABB collisions

#

My idea is to have a toolkit where you have a bunch of geometric primitives (sphere, box, prism, pyramid, etc.) all with highly optimized collision tests, and you can use those to build your FPS. I'm going to set it aside for a little bit while the Pyglet folks work on Pyglet 3, though

raven spear
#

<@&831776746206265384>

#

I have a bug

coarse hill
raven spear
coarse hill
humble glacier
#

and you can use pygame drawing functions on top of it?

rotund wyvern
#

Am I cooking or am i cooked

humble glacier
#

Very cool

#

I am making a first person dungeon crawler that renders in the terminal

round obsidian
humble glacier
#

I remember people using it for roguelikes.

round obsidian
#

Sure, it can be used for that

zinc pike
long plover
#

guys how do i make this square look more like a VAB while still keeping the look?

#

Im not that good at pixel so thats why im doing it all in code

tranquil girder
#

VAB?

long plover
halcyon cipher
#

Guys who good at making pygame

slow copper
#

just ask your question mate

halcyon cipher
#

icl bro

#

Hop off my shi bro

#

I wasnt talkin to u

#

Doin backflips on my thing

slow copper
#

im jus tryna save you time

#

I could maybe even answer your question

#

but not many people would consider themselves an "expert", not even some "expert" themselves

halcyon cipher
#

never said expert bro

slow copper
#

or good

halcyon cipher
#

someone that can make a small py game

slow copper
#

or just ask your question

halcyon cipher
#

by using defRect and defOvals

halcyon cipher
slow copper
#

why?

#

are you doing some assignment or something?

halcyon cipher
#

not an assignment

#

im tryna build something for a business

#

im 25 bro😂

slow copper
#

or if you wanna paste some code you can use the paste bin

#

!paste

frank fieldBOT
#
Pasting large amounts of code

So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

slow copper
halcyon cipher
jovial wyvern
#

OOPL

cerulean nimbus
round obsidian
#

I got most of the important stuff running again last night with instancing. The rendering time for each frame is now 1/100th (!!) of what it used to be.
And apparently even that is a misleading number: my statistics for each frame render are being thrown off by the vsync sleep.
So it's actually even lower than that.

fierce wraith
#

Nice. What lib do you use?

round obsidian
humble glacier
#

Anyone interested in writing a rasterizer with me?

round obsidian
# tired summit Wow

and that's just the bare bones start, I haven't really done anything super sophisticated yet. Just basic shapes and camera movement

tired summit
round obsidian
tired summit
#

Like I know the lib might use other languages but the code that you write is only in python

round obsidian
#

shader language is absolutely its own thing, though

round obsidian
# tired summit Woah

that library is wild - it works cross platform, has no external dependencies, and now will support Vulkan as well as OpenGL

tired summit
round obsidian
worn barn
#

@round obsidian i heard your doing a game engine

#

im also doing one

round obsidian
round obsidian
#

If it produces something other people can make use of, great.

tired summit
worn barn
#

but its javascript though

tired summit
#

I mean like y

worn barn
#

not python

round obsidian
#

I'm not familiar with JS except through what little I use it for front-end work, unfortunately

tired summit
#

Their project is completely python

worn barn
#

il make a custom lang like gdscript i guess 🥀

tired summit
#

So, uhh you can work together maybe

worn barn
#

later

cold pelican
#

Made a algorithm, in python and roblox.

I can copy any minecraft world or any map of any size even 10-100million blocks into roblox with 0 lag.

junior crypt
cold pelican
#

As roblox studio starts lagging with even 30-40k blocks so it is a big deal that i can add 10million+ blocks

humble glacier
cold pelican
humble glacier
#

Block Pallete, Fyling, Hot Keys, Fill, Line, Elipse, Cube, Sphere, Hemisphere, Copy, Paste, Union, Intersection.

#

Saving Voxel Models to seperate files

cold pelican
humble glacier
#

Oh I just heard minecraft and wanted building features

cold pelican
cold pelican
humble glacier
#

I like building and playing dungeons

cold pelican
humble glacier
#

Minecraft adventure maps

#

Sort of like metroidvania maps

cold pelican
#

Yeah, i would be able to add any kind of minecraft build or map in my app, even something like this

#

or this or literally any minecraft map

#

@humble glacier is this what you mean by adventure maps?

verbal quiver
#

are you working alone on this?

cold pelican
verbal quiver
#

oh nice

#

i saw that

cold pelican
verbal quiver
cold pelican
verbal quiver
#

when did you started python ?

cold pelican
verbal quiver
#

high school?

cold pelican
#

so probably 4-5 years

verbal quiver
#

do you know other languages or only python

verbal quiver
cold pelican
#

so only about 20-21 months of scripting and making games

verbal quiver
#

oohhh

#

what about 3d modelling or game art stuff

#

reach me out if you like

cold pelican
cold pelican
#

or like portfolio?

cold pelican
ebon crystal
#

Saw that there is PyWeek soon and I want to try it, but I have zero experience in a game dev. Only that I know is how to use Unity and Godot.

So a question is: is it possible to learn any of the libraries like Pygame, Pyglet etc. for a week?

glossy moon
#

most of libraries like that are conceptually simple, but you'll have to learn the basics of "from scratch" kind of gamedev: organizing your own event loop, organizing the way you store data, there's no "nodes" or "entities" or other concepts provided by an engine, it's up to you

glossy moon
#

the API of these libraries is roughly "create a window", "check input events", "load an image file", "display an image at the certain coords", "play a sound", and then you make a game 🙂

ebon crystal
#

Okay

#

BTW, if comparing with other engines, is it easier to create a game in Python?

glossy moon
#

Depends on what you are used to. I was occasionally making small games without engines for a long time, so a typical engine like unity just feels overly complex and overwhelming to me

#

But I imagine it will work the other way around: someone with 10 years of unity experience will probably be lost without the engine they are used to

#

for gamedev the two major "pain points" of python are certainly speed and distribution

ebon crystal
#

C is compiling and Python is not

glossy moon
#

the performance issue is a bit more complex than "compiling vs interpreting"

#

CPython is fairly slow compared to many other runtimes, but you can use pypy instead. And for a small mario-like kind of game, even cpython speed is more than enough even on a modest modern hardware (aka you'll be fine on a 15 years old laptop)

#

the main reason why python is slow is not the bytecode interpretation process, it's the fact that every operation is generic in runtime. To do c = a + b python has to at this point see what is a, find its addition method, and call it (and function calls themselves involve some more dynamic dispatch), and then this procedure has to check the type of b and only then the addition will happen. While something like C knows during compile time that both things are int so it can emit a very specific CPU instruction for adding two numbers specifically

#

so even if you remove the interpretation process (which is what nuitka does), the naive process of doing a + b in python still involves maybe 50 operations instead of a single operation which a C compiler would emit

#

dynamic languages like python or js get fast via code specialization: the runtime either statically proves that both things are always ints, or it gathers statistics, that these things are typically ints, and then it emits specialized code for adding two numbers, perhaps with a check that if things didn't happen to be numbers, they will go via a slow generic route

ebon crystal
#

Understood. Thanks for a detailed explanation!

When I said about about a compiling, I mean this, but seems I used wrong terms or it wasn't so obvious :)

glossy moon
#

technically compilation just means "transforming one language to another", and cpython does that, it compiles python to its internal bytecode representation

#

also languages themselves are not compiled or interpreted, their implementations are. Nothing prohibits you from making a python compiler (nuitka), or a C interpreter (picoc, cling and some others). A lot of early pascal implementations were bytecode interpreters, not unlike (early) java or python. But then some languages benefit more from a compilation process by having more static type information available at compile time

ebon crystal
#

Understood. It's so interesting, but I didn't dive in this topic still and for now all I know is that programming language has a syntax and a compiler uses this syntax to transform source code to binary code that represent commands for a processor

UPD: rephrased a sentence

glossy moon
#

that's a rough idea, yes (except not all compilers compile directly to the CPU code)

#

Another random bit of gamedev related information: if you are going with pygame, I suggest using its fork pygame-ce, seems to be more actively maintained, works with the latest python version

ebon crystal
glossy moon
#

most of them aren't overly different in how you will use them to make a game. They may differ in features you may or may not care about (like support for shaders and other GPU stuff)

#

there will be some sort of init code, and then some sort of infinite loop in which you'll handle input events (I guess some of the events would quit the game, so technically the loop isn't so infinite), and then draw something on the screen (and play sounds etc)

#

after going from pygame to some other library I was like "woah, you can easily rotate images" 🙂

#

(not sure what it does now, but back then pygame was a fairly thin wrapper over CPU rendered SDL surfaces, and rotating images as you draw them wasn't really feasable because it's a somewhat expensive operation)

noble hull
#

Hi

ebon crystal
#

👋

ebon crystal
noble hull
#

Print (‘hello every one’)

ebon crystal
#

!e print("Hi")

frank fieldBOT
glossy moon
#

hm, pyweek, game jam, next week you say

#

maybe I'll try it, didn't participate in gamejams for… 12 years at this point

glossy moon
ebon crystal
glossy moon
#

yeah, single button control

#

it was actually very inspired by a PocketPC game I forgot the name of

ebon crystal
#

If add some visual and audio, then it'll be perfect for a mobile even for now (especially, when even a poor optimized game made on Unity can be on a top of stores lol)

ebon crystal
#

I googled and seems it's a mobile (?)

glossy moon
#

It's a name of a PDA/early smartphone platform

#

pre-iphone, pre-android stuff

ebon crystal
#

I was close

#

omg it's a relic

glossy moon
#

Speaking of relics, I also used a Palm OS device when I was a kid 🙂

ebon crystal
#

Palm OS??

#

Can I ask you something? How old are you?

glossy moon
#

late 90s early 00s PDA stuff

#

I am 32

ebon crystal
# glossy moon I am 32

It now explains why are you know this things :) BTW, where are you from? Seems that you're from Russian or Ukraine (?)

glossy moon
#

from Russia, yeah

ebon crystal
#

I'm from Ukraine

glossy moon
#

hope you are safe

ebon crystal
#

And I'm 18 years old. Forgot to say :)

ebon crystal
foggy python
limber veldt
#

@jade owl Still around? I've made a short card demo with cards as sprites (in a sprite group) and only a couple of behaviors https://paste.pythondiscord.com/KJTQ Clicking any card just flips it over

#

Just looks like so

#

Ideally, I think a game of cards (any kind) should use a Deck() class as a container for all the card sprites with methods like shuffle() and deal() or whatever else a deck of cards usually does

jade owl
limber veldt
#

Yeah, I saw that in your code. I haven't used such a model before so know nothing of that part

jade owl
worthy verge
#

just started learning python a few days ago, pretty proud of this little start to a rouge like i'm working on! I know it's probably pretty janky but its my first time at a big project. If you have any feedback please share!

worthy verge
novel salmon
#

but i wanna say, for the food_chest, you can use player["hunger"] = min(max(player["hunger"], 0), 100)

worthy verge
#

Ty I’ll go change that now then!

novel salmon
bleak ginkgo
bleak ginkgo
#

now I work with ursina (very good for 3D)

worthy verge
lusty pine
#

I made an algorithm that can procedurally generate music in the Style of the NES or the GBA

dense elbow
#

@lusty pine bro do you have more musics like this. I need for bg in video presentation of my projects

lusty pine
bleak ginkgo
#

That’s great!!

cerulean nimbus
tranquil girder
worthy verge
#

I have a little question. If i code my entire game to just be played in the console by typing inputs, would it be hard to give it 2d graphics in the future? I don't even know how to make a game in python with 2d graphics but would it be hard?

opal thorn
lusty pine
# lusty pine it LOOPS too!

Been adding new algorithms. We now have styles for NES, SNES, and GBA, currently working on generating PS1 style midis. Starting on the website this Friday. Here's sample NES style and bonus GBA style song. Still working on refining the SNES algorithms. town_snowy_10.wav is NES style, and boss_foreboding_03.wav is GBA style

worthy verge
amber delta
#

crazy

minor valve
#

what do you guys use for Game dev?

cerulean nimbus
#

Raylib bindings

#

Opengl glfw pygame pyglet ursina panda3d

#

And more

round obsidian
slow copper
novel salmon
#

raylib

vagrant saddle
#

there was also py-irlicht once and godot 3 had python bindings unsure for the 4+

humble glacier
#

Anyone want to make a MUD with me?

zinc pike
#

can you make any game using Python? I know a lot of games use C++ but will Python work?

humble glacier
#

@slow copper hey would you want to make a MUD with me?

vagrant saddle
zinc pike
slow copper
humble glacier
#

You too busy jiggling balls

#

Well if anyone is up for a group project you can dm me.

minor valve
#

whats MUD?

lusty pine
lusty pine
misty raft
humble glacier
novel salmon
#

what's a MUD?

humble glacier
#

Its sort of an dnd online in the terminal

#

Mud is short for multi user dungeon

novel salmon
#

ohhhh

#

well idrk c

humble glacier
#

Well good luck with your programming. I have a friend hopefully he will contribute

tame vapor
#

hey guys help me

cerulean nimbus
round obsidian
#

<@&831776746206265384>

white dirge
#

If you want to share your code/project, see #1468524576479641744 . Otherwise, we don't allow advertising here. Your post has been removed

arctic thistle
#

Hi there.

novel salmon
#

hello

verbal quiver
#

hello

#

would you guys use an AI app that gives you weekend missions??

#

im building an ai app that gives you side quests to complete for anybody who likes adventure and want a break from their boring lives

viral bane
cold pelican
arctic thistle
#

I'm interested in creating a visual novel, but I don't know any programmers. I was wondering if I could ask where to look or if anyone is interested.

harsh panther
#

Suppose I was building a (solo) digital card game, think Magic The Gathering but wayyyyy smaller (16 cards or so). All cards have common stats like name, color, power, cost, etc with different values. Some cards have permanent effects ("give all blue cards +2 power"), other cards have instant effects that resolve once ("put another card from play into the discard"). What would be a good architecture or pattern to implement this? The stats are clearly just instance attributes, but the effects are more akin to functions. I could make a class that has the attributes and do_instant_effect and apply_static_effect functions each with a big if elif that performs the necessary logic based on the card name attribute, but that seems messy. Any cleaner solutions?

strange bone
#

why model that with oop?

#

card definitions are a dict/dataclass/whatever

#

functions implement effects/actions, card definitions refer to those functions

#

I say that because actions probably are going to be shared between cards, so you're going to end up trying to have some class hierarchy, but that'll get messy quick

harsh panther
#

yeah I was also worried about that 😅 whenever I use inheritance I quickly encounter some friction

#

like it's not a good fit

#

how would I write card definitions as a dict though?

strange bone
#

the same way you'd store it at attributes

native cradle
#

If you suddenly received $50,000 at your doorstep, which of these would you spend it on first?

  1. Family
  2. Child
  3. Car
  4. Bills
  5. Clothes
  6. Food
  7. Investment
  8. School
  9. Vacation
  10. House
  11. Savings
  12. Donations”
white dirge
#

!warn 1483307751852736562 You've pasted this message across multiple channels. Do not spam on this server, and respect the channel descriptions.

verbal quiver
woven canopy
#

question. Working on some text stuff for a game, basically characters will store a series of words that may be used to referr to them by their class, race, pronouns, etc. I'm not doing the writing side, but

Pronouns I've got values for

subject (he/she/they), object (him, her, them), posessive (his, hers, theirs), and reflexive (himself, herself, themselves)

For race (lets say basic humans for now, but there are several races) got singular, plural,posessive, and adjectives (human, humans, human's, and human) that's kinda boring so there's also (elf, elves, elf's, elven), (dwarf, dwarves, dwarf's, dwarven) and so on

gonna do lists like these for the various professions and such as well.

As I don't have much if any access to the writing bits... any other things I should include just in case?

(Also do note, I guess eventually players be making up their own races pronoun lists and etc, so on some level it's kinda moot, but will still need all of these variables to store the custom information in)

olive geode
white zephyr
#

how do I start to learn python to make a game

normal silo
frank fieldBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

urban shuttle
#

What are some really important lines of code that you would need to know when starting out coding in python, considering that you've already learned the basics (excluding actually making a game, I only know how to code in replit and have no idea on how to start making actual games)

#

By the way this is something I need for a project at school (year 10) about researching what we see ourselves as in the future, any contribution helps 😄

please consider rule 8 when responding

coral walrus
#

do you mean game dev, or coding with python in general?

urban shuttle
#

mb i mean functions

#

a bit of both btw, preferably an indie game dev

coral walrus
#

print, input, min, max, sum - but it's all subjective at the end of the day depending on what the developer is doing

#

for game dev, I'd say the most important concepts to understand is velocity/acceleration and a little bit of collision logic, so normals, AABB, etc.

urban shuttle
#

thank you so much bro i really appreciate it

minor cloak
#

Happy with my current WIP of a survival game. Also just as happy that ursina is just easier to code than pygame. I just wish they had better docs tho.

white zephyr
verbal quiver
slow copper
#

You can still ask chatgpt to give a gamified mission

#

Also how will you be generating these missions

#

|| through some ai API? ||

humble glacier
#

Hi. Anyone lurking?

#

I want to make a game but don't know what to make.

final shard
humble glacier
#

No

cerulean nimbus
humble glacier
#

3d

#

I think an isometric voxel game would be cool. Inspired by Zelda or Kirby. But I dont think i have the assets.

#

You would get abilities like one allows you to extrude block faces

#

Maybe if I make the game with concept art I can get somone to create better art.

wraith stirrup
#

u can do it with Pygame

worn barn
#

car driving simulator?

#

thats what i made for my first game

#

and no its not pygame.

humble glacier
#

Well i want to make this isometric game. Ill be doing it in C.

worn barn
#

why do a hard game for ur first game?

humble glacier
#

The main issue is I dont have assets and cant make them

worn barn
#

u will probably end up hating game dev

worn barn
humble glacier
#

I like C

worn barn
#

describe the type of game ur trying to build

humble glacier
#

3d

worn barn
#

ah perfect

humble glacier
#

I did above

worn barn
#

describe the game

worn barn
#

u can get assets here

humble glacier
#

Thanks

worn barn
#

il see if im able to help. i have quite some experience in game dev

cerulean nimbus
valid ruin
#

Has someone ever tried ursina to make a 3d game before?

lunar venture
#

Yes

stuck crow
#

how do i get started with maki ng a clicker?

shrewd dagger
#

Hello, I wanted to introduce my first game, secret_console.exe

secret_console.exe is a text-based game — an interactive console with custom commands that hides something beneath the surface. The more you use it, the more you realize you're being watched. The more questions you ask... the deeper it gets.

Developed by a 2-person indie team. Currently in early development — follow the DevLog to stay updated.

GameJolt link:
https://gamejolt.com/games/secret_console/1058721
thanks for your time...

lunar venture
lunar venture
#

!rule 6

frank fieldBOT
#

6. Do not post unapproved advertising.

lunar venture
#

I suggest you take down your message

minor cloak
#

or, y'know.... ask ChatGPT for some ideas... Google around... etc

coarse hill
#

!warn 1372930274526236796 Don't advertise here

frank fieldBOT
#

:incoming_envelope: :ok_hand: applied warning to @ancient trail.

uneven bridge
minor cloak
#

3D modelling is hard. Been trying to figure out about this texture modelling problem with Ursina. Seems like its fine if I make one from scratch. I suspect the model I downloaded online is just not compatible... probably

#

Ugh I really dont wanna build all of these models... I guess I'll do it Minecraft style. Everything is a cube lemon_sweat

hushed osprey
#

Is this tux?