#game-development

1 messages · Page 53 of 1

dawn quiver
#

i heard that starting with very low pixels is good for the first game

#

but i guess if you're already a pixel art wiz, go ahead

vestal vessel
#

oh thnx for the suggestion. i guess i will make low pixels for my first game then 😄 ty

hearty adder
#

Hey guys

#

I'm new to python, I've just made some basic projects

#

I want to get into game dev

#

Can you recommend a starting point?

#

Much appreciated thanks.

#

I want to do some basic pixel animation and then move on to interaction

swift jacinth
#

Whats the best game engine for creating an 8 bit game?

still shard
#

@swift jacinth There is no universal answer to that

#

You can use any engine for that, from Unreal to Unity to Gamemaker Studio

#

But try something simple first maybe, like defold? Or try pygame if you want to python it

swift jacinth
#

I see, thanks

frozen knoll
#

And @swift jacinth , there's a lot of resources on that site as well to get started creating 8-bit games.

hearty adder
#

Thanks a lot for the help Paul!

swift jacinth
#

@frozen knoll Thank you, I'll look into it

fading gust
frozen knoll
#

Hi, I'm redoing sound support for Arcade. If you are on Linux or MacOS, I'd love it if you'd try the 2.3.8b2 library (as it is beta, you'll need to specifically select it) and let me know if sound works. Now supports volume and panning. ogg, mp3, and wav should all work.

olive parcel
#

Godot is neat, but despite GDScript's superficial similarity, it's not Python, and you don't have access to the Python ecosystem. This is unfortunately a really crippling flaw to anyone who's used to working with Python, because you lose out on a ton of thirdparty libraries, so any time you need a function that's not provided by Godot itself you'll have to implement it in C++.

dawn quiver
#

isn't there a way to use python in godot as well?

atomic totem
#

Ironically I saw this channel and was just about to ask about GDScript, and rdb answered my question before I even asked it.

ember ocean
#

lol, but now we want to know your question.

atomic totem
#

I was going to ask if it IS python or if it's just like python.

#

Or even if it were "like python", if it could use python assets

grand imp
safe glade
#

^^^^

#

ay brother

olive parcel
#

@atomic totem The syntax is superficially like Python. There are enough significant differences for it to not to be possible to just paste in Python code and expect it to work.

mortal narwhal
#

So I'm currently writing a torn.com rpg game. Just wondering if anyone wants to help and join this? I want to make it open source and run in docker so :)

fading gust
#

heavily inspired by python not python

somber bramble
#

hey guys, any free pdf/ebook for backend game stuff? like creating fights, inventory system, things like that?

vestal vessel
#

so my tile palette is suppose to be 20x20

#

is the reason y its acting up like this is coz i sliced it wrong ??

#

this is my palette

#

??

fervent rose
#

It is hard to say without your code, but yes, it looks like a sampling issue

vestal vessel
#

thnx i will try to fix my sample first 😄 im using unity so no code for this

vestal vessel
#

ok its not the sample -.-

#

any other possible solution? im using grid of 0.2 x and y in unity and my sample are sliced by 20x20

#

i googled it and it said turn off the anti aliasing. but didnt work

frozen knoll
#

What engine are you using? It does look like you aren't aligning to the nearest pixel. Might need to check math or use GL_NEAREST.

safe glade
#

hey guys big question

#

is unity a good gaming ....platform to develop in ?

fervent rose
#

Unity isn’t a gaming platform, it is a game engine, but I see your point

safe glade
#

yeah yeah

#

i don't know a lot of english sorry O_O

fervent rose
#

It depends which plateform you’re targetting

#

’sokay

safe glade
#

uh.....RPG ?

#

i'm trying to create a little RPG game

#

is it ... good ?

fervent rose
#

I mean plateform, such as desktop, mobile, console..

safe glade
#

bruh

fervent rose
#

And also 2D or 3D?

safe glade
#

destop

#

2D

#

desktop 2D

#

3D seems kinda advanced XYZ

#

i'm kinda starting out

fervent rose
#

I think Unity is a good choice yeah

safe glade
#

ah thanks

#

also question .... should i start learning python then unity

#

cause a lot of people say that python is a good langue in code to learn 1st

frozen knoll
#

I find Unity not a great language/platform to get students started in.

#

You can spend a lot of time messing with the UI and graphics and not actually learn programming.

safe glade
#

ok , soo python 1st

frozen knoll
#

That's my recommendation. Then jump to Unity and C# once you have the basics.

safe glade
#

aight thanks

frozen knoll
fervent rose
#

Yep, I agree

#

That sweet little move haha

safe glade
#

ok , i'll remeber that

#

woah

#

this is pretty cool

fervent rose
#

!resources we also have other resources to get you started here

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.

fervent rose
#

Okay nevermind, that’s a full python tutorial

safe glade
#

i'm good

#

it's ok

#

@fervent rose i'll check it out , when i know the basics of python

#

also thanks both of you guys

fervent rose
#

Np lemon_pleased

dawn quiver
#

hey @foggy python , I think you're the bomb diggity and super cool

#

i just downloaded px editor, that tool you (awesomeperson) made

fervent rose
#

What is px editor?

#

It sounds interesting

fierce wraith
#

Paul, I definitely agree. A friend kinda pulled me into learning unity with him two years or so ago. I had been using python for a couple years at that point, he didnt have any programming experience. It was a lot of fun for both of us, especially because you can create things that just work pretty fast. But I have to say, its so easy to just use unity's drag and drop system, write horrible code and always take the easy way out.

frozen knoll
#

It is too easy in my opinion to get stuck on some checkbox somewhere. I prefer text files rather than GUI settings, but can't deny Unity is quite powerful.

fierce wraith
#

We recently did some coding challenges together and it was very obvious that he was lacking the fundamental knowledge for working in a system where you have to actually code systems yourself without a powerful system like unity helping you

#

One of the criteria for the challenge was speed/complexity. He had gotten into the habit of writing very unoptimized code because c# could just compensate. Coming from python I was used to optimizing stuff

#

I find unity allows you to get away with too much too easily by compensating with its powerfull systems.

#

But you cant deny that the power of unity is amazing if you use it right

foggy python
#

@fervent rose it’s a pixel art tool I made

fervent rose
#

_@fierce wraith Unreal Engine 4 when? _ lemon_pleased

fierce wraith
#

i like UE4!

fervent rose
west ingot
#

is pygame beginner ffriendly

fervent rose
#

Not really tbh, you should take a look at arcade instead

vestal vessel
#

@frozen knoll im using unity's, tile map and grid system for this

vestal vessel
#

somewhat mange to fix it but if u see in the video it starts breaking while im moving in the yellow part -.-

fierce wraith
#

if you are using unity we cant really help you with python 😉

#

but there is a unity discord!

vestal vessel
#

oh i thought it was general game development lol anyways thnx for the info

dreamy swan
#

I know it has been asked a billion times...
What is a good library for making a platformer in python?
Note: I want to make a 2d, side scrolling platformer with the ability to also move the camera on the Y axis...

fierce wraith
#

probably not the best lib to use though, id use something like arcade or pygame

frozen knoll
dreamy swan
#

i'll take a look

#

I tried it before but it did not seem to work for me

frozen knoll
#

I usually hang on this channel, so I'm happy to answer questions. Just ping me.

vestal vessel
#

lol they just ignore ur message in unity @fierce wraith -_-

#

posted 2 times it got lost in chat ....

dawn quiver
#

yoo @foggy python your art tool is absolutely awesome, i picked up how to use it in a couple minutes. BIG UPS

#

this is exactly what i needed

dawn quiver
night coral
#

Been snipping some bits from the jam projects... might take a look at that camera in some form

dawn quiver
#

Are there any games on the market that are made with python?

queen surge
dawn quiver
#

Aha Ok - Thanks @queen surge - I guess you cant tell much from Steam what platform was used.

foggy python
#

there's another one too

#

hold on

#

much more successful than mine

#

Just did the math and it looks like it probably made more than $30,000 in profits.

queen surge
#

Oh boy, that game looks good on trailer

foggy python
#

Oh, I just noticed you said Python and not Pygame.

dawn quiver
#

Hmm kool Thanks @foggy python - Ive often wondered if there were any. I use Unity for Game Dev for android but I use python a lot, mainly for testing encryption ideas. Is SwitchCars also made with Pygame?...Wo 30K niice!

foggy python
#

Eve Online uses stackless python

#

Yeah, SwitchCars is Pygame

dawn quiver
#

oh does it wow

#

*looks up stackless python lol

#

