#game-development

1 messages · Page 11 of 1

quartz fossil
#

Quite a bit.

dawn quiver
#

you said hopefully these mechanics will be useful for games in the future, will you make them yourself or get others to help you?

quartz fossil
#

Both. I'm a coder and somewhat of a writer, but I'll definitely need help from artists.

dawn quiver
#

like 3D models, pixel art, or 2D sprites?

quartz fossil
#

Depends on the project.

dawn quiver
#

that's true

#

I know casting call and deviantart are places to look

#

but that's for the future XD

quartz fossil
#

I think most of all I need people who battle-test my projects in their own games.

dawn quiver
#

yeahhhhhhh

#

wanna make sure what you made works first XD

#

that's gonna be my main problem is finding play testers for my game :/

quartz fossil
#

Well, panda3d-keybindings works pretty well for single-player games, if using Panda3D is your jam.

dawn quiver
#

I'm new to all this, so what is panda3d exactly?

quartz fossil
#

3D engine. C++ core, Python wrappers for everything, easy access to the innards of rendering, but next to no tooling.

dawn quiver
#

Ohhhh!

quartz fossil
dawn quiver
#

0o0 ooh!

#

I think I'd tackle 3D when I'm more experienced in modelling XD I've only tinkered around with it a little bit in blender.

#

I was thinking if I was going to make a single player game I'd do a 2D fighter, with like a chibi art style

quartz fossil
#

Yeah, knowing people who can use Blender really helps; Too bad I'm too busy to become someone like that myself.

dawn quiver
quartz fossil
#

Your game doesn't have to be 3D to use Panda3D for it, BTW; You can just as well make your camera orthogonal (even that is optional), and leave all objects at y=0.

dawn quiver
#

afraid of embarrassing myself Aha! I see ;v; very good to know.

I guess having a beefy program able to render chunks would do me good when it came time for anything involving platforming.

quartz fossil
#

I think the collision detection is an even more helpful tool with that.

dawn quiver
#

I could never imagine making something complex like a platformer or even a 2D fighter by myself though XDD just the idea makes my head spin

#

it's exhausting enough imagining all the artwork I'm gonna have to draw for the VN on top of the programming

quartz fossil
#

Teamwork makes the dream work.

dawn quiver
#

If I had someone to help me program the game then teamwork would make the dreamwork ;v;

quartz fossil
#

Your game may not even be defined yet, but I am already working on its AI. 🙂

quartz fossil
#

Do you know how a chess AI works?

dawn quiver
#

I feel there was a sarcastic joke in there I missed

dawn quiver
#

treat me like an invalid who knows nothing and is just barely scratching the surface of computer stuff

quartz fossil
#

Okay, that makes things a bit more difficult to describe... But game AI is a topic with surprisingly not that many fundamental techniques, most of them building upon one another. And that is a mountain I'm currently tackling. I've written the Tic Tac Toe rules yesterday in a rather abstract fashion, and I'm now starting to write a search engine that will search for the best move for a player to make. I know a whole bunch of techniques to help with that, and so when I am done, I should have an AI engine that can find sensible moves for any game that can be described as a certain set of functions (which should be pretty much every game).

dawn quiver
#

it's just building off of each other

#

I'm pretty sure I saw a few people in the programming hell reddit actually have issues with their tic tac toe AI code, gosh if you're gonna be doing that with CHESS I can't imagine the nightmares you must be having XDDD

quartz fossil
#

One technique I want to bolt onto that is Monte Carlo Tree Search. That's an evaluation function that has the interesting property of not needing to know anything about what makes for a good move to play a game. So if you can define your game as state = initial_state(), moves = legal_moves(state), winner = game_winner(state), and new_state = make_move(state, move), the AI should immediately be able to play the game somewhat sensibly.

#

Err, why? To me a game is just the set of those aforementioned functions (and probably a few more to encapsulate some game-specific knowledge), and I don't need to care about the specifics of those.

dawn quiver
#

but with the other code you just laid out I guess it wouldn't be much more complicated than what you already mentioned

fallow finch
#

what are you trying to code

quartz fossil
#

It's a more complex games, and LOTS of techniques exist to improve any given game's AIs, but those are questions I can leave to people implementing a given specific game.

dawn quiver
fallow finch
#

you

dawn quiver
quartz fossil
fallow finch
dawn quiver
#

^ @fallow finch

fallow finch
#

uuuuh

#

lag in visual novels wtf

quartz fossil
#

...because in the end, chess and The Sims are not that unrelated. 😆

dawn quiver
dawn quiver
fallow finch
#

i don't get the point at all

#

how can it lag

#

i don't really know visual novels but i made some games with dialogues and choice, i just had an array of booleans with "states" and each part of dialogue was a label, some choice can lead to different labels

quartz fossil
dawn quiver
# fallow finch i don't get the point at all

So when you click a choice it opens up another path in the game because of that choice, great, you get your new dialogue, but NOW you're stuck in a folder where you have to copy and paste the rest of the basic dialogue and keep building and building and making new folders to adhere to the choices.

dawn quiver
#

well I wasn't I was agreeing with you in a sarcastic way

fallow finch
#

why would you do this

dawn quiver
# fallow finch why would you do this

_<;; I haven't done anything YET I have like two more endings to write I was asking because I saw it somewhere else when I was learning about coding!

fallow finch
#

when i make a game with dialogs i use a boolean array with a lot of conditions in the game

dawn quiver
#

I just thought I'd get early clarification since the choices come pretty early in the game

fallow finch
#

and dialogue parts can have conditions based on the states

fallow finch
#

well the array is in the save

#

like, i made a game with 300 conditions + 200 conditions involving items

#

and dialogue/text can change depending on these booleans

quartz fossil
#

Last time I was using a Finite State Machine that used a state, and the nodes of which were functions taking that state to generate the node's representations and connectivity for that visit, but I doubt that such a jargony explanation is helpful. 🙂

fallow finch
#

just don't use real folders for choices lol

dawn quiver
dawn quiver
fallow finch
#

this person is talking of things that look way more advanced than a visual novel game

quartz fossil
#

Wat I can recommend, however, to forego the visual aspect for now, and use print and input as your frontend. That frees you up to think about how you want to implement stories practically immediately.

fallow finch
#

just think of how to implement your string files

#

like, each dialogue part can have a label
1 - blah blah blah ; yes = goto 5, no = goto 2

quartz fossil
#

Hardcoded dict. De-/serialization is a problem for later.

fallow finch
#

no for a game with a lot of text its bad

#

use a json file, they can be modified manually super easily

quartz fossil
#

Yeah. But for a prototype it's not.

fallow finch
#

its better to have the right tools

quartz fossil
#

The right tools usually are available anyways. It's also important to know how to architecture things, and for that it is helpful to have a few failed prototypes.

dawn quiver
#

I mean I was gonna do like a test run with one route before I just dumped the whole text into the engine

fallow finch
#

you can load everything in memory for your first thing yea

#

and even your whole game may not be that big

#

it's just text, bitmaps take a LOT more space for example

dawn quiver
#

so far we're at 252 pages

fallow finch
#

pages of what

#

paper ?

quartz fossil
#

I mean, JSON is a right answer here, but its question is "How do I load/save the game?", and the question before that should be "Do I need to do that already?"

dawn quiver
fallow finch
#