With today's most efficient operating system threads on a specially modified Linux variant and 1 GB main memory, it is possible to run about 100.000 Threads. The switching rate is somewhere better than 1 million per second.. With its tiny Python tasklets, Stackless accomplishes similar performance within only 100 MB, but creating a million tasklets. In conclusion, Stackless Python is very efficient and especially suited for simulations with very many autonomous tiny objects.
Okay this looks like its worth looking into.

#

Thanks @foggy python

foggy python
#

Uh

#

That’s useful for MMOs and stuff

#

Not normal stuff

#

Threading is for handling a bunch of processes at the same time (typically used for multiplayer games)

dawn quiver
#

Yeah I'm thinking of simulating huge amounts of mass and early big bang creations so this is exactly what I'm after.

foggy python
#

Oh my

dawn quiver
#

So its a pet dream game I had a while back where the user basically plays around with the physics till the advent of life is created carbon or argon or whatever. So yeh God game with pretty simulations.

#

For now tho - I have to keep my stupendous imagination limited to what I can actually produce lol - hence Android Casual Play lol

fierce wraith
#

@vestal vessel wdym?

vestal vessel
#

asked for help in unity no one is willing to help -.-. anyways i will try to fix it later so allg haha 😄

safe glade
#

question

#

is tkiner a good graphics thing

fervent rose
#

Hmm

#

Nope

#

Haha

#

It is pretty hard to do good looking things with tkinter, it is more a prototype tool imo

safe glade
#

yeah i know ,it's really hard to make

fallen gyro
fervent rose
#

Nice lemon_hearteyes cavedude

wild flare
#

Do you guys use pygame?

fervent rose
#

I try to avoid it as much as possible haha

wild flare
#

And with 3d game development in Python, is it bad or good?

fervent rose
#

It works I guess

#

But it is pretty limited sadly

wild flare
#

I've looked at panda3d but every example game with it looks like its from the 90s.

#

Is that all it is?

fervent rose
#

Well, it is limited haha

#

I didn’t really did a in-depth check though, it might be more

wild flare
#

I really wanted to use my Python skills to try and make a game. 😦 Should I just learn C#?

fervent rose
#

As always, it depends on what you want to do

#

Python can be okay, C# can be as C++ can be okay too

wild flare
#

Is it possible to make multiplayer games in panda3d?

fervent rose
#

Sure

#

Multiplayer (networking) and rendering are totally independent subjects

#

Multiplayer is just about packaging user inputs and/or object positions into a package and sending it to other users, most of the time using UDP for speed, and unpacking it on the other side, and applying some interpolations

#

Multiplayer in a nutshell

wild flare
#

How advanced would you say panda3d is?

#

I'd like to say my Python knowledge is ok. 😄

fervent rose
#

I think you should be okay then

#

It doesn’t seems very complex, but not very easy though

wild flare
#

I think the hardest thing for me will probably be the gameserver as I always use HTTP for networking which won't suffice for a game.

near wedge
#

@wild flare Panda3D is pretty capable of more advanced graphics, but there, sadly, aren't a ton of examples.

fervent rose
#

Yes, you’llhave to use raw sockets

wild flare
#

I just don't want my game to look like a crappy game from 2004.

near wedge
#

@wild flare That's going to be more up to you (or the artist) than the engine.

wild flare
#

I'm ok with Roblox level of graphics.

tawny stratus
#

Unity makes it very easy to make modern looking things

wild flare
#

Unity is C# right?

fervent rose
#

I mean, if the engine doesn’t support displacement for instance, it is going to look crappy haha

#

Yes

tawny stratus
#

Technically also supports js apparently

fervent rose
#

I don’t know if pandas3d support procedural texturing too

wild flare
#

Python is my first programming language.

#

I wanted to learn C# but I couldn't compile hello world without 50 errors so I gave up.

fervent rose
#

But if you want to go for photorealism (or even just 3d actually) I’d suggest you to learn Unreal Engine 4 instead

wild flare
#

Don't people give shit for using Unreal Engine since it's developed originally? by Epic Games?

tawny stratus
#

Just curious, why unreal? Unity seems quite nice for smaller 3d games

#

I have only tiny experience with unity

wild flare
#

Unreal Engine also C# or C++?

tawny stratus
#

C++

fervent rose
#

Or visual scripting!

#

UE4 is the big ass engine running a freakin' lot of AAA titles

wild flare
#

It'll be annoying because kids think Epic Games is poison which destroys everything it touches.

fervent rose
#

It is just miles away from other engines

wild flare
#

But thanks for the recommendation, I was leaning towards Unreal Engine 4 anyway. 😄

fervent rose
#

Yay

tawny stratus
#

But it also seems like it takes a lot more time and effort to get something going with unreal over unity

fervent rose
#

Yes, the learning curve is harder

#

But I think it is worth it

wild flare
#

I always associate Unity with indie web games and then Unreal Engine with AAA games but I may be wrong.

fervent rose
#

You aren't really wrong, even if ue4 also target indie games

tawny stratus
#

Not even just the learning curve. Speaking to people who know both, if they want to make something they just use unity. Unreal seems much more oriented to massive games

fervent rose
#

Do you know the game astroneer for instance?

wild flare
#

A name I haven't heard in years. pogey

fervent rose
#

Well, it is an unreal game

wild flare
#

I played it when it first came out.

fervent rose
#

Func fact btw, pubg is an unreal game haha

wild flare
#

PUBG biggest Unreal game?

fervent rose
#

No

#

Have you forgot about fortnite?

#

Haha

wild flare
#

Fortnite? Like 2 weeks?

#

😄

#

I've seen very basic games in Unreal and they look so good for being so simple.

fervent rose
#

Well, fortnite is probably the biggest ue4 game

#

Yeah, you can do simple things with it surprisingly enough haha

#

But the learning curve is still a bit harder than unity

wild flare
#

Like I saw these kids trying to recreate Fortnite and it didn't look bad.

fervent rose
#

But now that ue4 users have a free access to the quixel suite, I now cannot use another engine

#

Fortnite is kind of they're way to show devs what you can do with ue4 too

#

Like, they're new particle system Niagara was rolled out to fortnite a week before the public release (it was in beta before, only accessible if you build unreal from source)

near wedge
#

@wild flare I would pick something that will be easy to learn and get something done with rather than the maximum capabilities of the engine or what AAA studios are using. The needs of a AAA studio are vastly different than a one person trying to get started with 3D game dev.

#

If you're new to game dev in general, you may want to try out a couple of 2D examples (e.g., create a simple breakout clone) to get a feel for some things before diving off the deep end.

wild flare
#

If I were to make a 2D game for experience, what package would you recommend

fervent rose
#

2D and 3D are fundamentally very different

#

I don't think starting with 2D to learn 3D is any good

wild flare
#

It feels like I'm jumping in at the deep end.

fierce wraith
#

you can always make your own engine 😉 most of the time making the engine becomes the project, but it can be a lot of fun

#

using something like moderngl and learning about how graphics work is awesome

fallen gyro
#

between pyglet and pygame, which one would you recommend for game dev more than the other ?

fervent rose
#

I’d recommend to stay away from pygame as much as possible haha

fallen gyro
#

ah...

crimson zenith
#

Is pygame really that bad?

fervent rose
#

It is just my opinion, but it doesn't fit the learning fun library that it wants to be

iron galleon
#

pygame is ok, but i like arcade's OOP approach better

fervent rose
#

I think I should do a little note about what I don't like about pygame, maybe later today

dawn quiver
#

Anyone want GitHub Student Pack?

fervent rose
#

You want to share your student pack?

ember glade
#

@dawn quiver Please do not attempt to distribute or sell things that would normally require student ID or anything of the like

#

They are not meant for any kind of distribution as part of the terms for getting them

dawn quiver
#

Okay, understood.

ember glade
#

Thank you for being understanding

foggy python
#

@fervent rose I think that Pygame can be a great “learning library” depending on how the person learning thinks. Personally, I found things like Pygame much easier to understand when I was 12 than things that made you use their frameworks for everything.

jovial fable
#

Personally, I found things like Pygame much easier to understand when I was 12

#

alright

#

no offense but that's a pretty unique experience

frozen knoll
#

@fallen gyro Pyglet is more raster-graphics based. It runs on a lot of devices, even the rasperry pi. Pyglet and Arcade use OpenGL and do hardware-based camera panning, scaling, rotation, etc. Pyglet makes it easier to do your own shaders, etc. Arcade is easier to use if you don't want to do that. ModernGL is great if you want to do your own OpenGL code.

fervent rose
#

Oh BTW, I was wondering, does any of those Lib have support for bone animation?

#

I don't think so, but you never know

frozen knoll
#

No, don't think so.

#

I think you'd need to jump languages for that and do godot or C#.

fervent rose
#

Yeah

#

It does make games heavier doesn't it, since you have to build all the animation inside the packaged game, right?

potent ice
#

@fervent rose We do have gltf 2.0 support in moderngl-window that currently loads most of the data needed to support this.

#

So I guess it's more about making the shaders. There are lots of examples out there one can base this on

fervent rose
#

Really? That's great!

sage bluff
#

@fervent rose im making a game engine stronger than pygame , pyglet ect

#

the game engine is gonna be stronger than python itself

#

the game engine im making is called XGame this engine will enable people using python to develop simple but insanely powerful games

dawn quiver
#

@sage bluff sounds interesting

#

have you made any simple games in it?

#

as a test

sage bluff
#

its still expirimental @dawn quiver but it will be done soon

#

'the engine utilizes mingw c++ for building the game

finite fossil
#

yea

#

you use both languages

whole burrow
#

I'm looking for a way to 1) deploy my 2048 clone to a website 2) if this is feasible, add the ability so see someone's board in real time

fervent rose
#

@whole burrow

  1. you should ask #414737889352744971, but usually you'd just make a container of the site app and deploy it online
  2. this depends on your implementation, you'd have the user sending you back the state of his board, and you'd distribute it to spectators
whole burrow
#

hmm

#

what if I want to manage board state serverside?

fervent rose
#

@dawn quiver this spam of global is kinda horrendous to look at, you should use a class instead

#

It would be a waste of resources and make the game slower, but I guess you can @whole burrow

whole burrow
#

I understand it's not efficient

#

hmm

fervent rose
#

Just leave the processing to the client, what harm can it do?

#

You can use an object to store all your game state and pass it around

whole burrow
#

well, I wanted to prevent the user from manipulating the data they send

#

to essentially cheat

fervent rose
whole burrow
#

though this is just a practice project

fervent rose
#

I mean, that's just 2048

whole burrow
#

I know

#

it's more of a practice project

fervent rose
#

Fair enough

#

So yes, you can do the processing on the server then

#

Or even better, to avoid connection delay, check if the state sent by the user is correct

whole burrow
#

yeah

#

essentially I send coord

#

of the spawned tile

#

and receive the board state from the client and check if it can result from the existing board state

fervent rose
#

It is explained in the article, you should read it first

#

You can have the client create the tile

whole burrow
#

this might also be userful @dawn quiver

fervent rose
#

Imagine that the client have an horrendous ping, like 1s

whole burrow
#

ah that's fair

fervent rose
#

Everytime they make a move, they'll have to wait 1s for the tile to spawn

whole burrow
#

is there a way to pre generate them

fervent rose
#

In a game it is always a balance between security and user experience

whole burrow
#

ah yeah

#

if I pregenerate them then they can eventually get at them

#

anyways

fervent rose
#

You can generate the seed yourself and send it at the beginning of the game, and so you can check if the random stream was modified or not

#

You don't want to actually use globals

#

They are really bad practice

whole burrow
#

^

fervent rose
#

You'd just want to create a game state at the beginning and pass it between your functions

#

You cannot use discord then

#

:>

#

You aren't authorized to register on discord if you aren't at least 13 years old

#

Because GDPR and stuff

whole burrow
#

GDPR*

#

@dawn quiver basically, globals are bad practice because they can change other code you are working with unexpectedly

#

and if you have a large amount of code that all works together, keeping track of all the global variables is a pain

#

so essentially, if I let the client generate the random tiles, I can't prevent an attacker from being able to predetermine where the next tile will spawn

#

correct?

#

though it certainly makes such attacks far less feasible and more labor intensive

#

versus just not checking

#

@fervent rose could I ask you to take a quick look at my code and give me some feedback on style?

azure seal
#

!tempban 655630579227688991 3y Sorry, but we don't accept underage peeps. Come back when you're old enough.

frank fieldBOT
#

:incoming_envelope: :ok_hand: applied ban to @gleaming sandal until 2023-03-14 10:14 (2 years and 11 months).

fervent rose
#

@whole burrow sure

whole burrow
#

Any advice would be appreciated

fervent rose
#

@whole burrow it does look pretty good, you ought also want to typehint your code

whole burrow
#

yeah, I was in the process of doing that

#

I am mostly looking for stylistic pointers

fervent rose
#

Nice

whole burrow
#

and tips to make it easier to read and such

#

or well anything I can improve on in general

fervent rose
#

You could break up your code a little more, but it looks really decent

whole burrow
#

originally

#

I had move() divided into move_up(), move_down() and so forth

#

but I ended up changing it since it is more compact like this and tried to make up for readability with the comments

fervent rose
#

No yeah, it doesn't seems like a good break up

#

You'd have a lot of duplicate code

whole burrow
#

I'll probably port this to numpy, which should allow me to overhaul the algorithm that computes the moves (slide())

#

because is lets you rotate an array more easily

somber bramble
#

hey guys,

#

@river notch i'm coding a text rpg too

dawn quiver
#

it says that pygame isn't installed when i try to import it

#

it's already installed and in another one of my projects

#

well, it says this

#
ModuleNotFoundError: No module named 'pygame'```
dawn quiver
#

did you install it into a virtual environment before? @dawn quiver

spiral skiff
#

@dawn quiver if u are using pycharm, open your project and go to terminal and do pip install pygame

dawn quiver
#

Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-2bw2jclv\pygame\

#

for now, i'm making a new file next to the one where pygame works

#

but i'd like to know why it just fails here

dawn quiver
#

@dawn quiver from the command line type -
python -v
this will spit out lots of data showing paths of native libraries
Then type-
import pygame
You should see where pygame is installed from that

#

that's a lot of data

#

pygame 2.0.0.dev6 (SDL 2.0.10, python 3.8.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
import 'pygame' # <_frozen_importlib_external.SourceFileLoader object at 0x000001DA5352D6D0>

#

that's the last couple lines

#

am i on the wrong version?

#

look up the list a bit and check the paths of pygame - it should point you in the right direction for your egg_info file

#

There have been issues with py3.8 and pygame2 maybe consider going back to 3.7

#

for a more direct route to the path of pygame you can do -
from the command line type -

import imp
imp.find_module('pygame')```
#

i installed python3.7

dawn quiver
#

i havent really seen much talk about python game dev

#

what kind of games can you even make besides text-based games or whatever

iron galleon
#

check out the projects page

dawn quiver
#

woahhh

#

thats awesome

near wedge
vestal vessel
#

can someone provide me with some learning sources for compute shaders ??

#

good ones ??

#

idk where should i be asking this question

fierce wraith
#

@vestal vessel i love cs! what are you trying to do with them?

#

and what lib are you using?

vestal vessel
#

im just trying to understand the concept for it ?

#

@fierce wraith i went through some utube videos but wasnt much of a help so

#

i was looking for some resources that explains it more properly

#

btw im trying to start on project for creating a random world. so im just trying to understand most of the underlying components needed to build it

fervent rose
#

They are pretty simple, they’re just graphical shader with an interface built to make them crunch data easily

vestal vessel
#

so how do they do it ??

fervent rose
#

You know how graphical shaders works?

vestal vessel
#

nope

fervent rose
#

They're basically code, written using a C like syntax, that run on the GPU

#

At the most basic level, they just do calculations

#

In most case they're used to compute graphics

vestal vessel
#

ohh so u just use them thats all ??

fervent rose
#

But nothing is stopping you from using them to crunch some data, yep

vestal vessel
#

ohh then when sud i use pixel shader over compute shader?

fervent rose
#

When you have something to render

vestal vessel
#

ohhh i get it now

#

i was just thinking it was something else smh thnx heaps for clearing things out @fervent rose

fervent rose
#

Any time lemon_pleased

vestal vessel
#

how is top edge rule applied there?

#

am i allowed to ask it here?

fervent rose
vestal vessel
#

thnx

fierce wraith
#

a very important detail about compute shaders, fragment shaders etc is that they operate in parallel!! thats what makes them special.

#

the fragment shader can operate on thousands of fragments at once!

#

@vestal vessel i suggest watching this talk, she does a great job at explaining how compute shaders work.
https://www.youtube.com/watch?v=0DLOJPSxJEg

This talk will give an in-depth introduction to compute shaders – how do they differ from vertex and pixel shaders from a programming and from a hardware perspective? What are the typical use cases for compute shaders, what are their advantages and disadvantages – how can you ...