that's gonna be hell to rewrite

dawn quiver
fallow finch
#

well nice

#

but you said dialogue code

#

so i guess you have to add the code part

quartz fossil
#

What is your story's underlying structure? Pure tree? Something like Choose-your-own-adventure books?

fallow finch
#

visual novel is just about choices afaik

#

so its a tree but different things can lead to same thing

dawn quiver
fallow finch
#

yea, what goes to what

#

its like the books where you're the hero

dawn quiver
fallow finch
#

for me tree means every choice leads to different choices but i'm maybe wrong

#

in a game with decisions a lot of things can lead to the same thing

fallow finch
quartz fossil
#

Nope, that's right. A tree is when each node has zero or more children, but only one parent (and the root has 0).

dawn quiver
quartz fossil
#

May I interest you in Directed Acyclic Graphs, in case that different sequences of action still lead to the same game state?

fallow finch
#

i mean with simple labels its not a problem

#

a lot of decisions can goto to the same label

#

its where the magic happens

dawn quiver
fallow finch
#

thinking of a graph is probably not a good thing to do for beginners who want to have fun making a game

dawn quiver
#

yes please keep in mind I am very new to all this OVO;;;

quartz fossil
#

Yup, that's a possible and popular way to use DAGs.

fallow finch
dawn quiver
#

and what you just described doesn't sound like it's what I want for the game since this game is very linear, you get 2 options each choice you make that leads you closer to a bad ending or a good ending

dawn quiver
quartz fossil
normal silo
#

A connected acyclic graph is a tree, a disconnected one is a forest (multiple trees). You may be familiar with a decision tree in story focused games. Each choice causes a branching. The leaf nodes are the different endings to the game.

dawn quiver
#

...................wait now that I'm looking at it that might actually be what my game is

#

._.;;

#

how did I get here from just giving two choices to the player? o~o;;

normal silo
#

However, most of these games have decisions that don't actually matter, they rejoin with another decision down the line. This would imply a cycle in a normal undirected graph. But since we can't go backwards in time we use a directed graph (one way edges), so there are no cycles.

quartz fossil
#

You came upon people with too much knowledge? 🙂

fallow finch
dawn quiver
fallow finch
dawn quiver
#

I think like each route has 3-4 choices that can give you a good or bad ending

normal silo
#

All this math talk just boils down to something like this:

dawn quiver
normal silo
#

You have some scenes, and your choices move you to different scenes.

dawn quiver
fallow finch
#

but not for a complete game maybe

#

or it can be good to have

#

but you don't need it to make the game

dawn quiver
#

OH

#

ok I get it, a bit, I mean

normal silo
fallow finch
#

search algorithm ?

#

for a game when you choose something in a dialogue ?

#

they're not going to check folders in folders in folders to find what file is the right thing...

normal silo
quartz fossil
#

Yeah, it's really not applicable to a visual novel.

#

Well, it is, for automated tests, and cycles in the story would make those... problematic.

normal silo
dawn quiver
#

@quartz fossil was talking about game AI :3 I had a different question but we delved into a whole different thing XDDD lol

lilac solstice
#

I have question about typical architecture for game object. I have a gameobject class in my engine that handles objects in the game world. I want objects to have certaint traits (Damagable, Destructable, Movable, Triggers, etc) and interact with other objects. I also want to give traits to objects based on a json definition at runtime. My current route is to have several member 'trigger' functions that are always called (update, move, damage) and have trait objects that register as a callback whenever a relevant trigger function is called. The problem I run into here is that game objects do not know which traits other objects will have so I will have to do alot of checking and it doesn't feel very clean.
An alternate route that i've thought of is to have subclasses of game objects and create new class objects dynamically using multiple inhertance. But this also feels overly complicated. Is there some obvious solution to this that I'm overlooking?

#

Or does anyone know of an existing engine that has a good solution that I can draw inspiration from?

sharp lake
#

Hey, I'm trying to make collisions in my game, I have everything done that should work, but I have this error and that don't make sense

#

If I create "tiles" without being and attribute it say it doesn't exist, even if I import it, and when I create it as an attribute it says it's an object

#

My goal is just to create collisions where in my list (where each number represent a tile of 32x32), there is a 1

#

But I have these errors

normal silo
calm trench
#

anyone free to help me with a code?

cursive rivet
dawn quiver
#

братва

#

помогите по братски

#

как слышно

#

але

#

але

#

але

#

не могу справится

#

с жестким аналом

#

проблема большая

#

не могу держаься

#

помогите мне

#

пожавлуйста

#

я даже не знаю что делать

#

просто помогите

#

пожалуйста

#

помогит

#

епомогиет

#

помогитеэ

#

помогите

simple wyvern
#

is %appdata% used for configs?

fallow finch
simple wyvern
#

i just said that

versed aurora
versed aurora
#

it depends on how you set it up

fallow finch
#

its fine for simple games but if you need more than one file appdata >>>>>

versed aurora
#

i mean, afaik it's just a folder, no?

fallow finch
#

wdym

versed aurora
#

like it's the same as any other folder, you could just store it wherever

#

also unless you expect your users to manually set config, it shouldn't matter if it's in appdata because you'd want to modify it in-game anyway

fallow finch
#

UsEr-SpEcIfIC cOnFiGuRaTiOnS

versed aurora
#

oh if it's user-specific, then sure

fallow finch
#

i mean you generaly don't care

#

but i think 90% of apps do this for that exact reason

versed aurora
#

also one concern i would have is that other OSes don't have an appdata folder afaik

fallow finch
#

there's a similar thing ?

#

idk but i'm pretty sure mac has an appdata-like thing

#

also, updates. noooo you DON'T want to erase user configs 😂

#

simple apps don't have updates but well

versed aurora
#

yeah that's true

fallow finch
#

ah yea and if you uninstall

#

the configs will stay

#

i think i found all reasons lol

#

maybe some configs are relative to different apps at the same time too

torn jackal
#

Hello guys, I am currently mking a video game coded with Pygame, but I have a question : does convert() makes the images at the right size for every screen ?

prime grail
#

hey, I need to make a game in python that teaches people the basic concepts of programming in python, such as data types and variables, using and defining functions, loops (while and for), and the stuff like inputs and outputs. I need to use the pygame import and the game needs to be fun and educational with a decent amount of interaction and a simple looking UI and it needs to be beginner friendly, I plan to create a small quiz after each programming concept level.

Each concept will have its own level so right now i have level 1 for printing text, and i have a final level (level 5) which is a bonus level.
I need some ideas for:

  1. datatypes and/or varibles (for my level 2)
  2. while and for loops (for my level 3)
  3. Arithmetic operators and comparison operators (for my level 4)

Does anyone have any ideas on what game I could make for these levels or if you have any other ideas for the level topics. Any ideas or suggestions is appreciated.

fallow finch
#

or something like the weird rayman games to learn spanish

prime grail
eternal vessel
#

so no, convert doesn't change the size based off the screen

fallow finch
#

it converts to the pixel format of the display surface

#

you have to do this pretty much all the time, otherwise blitting is slow

calm trench
manic totem
#

why it cannot access the lives variables

def main():
    run = True
    FPS = 60
    level = 0
    lives = 3
    player_vel = 6
    main_font = pygame.font.SysFont("bitmap", 40)

    enemies = []
    wave_length = 0
    enemy_vel = 1

    player = Player(240, 500)

    clock = pygame.time.Clock()

    def redraw_window():
        WIN.blit(BACKGROUND, (0, 0))

        level_label = main_font.render(f"Level : {level}", 1, (255, 255, 255))
        live_label = main_font.render(f"Lives : {lives}", 1, (255, 255, 255))

        WIN.blit(level_label, (10, 590))
        WIN.blit(live_label, (WIDTH - live_label.get_width() - 10, 590))

        for enemy in enemies[:]:
            enemy.draw(WIN)
            if enemy.y + enemy.get_height() > HEIGHT - 50:
                lives -= 1
                enemies.remove(enemy)



        player.draw(WIN)


        pygame.display.update()```
pine plinth
#

Because it is not defined in redraw_window at the moment when your code is doing lives-=1

#

You should add nonlocal lives into inner function

manic totem
#

nonlocal lives?

tranquil girder
#

look into scope and the global keyword. if you have the variables in an object instead, it can save you a lot of trouble

jagged quarry
#

hallo guys

fallow finch
#

try to use oop

versed aurora
#

using globals isn’t the worst thing ever but try not to use them too much

versed aurora
#

and yeah as denball said there’s ‘nonlocal’ (which to be honest, i hadn’t known about until they mentioned it) which is used in nested functions apparently

#

as an example:

value = 1

def function_1():
    value = 3
function_1() #value is still 1

def function_2():
    global value
    value = 3
function_2() #value becomes 3
versed aurora
#

it's a lot simpler that way because you can just handle that with something like player.update()

quartz umbra
#

I'm struggling to open a python game I want to mod into my IDE could someone link a tutorial or give some instructions

slow rose
#

hello guys i know it dosent have anything to do with python but what should i use for game developpment C++ or Rust? (2D or 3D)

fallow finch
#

there's bevy for rust but that's all

covert lagoon
fallow finch
#

still, C++ is so much more used, its the best thing to use

covert lagoon
fallow finch
#

unreal is superior to everything but is mostly made for realistic 3d games

#

for a 2d game or a simpler 3d game unity is better

covert lagoon
#

And use godot if you don't want to deal with licensing stuff or you like foss

sweet shard
surreal olive
#

Help, cannot use external modules on Linux . I have the same problem with matplotlib

torn jackal
#

to be more readable

#

Hi guys I am currently making classe for my video game and i am totally stuck on a problem, i would like that a bullet follows a path in the direction of the player, i have the player pos, the shooter pos and its angle. Please help !

surreal olive
#

Its not about the text, pygame cannot install

urban hemlock
mighty hemlock
#

💀

versed aurora
versed aurora
tranquil girder
proper peak
#

wow, great eye lemon_eyes

fallow finch
#

yea, i got a similar problem with a file called json.py

surreal olive
#

Everyone who helped me, thank you so much. You really helped me.

fallow glade
#

Welcome on their behalf

pseudo bobcat
#

you dont do that unless its a class

gentle flame
#

i have a game that asks randomly if im still online. I would like to write a program that recognizes the image below and clicks on it.

pine plinth
#

Im pretty sure that it is against rules of that game

eternal vessel
fallow finch
#

i hate def main() in python

eternal vessel
#

what for?

jagged quarry
#

d

fallow finch
#

it's not java, there's no reason to make a function called main

#

just so it looks like c or java

tranquil girder
#

I agree that it looks worse, but as long as it's faster when the code is in a function, people will keep doing it

fallow finch
#

the problem is calling it main

#

when i make an oop project, i use an object for the root class and i call the start method run

#

who wants to see a line calling main() 🤮

eternal vessel
#

lol

fallow glade
eternal vessel
#

yup yup

proper peak
fallow glade
#

The underlines

#

warning marks

fallow finch
#

idk whats wrong with the if name = main thing

random warren
#

Hi guys! I would like to share my first project, it's a text-based football manager game that simulates the 2022 World Cup. If you have any ideas or feedback, I would greatly appreciate it! The game is currently in portuguese, but I plan on doing a translation in the future. The game is very simple, and I think you should be able to play it without many problems if you give it a try.
https://github.com/wesleyfuchs/worldcup-manager-game

GitHub

footballmanager like game. Contribute to wesleyfuchs/worldcup-manager-game development by creating an account on GitHub.

brisk yew
quasi patrol
quasi patrol
foggy python
#

yes

blissful cape
#

any reccs for good yt tutorials/youtubers to watch for when youre new to pygame

knotty thorn
#

DaFluffyPotato is pretty great ngl

#

I'd start by watching clear code to get the basics

#

But I can tell ya once you got the basics, go and watch DaFluffyPotato. He's pretty experienced knows his stuff well

blissful cape
#

any clear code videos specifically or is it his pygame tutorial series

#

cause i was following along with those and i got to around ep 6 until i realized i didn’t actually rly completely understand what was going on, i was just sorta copying everything

knotty thorn
#

The question is do you not understand the functions? As in that you don't know how the inner workings of let's say the pygame.draw.circle function work or do you struggle with the Logic?

tawny smelt
#

Does anyone know any good places to get game assets?

I’ve tried itch.io but it doesnt seem to have alot of “full game kits”

I’m looking for asset packs that include the player, the enemies, overworld etc… all in one

brisk yew
#

you could... draw all of that yourself

#

otherwise someone recently suggested a place, lemme find it rq

brisk yew
brisk yew
# blissful cape cause i was following along with those and i got to around ep 6 until i realized...

well, have you made pong yet? it's a pretty simple game and covers the concept of collisions somewhat but you can actually add game state stuff to pong and what's great about that is that you don't need tons of code for game logic which lets you explore these other areas of game dev more easily, for example, states, like game state, pause state, menu state and so on (you could call them scenes too)

#

and it's fine if you copy some code, like, if you wanted to go and now create your own project, you could copy some code from tutorials that you're really struggling with, but try to come up with the rest yourself and that might let you escape le tutorial hell more easily, but in general the idea is that you just try to create a project independently, the tutorial should've at least introduced you to some capabilities of the library and you can then use that to work on your own project

fallow finch
#

and you're not going to get 100% the assets for a game at the exact same link

#

opengameart exists but you'll get even smaller spritesheets

tawny smelt
#

What would you suggest? Should i mix and match similar assets from different creators??

fallow finch
#

and do you know what game you want to do ? if you want to grab everything from one thing that means you don't really care of artistic part of your game

fallow finch
tawny smelt
#

Makes sense. Cool i see what i can do

fallow finch
#

especially if you use 16x16 or 32x32 art

#

there's so much on the internet

#

higher resolution stuff is harder to modify when you know nothing

lilac garden
#

I think there are some all on ones there

#

But definitely good assets either way

dawn quiver
#

Hey guys, I'm currently a student in software eng. and I am a novice in programming. I wanted to know if there is any websites with some kind of bootcamps/projects you recommend to a beginner so I can continue learning by myself by creating in the summertime? Would love to learn how to develop games eventually although I am not sure it's the best way to start. Much appreciated!

grim rover
marble jewel
#

Link to my latest Pygame tutorial video: Image Rotations Around a Pivot Point: https://youtu.be/-a4XPffa8Xg

In this video I show you how to rotate images around a pivot point using two examples. In the first example we create a rotating spikeball common to many side scroller games. In the second example we rotate a weapon image around the center of the screen to point in the direction of the mouse, another common feature in sidescroller and topdown ga...

▶ Play video
blissful cape
blissful cape
knotty thorn
hushed haven
#

Hello i a currnetly trying to install pygame and it is telling me distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ yet when i check i have Visual Studio Community 2022 17.5.5what can i do to fix it?

marble jewel
#

@hushed haven try installing the latest version of pygame-ce

pip install pygame-ce
brisk yew
dawn quiver
fallow finch
dawn quiver
fallow finch
dawn quiver
#

I have the block rendering

fallow finch
#

that would push python to its limits or at least make something finished

#

not just a demo

dawn quiver
fallow finch
#

there's 2-3 pros on making games in python that are very underrated, only known python games are stupid stuff like DDLC

dawn quiver
#

There is a list of pros and cons, and the majority are pros.

fallow finch
#

i don't think so but the pros are really pros

#

like, modding in python

#

since it's interpreted its easy to use the language as a modding language, and python is easy

#

an other pro imo is cheating, cheat engine and other cheat software can't really interact with python

dawn quiver
#

perfomance might be an issue, but we can compile it with pyinstaller

fallow finch
#

even a delta time based on the default time module breaks the speedhack

fallow finch
dawn quiver
#

there might be a limit to it

#

therefore, we can use cpython

fallow finch
#

yea you can't make the biggest games in python

#

but you can do some parts in cython

#

or c, or use numba

#

at least for calculation stuff

dense nebula
#

I am making a top down game and i was wondering how i would make it so that when the player enters the house they would be in the house and when they leave they would be back outside from the entrance?

Kinda like pokemon green/red

fallow finch
dawn quiver
fallow finch
#

and the door will "teleport" the player

fallow finch
dawn quiver
fallow finch
dawn quiver
#

will it have a big impact on its perfomance

fallow finch
#

the main menu shader ? trollbob

#

oh you mean shader packs ?

dawn quiver
#

yes

fallow finch
#

it will be slow for sure if you implement this

#

but well i don't think you should think of shader packs now :p

dawn quiver
#

thats true, it affects computers perfomance

#

ive seen the reports of fps slowing down because of ticks in minecraft

fallow finch
#

shader packs arent even a feature of the base game

dawn quiver
fallow finch
#

only glsl shader in minecraft is the main menu

fallow finch
#

or canvas shaders

dawn quiver
#

Should I use pyglet or pygame for this mc project?

fallow finch
#

pyglet is kinda the equivalent of lwjgl in java, the thing used in minecraft

#

but using a raw opengl implementation like moderngl can maybe be faster than pyglet, i'm not sure

dawn quiver
#

whats the difference of moderngl and opengl?

fallow finch
#

moderngl is an implementation of opengl for python

#

or maybe you mean moderngl vs pyopengl

dawn quiver
#

ive been using the opengl api of python

fallow finch
#

pyopengl feels like python bindings for the c implementation of opengl so it forces c-like code, while moderngl is more pythonic

dawn quiver
#

ive been using raw code this whole time

fallow finch
#

imgur i think

dawn quiver
#

nvm

#

i can directly publish it here

fallow finch
#

it's pyopengl in a pygame.display window ?

dawn quiver
#

i was programming in a raspberry pi

#

it didn't support pyglet

#

so i chose pygame

#

made that in a airplane imao

#

wait wait, let me edit the code so its only for pyglet

dawn quiver
fallow finch
#

what is strange

dawn quiver
#

pygame can render heavy content

#

those images we 5mb each

fallow finch
#

it's not rendered by pygame

#

it's a feature of sdl (the thing used in pygame) to allow renderer to be opengl instead of sdl itself

dawn quiver
#

ohhh, i'm new to game development, i used moved from full-stack web development

#

i might commit more mistakes on the long run

fallow finch
#

some people like DaFluffyPotato use their game screen made in surfaces in their opengl textures

#

so they can add shaders to their games, without really using opengl for rendering

dawn quiver
#

is it possible to use opengl for rendering?

fallow finch
#

well using the pygame.OPENGL flag on the display switches the renderer to opengl

#

you can use moderngl too, it's better than pyopengl imo

normal silo
#

Shaders in graphics typically refer to programs that run on the GPU. If that is what you are referring to, it's one of the things that is the same regardless of language used (C/Python/etc), because none of those run on the GPU.

#

Everything a game is displaying (unless CPU rendered) is going through a shader.

normal silo
normal silo
fallow finch
#

or like 95% i guess

normal silo
#

The biggest issue is that Python does not have the CPU speed needed for many tasks in an open world game like Minecraft. So many parts would have to be C/Cython/Mypyc.

#

(e.g. world generation and AI)

fallow finch
#

i think the game would also have to use multiprocessing, which is not easy to implement and will not be the same code than concurrent in java

normal silo
#

What Python can totally handle is a non-open-world game. The standard linear game type. One with only a few AIs in a scene with a lot of static geometry / elements.

#

(Which is a large chunk of all possible games)

fallow finch
#

minecraft can't really be compared to all open world games

#

an open world game can be light but minecraft isnt

normal silo
#

Open world game's selling point is scale, lots of things at the same time, which (usually) requires more CPU compute. There is also open world in a different sense. It does depend what is meant with that tag. For example one could consider Dark Souls open world. One can go off in whatever direction. But at any given time there is not that many non-static elements happening (and in areas where there was, it lagged (and still does)).

dawn quiver
#

interesting

#

how does Core and Roblox manage their lighting?

fallow finch
#

ais in minecraft is one of the most performance eating parts

normal silo
# fallow finch ais in minecraft is one of the most performance eating parts

Once the meshes have been generated and are not being edited, they are effectively static, just like in a non-world-editable game. In that case AI takes up a lot just like in other games, because other than something like physics, not much else is happening on the CPU in terms of amount of crunching (there is a lot conceptually happening).

#

Which is why many games in the past never had many AI units at any given time, or if they did, it was their specialty (a lot of effort into it).

#

(Or make each unit really basic / dumb (e.g. a zombie hoard, just run towards the player))

dawn quiver
#

it hasn't been 5 minutes

#

and my post got removed

fallow finch
#

is it the official minecraft one ?

dawn quiver
#

no

dawn quiver
#

sorry for the delay

proper peak
# dawn quiver

well, one of the rules of it is "2: Posts to this subreddit must be requests for help learning python.", so makes sense to me.

quasi patrol
sharp lake
#

Hey, sorry to disturb, I was wondering if there is a way to make a sprite look the other way without having to create a mirror version of my spritesheet

fallow finch
sharp lake
#

I have a characher and I want him to be able to look in both directions

#

But I think I found something

fallow finch
#

otherwise you need to create an other surface with pygame.transform.flip

sharp lake
fallow finch
#

yea that's what you want to do most likely

#

you can make the surfaces in the game too and have only one side in your spritesheet image

sharp lake
#

okay, thank you for the answer !

brisk yew
neon horizon
#

How rough of a time am I in for if I were to try and make a fighting game as a way of relearning python?
For clarity’s sake, by fighting game I mean Super Turbo.

dawn quiver
#

How do I code a game on vscode python

fallow finch
dawn quiver
fallow finch
#

any

#

python is a language

#

idle python, vsc python and pycharm python is the same language

#

some ides like pycharm can make a virtual environment for you but that's still python

dawn quiver
#

Ah OK so how do I code a game

fallow finch
#

you use a library

dawn quiver
#

Ye py

fallow finch
#

pygame is pretty popular, there's also arcade for 2d games and ursina3d for 3d games

#

the other ones are lower level

dawn quiver
fallow finch
#

pip install pygame-ce in console

#

to install the package

dawn quiver
#

K then what

fallow finch
#

then you can do import pygame in your code to use its functionalities

#

its like the default libs but its third party (not installed by default)

dawn quiver
#

In pygame

fallow finch
#

pygame is a wrapper of sdl which is made for 2d games mostly

#

you can use opengl to render in it and have 3d

#

but a game like gta5 can't be done in opengl from scratch

#

you need unreal engine 5

dawn quiver
fallow finch
#

there's nothing else available that can make a game like gta5, and even with it you need a large team

#

ue5 is free and you have to pay only i your game makes more than $100k

#

but you'll not make the next gta

dawn quiver
#

I have a big dev team

fallow finch
#

probably not big enough to make a gta-like game

dawn quiver
#

I have 40

fallow finch
#

well they have to learn ue5

#

and you have to manage the project correctly

dawn quiver
fallow finch
#

each person should make a specific thing

#

but you'll need a lot of years to make a game like gta

dawn quiver
fallow finch
#

ue5 can really make impressive games even for a small team, but not a game like gta

fallow finch
dawn quiver
fallow finch
#

making the models, optimizing the code, the game design...

#

5-10 years of learning and 15-30 years to make the thing

#

maybe

dawn quiver
#

I'll make a game now with ue5

#

I've learnt 10 tiny things about ue5

fallow finch
#

you can make impressive games alone with ue5 already, but you should know what you can do and what you can't

dawn quiver
#

K

fallow finch
#

if i make a ue5 game alone it would be a puzzle game with white blocks

#

because idk how to make good looking models

dawn quiver
#

Damn

fallow finch
#

and open world or too large scope kind of game is too big

#

for one guy alone

dawn quiver
#

I will look on fiver

fallow finch
#

aaa games use real actors for the characters too

dawn quiver
#

Oh

fallow finch
#

you can't really make them from scratch

#

maybe in 5 years ai will do it

#

but right now you can't

dawn quiver
#

Ohhhh

#

How do I make fortnite in ue5

fallow finch
#

there's a lot of things like this

#

that you can't do alone

fallow finch
#

or maybe fortnite singleplayer

#

but it's still very big for you and your "team"

dawn quiver
#

How do I do fortnite single player

fallow finch
#

fortnite is years of game design, it's not a game made with ass

dawn quiver
#

True

fallow finch
#

but you'll never make assets and game design like what you can find in fortnite

dawn quiver
#

True

fallow finch
# dawn quiver True

looks like you don't know anything about game design, here's a list of things you and your "team" will never make :

  • any aaa game
  • mmo, any multiplayer game with big public servers
  • open world (at least like what you can find in aaa games)
  • human-looking characters
  • game design of large game with no real issue (even aaa games have some generaly)
  • thousands of 3d models
  • game with regular updates, even one per month is most likely too much
#

you can still have fun with ue5 and make great games in it

dawn quiver
#

K

#

Yo I need some game devs to help me on a game with ue5

fallow finch
dawn quiver
quasi patrol
#

or pyglet

dawn quiver
#

I'm not going to use pyglet.gl, because it has less features, and can be a hazard on the long run.

fallow finch
#

or pyopengl

#

i found this guy making a python mc game on youtube but it's infinished

#

Episode 13: unavailable
Introduction episode: https://youtu.be/YgvNuY8Iq6Q
Episode 12a: https://youtu.be/cWu-4ohrU1A

GitHub link: https://github.com/obiwac/python-minecraft-clone/tree/master/episode-12
Discord server (if you need help, don't hesitate to ask!): https://discord.gg/Rd5cKzn

Further reading:

Full lecture on linear differential equ...

▶ Play video
#

it's the best recreation i can find actually

brisk yew
neon horizon
#

Fair enough

shell scroll
#

I updated ROTA with a Day/Night Cycle and Weather System! (:

dawn quiver
dawn quiver
#

I'm going to use OpenGL API and not morderngl because the lack of low level control

fallow finch
#

what is opengl api

#

pyopengl ?

dawn quiver
#

yes

#

i still get confused with import OpenGL.GL as gl

fallow finch
#

i think they're the same feature-wise

#

moderngl just allows more python-friendly code

dawn quiver
fallow finch
#

not really relevant

#

you're new in importing python packages ?

dawn quiver
#

its been like that for a while

fallow finch
#

you generaly don't use the full name especially when they're "sub-packages"

#

like, import pygame as pg

#

or import numpy as np, nobody in the world doesnt import numpy like this

dawn quiver
#

Yo

fallow finch
#

it's just better to use small names

dawn quiver
#

Anyone has a game suggestion pls I don't need snake game or doraemon

fallow finch
#

and you can import an other package / other version of a package as the same name

dawn quiver
#

Haven't used numpy in a while, might need that to define the vertex of the block

fallow finch
#

well no

#

you can use numpy with opengl but generaly not for this

fallow finch
#

you're saying it's too recommended but idk that game

dawn quiver
#

Doraemon

#

see one example:

OpenGL.error.GLError: GLError(
    err = 1282,
    description = b'invalid operation',
    baseOperation = glGenTextures,
    pyArgs = (
        1,
        <object object at 0x000001979EE36D30>,
    ),
    cArgs = (1, array([0], dtype=uint32)),
    cArguments = (1, array([0], dtype=uint32))
)

Process finished with exit code 1
#

I have even the code of doraemon but it's too long

#

i dont know where to look

#

500 lines brainmon

fallow finch
dawn quiver
fallow finch
#

pyopengl forces c-like code and doesnt use the python objects

dawn quiver
#

Rip but at least you did your best , your considered a legend

dawn quiver
#

ima post the code on github, if anyone wants to help me

fallow finch
#

you're using pyglet or pygame ?

#

if you use pyopengl for rendering is there a reason you want to switch to pyglet btw ?

dawn quiver
#

thats my main goal

fallow finch
#

there's pyglet.gl but looks like you're not going to use it

dawn quiver
fallow finch
#

it's easier

dawn quiver
#

if i only had money for copilot 😔

fallow finch
#

moderngl or pyopengl are probably better options to make a really optimized thing

#

but aside rendering, pyglet is written in python while pygame is based on SDL which is written in C

dawn quiver
#

should i use moderngl or pyopengl 🤔

fallow finch
#

moderngl is more pythonic

#

i would recommend this one

dawn quiver
#

does it have other benefits?

fallow finch
#

the point of it is to be pythonic instead of requiring C-like code like pyopengl

normal silo
#

Moderngl does some extra work for you that you would be doing in PyOpengl anyhow.

#

But it will be OpenGL 3.3+.

fallow finch
#

3.3 is so old already

normal silo
#

Maybe you want OpenGL ES or something, up to you.

fallow finch
#

i don't remember having issues with old/new games and opengl versions

normal silo
#

OpenGL 3.3 will be available on pretty much every PC.

fallow finch
#

unlike directx games

normal silo
#

OpenGL ES is you want Mobile / Web too.

fallow finch
#

it was released >12 years ago

#

(3.3)

normal silo
#
Limitations using ModernGL over PyOpenGL?

All the necessary calls are (or can be) implemented in ModernGL. However you can interact with the ModernGL objects from PyOpenGL. If something is missing write an issue or raise a PR.```
fallow finch
#