▶ Play video
#

she talks about AMD specifically, but for the most part its the same with NVIDA, stuff just has a different name

vestal vessel
#

Oh sure thnx heaps @fierce wraith for the link

somber bramble
#

hey guysss, is it possible to set a local "server" to a second player to login in a local network for playing an python game?

vale yarrow
#

sure, everything is possible

hot moth
#

Heya! Anyone knows if its possible to control unity games like youre able to control windows applications with pywinauto? (not talking about pyautogui)

frank fieldBOT
#

Hey @solar bone!

It looks like you tried to attach file type(s) that we do not allow (.txt). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.

Feel free to ask in #community-meta if you think this is a mistake.

solar bone
#

I've made a simple game (Rock, Paper scissors) , it's full functional and I'd like to receive some opinions like How can I make the code more optimal

frank fieldBOT
#

Hey @solar bone!

It looks like you tried to attach file type(s) that we do not allow (.txt). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.

Feel free to ask in #community-meta if you think this is a mistake.

solar bone
#

BTW, how can I send the code? It's longer than 2000 characters

iron galleon
#

!paste

frank fieldBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

iron galleon
dawn quiver
#

Did it

#
import random
import time

numbers = []
last = 0

while True:
    numbers.append(random.randint(1, 4))
    for index, num in enumerate(numbers[last:]):
        print(f"Number #{index}: {num}", end="\r", flush=True)
        time.sleep(2)
        last = index
    print("What were the numbers?", flush=True)
    for num in numbers:
        n = int(input("Number? "))
        if n == num:
            continue
        else:
            print("Whoops, you guessed wrong, try again!")
            exit()
#

Note: I haven't played that game in a while

#

So this may not be exactly how it works

wicked swift
#

Is an acer laptop good for programming

#

I'm only a startee

vale yarrow
#

the laptop brand is totally unrelated

wicked swift
#

Um I'm not sure

#

I made 2 simple games

#

Any advice

fervent rose
#

If you want to do AAA games, you'd need a beefy laptop, otherwise you're fine with any recent one

dawn quiver
#

@fervent rose you should also add that you don't want to make AAA games using python

fervent rose
#

Yes true haha

#

But you could be interested in game dev in general

dawn quiver
#

yep

near wedge
#

A beefier laptop is useful for doing fancy stuff with Panda3D (e.g., playing around with shaders) even if you're not doing a AAA game.

wicked swift
#

Does anyone know how to open files in python

#

/sublime

#

Or upload images

hollow apex
#

An AAA game doesn't make success, even Celeste (sorry if I spell it wrong) was simple 2D pixel art game but made it to game awards game of the year nominations. I think with python we can recreate it.
But can we remake half-life in python?

vale yarrow
#

I don't see why not

fervent rose
#

@near wedge tbh, it is not, you'd need a beefy laptop to build things around, if you can run a modern AAA game, Pandas3d will run more than fine

near wedge
#

By "beefier" laptop, I was mostly meaning something that has a non-Intel card.

#

Although, modern Intel GPUs have gotten pretty decent.

rancid yoke
#

What do you think is better for making small games. Unity or python?

near wedge
#

In general, Unity is rarely a bad choice. But, which one is better likely depends a lot on your situation and what you are trying to achieve.

#

If you're already comfortable with Python, like using it, and want to dabble with some game dev, then you might as well grab a library like PyGame or Arcade to play around with 2D games.

#