imagine using pyglet, moderngl and pyopengl at the same time

normal silo
#

Usually, one implements a layer on top of OpenGL that ends up looking like ModernGL.

#

(So if you go with PyOpenGL, you can expect to end up with something that looks like ModernGL, maybe more specific to the task, but basically the same)

#

(ModernGL may be slighty faster since it moves a bunch of OpenGL function calls to C++ (your issue for speed in a MInecraft clone will be chunk generation (both the contents and mesh), not that))

dawn quiver
#

😢

#

might take me days to change from pyopengl to morderngl

#

it has 410 lines of code, and i can't even display a block 😭

fallow finch
#

so years for making mc

#

notch made first alpha in 6 days trollbob

dawn quiver
#

I shall buy my way out of this with copilot 🫡

normal silo
dawn quiver
#

wait, jetbrains doesnt have copilot.

#

only vscode 😦

normal silo
#

I highly recommend not using Copilot as a beginner.

dawn quiver
#

could anyone give me a hand then 😟

#

i really hate using the docs, but its my only option

#

i should of stick with full-stack

#

but there is no backing now

shell scroll
brisk yew
prisma olive
#

turtle how do i make collision ive been trying for ages i cant get it to work

brisk yew
#

you may want to consider not using turtle

#

otherwise what collisions are you struggling with exactly?

dawn quiver
#

if u have an rpg game, and u have different skills, how would u make it: a character recieving the skill class and dmg himself, or the skill recieving the target and dmging him?

tranquil girder
#

the latter makes the most sense to me

#

I've made a rpg battle system with complex interactions, and then I did something like spell.cast(caster, target)

dawn quiver
#

mmm

#

but shouldnt the spell belong to the character?

#

like, if ur player wanna use attack on someone else

#

the main class is the character itself, who has his available skills

#

so something like character.cast('spell', target) or similar

#

no?

#

and then inside cast, u handle the logic

#

make sense having the spells as classes too, so they can have their atk power, element, precision, description, etc

tranquil girder
#

In my game the players and enemies can have the same kind of spells

#

if your system is simple, try to keep the code as simple as possible too

dawn quiver
#

u have the class spell

#

and each character has its own kit

#

of spells

dawn quiver
#

I'm looking for a library to visualize some 3D shapes, plot them in space, and assign them colors. I'm just wondering what the easiest library is to use for this is? I have a tiny bit of experience with Babylon.js but not much else.

normal silo
#

Knowing which class to put such a method on is a common problem in OOP. The correct solution is often a third.

#

Inside either the character or the enemies you can now cast spells, by having them have a reference to the spell system.

reef hinge
#