If you are a startup studio looking to get a game out quickly, Unity offers a lot of resources like the asset store that can accelerate the development process (especially if you're willing to throw money at the problem).

rancid yoke
#

i am very new to coding in general and have never done anything with it soooooooooo ok thx

dawn quiver
#

i heard that unity is decent but very complicated, and that godot is better

rancid yoke
#

ok thx for the help

potent ice
#

No matter what you pick.. you will learn things that translates to other libaries / engines

#

Also, it depends on what you are planning to create

hollow apex
#

godot is great! its scripting language is GDScript which is heavily inspired by python.

#

and in general when ever i see unity splash screen at first i think it should be a bad game, don't worry i am not fanatic there are some great games made by unity, Unturned, Heartstone and sundered (maybe spelled wrong) (these games removed unity splansh screen LOL).

fervent rose
#

Unity is pretty bad in some cases

hollow apex
#

the only good games made by unity are the ones that simple (in case of graphics) but fun like ravenfield (free on itch.io, paid on steam) its good since its an offline battlefield with good ai, but graphics are too simple.

fervent rose
#

Yeah, Unity doesn't support advanced technologies used for bigger games, or just photorealist environment

#

UE4 for instance is a very good choice for modern 3D games imo

#

Plus, it can be used to other domains than game dev, such as arch vis, live events, automotive..

dawn quiver
#

yeah but you've never gonna make a modern 3d game

#

especially on your own

fervent rose
#

I mean.. Let me find back the name of that game

#

Bright Memories

hollow apex
#

oh that game is immersive!

#

but its made using unreal

fervent rose
#

UE4 for instance is a very good choice for modern 3D games imo

#

UE4 is a shorter term for Unreal Engine 4

hollow apex
#

godot is still good for games with simple graphics, its growing and easy to use

tranquil girder
#

Check out https://www.ursinaengine.org/ Wrapper for panda3d to make it easier to get started and prototype quickly. I'm really biased, but it's much better than Unity in terms of code complexity and scaling. I work with Unity daily on a rather big project and it's soul crushingly slow for bigger projects.

fierce wraith
#

ursinaengine scales better than unity?

#

but unity has stuff like ecs

fervent rose
#

I mean, ursina is brand new

#

It is in the early dev

fierce wraith
#

i would be very surprised if it really scales better than unity! although that would be pretty awesome

#

@frozen knoll im trying out some of your tmx levels, and i was just wondering if there is a reason the layer ids start at 14 in your level map_with_ladders.tmx

tranquil girder
#

What I mean is that it scales better in terms of workflow. You can easily load and run just the part of the game you're working on. You don't have to wait for compile after every change you make and can test things faster.

#

I've been using it for years now actually and panda3d is incredibly stable

#

The unfinished parts are mostly higher level stuff

#

But the core is stable.

fierce wraith
#

ah ok yeah. i always hated waiting for unity to compile

somber bramble
#

hey guys, quick help with if statement

#
print(f" Are you sure you want to upgrade? [y/n]")
        asw = input("")
        if asw == 'y' or 'yes' or 's':
            if upg_cst > self.minerals:
                print(f" Sorry sir, you have not enough minerals. Value: MN {upg_cst} ")
                print()

            elif upg_cst < self.minerals:
                self.minerals -= upg_cst
                self.attack_ships_damage_increase.append(15)
                print(f" You have upgraded your attack ships!")
                print(f" Your damage bonus now: {sum(self.attack_ships_damage_increase)}")
                print()
                print(f" Your ships damage now: {self.attack_ships_damage + sum(self.attack_ships_damage_increase)}")
        else:
            pass
#

what is wrong with this statement?

#

when i put "no" as answer, it enters the "yes" flux

#

even putting different options

#

this part is inside an if statement as well

#

but it's returning wrong values somehow

fierce wraith
#

even though if asw == 'y' or 'yes' or 's': sounds right, it doest do what you think it does

#

you have to do something like this: if asw == 'y' or asw == 'yes' or asw == 's'

#

or if asw in ('yes', 'y', 's')

dawn quiver
#

if ans.lower().startswith('y'): is one I like.

#

probably looks cleaner with input().lower()

dreamy swan
#

Does anyone know if unity has python support?

gray girder
#

I don’t believe so

#

You have to use c# for unity if I’m not mistaken

dreamy swan
#

Crud...
Ok

#

Ya...
And I think JS as well

gray girder
#

Mmm there use to be unity script which I think was similar to JavaScript but that is deprecated

dreamy swan
#

I’ll take a look.
I don’t want to learn c# for unity only

gray girder
#

If your into web dev I think Microsoft made a new c# framework for web assembly so it might not be totally useless

#

@dreamy swan Godot is a really good 2d engine with a simple scripting language similar to python

dreamy swan
#

I have Godot but I need to learn how to use it soon...
I am gonna try to stick with unity for now

gray girder
#

Unity is a better choice for 3D anyways good luck

dreamy swan
#

Ya thanks!

fervent rose
#

Unity does have unofficial python support

hollow apex
#

Can a programmer remake half life 1 in python (using any module, slight improvement)? Or at least the uplink demo?

gray girder
#

Maybe but I wouldn’t suggest doing 3D game development in python

dawn quiver
#

is it okay if i use this channel for posting a problem (incase u find it rude if i post a question while ur in a discussion)?

gray girder
#

If you don’t want to use an pre existing engine you would probably need to learn C or C++ or java or maybe rust

#

Use a help channel lol unless it’s game dev related

dawn quiver
#

its game related

gray girder
#

Probably okay

dawn quiver
#

guys im making a game and right now im working on shooting a bullet so i have coded it a little bit and tested it but it didnt work out as planning if possible could you please help me with the code im using pygame 1.9.6

#
class Entity:
    life = 1
    ex = None
    ey = None
    target = None
    vel = None
    entity = None

    def set_life(self, n: int):
        self.life = n

    def check_life(self):
        if self.life == 0:
            return False
        else:
            return True

    def get_pos(self):
        return self.ex, self.ey

    def get_type(self):
        return self.__class__.__name__

    def update(self, ex, ey):
        surface.blit(self.entity, (ex, ey))

    def get_vel(self):
        return self.vel

class EntityManager:
    entities = {"Bullet": []}
    states = []

    def add_entity(self, entity):
        self.entities[entity.get_type()].append(entity)

    def run(self):
        for type_ in self.entities:
            for entity in self.entities[type_]:
                ex, ey = entity.get_pos()
                vel = entity.vel
                if entity.target is None:
                    entity.update(ex, ey)
                elif entity.check_life():
                    tx, ty = entity.target
                    if tx != ex and tx > ex:
                        ex += vel
                    elif tx != ex and tx < ex:
                        ex -= vel
                    elif ty != ey and tx > ey:
                        ey += vel
                    elif ty != ey and tx < ey:
                        ey -= vel
                    entity.update(ex, ey)
                    entity.set_life(entity.life - 1)
                    if entity.life == 0:
                        self.states.append(False)
        return self.states

class Bullet(Entity):
    ranges = {'m4': 20}
    entity = pygame.image.load("game/Assets/images/Bullet.png")
    vel = 5

    def __init__(self, px: int, py: int, w: int, h: int, mx: int, my: int, gun_name='m4'):
        self.ex = px + w/2
        self.ey = py + h/2
        self.life = self.ranges[gun_name]
        self.target = (mx, my)

#

really sorry for taking your time, Please ping me or DM me.

fallen river
#

sorry i cant help cause im starter and i really cant do much.

potent zinc
#

can someone hlp me with pygame

#

plz

potent zinc
#

why doesnt this work

#
import pygame, sys

pygame.init()
pygame.display.set_caption('Adventures of Joe')

windowSize=(400,400)

screen = pygame.display.set_mode(windowSize,0,32)

player_image = pygame.image.load('player.png')

moving_right=False
moving_left=False

player_location=[200,200]
player_y_momentum = 0

player_rect = pygame.rect(player_location[0].player_location[1].player_image.get_width().player_image.get_height())
test_rect = pygame.rect(100,100,100,50)

while True:
    screen.fll((146,244,255))

    screen.blit(player_image,player_location)

    if player_location[1] > windowSize[1] - player_image.get_height():
        player_y_momentum = -player_y_momentum

    else:
        player_y_momentum += 0.2
    player_location[1] += player_y_momentum
    if moving_right == True:
        player_location[0] += 4
    if moving_left == True:
        player_location[0] -= 4


    player_rect.x = player_location[0]
    player_rect.y = player_location[1]


    if player_rect.colliderect(test_rect):
        pygame.draw.Rect(screen,(255,0,0),test_rect)
    else:
        pygame.draw.Rect(screen,(0,0,0),test_rect)
       
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()
        if event.type == KEYDOWN:
            if event.key == K_RIGHT:
                moving_right = True
            if even.key == K_LEFT:
                moving_left = True
        if event.type == KEYUP:
            if event.key == K_RIGHT:
                moving_right = False
            if event.key == K_LEFT:
                moving_right = False

    pygame.display.update()


dreamy swan
#

What is the problem?

potent zinc
#

@dreamy swan ```
File "C:/Users/FAMILY/Downloads/lol.py", line 1, in <module>
import pygame, sys
File "C:/Users/FAMILY/Downloads\pygame.py", line 3, in <module>
from pygame.locals import *
ModuleNotFoundError: No module named 'pygame.locals'; 'pygame' is not a package

dreamy swan
#

Did you install pygame with command prompt?

potent zinc
#

ye

dreamy swan
#

I don’t really know then...
Maybe make sure you installed to the right user?

potent zinc
#

C:\Users\FAMILY>python -m pip install --user pygame Requirement already satisfied: pygame in c:\users\family\appdata\roaming\python\python38\site-packages (1.9.6)

dreamy swan
#

Hmm...
I don’t know then sorry

potent zinc
#

nvm

dreamy swan
#

Ah...
Got it then?

potent zinc
#

ye

dawn quiver
#

@foggy python If I wanted to use your font, would i have to make it into a font from the image and learn how to do that?

#

or do you already have a file?

#

i don't mind much learning

foggy python
#

if you look at my games, it's typically stored in a single image per font

#

and my scripts cut out the characters

#

and store them in a dict

dawn quiver
#

your scripts?

#

you can make a script to cut a piece of an image?

#

that would take a while to write a long text

foggy python
#

If you take a look at my code, I’ve got a clip() function for cutting out portions of an image.

#

Performance is fine if you cache characters into a dict

#

Just take a look at my text.py script in almost any of my games to see how it works.

ember cloud
#

What is the best engine for City Building Game?

hollow apex
#

every engine is made to make games, that's right that some engines are made only for a specfic game but most of them are like programming language, could do anything.

dreamy swan
#

What languages are you EXTREMELY comfortable with? @ember cloud

fervent rose
#

Best? Probably Unreal.

#

But they are plenty of other engines available to you

dreamy swan
#

I am personally using unity

fervent rose
#

If you want to have a photorealistic environment, you'd have to use Unreal

hollow apex
#

godot is an easy to use one, also free and open source

fervent rose
#

Unreal and Unity are open source too

#

And free, expect for unreal if you earn more than $3000/3 months

hollow apex
#

oh? i thought they were paid

fervent rose
#

Unreal used to be paid, but now it is free, and I think Unity have always been free

hollow apex
#

unity isn't free if you earn more than 1000 or 10000/year

fierce wraith
#

100k is the limit afaik

#

very unlikely if you are just doing things for fun

fervent rose
#

Well, if you reach those limit, you morally need to give something back, even if it is totally free

dreamy swan
#

ya I stopped wanting to use Unreal when I saw the bull that they want for money and legal...
I read that entire EULA

fervent rose
#

Outch

#

They changed it around a year or two ago

#

Now it is way better

dreamy swan
#

that is when I read it...
Lol

fierce wraith
#

can you blame them? its pretty good software so ofc they want money if you make something profitable lol

dreamy swan
#

after they changed

fervent rose
#

I mean, it is still pretty fair

#

Even the selling condition of the EGS is pretty fair, compared to steam

dreamy swan
#

ya...
I like Unity more tbh
But I need to learn C# to use it effectively

#

and I don't like OOP

hollow apex
#

epic games store is just come for profit, it just shatters pc community

fervent rose
#

No?

hollow apex
#

having serval clients is a pain

fervent rose
#

Like, giving more money to devs come for profit?

#

I mean, Unity is about OOP too, I can't imagine making a game without OOP

hollow apex
#

there should be a complete system like steam

#

having serval could cause problem

fervent rose
#

They are actively developing it

dreamy swan
#

I mean C# is OOP and I don't like OOP languages

fervent rose
#

Yes, but.. You can't really make a game without something close to OOP

dreamy swan
#

sue me but OOP is annoying...
and try me

#

number games are fun

hollow apex
#

OOP lets you code common things once for every object that has it (inhritance system)

fervent rose
#

I quite like the concept of OOP personally

#

It creates a pyramidal structure that is very useful for game dev

ember cloud
#

Python @dreamy swan

ember cloud
#
#

@everyone

dreamy swan
#

maybe try using Godot?

#

it is close to python if I remember correctly

sage bluff
#

my game engine is officialy faster than pygame lol

#

its faster than python itself lel

#

heres the game engine translating a few lines of code into c++ code:


#define SDL_MAIN_HANDLED
#include<SDL2/SDL.h>

#include<iostream>

#include<stdio.h>

using namespace std;

#include <stdio.h>
int main(int argc, char* argv[]){

    SDL_Window *window;                    // Declare a pointer

    SDL_Init(SDL_INIT_VIDEO);              // Initialize SDL2

    // Create an application window with the following settings:
    window = SDL_CreateWindow(
        "An SDL2 window",                  // window title
        SDL_WINDOWPOS_UNDEFINED,           // initial x position
        SDL_WINDOWPOS_UNDEFINED,           // initial y position
        640,                               // width, in pixels
        480,                               // height, in pixels
        SDL_WINDOW_OPENGL                  // flags - see below
    );

    // Check that the window was successfully created
    if (window == NULL) {
        // In the case that the window could not be made...
        printf("Could not create window: %s", SDL_GetError());
        return 1;
    }

    // The window is open: could enter program loop here (see SDL_PollEvent())

    SDL_Delay(3000);  // Pause execution for 3000 milliseconds, for example

    // Close and destroy the window
    SDL_DestroyWindow(window);

    // Clean up
    SDL_Quit();
    return 0;

}
fierce wraith
#

@ember cloud dont try to ping everyone and dont post your stackoverflow questions here, ask them instead.

#

@sage bluff this channel is really just for python game development, so unless you are making a python gameengine using cpp...

somber bramble
#

guys

#

any tips on balancing a game

#

i'll throw it here and if anybody could contribute, i'm a little lost on this.

the game is a TBS (3 turns and a possibility of attack the enemy (or not)) based in the space.

has 4 races and I want them to have mechanics, but not in a unbalanced way

#

it's singleplayer but i want to make it multiplayer

#

the keys on the game are costs of ships

#

and minerals

#

the economy is based on minerals and population, a % of population mines the planet itself, but the mining ships (that mines meteors) mines a lot more

sage bluff
#

@fierce wraith actually i do have a python game engine that uses cpp

#

🙂

#

the package is called xgame

#

i just released the beta

#

you can get it via pip install XGame

#

(mods please delete this if this is aginst rules very sorry)

gray girder
#

@sage bluff Is your library faster then pygame. If so that’s really impressive work

#

Well it’s impressive either way honestly

sage bluff
#

@gray girder 100x faster than pygame lol

#

the library uses c++ for the speed

#

but you have to install stuff to use the library

#

like mingw for compiling

#

one day this will change

gray girder
#

If I installed code blocks which Comes with that compiler will it work straight out of the box with the pip install

#

Or should I install the compiler stand alone

iron galleon
#

i mean, pygame uses C

#

what makes yours so much faster?

gray girder
#

@sage bluff

somber bramble
#

guys, sorry for interrupting, anybody has any good guide on sockets for multiplayer games?

tranquil sentinel
#

Goal:bus move to i then stop then automatically go to i+1 and so on

    if something > 0:
        i += 1       need this var to keep adding after bus_stop , for loop is too fast for my game
        run a bus
    
        if bus_stop:
            start over from if something > 0

        #tried while !bus_stop but crashes
        elif !bus_stop:
            wait until bus_stop = true   which will start over

func _run_at_the_same_time1():
    
    if bus_hit_something:
        bus_stop = true```
#

@me

#

need help

sage bluff
#

@gray girder your going to want to have the mingw command line version

#

im not too sure about code blocks

gray girder
#

can i have both installed without causing problems... I'm pretty new to that low level stuff

tranquil sentinel
#

This is in GDscript btw. It just use same syntax as python

ember cloud
#

I like the GDScript btw but I need a easy to use game engine with python

fierce wraith
#

@sage bluff what are you doing differently from pygame?

sage bluff
#

@gray girder probably

#

can i have both installed without causing problems... I'm pretty new to that low level stuff
@gray girder

#

just view the mingw setup as listed

#

@fierce wraith XGame:

  1. is NOT using python for runtime
  2. uses c/c++
  3. uses sdl library
  4. is overall faster 🙂
#

and im still adding updates to make the package even better

#

currently the package can let you build simple programs or sdl games

mint zenith
#

If you release wheels on pypi the need for installing a compiler will be removed for end users.

fervent rose
#

Except if you don't have wheel for a certain arch, and this arch wants the package

potent zinc
#

can someone help me with pygame

mint zenith
#

@void sluice Just pick a single random y coordinate say, for the bottom end of the top pipe. Then if you add the size of the gap to that random value, you'll have the y coordinate for the top end of the bottom pipe.

ember cloud
#

I need a help with audio engine, gui framework and a game engine for my game?

void sluice
#

@void sluice Just pick a single random y coordinate say, for the bottom end of the top pipe. Then if you add the size of the gap to that random value, you'll have the y coordinate for the top end of the bottom pipe.
@mint zenith Thanks

frozen knoll
potent ice
#

@sage bluff Where is the source code? The package just link to google. Also, there is no docs anywhere. You are not giving people any incentive to use your package.

frozen knoll
timid river
#

I am planning on writing a 3d game engine in python3. Where is a good starting point?

#

I am also planning on making an editor for this game engine.

#

In the far future.

fervent rose
#

Firstly you should choose which library do you want to use

timid river
#

I was thinking of using pyglet

fervent rose
#

Well, are you familiar with it?

timid river
#

I am working on learning about it

#

I have mostly done web servers until now.

fervent rose
#

You should do some more basic apps with it first, in order to know it better

timid river
#

ok. thanks!

rain socket
#

Mee too I am making a 3D game engine

#

that's about 2 months

#

Gonna finish it this week I think

fierce wraith
#

@rain socket very cool! care to share?

rain socket
#

Yeah but I need to finish it totally, it will don't work to you if I export it

fierce wraith
#

what kind of stuff are you doing with your engine?

rain socket
#

I am working on the txt file where we can program 3D blocks building etc

sage bluff
#

@potent ice xgame is fairly new everythings a work in progress so things like source code are not avaible

#

you can view documentation by doing XGame.docs()

#

or you can do XGame.tutorial() which will install the needed software to use the engine

potent ice
#

Why are not source available? 🙂

sage bluff
#

never made one yet

#
  • im a noob at github Xd
potent ice
#

I would not run anything unless I at least skimmed through the code 🙂

sage bluff
#

ill be making a veiwable github repo for it soon

potent ice
#

Don't worry about that. Just get it out there 😉

sage bluff
#

@potent ice since xgame uses c/c++ this makes xgame THE most fastest game engine

#

im planning to add things like easier variable creation

potent ice
#

There are several projects also using c/c++

sage bluff
#

which?

#

i must be the top lol

potent ice
#

Panda3D and related projects, moderngl and even pygame

sage bluff
#

pygame and moderngl are quite slow

potent ice
#

but you may get better performance if you use a different approach and greatly reduce flexibility

sage bluff
#

panda3d is pretty fast though

#

@potent ice kk

potent ice
#

What makes your project so much faster?

sage bluff
#

it uses pure c++ and sdl

#

python simply converts and compiles the file

potent ice
#

How does python interact with it?

sage bluff
#

it simply is used to create the file with minor to no knowledge of c++

still shard
#

what file?

sage bluff
#

xgame can make .exes

#

.cpp

#

ect

still shard
#

lol

#

So, basically, all Python does is to create some boiler plate code

#

that really isn't a python game engine then

sage bluff
#
game = XGame.game("hello")
@game.code
def code():
  return XGame.FreeStyle(
    XGame.Main(
    XGame.Log("hello world")
  )
)
game.debug(output="hello_test") #compiles and runs
#

@still shard well python is used to write the code without needing to know much about c/c++

#

the point of xgame is intended to be a simple and very fast engine

potent ice
#

So I could end up writing some logic in python that does not translate? I have to follow a strict api?

sage bluff
#

@potent ice all the code for your game is converted to c/c++

#

but yes you have to follow xgames api

#

right now im getting docs together so xgame is more understandable

potent ice
#

Sounds like a lot of work 😄

sage bluff
#

it is

#

@potent ice you also can see the converted code when running your xgame script

#

or you can just do print(xgame.Main())

potent ice
#

Well. Good luck with the project. It could be a useful experiment.

sage bluff
#

thanks

#

@potent ice will you use my package? some feedback immensely helps

potent ice
#

What can you do with it? It is SDL rendering?

sage bluff
#

yes full fledge sdl is used for rendering

#

xgame not only is for game development

potent ice
#

Ok. so like pygame

sage bluff
#

xgame can be used for developing basic scripts

#

i forgot to mention you can do opengl in xgame, or any c++ package

potent ice
#

I might look at in the future if you post updates, but right now I have more then enough to do on the moderngl project

sage bluff
#

kk

still shard
#

It wuold be more useful to be able to write freeform in python, than to actually use C++ packages

#

because someone who knows C++ won't be using your stuff if they have to write python

#

even if it is just partially

potent ice
#

Post update when you reach the next goal. docs and repo up etc

sage bluff
#

@still shard @potent ice will do

still shard
#

There are a lot of rendering engines out there for C++ which are really good and don't need a strict form

#

e.g. OGRE or Irr

#

just to name two

sage bluff
#

also @still shard xgame is as stated for making c++ games or programs using python

#

everyone loves simplicity 🙂

#

and making a c++ game is not as easy as it sounds lol unless you use unreal

still shard
#

simplicity is something else than strictness

#

you are writing a transpiler, but you are mixing two languages

#

and that won't bode well in my opinion

#

but good luck

sage bluff
#

thanks

dreamy swan
#

Unity is just mean to learn so a good python engine other than pygame would be nice in my opinion

potent ice
#

I think there are room for game engines doing one type of game type well at least. Simple python interface were C/C++ does the heavy work in the back.

still shard
#

Yes, but I think it should provide a native python interface without the need for a strict setup

potent ice
#

yeah

#

Needs to be native python. definitly

still shard
#

I think @sage bluff would be better off using python embedded for his idea

#

so the scripts can be written relatively freely

#

add a C++ api to that to allow for more freedom and it becomes a shoe

potent ice
#

And of course provide wheels for win, osx and linux

#

Unless you are on linux people are not going to build it 😄

#

(most people at least)

sage bluff
#

@potent ice ill try that but im on windows and i have no idea how to make it crossplatform like that

potent ice
#

You can use Ci systems to build it for you

sage bluff
#

kk

potent ice
#

and even make it release to pypi automatically for all platforms

sage bluff
#

rn im adding a translation that lets you create windows in xgame 😉

#
XGame.Window(create=True,name="hi",flags=[],x=0,y=0,w=50,h=50)
#
{
  SDL_Window* win = NULL;
  win = SDL_CreateWindow(args from previous function)
}
#

translater functions are op

dull swallow
#

Heya everyone, me and a friend are making a game, and i plan to add multiplayer support, but how would i make it so the server can tell between the official client and a custom client? Because i want to give people the ability to disallow custom clients, as my friend pointed out that it is possible to exploit and ruin the game for everyone (it will be opensource)

frozen knoll
#

Honestly, I'm not sure you really can.

#

Closed source, you could make it more difficult.

#

But you only know what is sent over the network. You can't really inspect the client code.

potent ice
#

It's a challenge for sure

dull swallow
#

Yeah, it is an issue me and my friend are experiencing

potent ice
#

I know a lot of games add a lot of obscurity to make it more difficult, but if people really want to they can do it

#

Cheat detection are normally added in separate systems

#

For example movement tracking.

dull swallow
#

Yes, but if i am opensourcing the game and the server software, everything becomes more difficult

#

Which is the issue i am running into

#

I could add some code that only the official builds would have?

#

It would probably be turned into a .so file with Cython so i can try to import it, if it fails, do not send that data

potent ice
#

That can always be extracted

dull swallow
#

I know

#

But it adds a simple layer of complexity at least

#

But i am not sure what to do

potent ice
#

yeah, you can also send the client version and hash

dull swallow
#

The hash?

potent ice
#

Hash of the client files

#

sha1, md5 or similar

dull swallow
#

Oh! That actually seems like a good idea!

#

Wait

#

But if i am distributing it to multiple platforms

potent ice
#

Of course a fake client can also fake this

dull swallow
#

Won't the hashes be different?

#

Mhm

#

Also modifications of the original client since it'll accept mods

#

But that can be avoided by disabling mods completely in the server selection screen

#

And disabling them within game

potent ice
#

Depending on the game it might just be better to make some simple karma system

#

Simple sanity checks for how often certain actions can be done for example

#

so if the client sends some type of events too often.. it will throttle the user and alert admins or just kick

#

Item interaction for example

sage bluff
#

Heya everyone, me and a friend are making a game, and i plan to add multiplayer support, but how would i make it so the server can tell between the official client and a custom client? Because i want to give people the ability to disallow custom clients, as my friend pointed out that it is possible to exploit and ruin the game for everyone (it will be opensource)
@dull swallow my idea is 1. your game should be compiled

#

compiling a game is a great way to prevent code from being edited

#

and you can make a mod mode where people can use .json or .py to modify game

#

like hp or whatever

potent ice
#

I know some games also use custom encryption with rotating keys/secrets so it gets a lot more painful

sage bluff
#

you dont need that complex stuff

#

just convert the game to a .exe

#

much faster

#

code isnt editable all good

dull swallow
#

I do not know how i would compile the game @sage bluff, because it can always be decompiled anyway

sage bluff
#

and you can make a json loader system to add mods

potent ice
#

The project is opensource...

dull swallow
#

It will be able to load Lua, Python and probably simple json mods

sage bluff
#

but even if you did make the client non modifyable

dull swallow
#

@potent ice i am planning on making a pre-compiled/packaged 'official' build

sage bluff
#

theres ways to make a hacked client

#

you should make everything serverside and add anti cheats

dull swallow
#

I have pointed this out before but thank you for helping

#

That is a good idea actually

sage bluff
#

which @dull swallow >

#

i used multiple ideas xD

dull swallow
#

Yeah i said i can use Cython to make a .so file that is only required in the official client

sage bluff
#

true

#

whats .so btw xd

#

is that a linux file?

#

??

potent ice
#

It's like a linux dll

dull swallow
#

Wait, .so files can not be imported on windows can they?

sage bluff
#

no

dull swallow
#

Oh, so i would have to make that a .dll file then

sage bluff
#

i highly recommend you just use cx_freeze or cython and just make different versions for different operating systems

dull swallow
#

That is what i am going to do

#

But how would i specify whether to make a .dll or .so file?

potent ice
#

I guess you have to build it on each os?

dull swallow
#

I don't have windows at all...

potent ice
#

Just start a VM. WIn 10 is free

dull swallow
#

I can not be bothered with VMs, they annoy me quite alot

#

I will probably ask my friend to compile it if he has a windows PC at his disposal

potent ice
#

hmm. Can Ci systems build it? No idea.

#

I do build wheels for win, linux and os x on for example travis-ci

dull swallow
#

Ci systems?

#

It depends if they can even run Python and pip

#

And what OS they use

potent ice
#

The can run python and pip and run any os

#

Maybe even github actions can do it. Havent checked

dull swallow
#

Oh? That sounds excellent then

sage bluff
#

@dull swallow what kind of game are you making

dull swallow
#

Thank you for helping me!

sage bluff
#

im intrigued

dull swallow
#

Well, it is a factory based game, where you mine resources, you'll have to build a base and defend against invaders that will try to destroy your Hub

#

It is like Factory Idle

sage bluff
#

oo nic

dull swallow
#

But

sage bluff
#

nice

dull swallow
#

More modable

#

I realised this was a good idea since there isn't many games with this sort of idea out there

#

You will also be able to make mods in Lua, Python, JSON files for really simple mods, and maybe even C or C++

potent ice
#

I would say as a minimum you should at least have a karma system to ensure a bot cannot for example replay a game at 10x speed

dull swallow
#

What do you mean replay a game?

potent ice
#

unless there is some other mechanic that makes this impossible

#

Is there some kind of versus mode?

dull swallow
#

The game won't be in matches, but there will be waves of enemies that will come along every 1-3 minute interval

#

Probably an attack mode

potent ice
#

So cheating will not negatively affect another player in a large degree?

dull swallow
#

Not really no

#

But they will have factories to make their own enemies

potent ice
#

Ok, then you have a lot less to worry about 🙂

#

Maybe even bots can be encouraged

dull swallow
#

But then they will have to gain resources for those factories

honest scarab
#

is it multiplayer or singleplayer? still confused

dull swallow
#

Yup, but i still want to verify the clients for some people who want that

#

@honest scarab multiple modes

#

So an option for single player and multiplayer

honest scarab
#

allow mods for singleplayer, restrict them in mp

dull swallow
#

Mhm

#

That is what i will do

honest scarab
#

maybe only allow client sided stuff

dull swallow
#

Yup

#

There will also probably be a whole separate API for bots

potent ice
#

You can have an "are you a real player"-challenge 😉

#

Ask questions that only a human can easily answer

#

but maybe that can be a bit annoying

honest scarab
#

like graphics mods. Dont know much about modding, but Lua sounds pretty good for multiplayer as you can allow and restrict specific commands afaik

#

if sb has enough recources he will always be able to break multiplayer

#

like for your questions, some screen capture software that can extract the text from screen and then an algorithm to solve them

#

if you want to keep your game bot-free, you have to make it too much of a time investment to get one working

#

I mean - you could catch bots that are on 24/7 - but then the botter just emulates day/night circles and the cat-and-mice game starts again

dull swallow
#

Bots will not be completely disallowed, but an option to disable custom clients from joining a server will be useful to some people, and the ability to disable bots (they would have their own API) would also be useful to people

#

@honest scarab also, we are using Lupa to embed Lua into our code

#

This will allow for some very interesting possibilities

honest scarab
#

a wait so you allow custom servers?

#

thought you would host it

dull swallow
#

No, the server software is also opensource

#

I do not have anywhere where i would even host my own server eheheh

honest scarab
#

amazon web services for example

dull swallow
#

I do not even have a credit card

#

I have a raspberry pi

#

But then it'd be prone to DDoS attacks

dreamy swan
#

I think having self hosted servers is good so that I’d say your computer goes down they can still play

dull swallow
#

Yup

fervent rose
#

Hosting something on a home connection is quite hard and error prone though

potent zinc
#

like a discord bot per example?

fervent rose
#

If you have any internet or electricity issue for instance, the bot became offline

potent zinc
#

yup.

fervent rose
#

Plus you loose a part of your internet speed

potent zinc
#

Is there any free bot hosting system

dawn quiver
#

What's your opinion on game development with JavaScript?

potent zinc
#

Try asking Discord.js Official

fervent rose
#

There is heroku and python anywhere that have permanent free tier I think, and all popular host have a temporary free tier

potent zinc
#

I heard bad things about heroku

fervent rose
#

@dawn quiver it is pretty limited, because you have to make the user download the whole game everytime they want to play it, you can't go too hard on graphics, neither do a reasonably good looking 3d

#

@potent zinc I never tried it personally

#

I don't know

potent zinc
#

ok

humble berry
#

You are hosting a python based discord bot?

potent zinc
#

no

#

but just asking

#

for future references

humble berry
#

You can try repl.it and using uptime robot with it

fervent rose
#

I tried repl.it though, it is garbage

#

The bot goes down constantly

#

It isn't an hosting service

humble berry
#

It's not as complex as heroku

dawn quiver
#

oh i see

#

so which is better: gamedev with python or JavaScript?

fervent rose
#

Depends on what you want to do, as always

dawn quiver
#

can you use more than two languages for a game

#

if so, how?

#

maybe like one language for backend the other for graphics and other stuff

fervent rose
#

You can’t really separate them like this

#

Are you talking about making a game from scratch and make the engine with it, or using a premade engine?

dawn quiver
#

yes

fervent rose
#

From scratch or using an engine?

dawn quiver
#

frm scratch

fervent rose
#

Then you’ll probably have to use different language yep

#

At least one for the engine itself, and one for the shader rendering your game

queen surge
#

Hosting on heroku is surprisingly not that complex

#

But it is ultimately more suited toward hosting website instead, and is not really suited for a discord.bot

fierce wraith
#

how would generate the red points with the blue dot as (0,0)? with some arbitrary r. the coords should always be full integers.

#

hmm. is that just a square with side length r tilted 45deg?

#

or is that just because of my terrible paint skills

fervent rose
#

You want to generate all points with integer coordinate numbers inside the circle?

fierce wraith
#

yup

potent ice
#

Purpose of this is?

fierce wraith
#

rn im just looping from -r//2, r//2 on x/y and filtering out points that are too far away

#

finding the chunks that are <=r away from the camera @potent ice

potent ice
#

Can't you just use the distance to the chunk?

#

Distance to chunk corners a bit more accurate

#

@fierce wraith yes no maybe? 😉

fierce wraith
#

what do you mean by that?

#
    def positions_in_radius(position: Point, radius: int):
        out = []
        for z in range(-radius // 2, radius // 2):
            for x in range(-radius // 2, radius // 2):
                if World.distance_to(Point(x, 0, z), Point(0, 0, 0)) <= radius:
                    out.append(Point(x + position.x, position.y, z + position.z))
        return out```
#

thats what i have rn

fervent rose
#

That's what I was going to suggest haha

frank fieldBOT
potent ice
#

That looks very complicated for finding chunks inside a radius of a point

fierce wraith
#

how else would i do it?

potent ice
#
for chunk in chunks:
    d = distance(player, chunk)
    if d < r:
        blah
#

But I guess you store chunks in a 2d array, so you can loop chunks inside the square using the radius

#

then that filter will weed out the corners making it circle ish

#

Maybe I'm misunderstanding something here?

fervent rose
#

Ah it doesn't have to be a perfect circle

#

You could also an otcagonal-y looking shape by cutting triangles in a square angles

potent ice
#

Yeah. could just make an R * 2 quare and filter them on distance

fierce wraith
#

i cant to for chunk in chunks because i might not have loaded the chunks yet and they need to be generated

potent ice
#

You know what chunk you are standing on and the radius

fierce wraith
#

yup

#

rn im doing the r^2 and filtering

potent ice
#

bah. I should take a break from the computer. You are doing exactly what I suggested 🤦‍♀️

fierce wraith
#

hhaha thats fine 😉

potent ice
#

So that thing will run when you leave a chunk / enter new chunk I guess?

#

Keep track of the player/cameras chunk location and update when it changes

#

Because at 100 fps you don't want to do that every frame

potent zinc
#

can someone help me with pygame

#

since their websites are down

potent ice
#

wiki links don't work, but must doc pages do

potent zinc
#

can someone help me with pygame?

#

like from scratch

potent ice
fierce wraith
#

well for the first time ever ive made a trello board. lets see how this works out haha

#

ahaha

fierce wraith
#

eyy decreased file size 3x

#

significantly decreased load time too 🙂

#

but now i've completed the only easy thing on the todo list 😦

potent ice
#

Why not use github project with basic kanban + issues instead? 😉

potent ice
#

It's at least a simpler solution if you want to collaborate

wheat marlin
#

So I want to make thing when I give it a maze(image) and then it solve it

#

How do I do that

fierce wraith
#

You could use something like A* or some other pathfinding algo

frozen knoll
#

That starts from scratch.

fierce wraith
#

cough cough @potent ice cough cough. i heard you know a thing or two about making games. you gonna take part in the game jam?

potent ice
#

I'm getting old and I have a lot of work to do on other project. I'll think about it.

#

Not really that creative tbh. Worked more on the techincal side of things

topaz rock
fierce wraith
#

fair enough, maybe next time itll be a moderngl game jam 😉

#

@frozen knoll does arcade allow you to execute shaders in some way?

#

specifically a fragment shader

dawn quiver
#

is arcade better than pygame

#

?

tulip basalt
#

Anybody have an empty space for the gamejam, I can join!

dawn quiver
#

Heyho, this is a little different request, but maybe someone got heart for that and might wanna help a little.
I´ve read all TOS and guidelines and hope i am acting right, so if anyone sees a technical flaw of method pls be kind and tell me! =]

OK, i have a small Team working on a Mod for >Star Trek Bridge Commander< from 2002 in Python 1.X...
i know i know, old tech so this request is more of a idealistic one. The game engine is Netimmerse 3.2/Early Gamebryo and the mod we are working on is the more or less famous >Kobayashi Maru<. Our goal is to make a persistant world this time with all the 30+ Starsystems in the mod and add some more eyecandy.

What we did until now is: We added Widescreen Support, made it directX11 compatible thru injection and therfor could add a bunch of shaders. Work in progress now is adding 8k planet textures to give it a nice look, working on lightning etc.

The Python conquest would be to go over all existing mods in KM2011, renew them, fix errors, add functions like new rooms, options, stellar cartography, fix the star systems and scaling.

This is truly for someone who loves Star Trek and is very idealistic about that.

#

And again i´m sorry if i misunderstood the TOS here i really do believe that my helprequest is OK, if not pls correct me

#

i´ll add 3-4 screenshots in just a second, thank you for reading.

frozen knoll
#

@fierce wraith If you are looking to use shaders, I'd just use a PyGame /ModernGL combo. Arcade is designed to be easy-to-use.

fierce wraith
#

@frozen knoll yeah im used to moderngl, but was hoping some of my knowledge could be used with arcade

frozen knoll
#

@dawn quiver It is a language used by graphics engine on your computer. OpenGL graphics can offload a lot of processing to your graphics card which speeds graphics a lot.\

#

@fierce wraith Arcade focuses mostly on the mechanics, and less on the look. I'd really like to get lights added to it.