I got a question regarding 8 directional rendering of a moving npc. I do know for a static sprite you need to calculate the angle between the sprite and the player and round it to determine the octant. But for dynamic sprites (enemies/npc's) there are some extra steps and i don't find them

finite hull
# reef hinge I got a question regarding 8 directional rendering of a moving npc. I do know fo...

Determine the angle between the sprite's current position and the player's position using atan2.
Convert the angle to degrees.
Add 360 to the angle if it is negative.
Divide the angle by 45 to get the octant number.
Round the octant number to the nearest whole number.
After getting the octant number, you can use it to select the appropriate sprite or animation for the NPC's movement in that particular direction.

echo whale
#

where would i start trying to learn game development with python?

#

is there any good videos

eternal vessel
#

Clear Code has good tutorials with Pygame

#

and Dafluffypotato has more advanced ones

prisma olive
#

with turtle how do i clone the turtle while keeping all stuff for it?

like i have a turtle which is a target. i shoot it, and stuff happens. but if i do turtle.clone, the clone doesnt have anything done

brisk yew
#

srsly, you shouldn't be making a shooter in turtle, use a proper game library

brisk yew
reef hinge
#

i am using no pygame its for a task for uni. Most of the game works, i am 100% sure that the coordinate system is right. I just have a problem wtih calculating the right angle i think. The library i use to calculate the angle are numpy(some arrays are done in numpy but numpy isn't used for the calculations) and math. Once it has the angle it needs to assign a octant. That octant can be determined in 2 ways i don't know which one is the best, one is by looking between which limits of the 2d octant and the other is by dividing the angle and then rounding to a number from 0-7

#

@brisk yew

#

the y faces to the left in my coordinate system and the x faces down

brisk yew
#

wait, so you have a way to determine that? I mean, if it works in all cases it's good enough
I personally would probably use pygame vectors for that but yeah

reef hinge
#

well we're not allowed to use pygame

#

Its annoying but we actually have a working game. Only the npc does the wrong walk animation. It moonwalks through the level instead of playing the animation for the direction it is running in

#

its hella weird cause i've tried so many things

#

and none work

#

its as if its cursed or something

proper peak
#

maybe the sprites themselves for that NPC are in the wrong order?

fallow finch
prisma olive
#

a crappy little shooter i need to do for a school assignment

fallow finch
#

but why you decided to use turtle

hollow kettle
#

Guys, Does anyone knows pygame? like Experts? or a middle class?
it would be great to help me out
in my project

hollow shuttle
#

not say that you have a problem

hollow kettle
#

I clearly said, I'm recruiting new people.

hollow kettle
fallow finch
#

you started working on this already, and you're alone for now ?

prisma olive
fallow finch
#

well your teacher is meh

#

turtle can't make games, or at least it was never made for this purpose

#

even tkinter the thing used for turtle is really bad for games

prisma olive
#

the class is learning python as starters

#

the aim of it is to teach us how to code via turtle

fallow finch
#

yes but you can use pygame

prisma olive
#

yea but its not

fallow finch
#

turtle can teach some coding basics but it can't make games

prisma olive
#

so

prisma olive
brisk yew
fallow finch
#

it's easier to make a simple game with pygame

prisma olive
#

ok look i cant decide what library

#

so why complain about it

fallow finch
prisma olive
#

dude

#

why r u so bothered about it

fallow finch
#

because you can't make a game in turtle

prisma olive
#

well i have to, so u gonna help me or not

#

coz i asked for help, so why respond if no help

fallow finch
#

well i can't help you, turtle is drawing shapes and lines very slowly, i don't see how you can make a game with this

brisk yew
fallow finch
#

i know you can

#

but its a terrible thing to do

brisk yew
#

but I can't be bothered to put in the effort to do it in turtle

fallow finch
#

and i can't help anyway

prisma olive
#

thats all i need

#

duplicate a turtle

#

turtle.clone wont work right

brisk yew
fallow finch
#

maybe the teacher just told them to use turtle and thats all

#

a good python teacher should ask to make a GAME with turtle

prisma olive
#

bro stop worrying about my teacher, if ur not gonna help then dont waste my time pinging me about my teacher

brisk yew
#

don't make a game in tkinter, it's as terrible a choice for game dev as turtle

#

unless idk you're making tic tac toe

#

well, you could use pygame-ce
or for pop cat ig tkinter would be fine too

import tkinter as tk


root = tk.Tk()

image = tk.PhotoImage(file="image.png")
label = tk.Label(root, image=image, borderwidth=0)
label.pack()

root.mainloop()
#

it's very similar to pygame

#

alr, I mean, again, you could use tkinter for this since it's just a clicking game

#

well, again that'd be tkinter cuz you don't have to interact with the event loop as much and given the simplicity of the game it would be fine, but otherwise I'd go for pygame-ce

#

is that image located in the same directory from which you run the python file?

#

in the same directory as what?

#

it has to be in the same directory as where you run the python file from which is not necessarily the same directory as the python file

#

tho for sth like this you probably want those directories to match

jovial laurel
#

!pban 468400922100367370

frank fieldBOT
#

:incoming_envelope: :ok_hand: applied ban to @safe crow permanently.

unborn thunder
brisk yew
#

in a way it literally is pygame and pygame ain't that hard in the first place

half sphinx
#

would anyone know where to learn how to make games in pygame, or specifically make 3d games?

#

by any chance?

#

thanks

fallow finch
#

it can be used with opengl to make 3d but it's not the best thing to use

#

you can use ursina3d or pyglet, a higher level opengl wrapper

half sphinx
#

Thanks for the info. do you know anyone who teaches it in full online?

fallow finch
#

there's a lot of videos about pygame, i recommend clear code, coder space and maybe dafluffypotato

half sphinx
#

oh ok thanks

fallow finch
#

clear code has really the best videos for beginners

brisk yew
# fallow finch pygame ?

bruh, they asked about 3d games, you suggested 3d libs and you ask if they want to watch a tutorial for a 2d lib?

fallow finch
#

i don't get if they still want to use pygame or not

dawn quiver
versed aurora
brisk yew
normal silo
#

Otherwise you may end up with duplicate code on each entity.

safe crow
#

how do i play sound on python

dawn quiver
#

wow

#

how not extensible?

dawn quiver
#

a class has its own skill set

#

furthermore, if a class can change to a different class, and u wanna track the skills learnt from other classes, u need to do it the way i say

#

U will end up having somewhere a variable with the available skills

#

so better than ifs checking if the actual class can cast certain spell, have the spells that class can cast as attributes

fallow finch
#

there's winsound for windows but you may want to use something else, like, pygame has a sound/music module

vernal jacinth
#

how could I create an energy system? for example, casting one spell requires 3 energy, while another requires 5, you only get 6 energy per turn?

#

Set initial energy value to 6

energy = 6

Define spell energy costs

spell1_cost = 3
spell2_cost = 5

Prompt user to select a spell

spell_choice = input("Select a spell (1 or 2): ")

Check if user's choice is valid

if spell_choice == "1":
# Check if user has enough energy for spell 1
if energy >= spell1_cost:
print("Casting spell 1...")
energy -= spell1_cost
else:
print("Not enough energy for spell 1.")
elif spell_choice == "2":
# Check if user has enough energy for spell 2
if energy >= spell2_cost:
print("Casting spell 2...")
energy -= spell2_cost
else:
print("Not enough energy for spell 2.")
else:
print("Invalid spell choice.")

I tried something chatgpt gave me for fun but I don’t know if theres a better alternative

dawn quiver
#

guys how can i make enemies disappear after collision

meager locust
#

hey guys, im new to python and im wondering what type of games can be made with it?

safe crow
#

anything

meager locust
#

oh wow okay, thank you

hollow shuttle
#

basically if you have the time and effort and skill you can remake any game you see on the internet in python

marble jewel
#

Latest Big Chungus devlog, now called Isometria, made entirely with Python and Pygame: https://youtu.be/7oEtu0_VmCw Check it out and be sure to subscribe.

In this week's devlog we've rebranded to the name Isometria, added tile animations, updated various graphics, introduced gray blobs and fungo enemies, and show some new wands.

#indiegamedev #devlog #gamedev #gamedevelopment #indiedev #python #pygame #pygame-ce #pythongaming

▶ Play video
fallow finch
#

probably because of a "big chungus" flair

marble jewel
fallow finch
marble jewel
#

and fyi I don't think I ever had an flair or whatever on reddit, the account never worked at all. The first post I made to the pygame subreddit linking my devlog just never got posted, the account literally never worked and was shadowbanned from the start

dawn quiver
#

@fallow finch , have you heard of the new superset of python called mojo?

dawn quiver
fallow finch
#

well idk why you're thinking of metaprogramming

dawn quiver
#

yeah, your right. I got another project in my hand 😅

#

anyways

#

how fast is mojo compared to cpython?

#

supposedly is 100x faster right?

fallow finch
#

45000x for the example that we don't know

#

in general idk lol

#

i thought it was a compiled language but i learnt recently it will be or AOT or JIT or both (?)

dawn quiver
#

remember the mc project we where discussing, do you think its a great time to move the default python content to mojo

#

or just leave it to cython

fallow finch
#

if mojo is really what we're expecting then we should go for it

#

being able to use the python libs with the python code and with ability to add low level control code, it looks like the dream of some python devs

#

but some people aren't really expecting it will be like intended, especially for the python libs support part

#

with the low level control stuff and ability to use packages like moderngl we'll maybe even be able to make game engines, who knows

dawn quiver
#

@fallow finch i imagine that mojo is open-source right?

fallow finch
#

it's not

#

but it will be at some point

#

maybe when it will be rewritten in mojo itself

dawn quiver
#

that "will be at some point" sounds like matlab

fallow finch
#

well matlab is not even free

#

that's terrible

#

imagine having to pay for a programming language

dawn quiver
#

Sounds like their plan

#

@fallow finch, does it say that i can use default python libraries like numpy?

fallow finch
#

the standard libraries of mojo look disappointing tho

#

but that's okay if we can still use the python ones

dawn quiver
#

Better stick to cython until mojo is better

#

I'm not going to risk it

fallow finch
#

you cant really compare

#

cython is mostly used for a part of a library

#

you can't compile a whole project using libraries like pygame or moderngl with it afaik

#

(when i say compile i mean convert to c)

#

mojo is intended to allow this but some people are saying AOT/JIT on all the python third party libs would be impossible

#

mojo will also allow making distributables so it should be good for games, but games isnt the reason the language exists at all, at least for now

tardy oracle
#

not interested enterily about game-dev but, is ursina much better than pygame?

fallow finch
#

pygame is a wrapper of the SDL library which is made for 2d games and multimedia apps

#

it can use opengl to display 3d but that's generaly not how its used

#

ursina is kinda like a 3d engine

tardy oracle
#

well the different is ursine is for 3dd and pygame is for 2d

fallow finch
#

well ursina isnt to 3d what pygame is to 2d

tardy oracle
#

aight i think you are confusing, stop it

fallow finch
#

but yea, ursina makes 3d games and pygame makes 2d games and multimedia apps

haughty agate
#

Is there any link or source where i can download lets us python book for free?

dawn quiver
dawn quiver
fallow finch
#

but it will not give you an equivalent c source of your code

dawn quiver
#

will it make a difference in performance though?

fallow finch
#

nuitka is a bit slower sometimes

dawn quiver
#

slower are compiling, or simply executing it?

fallow finch
#

it compiles the things like the python interpreter does, it doesnt change your code

fallow finch
#

it's intended to be the same speed but idk why this happens

dawn quiver
#

damm, im running out of options

#

i really want mojo to be opensource

fallow finch
#

cython changes your code and can use the hints to use real types instead of emulating python's dynamicness

#

nuitka isnt this

dawn quiver
#

I dont want it to be a freeware

sharp lake
#

Hey, I'm using Tiled and Pytmx to create my maps, but in my game it does that, (the black color is due to the background color not being the same as the transparency color of the tiles), but the problem is the strange decoloration and the objet's color spraying around it.

fallow finch
#

looks like a transparency issue

#

what is the format of the images btw

dawn quiver
sharp lake
#

the tileset is in png, and the map is in tmx

fallow finch
#

but nuitka is a good thing to prevent 99% of people to steal your code

dawn quiver
#

game cheats might be an issue though

fallow finch
fallow finch
dawn quiver
#

when I tried running cheat engine in my python program, I could simply edit some values, and abracadabra; my player was faster than normal.

fallow finch
#

well cheat engine is (or at least can be) useless against python

#

python uses a stack, not just values in addresses like C/C++

#

cheat engine doesnt have support for it, so the values you modify will move in seconds

#

cheat engine is useless against my python games, aside for the "memory view" part

#

even a delta time implemented with python's standard time module makes the speedhack dll useless, while every game in the world can be speedhacked

dawn quiver
#

can code injection in my pyglet game, be a subject that i have to worry about

fallow finch
#

well if you use pickle objects in some files or exec() somewhere where users can interact with, yes

#

there's probably more obscure ways to do it but these are 2 things that are pretty unsafe in python

dawn quiver
#

does pyglet execute its default window with exec?

fallow finch
#

no ? and i don't really get the thing

#

exec() executes code in a string

#

if there's some way the user can interact with something passed in exec() its a problem

dawn quiver
#

is there any ways to prevent it?

fallow finch
#

not using exec() or using it for stuff where the user doesnt interact with

#

that's not like if we use exec() for everything...

sharp lake
fallow finch
#

90% of people never use it, and exec() is a super high level thing we have because of how python uses an interpreter

#

other compiled languages don't have it

dawn quiver
#

is there any difference of exec_() and exec()?

fallow finch
#

i don't know exec_()

#

google tells me it's a Qt function

fallow finch
dawn quiver
fallow finch
#

idk why you're even talking of exec()

dawn quiver
#

i forgot that was imported from qt

fallow finch
#

are you using it actually ?

dawn quiver
#

no just got confused with some stuff

fallow finch
#

there's a problem with transparence somewhere

#

if you don't need transparence don't use png maybe

fallow finch
#

if source isnt a problem and the assets are from mojang

sharp lake
fallow finch
#

but nothing is transparent in your screenshot

sharp lake
fallow finch
#

yea i see non-transparent images

#

and?

sharp lake
fallow finch
#

they're not transparent, yea

#

nothing is

#

in this screenshot

sharp lake
#

yes but how some shapes in the plaforms can be ?

fallow finch
#

i don't see transparent images

#

try to blit on a background

#

they're not

sharp lake
#

okay, thank you

#

that's how I made it

#

But I think your'e right

fallow finch
#

i never used pyscroll so idk if the transparence issues comes from this

sharp lake
brisk yew
#

can you send one of those spritesheets over?

fallow finch
#

they said its png

#

but its maybe png saved with mspaint

#

if pyscroll doesnt cause this, it's a problem with the image yes

sharp lake
#

It's a png, saved as a Tmx

fallow finch
#

tmx isnt an image format

sharp lake
#

tsx* sorry

fallow finch
#

i used tiled to make my maps but i don't use their formats

#

so idk what tsx is

#

its a tileset hm

sharp lake
#

it's the format that I used to save the spritesheet, and then the tmx filed use the different tsx to create the map

fallow finch
#

maybe your tsx file isnt transparent

#

can you send it

sharp lake
#

yes of course, here it is :

sharp lake
#

I have sent it in pm

dawn quiver
#

@fallow finch , do you know how to lock user mouse into pyglet window?

fallow finch
#

if your rendering is 100% moderngl i would say pygame is more solid tho

#

it's based on the sdl library which is made in C and has most of the features you'll need for a multimedia app

#

pyglet is lighter but so it has less features aside rendering

dawn quiver
#

@fallow finch what about performance

fallow finch
#

pyglet is entirely written in python

#

so pygame is probably faster for everything aside rendering

#

i would say pyglet is better to make an other library/framework upon of it

dawn quiver
#

perfect for me then

dawn quiver
#

@fallow finch do you know the cam sensitivity and player speed in minecraft?

fallow finch
#

i never made a minecraft recreation in an other language actually

dawn quiver
#

still stuck on the velocity

fallow finch
#

but you should really consider trying to port or make something similar to the code of the real game

#

are you sure you have to implement this before world generation and all that stuff too

dawn quiver
#

yep, i made a prototype in javascript using three.js

#

i know the concept

#

implementing in python might be my struglle though

#

@fallow finch, do you know how i can lock the camera inside my pyglet window?

fallow finch
#

you mean lock the mouse ?

dawn quiver
#

yes

fallow finch
#

i think thats not the thing to start with

#

but i'll try to find it for you

dawn quiver
#

best regards

fallow finch
dawn quiver
#

interesting

fallow finch
#

there's also the same thing for keyboard

dawn quiver
#

so its set_exclusive_mouse, and set_exclusive_keyboard?

fallow finch
#

yea

dawn quiver
#

it hides the mouse, but i can't interact with the block @fallow finch

fallow finch
#

wdym by interact with the block

dawn quiver
#

when i set exclusive, the cursor is gone; when i move the mouse too, i can't go anywhere

fallow finch
#

well thats not helpful, you're talking of your game logic

#

just debug to see if mouse detection works as you want ?

dawn quiver
#

tried it, but at no eval

fallow finch
#

i don't get it

#

what is a no eval

dawn quiver
#

what im trying to say there is no results on how to solve it

#

two words describe that whole sentence

fallow finch
#

use print()

#

not your engine

dawn quiver
#

everything seems working alright

#

still doesn't let me move my mouse when its True

fallow finch
#

idk what you're talking about

#

just use print() to see if mouse detection workd

#

you can even make a new project to test

dawn quiver
#

the mouse lock does work

#

but the matrix breaks

buoyant gazelle
#

i was wondering what's a good place for 2d game assets that are free to use? Just to use for learning, i would like to make my own at some point but trying to learn a only handful of things at a time

fallow finch
buoyant gazelle
#

browsing through the first one, thanks

dawn quiver
#

do u know any AI that creates 2d sprites?

#

something to start with tho

dawn quiver
sharp lake
#

Hey, I was wondering if it's possible to make a parallax background like this a layer with pyscroll, I'm using pyscroll to render my map, and I make a function of parralax background but it blit over the map, because my map is created with pyscroll and the layer is 1.

leaden jacinth
#

I need a graphics guy for my pygame team

dawn quiver
#

whats good @fallow finch

#

do you think glfw is better than pyglet

fallow finch
#

so it will force c-like code and you need something else for the sound part and probably a lot more stuff

dawn quiver
#

pyglet is limited to certain things

#

i was intrigued to find out you can lock the mouse at a certain position

fallow finch
#

its not limited

#

you just don't understand how it works

dawn quiver
#

.set_exclusive is not a great handler in simply words