#game-development

1 messages · Page 48 of 1

lunar venture
#

He's clearly in pain

minor cloak
#

I guess I gotta learn shaders next

lunar venture
#

Oh now I can see it was the monkey head model 💀

coral walrus
#

tbf ursina is a little lacking in their in-house shaders

#

I'm sure you've got it tho

stuck crow
#

Idk how to do that gulp

lunar venture
#

You must first create the screen/window

#

Do you know how to do that?

tranquil girder
stuck crow
#

I think I have that setup

coral walrus
# stuck crow I think I have that setup

draw a texture somewhere on the screen, fix some imaginary dimensions around that texture, get the mouse position, then check if that position is within those boundaries

#

I want to assume you're using pygame, so you can utilize their Rect class and collide_point method for this (I think is what it's called)

minor cloak
#

Selecting all of these faces to color them is annoying. But as lack of a creative as I am, I find this better than doing it in 2D.

frank fieldBOT
#
Available tags

» decorators
» defaultdict
» dict-get
» dictcomps
» discord-bot-hosting
» docstring
» dotenv
» dunder-methods
» empty-json
» enumerate
» environments
» envs
» equals-true
» except
» exit()

minor cloak
#

Anyone got any good free royalty music and sound effects that I can use for my game?

verbal quiver
#

hi guys just started learning python watched a tutorial , using pycharm as IDE , so i could not get the local host

#

like local host doesnt opens a page , tried many times

azure bridge
#

Hello?
Any designers here? I need some designers
Who knows blender or 2D character modelling
Anyone????

#

I need them for my project actually I am building and 2D game open world

The game is on the concept of micro world & microorganisms
I have a story also
A brilliant scientist just made a formula to turn himself in micro form to explore the micro world!

#

This game can also contain fighting with different type of viruses & bacteria with his weapon exploration and a open colourful world full of adventure

minor cloak
verbal quiver
#

@minor cloak it actually another problem i got can ya see this

minor cloak
minor cloak
minor cloak
verbal quiver
#

ok

minor cloak
#

This is as much game dev as I can with the limited time and limited skill I have. I would appreciate any feedback from other game devs.

Thank you.

tired reef
#

Has anyone ever implemented a workbench in pygame

worthy verge
#

i'm kinda confused on how to import functions from different files into a main loop of code. for example i have a file named "functions" and it has a bunch of fuctions like "def room()" now how do i insert "Def room()" into my main game loop?

#

oh i didn't realize that i could just to "import file name" i thought i had to import something specific from that file never mind then

lunar venture
#

You could do from file import room if you are sure there won't be any name conflicts

amber crystal
foggy python
verbal quiver
#

if yes how??

foggy python
foggy python
verbal quiver
hard garden
foggy python
#

yes

minor valve
#

How long did that take?

cold pelican
# foggy python

looks nice, where is this game(I mean which platform steam/roblox etc?).
can you share the game link

hollow jewel
#

Hi guys is there any Telugu persons here and hi to everyone

#

@cold pelican yah DP was awesome

shut tulip
#

this is not a job board

formal phoenix
#

cant install pygame

shut tulip
#

install pygame-ce

#

that's the latest version

#

(then you use it all the same)

formal phoenix
#

aha i did this: pip install pygame

shut tulip
formal phoenix
shut tulip
#

pygame is an old library, let's say. it's no longer maintained and it not available for the latest python versions

#

pygame-ce is

foggy python
# cold pelican looks nice, where is this game(I mean which platform steam/roblox etc?). can you...

VOXEL SHOOTER MAYHEM
GunSlaw VR is a flexible free-to-play online multiplayer VR shooter featuring a wide variety of voxel-based gamemodes. Engage in PvP combat with realistic gun mechanics in destructible environments where you can build your own defenses!

MODDABLE SERVERS
GunSlaw VR allows users to host servers and write custom plugins in P…

Release Date

2026

foggy python
cold pelican
# foggy python https://store.steampowered.com/app/4272180/GunSlaw_VR/

if you need help for creating maps then lmk, i am creating a minecraft clone in roblox with some nukes. And during this i made a system that you can concert literally any minecraft map/build to database, then concert it to obj/glb/any 3d format. If you want you can share me any Minecraft map, and i csn create it for you. This will be good for you, as you can just open minecraft find some good battle royale maps, and directly add it your game.

foggy python
rough sky
#

Whats a good type of game to make for a college project? In my first year and for our finals theyre having us make a game with pygame. Thinking of doing a simple pixel dungeon crawler, anyone got any suggestions?

arctic wigeon
#

trying once more with pygame to finish something, got the first 100 lines in

#

has a state machine and a resizeable window

lost pelican
autumn geyser
# shut tulip pygame-ce is

just pip installed pygame-ce after reading this
and setcaption suddenly takes no keyword arguments anymore😭
I'm scared how much stuff is not gonna work now💀

low mason
#

Hi!

#

Did any body can help me to learn game development?

slow copper
#

It's positional only args, the / at the end of the function signature indicates that the parameters before it are supposed to be passed as positional only

karmic rover
slow copper
low mason
slow copper
low mason
flat river
#

wow

upbeat edge
#

rope game

minor cloak
worn barn
minor cloak
worn barn
minor cloak
#

Anywhere

worn barn
#

cuz i always have to trim by videos to 10 sec or less to avoid hitting 10mb limit

worn barn
minor cloak
#

The video I screen record are always under 10MB

worn barn
#

how?

#

what software do you use?

minor cloak
#

Standard windows recording thing

Win + SHIFT + R

#

No need for OBS

worn barn
#

thats what i use man but my 10s clip is 10mb

#

wtf

vagrant anvil
#

That can cause the file size to increase

worn barn
slender elm
#

the video is mostly showing map functions, the backend is still being updated

slow copper
worn barn
#

oh kk

tidal frigate
#

Does he have someone who knows the Acarde library well? plz i need help

proper inlet
#

If so, what exactly are you trying to build? game, GUI, animation, etc What issue are you facing? error, not understanding concepts, setup problems

raw monolith
raw monolith
autumn geyser
worn barn
#

alr

tidal frigate
tidal frigate
minor cloak
wild cobalt
#

Pygame is quite good

#

Has most things

#

Panda3d for 3d as well

clear idol
#

Anyone here who can help me making minecraft hacks

hushed osprey
#

Minecraft mods are probably better made in java than python

muted verge
#

hi guys i am new here is someone interested in trying my simple text-based game because i want to add ideas to it and i don't know what to add

lusty pine
#

yooo

#

any of y'all like magic the gathering?

fervent flower
#

I'm currently working on the procedural level generation and the combat system — I've got the basic dungeon crawling working but still polishing the enemy AI.

minor cloak
fervent flower
minor cloak
minor cloak
rare cloud
#

does this look like a button/pressure plate?

lunar venture
#

It does. Maybe darkening the walls would make it pop up more as interactive

#

It might be confused for a lone, round obstacle

shut tulip
#

I don't understand what is supposed to be a pressure plate tbh

spring ridge
rare cloud
spring ridge
#

cool

rare cloud
shut tulip
#

No I mean what on screen is supposed to represent a pressure plate

rare cloud
#

ig the tiles look a bit off

shut tulip
#

Ooooh

#

Yeah not sure tbh

fervent flower
#

Hey guys

rare roost
#

can we actually develop 3D games with python ?

ocean pasture
#

Hi Python community!

I'm excited to be a part of this vibrant group focused on the Python programming language. As a passionate developer, I specialize in full-stack development and machine learning, and I'm always eager to learn and share knowledge.

My background includes a solid understanding of both frontend and backend technologies, and I enjoy building applications that leverage Python's versatility. Whether it's creating web apps, automating workflows, or diving into data analysis, I'm all about finding practical solutions that make coding accessible to everyone.

Core Expertise:

  • Frontend Development: React, Vue.js, and Tailwind CSS for creating responsive user interfaces.
  • Backend Development: Proficient in Python/Django and Node.js, ensuring robust server-side logic.
  • Machine Learning: Experience with building and deploying models using libraries like TensorFlow and scikit-learn.
  • Automation: Using Python to streamline processes and enhance productivity.

I'm looking forward to collaborating with fellow Python enthusiasts, sharing ideas, and possibly working on exciting projects together. If you are interested in me, please DM me anytime.

long plover
chrome magnet
#

There are a few other versions, would you like to see them?

minor cloak
chrome magnet
minor cloak
#

That is running on your phone?

#

Or streaming from your PC to your phone?

chrome magnet
chrome magnet
minor cloak
#

I see

chrome magnet
#

:P

wintry bluff
#

Animation test for a game I’m making.
(I’m gonna be using renpy)

raven kernel
#

kinda reminds me of "no im not a human"

rare roost
rare roost
long plover
#

Because it's all CPU based

#

But you can off load stuff to gpu

wintry bluff
# raven kernel kinda reminds me of "no im not a human"

lol, yeah after I drew the initial sprite It took a sec for me to be like “wait a minute-“, eventually I’ll do a slight redesign though, but the game I’m making is about OCD and I asked my friends and family what color ocd was and they all said blue/green/purple.

raven kernel
#

i love that aesthetic

wintry bluff
somber creek
#

im learning python, im using sololearn, is it good?

empty dawn
rare roost
visual bobcat
#

I’ve been working on a CLI Pokémon game for my first project and just finished a big update to the battle system. It now features dynamic moves pulled from an API, a working XP/leveling loop, and a way to track team stats. I managed to squash the main crashing bugs and cleaned up the UI to make it feel like a real game. As a beginner, I’m pretty stoked it’s stable, and I’d appreciate any advice on what features I should try to learn next!

wintry bluff
#

Is there any 3d game making software that I can plug into renpy?,
Like for a mini game in a visual novel.

hazy pivot
#

Hewwo! I'm looking for Q&A testers for my game. It's a 10 minute play and I would just like a recording of some of your gameplay, with audio if you can for reactions. It was made in Godot and is a Horror Game

hazy pivot
vestal gyro
#

Hey guys! I am new here, in a little bit I am going to send a small ish message if what I am trying to do and hopefully I can get some help! I am brand new to using Python

wintry crag
#

hey guys

#

i made a cool game

#

its a.. simulator, grid based, i made it with numpy, and it simulates a bunch of materials interacting on a grid

#

i optimized it as much as i could, and its not too bad, considering my old machine

#

i packaged it into an executable, for windows only though

#

i dont know how to package for multiple plataforms, here's the link to the itch.io page

novel narwhal
#

I played around with it for a little bit and everything seems to be working well! Pausing the game does unlock the FPS but i suppose that doesn't matter.

wintry crag
#

@novel narwhal

#

also i used numba njit to optimize

#

i did it in about like 1113 lines

#

also do you think i should change anything about the page

amber crystal
minor cloak
#

@feral leaf share your pong game and progress here

feral leaf
#

ok

#

Progress of a pong game

minor cloak
feral leaf
#

im not done yet

#

a lil more

#

done

shut tulip
#

!codd

frank fieldBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

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

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

For long code samples, you can use our pastebin.

shut tulip
#

How wow the trigger worked even with a typo

feral leaf
#

lemme record

#

@minor cloak

#

please tell me how it is

minor cloak
feral leaf
#

shall i add a pause gameplay and a start gameplay thing

minor cloak
feral leaf
#

ohh

#

lemme make that too

#

3 BOTS ARE BEING TO HARD

#

sorry for cap

#

3 bots are very hard

#

can i do one?

#

@minor cloak

minor cloak
#

Easily, huh?

feral leaf
#

...

#

idk what formation

minor cloak
#

wdym?

feral leaf
#

if i do vertical they just feel like one big pong line

minor cloak
#

its just 4 sides

#

top, bottom, left and right

feral leaf
#

they are gonna try and get ball no

minor cloak
#

isnt that the point?

feral leaf
frank fieldBOT
feral leaf
#

they will stick

minor cloak
#

what does that mean?

feral leaf
#

it will ook like a big line |
|
|

#

LIKE THIS

#

but they will merge

minor cloak
feral leaf
#

got it

minor cloak
#

Do you? pithink

feral leaf
#

BOT1 BOT2 BOT3

      BALL

     PLAYER
#

like this?

minor cloak
#

no

minor cloak
#

I have to go. I'll check back later

feral leaf
#

like this oh

#

wait my code is almost done

minor cloak
# feral leaf

Cool. But I think the game needs to be a bit more challenging. Can you introduce ball power-ups?

#

Various power-ups will spawn in the middle and if the ball hits it, it gains and immediately uses that ability.

#

Some examples:

  • Multi-ball: The ball splits up into 3 new balls going in different directions.
  • Fast ball: The ball speeds up really quickly but momentarily
  • Trick ball: The ball splits into 2. One is fake (with no collision), the other is real.
  • Spin ball: Once picked up, the ball will start to swerve. So the projection isn't linear/straight. It can curve towards a different direction (even possibly do a U-turn)
feral leaf
#

well

#

now ur making it compplicated

#

but why do i need to add them

minor cloak
feral leaf
#

my broter enjoyed it

coral walrus
#

maybe you'll find certain parts of your code that prevent that Shrug

wintry crag
final jay
#

I'm just starting and I've been using Exercism to practice and one was to make a Pacman code

#

Honestly now I'm very curious, how much can you do only in Python?

shut tulip
#

A lot

amber crystal
stray holly
#

Hello everyone

pallid fable
dawn acorn
small pond
#

im trying to make some code where a gif i have downloaded is moved around on a window based on keypresses. the code runs with no arrows, but nothing is shown on the window.

#

import pygame

pygame.init()

done = False

size = [1000, 500]
screen = pygame.display.set_mode(size)

x = 500
y = 250

stupid_mario = pygame.image.load("stupidmario.gif")

while done == False:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
screen.blit(stupid_mario, (x, y))

keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
    x -= 5
if keys[pygame.K_RIGHT]:
    x += 5
if keys[pygame.K_DOWN]:
    y -= 5
if keys[pygame.K_UP]:
    y += 5
#

never mind i was missing some lines

small pond
#

this error is happening now, and im unsure what im doing wrong

error:
File "/home/hannah/stupidmariomover.py", line 2, in <module>
import gif_pygame
File "/home/hannah/gif_pygame/init.py", line 1, in <module>
from gif_pygame.gif_pygame import load, save, GIFPygame, version
File "/home/hannah/gif_pygame/gif_pygame.py", line 29, in <module>
from ._common import is_ce, FileLike, Point, RectLike
File "/home/hannah/gif_pygame/_common.py", line 20
else:
TabError: inconsistent use of tabs and spaces in indentation

#

this is my code

code:

import pygame
import gif_pygame

pygame.init()

done = False

size = [1000, 500]
screen = pygame.display.set_mode(size)

x = 500
y = 250

stupid_mario = gif_pygame.load("stupidmario.gif")

while done == False:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True

screen.fill((0, 0, 0))


screen.blit(stupid_mario, (x, y))

keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
    x -= 5
if keys[pygame.K_RIGHT]:
    x += 5
if keys[pygame.K_DOWN]:
    y += 5
if keys[pygame.K_UP]:
    y -= 5

pygame.display.flip()

pygame.quit()

shut tulip
#

You need to either use tabs, or use space, but not both

small pond
#

ok thanks

#

i deleted all the tabs and spaces from my code and put them back in all as tabs, but the code still gets the same error

rain gull
#

Hey everyone,

I just released Moon Traveler — a fully offline terminal survival game where you crash on Enceladus, talk to 10 alien archetypes using a local LLM (or pre-written dialogue), explore procedural ice fields, and repair your ship before you freeze.

It’s my first real game and I used Textual for the entire TUI.

I’d love two things from the community:

  1. Play it and give me honest feedback (difficulty, fun, bugs, what to add next). Download here: https://elephantatech.github.io/moon_traveler/

  2. TUI game dev tips — I’m especially looking for advice on:
    • Real-time game loops and live widget updates in Textual
    • Clean command input / history / autocomplete patterns
    • State management for games with procedural maps + many dynamic elements
    • Performance best practices
    • Any TUI-specific design patterns you wish you knew earlier

GitHub: https://github.com/elephantatech/moon_traveler

Super grateful for any tips or play sessions — thank you! 🚀

GitHub

A text-based survival game set on Saturn's moon Enceladus with ai npcs to help you survive - elephantatech/moon_traveler

minor cloak
small pond
#

I did though

#

I went through all of them and just did tabs

minor cloak
small pond
#

It forces me to, yeah

minor cloak
small pond
#

Same error message

minor cloak
#

then you didn't change it

#

how are you editing your code?

#

Are you using IDLE or Thonny or VSCode or PyCharm or ??

small pond
#

IDLE

minor cloak
small pond
minor cloak
small pond
#

Oh?

minor cloak
#

gif_pygame.py

#

well... gif_pygame/_common.py to be exact

#

oh you're using the other pygame

#

not pygame-ce

#

maybe not relevant now but I hear pygame has bugs and pygame-ce is more stable

#

But thats not relevant to your error atm

small pond
#

Now it is

minor cloak
small pond
minor cloak
# small pond

What did you set surface to?

Maybe also uninstall pygame and install pygame-ce as the warning says so

small pond
#

If I uninstall pygame, wouldn’t other code ive made get affected?

#

I’ve used pygame in multiple pieces of code

minor cloak
small pond
#

Ok

minor cloak
small pond
#

I don’t understand

minor cloak
small pond
minor cloak
small pond
#

i installed the package from my linux terminal

minor cloak
small pond
#

pip install pygame

#

i had gone into my env though

minor cloak
small pond
#

oh oops

minor cloak
#

how did you get gif-pygame source files?

small pond
#

i meant

#

pip install gif-pygame

minor cloak
small pond
minor cloak
# small pond

it doesn't look like you installed pygame or pygame-ce or gif-pygame tho

minor cloak
minor cloak
#

Did you have a venv?

small pond
#

yeah

minor cloak
small pond
#

those files arent in the venv though

#

neither is my code

minor cloak
small pond
#

ok wait, some stuff is here

#

(venv) hannah@penguin:~$ pip list
Package Version


aiohappyeyeballs 2.6.1
aiohttp 3.13.3
aiosignal 1.4.0
attrs 26.1.0
cffi 2.0.0
davey 0.1.4
discord.py 2.7.1
frozenlist 1.8.0
gif_pygame 1.2.2
idna 3.11
multidict 6.7.1
packaging 26.1
pillow 12.2.0
pip 23.0.1
propcache 0.4.1
pycparser 3.0
pygame-ce 2.5.7
PyNaCl 1.6.2
pyttsx3 2.99
setuptools 66.1.1
typing_extensions 4.15.0
yarl 1.23.0
(venv) hannah@penguin:~$

small pond
minor cloak
small pond
#

it worked in the past

#

like ill copy all the folders downloaded and move them where needed

minor cloak
small pond
#

hannah@penguin:~$ python3
Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

minor cloak
small pond
#

oh

minor cloak
#

anyways, Imma test your code and see if it breaks something else

#

gif-pygame is underwhelming unused but there a few issues its raised in the repo

#

this may be one of them

small pond
#

do you want the gif mentioned in the code?

#

like the gif im using?

minor cloak
small pond
minor cloak
#

Im getting a diff prob tho

#
pygame-ce 2.5.7 (SDL 2.32.10, Python 3.11.14)
Traceback (most recent call last):
  File "C:\Users\User\sides\soapgame\main.py", line 2, in <module>
    import gif_pygame
  File "C:\Users\User\sides\soapgame\.venv\Lib\site-packages\gif_pygame\__init__.py", line 1, in <module>
    from gif_pygame.gif_pygame import load, save, GIFPygame, version
  File "C:\Users\User\sides\soapgame\.venv\Lib\site-packages\gif_pygame\gif_pygame.py", line 27, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
#

gif-pygame is buggy

small pond
#

i have that downloaded

#

its just a module it needs im pretty sure

minor cloak
#

yea but they should add that in their setuptools

#

And yea I'm getting the same tab and spaces inconsistencies error like you had before

#

And its from gif-pygame

#

Its buggy

small pond
#

i fixed that manually

minor cloak
#

Can you consider using something else?

small pond
#

ill try

#

its getting late so ill try tomorrow

minor cloak
lucid mulch
#

how does coding fit in roblox

shut tulip
#

What does that mean ? What kind of answer are you expecting

red jasper
#

you guys know a place where i could search for ppl interested on making a game?

round obsidian
#

If you want to make something that involves a lot of people, then your problem isn't related to programming anymore, it's about team building and human resources

viscid maple
#

Hello, everyone! I've been working on a free of charge open-source game and would love if y'all could try it and share some feedback. Here's a small gif

mint geyser
#

Hey, I wanna start game developing using python and im not sure what tutorial to start with, what would yall reccomend

limber veldt
round obsidian
#

<@&831776746206265384>

coarse hill
#

Hello @ocean pasture, I've deleted your post as this is not a job board.

novel salmon
#

I speak as someone who learned pygame and raylib from him

gleaming briar
#

what are the best python based game engines ngl

minor cloak
frank fieldBOT
#

An easy to use game engine/framework for python.

Released on <t:1765059240:D>.

signal solstice
#

Hello friends! I hope you are doing great.
Is it good staff to learn game development in python?
SOmetimes I watch some videos about the c++, because it's the classic and I love it actually, also for gaming is the best.

If I learn gaming in python, Can get a job or make some big project what will make for me money?

what is your experiencee, Do you recomend learn game development in python and why?

slow copper
# signal solstice Hello friends! I hope you are doing great. Is it good staff to learn game develo...

If you want to do game dev professionally then I wouldn't recommend python. You can definitely make some insane games with python, but it isn't an industry standard yet. Most companies use game engines of some sort. Unity, Unreal, CryEngine, etc.. (they stay away from oss engines though for some reason) some even have their own proprietary game engine too (which most likely run on c++ or c#).

Making games in python as a hobbyist or as an indie is good enough if you're comfortable with that

#

But also doing game dev professionally is a bit risky, you might want to do some research on that if you havent

signal solstice
viscid maple
# signal solstice Thanks a lot, for you attention)!

I agree with Jiggly. Not only for Python, but for other languages as well, there is much untapped potential when it comes to gamedev, but it is not an standard, so it means there'd be much trailblazing involved.

That said, if you care to learn Python really well, the risk is also a bit counterbalanced by the fact Python is valued both in and outside gamedev. It means the time and effort you put into learning Python, building a codebase and solid skills won't be wasted even if you don't succeed as a game developer.

Even so, as Jiggly pointed out, extra research is needed, because other factors are at play here, like where you live and the available opportunities, the state of the job market, etc., etc.

signal solstice
mighty pagoda
#

Yo any roblox devs here

dawn quiver
#

When making a server authoritative game over websockets, how do I reason about how to construct a gameplay loop (server side, I'll leave client side for another day)?

Like, for example, suppose I would like to say, synchronise players at 10hz. Do I batch messages in 1 tick, taking their most recent action, then calculate positions and send messages back in the next tick? Any rough outline of how to do something like this would be great.

#

I'm also wondering if doing stuff like this over websockets means you're fighting against what TCP wants to do like queue up messages

normal silo
#

However, if everyone playing has a solid connection, then it's fine.

#

This part can also be swapped out later for UDP. It's a lower abstraction layer that can be replaced if your have the right abstraction layers in your code.

#

In general there is the underlying sending mechanism layer, some read/write stream layer, and a remote procedure call layer (this is the level the game is built on (call function on remote host with arguments)).

dawn quiver
#

I get what you're saying with respect to modularity and being able to swap it out. That's unlikely for me since it would mean moving to HTTP3+QUIC+WebTransport and I can't see that happening any time soon. But, in your experience, is it possible for me just drop packets/drain the socket when the tick has finished?

#

My thoughts for movement are something like we get the latest action within this tick and then process and send back a message the next tick

#

Then the client renders the movement.

normal silo
# dawn quiver I get what you're saying with respect to modularity and being able to swap it ou...

As long as there is no packet loss TCP is often fine. You need to disable Nagle's algorithm though. For when to send sync updates, they are on their own timer, like 20 hz. In the main loop you just keep track of a counter here. This can be at the start/end before/after you call tick on your game to have it simulate, does not really matter because either way the state the client receives will always be behind (past state).

dawn quiver
#

Ah wow thank you very much for your input, makes sense. In terms of disabling Nagle's, I imagine that it can come with downsides too?

normal silo
#

Make sure your tick function is fixed delta time btw, not variable, so the clients can run something that actually matches (somewhat, not perfect match due to things like browser versions, floating point hardware config, etc).

normal silo
#

We don't want to buffer to send less times, we want less latency.

#

We are ok with spamming packets like a fountain of data to the clients.

dawn quiver
#

Yep, makes sense. About this:

Make sure your tick function is fixed delta time btw, not variable, so the clients can run something that actually matches (somewhat, not perfect match due to things like browser versions, floating point hardware config, etc).

I'm sorry for the rookie question but why does my client side matter in this case? Surely it just renders what the server says it renders (within reason for the sake of latency like some interpolation)? I thought all I'd need to concern myself with on the client side was matching montior frame rates to the game and that sort of stuff

normal silo
dawn quiver
#

Oh I see alright, does this level of sophistication on the client side reduce as we get more lax with the ticks on the server side? I really just want to do a click and move game that is a little more turn based?

#

So I'm thinking server side 10hz

normal silo
#

If your game is like a RTS or MOBA, then you don't need this fancy stuff mostly.

dawn quiver
#

You're a legend, thanks for the advice I'll be referring back to this often.

normal silo
dawn quiver
#

Oh nice! Bookmarked.

normal silo
# dawn quiver Yep, makes sense. About this: > Make sure your tick function is fixed delta tim...

Start with the most simple version of just sending the state from the server to the client at some fixed rate, and then the client just setting their state to that. Once that works (it will be jumping around due to receiving old state at 10 hz and no animation/interpolation), looking into animation/interpolation so it's not just jumping from one state to the next received state, but animating between states. If that feels too unresponsive then you need prediction, not just interpolation. But at lower pings and high send rates (like at least 20 hz), this should feel find (since you just click and then the character moves themselves via pathfinding or such).

dawn quiver
#

Perfect yeah that's what I'm working on at the moment. Just trying to set up the client in such a way that this is easy to test and verify.

plucky rune
#

where pygame dc

halcyon gazelle
#

hello i'm new here

crimson canyon
coral edge
#

nice code for your first project, hope to create my own soon (idk what kind)

elder plank
#

hello??

shut tulip
#

Yes ?

grave inlet
#

made some scuffed pathfinding!

grave inlet
#

code is scuffed but it works, I used Manhattan's Formula to calculate the distance

cerulean nimbus
#

like its giving me this stupid pixel

#

😭

cerulean nimbus
cerulean nimbus
drifting thorn
#

hi

pliant osprey
#

Hi

ocean pasture
#

Hi Python community!

I'm excited to join this vibrant group focused on the Python programming language. I currently work as a full-stack developer with a keen interest in AI applications. My expertise lies in developing practical systems that incorporate AI alongside full-stack development, delivering real-world solutions.

Core Expertise:

  • Frontend Development: Proficient in React, Vue.js, and Tailwind, creating engaging user interfaces.
  • Backend Development: Experienced in Python/Django, Node.js, and Express, building robust server-side applications.
  • AI Integration: Working on projects that combine AI features into web and mobile applications, enhancing user experiences.
  • Mobile Development: Familiar with React-Native and Flutter for cross-platform mobile solutions.

I am passionate about collaborating and exchanging ideas within the Python community. I believe in making coding accessible for everyone and am eager to contribute to projects, share knowledge, and learn from this diverse group.

If you are interested in me, please DM me anytime.

lunar venture
#

Looks like copy pasta at this point

#

But nice skill set of it's true

#

If

#

!rule 6

frank fieldBOT
#

6. Do not post unapproved advertising.

unreal viper
#

Hello, I'm very bad at English like wrong grammar. Can anyone help me or give me a reference code on how to make a category for subclasses, Like Example dreadnoughts and Jackals. Dreadnoughts are straight forward and high damage, and Jackals are speed and evasion can anyone help me through dm's? Thank you very much^^ I'm new at coding I started like about 8 days ago.

shut tulip
#

You can post your code here and point what you tried, or at least what you want to do specifically

rare cloud
#

yo chat is this good?
also someone told those dont look like boulders

knotty wagon
rare cloud
knotty wagon
#

1.75 of the small, blue squares

#

Currently it's 2x2

rare cloud
#

aah gotcha

#

@knotty wagon which one in this?

#

probably the one touching the bottom of the tile

knotty wagon
#

I feel like the second one works better, purely due to it taking up less screen space and being less harmful on your eyes

rare cloud
#

yea okie

normal silo
normal silo
#

Or not aligned with the global pixel grid.

#

In pixel art pixels can't be half way above others.

rare cloud
#

so are u saying make objects on higher resolution?

rare cloud
normal silo
#

Imagine you drew the entire frame as a single image in pixel art. This would not be possible.

rare cloud
#

so u r saying is alignment is a bit off right?

normal silo
#

Yes, alignment needs to be exact, and all pixels the same size. So you can't just scale up the sprites.

rare cloud
#

ok thanks

normal silo
#

I know a bunch of games ignore this. But then it's not actually pixel art, and is IMO bad. It's inconsistent, no longer clear where things begin and end in the way that pixel art normally gives.

#

Basically it's very tempting to just take the object and set their scale to like 0.75. But really they need to redrawn to the correct scale.

#

This is part of what makes pixel art pretty labor intensive, since you might find you need to redraw things later when it's not what you want/need anymore.

#

Here can be seen that even though the character gets smaller, the pixels are always the same scale, and aligned with a global pixel grid.

#

This requires the character to be redrawn for each scale as how they are drawn changes.

rare cloud
normal silo
#

So your game scales up to any screen size correctly.

#

IDK what engine you are using, so I can't really give advice on how to do this.

#

I would just be aware of it.

rare cloud
#

just pygame no engine

#

and the window will be having a set size would that work

normal silo
#

Ok, Pygame-ce can scale things for you well.

#

You can basically target some fixed resolution or set of resolutions (different screen aspect ratios). Then have pygame scale that up to the full screen size for you (or whatever the window size is). What matters is that it then matches the aspect ratio of the screen. Or you can optionally ignore the aspect ratio of the screen/window and render at some fixed aspect ratio (one resolution) and then in that case depending on the window shape some things may be out of view/outside the window, which may or may not matter in your game.

#

Or you can add letter boxing or pillar boxing.

rare cloud
#

hmm i will look into this

#

@normal silo this is my first time making a game, and i was trying to get some experince before the next game jam so i can participate in it maybe

#

and thanks ❤️

normal silo
# rare cloud <@119925597395877889> this is my first time making a game, and i was trying to g...

Ah, in that case as long as this does not distract too much. But I recommend just getting anything finished, even if not ideal visually and such. But scaling up is required (and simple) for pygame. It's software rendered (no gpu) and so it can only handle low resolutions, which happens to not be an issue for pixel art, because you can target a low resolution and have it scale it for you (it's a simple setting in pygame (SCALED IIRC)).

#

(Note that you don't need to leave pygame to do things that would require the GPU, it's just a lot more involved then (requires learning opengl, e.g. the moderngl library))

rare cloud
#

k

fleet cloak
#

is there anyone looking for a dev?

minor cloak
split warren
#

I need help with a game

minor cloak
split warren
#

I'm making a futuristic football game but don't know where to start

minor cloak
split warren
#

This will be a multiplayer game that lets you build your own character and costumeise the suit and depending on your character build you'll get boosts but if playing story mode you'll only play the main character

shut tulip
#

That look very ambitious, do you gave any experience with python ?

minor cloak
split warren
#

No, I haven't

minor cloak
split warren
#

How

minor cloak
split warren
#

Python

minor cloak
#

Once you decided a game engine, then look up tutorials on how to build a platformer game in that game engine

split warren
#

I might do arcade

drifting yew
minor cloak
drifting yew
#

not really. there is pretty much only one platform there, platformer means jump and run usually

#

he may as well just start making that football game

minor cloak
#

anyways, thats up to him

drifting yew
#

it's some of the same problems, I was mostly talking about actual game genre definition.

#

players still move of course, needs some physics or trajectory for the ball, hitboxes etc

#

or make it more stat dependent

civic moss
#

anyone know of some tutorials/readings that talks about battle logic/leveling up characters? I'm pretty new to programming (few months), but trying to push my way through making a CLI game (16x16 grid/map, chance on move for a battle, some squares give you items or treasure, which ups chance of getting into a fight).

rustic marten
#

Does anyone here knows how to hack a game please 🙏

cerulean nimbus
# civic moss anyone know of some tutorials/readings that talks about battle logic/leveling up...

https://youtu.be/8OMghdHP-zs

i feel like this covers a lot of it

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

This video covers game development in Python. We will create a spaceship shooter, a Vampire survivor style game, Pong, a platformer and a Pokémon inspired battle game. Via those you can master your knowledge of Python since we will touch on every par...

▶ Play video
cerulean nimbus
cold fulcrum
#

does it start from 0 like from print hi?

cerulean nimbus
#

its an 11hr video XD

#

but the dude is a legend

cold fulcrum
#

oh a 11hr vid ok

cerulean nimbus
cold fulcrum
cerulean nimbus
cerulean nimbus
cold fulcrum
#

ok I tagged it #python I'm learning python after I finish something so I'll give this a try.

cold fulcrum
#

but I forgot to tag it... good catch.

#

if I don't tag it on bookmark I never find it so thx

#

man my task.md is already full but sadge I'll add these... For the sake of python :D

cerulean nimbus
#
class BaseGame:
    _logic_handler = None
    _draw_handler = None

    def __init__(self) -> None:
        self.screen = pygame.display.set_mode((600, 600))

    def run(self):
        while True:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    exit(0)

            if self._logic_handler is not None:
                self._logic_handler()

            self.screen.fill(background_color)
            if self._draw_handler is not None:
                self._draw_handler()
            pygame.display.flip()


class BlackJack(BaseGame):
    def __init__(self) -> None:
        super().__init__()
        self.deck = Deck()
        self.dealer = [self.deck.get(), self.deck.get()]
        self.player = [self.deck.get(), self.deck.get()]

    def _logic_handler(self): ...
    def _draw_handler(self): ...
```i love my boilerplate
cerulean nimbus
civic moss
raven kernel
cerulean nimbus
#

(I used to have one that had most of my needs but forgot to save it online so when i reinstalled my os i lost it all hahahah)

raven kernel
brisk geyser
minor cloak
frank fieldBOT
#

GameMain.py line 20

icon = pygame.image.load('space.png')```
dusky pendant
#

Hey can any one just suggest me a source from where I can learn about pygame and can actually make my own game as I have never used pygame any before

dusky pendant
#

Hey thanks for the resource

#

BTW what is your name

unreal granite
#

u can make 3d games with pygame?

raven kernel
#

it would be the same as making a 3D game "from scratch" ™

cerulean nimbus
#

but it would be slower than to just use moderngl or opengl

cerulean nimbus
#

i also have one where its a more modular aproach of the cubes but my math to simulate depth is a little off

brisk geyser
half slate
#

s

pure jay
#

Hii

verbal quiver
#

does anybody do 3d modelling

#

using blender

leaden kestrel
#

hi

past latch
#

Hello there

bold tide
proper inlet
verbal quiver
# bold tide yes

i am trying to validate my product idea, so would you pay to use a ai co pilot for blender

#

it is like you can prompt or use voice commands , to make your desired model step by step ,you control each step as well as the next step , rather than directly prompting the entire ideal 3d model/character uncertain Step 1:
Create humanoid base mesh

Approve? → yes

Step 2:
Add proportional limbs

Approve? → yes

Step 3:
Add rough face topology

#

@proper inlet would you pay to use this ? if yes how much is valid to pay per month ?

novel salmon
#

Before I make more questions, what do you (yes, you again! The reader! Hello!) think of this?

ancient trail
#

Hi

foggy marten
#

@white dirge I just installed pygame

#

how do i add a sprite

white dirge
foggy marten
#

I’ve got it covered dw

#

More coding less social media

white dirge
foggy marten
slow copper
# novel salmon Before I make more questions, what do you (yes, you again! The reader! Hello!) t...

It's pretty good but there some improvements you can make to it-

First.
Use collections.abc.Callable instead of typing.Callable as the latter is deprecated.

You can pass in arguments to the generic classes to be more specific on the arguments & return types of the callable, like so:

from collections.abc import Callable

def foo(func: Callable[[int], str], num: int) -> str:
    # func takes in a callable of 1 argument which needs
    # to be an integer and returns a string.
    return func(num)

def my_func(number: int) -> str:
    return str(number)

print(foo(my_func, 10))

Second.
Stay away from using global within functions, in many cases it's the worser option. Instead pass in arguments and return the data, as the variable mutation point becomes more explicit and easier to debug. You can read this for some more info.

#

Third.
A minor improvement, I see you have this over here-
qdraw_args: list[Any] = [0, 0, 1, True]
And later on unpack it to a function call-
current_question.draw(*qdraw_args)

In fact, this is the method's signature:

# method of `MouseQuestion`
def draw(
  self,
  start_x: int = 0,
  start_y: int = 0,
  draw_bombs: bool = True,
  draw_question: bool = True
) -> None:

OR

# method of `Question`
def draw(
  self,
  start_x: int = 0,
  start_y: int = 0,
  qa_newlines: int = 0,
  draw_question: bool = True,
  draw_answers: bool = True
) -> None:

As the type of current_question is MouseQuestion | Question , If you notice, the only real difference between the default args and the arguments passed in is the 1 from the list which goes to the draw method of the Question class only.

So you can write it like this instead:

if isinstance(current_question, Question):
    current_question.draw(qa_newlines=1)
else:
    current_question.draw()

to be more explicit about the arguments you're passing. But either way, if you still want to unpack an arbitrary args variable like you have, use a tuple instead of a list to type hint it better:
qdraw_args: tuple[int, int, int, bool] = (0, 0, 1, True).

Fourth.
You don't need to use match case at all in your program as you're not making use of python's pattern matching system. Match case does not work like switch case in other languages. You can read about how to use them correctly here. For your case simple conditional statements is the best choice everywhere.

Fifth.
I see you catch for AttributeError in some places. You don't need them at all.

#

And lastly, you can use a type checker to check if your type annotations are actually correct and if your program is type safe

novel salmon
#

I see! Thank you! (But one thing, I use the Attribute error because when switching from a MouseQuestion to a Question and vice versa, the lines of code after advance_question() runs would start working on the wrong class and give me an AttributeError.

slow copper
#

Ah that's why, my type checker couldn't identify that. Another reason to not use globals

brisk geyser
#

Do any of you want to try my game?

novel salmon
drifting yew
#

anyone here making a game with 64x64 or 128x128 pixel sprites or something like that?

vocal trench
#

guys im making a game with python and im using ursina as an engine but every time i run it doesnt run a game it just says point 0 wat engine should i use to make a fairly simple game

shut tulip
#

pygame will work fine for simple games

#

Or you can try to understand what's wrong with your ursina

cerulean nimbus
amber crystal
# foggy marten how do i add a sprite

First you need to define your texture

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

Then you need to blit your texture

scr.blit(texture, (0, 0)) #>  texture, rect style
drifting yew
#

at very first the game screen needs to be initialized

lusty pine
#

i know there's gotta be some peeps in here who like retro video game music

ocean pasture
#

Hi Python community! I'm excited to be a part of this vibrant group focused on the Python programming language. I currently work as a full-stack developer, specializing in web and mobile applications, automation, and integrating AI functionalities.

My experience includes:

  • Frontend Development: Proficient in React, Vue.js, and Angular.js, I focus on creating user-friendly interfaces that enhance user experience.
  • Backend Development: Skilled in Python/Django and Node.js, I build robust APIs and manage server-side logic to support seamless operations.
  • AI Integration: I enjoy incorporating AI into applications, enhancing functionality with features like chatbots and intelligent data processing.
  • Automation: I leverage Python and various tools to automate workflows, making processes more efficient and effective.

I believe in the ethos of the Python community that anyone can learn to code. I'm always eager to share knowledge, collaborate on projects, and help others on their coding journey. If you're interested in discussing projects, ideas, or potential collaborations, please DM me anytime!

lusty pine
#

Why post this in the game dev channel tho?

lyric sierra
rugged orchid
#

Hi or python you need to use packages to can use some of the apis

#

there is existing packages that might help

#

like tkinker or what ever it is named and also ctypes if already installed in some versions of python. Dont forget that you have to install pygame pillow and more for some of the packages to work

#

I once mad emy ai with python

#

using deepseek

#

plus permanent

#

if yall wanna try something new yall can give me suggestions

#

and il make them.

long plover
#

People just downright advertising in this channel 😞

winged vortex
#

ads? where?

#

o

uncut birch
#

I tried remaking something that you might find a little familiar.. on the left is the first few days of development

wise shale
#

What should I pixel next? ping me.

raven kernel
#

maybe furniture?

wise shale
#

Do you have other furnitures in mind?

raven kernel
#

oo yeah you've posted this before

balmy pilot
#

These are impressive

#

Do you have one with plants? Rocks/stones/grass/terrain would be amazing too.

chilly epoch
#

i think i have a leak somewhere lmao

long plover
wooden night
#

Why is this channel filled with ads 😭

main prawn
#

does anyone know about Five m?

bright plover
#

m what?

untold lodge
#

thanks for the suggestion to create this channel, @mighty rose, as you can see we went ahead and did just that. When you see this, can you tell us what some of your favorite learning resources for game dev in Python are?

untold lodge
#

@mortal bridge @karmic patio you guys familiar with any more gamedev oriented Kivy tutorials, videos, stuff that might be nice to add to the pins here?

mortal bridge
#

damn, there are very nice things in this video, i wish i had spent more time building little games like this, but i don't get ideas for these 😐

iron galleon
#

has anyone used panda3d and/or render pipeline? thoughts on them?

fierce wraith
#

Ive used it once, but found it surprisingly slow... I might have been doing something wrong though ;)

minor mortar
#

Has anyone tried python arcade? I was going to myself but since newer pygame uses SDL2 it might be good enough again

foggy python
#

Pygame 2 (the version that uses SDL2) only has development builds atm.

#

So make sure you get those if you use Pygame.

mighty rose
#

@untold lodge Thanks! I really appreciate this channel's creation. I'll do my best to contribute!

In terms of learning material, there's a ton out there for sure, though the parts that seem to be missing the most are "beyond the simple", like when you get to a relatively large feature set, debugging performance problems, that sort of thing. Again, these could all be boiled down to "how to do XYZ in Python" and not specifically game development, though I had struggled for a while with performance with kivy (spoiler, I put things together really poorly at first! 😄 ).

Anyway, for the material I've learned from (specific to Python, not game design or development in general, which is a whole other ball of wax 😄 )...

#

Arcade is created by Paul Craven, he uses it to teach Python and programming concepts, and while there's not currently a path to mobile with it, it is quite approachable. http://arcade.academy/ is a reflection of some of Paul's teaching materials he uses in his class.
https://www.youtube.com/watch?v=Djtm1DzWSvo

Kivy

  • Richard Jones was one of the tutorial authors that really got me started. He is known for running PyWeek (https://pyweek.org/), and contributed to cocos2D-python in its earlier days. If you need an intro to using tilemaps, he frequently uses them (in the form of Tiled TMX files).
    There are probably "better" ways to do things than he has in the tutorial he created for a Kivy game, but it works!
    https://www.youtube.com/watch?v=U14P8gtjQmU is a talk on that, and I am hunting for the original repo of that tutorial... found it. It's probably needing updating at this point (from 2015). https://bitbucket.org/r1chardj0n3s/kivy-game-tutorial/src/master/. He also has pygame tutorials on youtube and elsewhere.

  • Erik Sandberg has been creating Kivy videos, his Flappy Bird tutorial here https://youtu.be/2dn_ohAqkus

others

untold lodge
#

thanks!

mighty rose
#

cleaned up my message a little since you pinned it 😊

And if anyone is curious what I'm working on, I try to push clips to youtube every once in a while. Eventually, once I pretty things up more, I'd like it to be another example of what can be done with Kivy.

This shows a fog of war implementation, smooth camera movement, and simple sprite animations in use:
https://youtu.be/DTv_SiIAbCE

This shows some turn-based battle "action", which uses some simple kivy graphics instructions to paint the highlighting, and more animation handling:
https://youtu.be/3ZZdyWfNvTg

Some earlier footage of an in-game editor, playing with entity state:
https://youtu.be/-ReGZBIVvks

Anyway. If anyone needs help with games in Kivy, or is running into trouble with any aspect of their project, I'll help out where I can! 🙂

grim jasper
#

since when has this been a thing

#

oh

#

I'm making a game that needs thousands of similar objects to be drawn on the screen at once. They also have "collision", so my idea was to have an pool for the actual objects themselves so I don't keep reallocating memory. I thought of achieving this by having two deques, one for active and one for inactive objects. When an object exits screen it gets moved to the inactive deque, and when I need more objects I just pop from it. If I run out I could just fill the empty deque with objects and if I have too many inactive ones I can resize the deques ETC. to 1.5x the size. I really thought this was a clever idea and I had a question if anyone had better ideas, since there could probably be cool ways to save memory

I also thought of having a separate quadtree for just the positions so I only need to search for the nearest object to a position in log time instead of having a conditional in an O(n) loop. However I need to move every object every frame and that gets real bad real fast, especially since every object needs to have an unique function that calculates their trajectory, I'm not exactly sure how I'm gonna achieve this yet, probably with some cumulative delta presenting time and then each bullet has to calculate its own possibly new position. But this seems really inefficient and I can't think of anything to make the situation better

#

I should probably look into particle systems for the latter part pithink

grim jasper
#

wait no the resizing was left over from my old ideas deques shouldn't need that 👀

#

lol

mortal bridge
#

i think what you want is often achieved using an ECS (entity component system), to be able to manage efficiently a lot of similar resources with common rules, kivent is such a system and is able to manage these order of magnitudes of such objects http://kivent.org/ has some text explaining the concepts

#

https://opengameart.org is a nice resource of free artworks for games, with defined licenses so there is not too much questions about it when building your game and needing assets, be it for placeholders or for your final game

fierce wraith
#

If you wanted to, you could move the operations to the gpu, but sadly I dont know how to do that with only python... and (at least for me) things can get very complicated very fast haha

frozen knoll
#

Hello, nice to see this sub-channel created. I've put together the Arcade library. Feel free to ping me if anyone has questions on that library. http://arcade.academy/
Version 2.2.1 was just recently released, which has a improvements around built-in resources and better auto hit-box creation.

leaden loom
#

you should get a role or something roothink

frozen knoll
#

I'm starting a sabbatical, and hoping to be able to sink a lot of time into it.

olive grotto
#

nice to have you here @frozen knoll 😄

#

I tried arcade once with my son and we really enjoyed it

untold lodge
frozen knoll
#

Hey great to hear!

mint zenith
#

That site has some certificate issue SSL_ERROR_BAD_CERT_DOMAIN

frozen knoll
#

I've never set it up for SSL, just use http. I'll add the SSL cert to the to-do list.

mortal bridge
#

letsencrypt/certbot makes setting up ssl very easy

frozen knoll
#

Yep, still need to do it.

fleet basin
#

Actually there is a cert in place already, but for *.cloudfront.net, i.e. some default Amazon thing.

#

still need to set up your own eventually, I'm just being pedantic...

mighty rose
#

Awesome to see you on here @frozen knoll! My 10 year old son has been whittling away at some of the tutorials, and I've enjoyed what I've experienced of Arcade through that exposure.

night coral
#

anyone done any networking/multiplayer recently with kivy, still trying to figure how best to tackle it.

mighty rose
#

I've only experimented a little with using Twisted with Kivy, and I think they have some examples for mixing the two together, otherwise I'm not sure. What sort of communication are you needing to implement?

night coral
#

essentially turned based, could pass the board between players or some pieces. ideally would like to get to mirror board state during the turn, rather than at the end of each

mighty rose
#

sure. end of each doesn't seem to have much disadvantage, at least on the surface 🙂 are you going to support direct peer-to-peer communication, or will there be a game server?

night coral
#

I was going to server in some form - though if I can get peer to peer that may work too.

Currently it works locally, with active player being switched. Tying that into nonlocal system is whats confusing me most atm.

Looked at pusher a while ago as a possible solution, but didnt dig too deep in

fast root
#

I was thinking about revisiting Python for game development

#

But I did have a question... in what ways can I optimize array iteration with python?

#

I want to reduce cache misses and was hoping I would be able to do that with as little C as possible haha

#

also I know python has __slots__ which can be used to pre-allocate fields in a python class but I do not think this would benefit me here?

lost needle
#

list comprehensions are generally faster than full for loops, and caching method calls can help. Pypy is massively faster than Cpython for for-loops, but generally if you're doing massive iteration you ought to be using a library to do it for you--like numpy

frozen knoll
#

Push as much as you can into a shader.

#

What types of options were you running into that you wanted faster list iteration?

jovial fable
#

Nice that you're here! I really enjoy arcade, it's very simple to use and you can goof around quickly with all the templates you posted on your site. Thank you :)

round obsidian
#

Wishlist: a Numba-like way to take Python code, decorate it with type annotations, and turn it into a shader.

#

I like that we can do numeric specialization with Python already by way of Numba or Cython; it would be great to leverage something like that to write shaders.

fierce wraith
#

You mean convert to glsl code?

fierce wraith
#

@round obsidian calling python on the gpu is a lot harder than converting it to glsl iirc

round obsidian
#

I'm not talking about running Python on the GPU, but using Python as a metalanguage for writing GLSL

mortal bridge
#

glsl in itself is not very hard,

#

what you need to know is all the functions you can use in that, and how vector format works, and you'd need to learn that even if you mapped them in python

#

i don't see anything making it worth the effort of writing and maintaining a transpiler from python syntax to glsl

#

implementing a python on the gpu seems properly insane

round obsidian
#

Again, I'm not talking about "implementing a Python on the GPU", but using Python as a metalanguage to remove the tedium of creating GLSL by using Python to generate GLSL code. But it's been some time since I tried to write GLSL directly, so I might well have apprehensions about it that don't apply anymore. I found it very confusing at the time, so things might be different now.

vestal geode
#

i don't see anything making it worth the effort of writing and maintaining a transpiler from python syntax to glsl
I agree with this

round obsidian
#

All right.

#

I suppose my real problem is that I have never found a good, from-zero, soup-to-nuts tutorial for GLSL.

mighty rose
#

Hi @round obsidian, I've actually just been learning about glsl, and from within the perspective of kivy (actually thanks to @mortal bridge, and @karmic patio for helping me with the overview! 🙂 ). I'll see if I can link some of the content I found. My needs were to write a grayscaling shader that used a secondary texture for mask logic, still simpler in terms of shaders I suppose, and so I found a "live shader editor" to toy around with. While specific to kivy, they also have a live editor example to play around with in the demo section of their repo. I highly recommend doing something along these lines, at least if that is your learning style.

#

While it could be neat to have something describe glsl in python, I would have no idea what that would look like. I believe the challenge comes in where you would want it to generate very efficient instructions, as these instructions operate on each individual pixel. I get the feeling that, even after one "knows what they are doing" with writing shaders, it is still challenging to implement them in efficient ways.

#

in python, for instance, I would be inclined to write some sort of logical expression or use a conditional to solve a problem, and it could still perform decently, generally speaking. While you can use conditionals in shaders, because it is so sensitive, you could see a large difference in approaching the problem with a mathematical answer compared to a conditional, and the return of investment on that efficiency is much higher.

round obsidian
#

Whatever you can offer would be greatly appreciated

mighty rose
#

https://www.youtube.com/watch?v=u5HAYVHsasc - uses ShaderToy and draws circles, gradients, etc.
https://www.youtube.com/watch?v=uOErsQljpHs - is a bit dry, but all great info.
https://www.youtube.com/watch?v=mcoqXej5f-0 - uses webgl for the video, but the specifics I needed to understand (passing in a texture, needing to declare it in glsl, using texture as a mask) are shown.

I'm truly just starting out, so I might not be the most ideal to suggest learning material. In fact, if anyone is more steeped in the subject, I encourage you to step up and suggest sources to learn from, and how to get started! 🙂

mortal bridge
#

that's more advanced but it can be motivating to see what's possible, videos by Inigo Quilez (from shadertoy) https://www.youtube.com/user/mari1234mari can be pretty dense with learning material, he does write articles about the techniques he uses, and has beautiful art on shadertoy.

round obsidian
#

Yeah, I'm familiar with Inigo's work there, amazing stuff

#

Just very intimidating1

sacred yarrow
#

So ive only recently began learning to code. Ive learnt a little bit of python, but i am wondering what coding language is best suited for game creation? because after my python course is over i planned to learn C#

bitter geyser
#

Any one know of any easy to implement(Or available for python3) algorithms to determen when I circle moving in a stright path enter and leaves a OBB?

vagrant rose
#

i think refer to maths modules

radiant rapids
#

@sacred yarrow Most professional game development is done in C++, although the landscape is slowly shifting. There's a growing number of commercial projects developed in Unity/C#. If you're a novice just starting out, I recommend you start learning the basic concepts of 2D gamedev in an easier language like Python. Once you've got a few games under your belt and feel more comfortable with the ideas, you can try your hand at 3D, perhaps in something like Unity.

sacred yarrow
#

@radiant rapids so its good that i began with python?

#

cause ive gotten as far as learning about Modules in my notes so far

radiant rapids
#

Yes, Python is a good language for novices, and there's decent facilities for making basic 2D games.

sacred yarrow
#

wait Is Unity its own Code language

#

or is it a platform to use a programming language

radiant rapids
#

Unity is an engine.

#

It uses C# for scripting, and it has its own GUI.

sacred yarrow
#

Ye i thought it was c#

#

Im gonna learn that later on in my next semester of Comp science

#

once im done with Python

radiant rapids
#

It's better to focus on learning one thing at a time.

#

Your experience with Python and gamedev in Python will still benefit you when you move onto C# and Unity.

sacred yarrow
#

well its a course in my HS so i dont have much a choice lol

radiant rapids
#

There are a lot of overlapping concepts.

#

Ah, right.

sacred yarrow
#

well i was told once i learn python learning other languages would be easier

#

because some of the coding languages are similar

radiant rapids
#

It's true.

sacred yarrow
#

i got no idea how similar havnt tried other languages

radiant rapids
#

Knowing any language will make learning other languages way easier.

#

And Python has a LOT of concepts in common with C#.

sacred yarrow
#

ah so thats why my teacher said well start it after were done with python

radiant rapids
#

Yeah, that sounds reasonable.

vagrant rose
#

basically python has many flavours

#

I m learning Ipython

#

if u want to hands on logical problems pls visit website Project Euler

mighty rose
#

does anyone know of a pure python implementation for creating geometric shapes, like concave hulls, for instance, from a list of points? I'd like to avoid extra dependencies, like scipy/numpy/etc.

#

I saw Py2D but that doesn't have support for creating hulls, it doesn't seem.

frozen knoll
fierce wraith
#

Im doing a n body sim on the gpu and it works great, but im only rendering the bodies as points..

#

Whats the best way to render spheres at each of the bodies positions?

#

All the bodies are in one buffer

#

I imagine writing a geometry shader to render each sphere would be very slow

#

What other options are there?

crystal walrus
#

@frozen knoll Just wanted to say that arcade library is really nice! finger_gun_dank

frozen knoll
#

@fierce wraith - If you are using Arcade, I'd just create a sprite for each body. You can make them look anyway you want.

#

It would be like this,

fierce wraith
#

Im using moderngl

frozen knoll
#

Oh, nvm.

fierce wraith
#

Does arcade have compute shaders?

#

Then I might switch to arcade

frozen knoll
#

I'd stay with moderngl if you are already using shaders.

fierce wraith
#

And I feel like having a sprite for each of them would be pretty slow, the num of particles is in the thousands

#

Does arcade support shaders?

frozen knoll
#

It uses shaders to handle the sprites.

fierce wraith
#

Ah but can you write your own?

frozen knoll
#

But it is assuming you are moving sprites on the CPU, not GPU.

fierce wraith
#

Ah. I really need the power of compute shaders here

frozen knoll
#

Yep.

#

Sounds like you've done the hard part though. Adding the visualization might be easier?

fierce wraith
#

Yeah I hope haha

#

I also want to add a trailing effect

#

and its suprisingly stable haha. been running for over 3 hours at 1.7kfps

#

this is with a dt of 1 / 100000s

night coral
#

blender too much? kivy does have a mesh renderer but not had much luck with it myself

fierce wraith
#

id love a suggestion on how i could make a trail renderer...

#

also if someone has a a starting condition they think might play out interestingly id love to try some 🙂

untold lodge
#

@potent ice might have some input on that, being closely connected with moderngl

potent ice
#

I guess it depends how much trailing you need

#

The simplest way is to render your sprites to an fbo

#

Instead of clearing the fbo you fade the color values in it

#

There are several way to do it, but two fbos is probably ideal

#

Frame 1 : Render to A

#

Frame 2 : Render to B + layer over fragments in A * 0.9 (or whatever multiplier you want)

#

etc

#

@fierce wraith

#

So I guess in theory you can have a trail that lasts 250ish frames

#

Unless you are using floating point render target (HDR). This is only for RBGA8

#

Good old swapper fbo1, fbo1 = fbo2, fbo1 + use texture attachments. You've done this before 🙂

#

And yes.. stay with generating points and emit with geometry shader

#

Then you can render millions of particles instead of hundreds

#

It also means the compute shader only need to worry about points

fierce wraith
#

while i have you, i think im doing some buffer swapping wrong already

#

so initially i write into buffer1

#

then i bind buffer1 to binding0

#
# bind the buffers to 1 and 0 respectively
self._toggle = False
self.buffer1.bind_to_storage_buffer(self._toggle)
self.buffer2.bind_to_storage_buffer(not self._toggle)```
#

and buffer2 to binding1

#

the first compute shader i run has binding0 as its input and binding1 as its output

#

then i swap the buffers. for my second compute shader

#

it has the same bindings as the first compute shader

#

then i swap one last time

#

its all very confusing

#

haha

potent ice
#

That looks reasonable, but it's confusing that you are using a bool 😄

fierce wraith
#

that lets me switch it easily, what do you suggest?

#

*line

potent ice
#

I'd swap out_buffer, in_buffer instead, but it's not a big deal. What you do should work because the binding is 0 and 1

fierce wraith
#

im getting some nan problems, i think its from me subtracting two very large floats

#

ie position of pluto (4.5e12) and the earth (1.5e11)

potent ice
#

hmm yeah might want to scale that down if you are using 32bit floats

#

or move to dvecs

fierce wraith
#

yeah ive tried moving to dvecs and that ruined everything haha

potent ice
#

Scale down the values 🙂

fierce wraith
#

can i have my interleaved buffer with different data types?

potent ice
#

yes

fierce wraith
#

hm i guess i can try to just make the position a dvec

#

'f8' is the numpy datatype for double right?

potent ice
#

yup

#

the string version of it at least

fierce wraith
#

and 4f8 for dvec4?

potent ice
#

I haven't really used mixed datatypes in a numpy array, so I'm not sure if that would be compatible with the buffer protocol when uploading to gpu

fierce wraith
#

well.. that didnt work haha

#
interleaved = np.c_[positions.astype('f8'), velocities.astype('f4'), force.astype('f4'), colors.astype('f4')].flatten()
#

np.c_ concatenates the arrays, i know that works

potent ice
#

got an error or?

fierce wraith
#

nah it just doesnt work

#

hah

#

might be that np.c_ converts to one datatype

potent ice
#

Maybe just use separate buffers for each attribute for now. It makes it easier to use different datatypes per attrib

fierce wraith
#

but im using a planet struct in my compute shader

potent ice
#

Unless you know exactly how np can handle that

fierce wraith
#
{
    dvec4 pos;
    vec4 vel;
    vec4 frc;
    vec4 col;
};
potent ice
#

ahh

fierce wraith
#

i cant do that with separate buffers right?

potent ice
#

You're right. It would work with a vertex shader, but harder with compute

#

Maybe print out one planet entry with tobytes() and verify the contents.

fierce wraith
#

yeah its just nans after one step

potent ice
#

I have NO idea how np concats different dtypes

fierce wraith
#

yeah me neither.. @hybrid badger do you know?

potent ice
#

Is pluto is too far out for a float32 it'd still scale down the values

fierce wraith
#

the largest distance is 4.5e12

hybrid badger
#

you'll probably get an error, but it may be able to convert, say, ints to float --- i'm betting on an error though

fierce wraith
#

can i tell numpy to have different types in the array?

hybrid badger
#

no

fierce wraith
#

hmm

potent ice
#

You may be better off with struct.pack here?

hybrid badger
#

you could make object arrays i guess, but then everything get's shaky

fierce wraith
#

how would that work @potent ice>

#

*?

#

yeah object arrays are never a good idea

potent ice
#

Just store the data with python datatypes and struck.pack() them into bytes

#

Just get the format string right. All in the docs

fierce wraith
#

ah ok. and then write the bytes into the buffer?

potent ice
#

yup

#

The struct module is also very fast

fierce wraith
#

how would i interleave the data?

potent ice
#

struct supports patterns for that

fierce wraith
#

do i first zip the data and then pack it with something like 'ddddffffffffffff' for one dvec4 and 3 vec4?

potent ice
#

Can't you just feed it a generator?

fierce wraith
#
data = [0,0,0,1, 1,2,3,0, 4,5,6,0, 7,8,9,0]
struct.pack('ddddffffffffffff', *data)```
#

but how would i check if the encoding is correct?

potent ice
#

Do a len and check that the byte size is correct. Other than that you just have to trust the struct module converts your data correctly to IEEE 754 floats. 😄

fierce wraith
#

hmm

#

80

#

looks about right

potent ice
#
>>> struct.pack('4f', 0, 0, 0, 0)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 
#

16 bytes

fierce wraith
#

struct.pack('4d4f4f4f'*(len(data)//16), *data) seems to work

potent ice
#

yup. should work. There are also more efficient ways to pack multiple entires instead of building a potentially enormous string.

fierce wraith
#

4f8 4f 4f 4f has size not aligning with 64. Remainder: 16

#

but 80 is correct because the double is 4 bytes longer

#

64 would be 4*vec4

potent ice
#

hmm checking. Maybe I have a bug?

#

yeah it should be 80. Do you have the code somewhere public?

fierce wraith
#

yup

potent ice
#

@fierce wraith Checking in a few

fierce wraith
#

yeah np, take your time

potent ice
#

ValueError: Requested OpenGL version 430, got version 410 crap I am cursed on OS X atm. My win PC died!

#

But I can isolate the buffer creation, np

#

lol ... ```python
BUFFER_FORMATS = {
# Floats
'f': BufferFormat('f', 1, 4),
'f1': BufferFormat('f1', 1, 1),
'f2': BufferFormat('f2', 1, 2),
'f4': BufferFormat('f4', 1, 4),
'f8': BufferFormat('f4', 1, 4),

fierce wraith
#

haha

potent ice
#

Last parameter is byte size

fierce wraith
#

yeah

#

is that a easy fix?

potent ice
#

Pushed now.

fierce wraith
#

but not to pip right?

potent ice
#

Nope, but soon. Just clone repo and pip install it

fierce wraith
#

can i then delete the clone?

potent ice
#

I think you can just pip install -I https://github.com/moderngl/moderngl-window/archive/master.zip

fierce wraith
#

haha more like moderngl not my repo hehe

potent ice
#

fixed

fierce wraith
#

thx, downloading

potent ice
#

It's thankfully something in moderngl-window, not in moderngl itself

fierce wraith
#

ah ok

#

ah ok now that part works atleast

potent ice
#

I'll release new 2.0.5 this weekend, so you might as well update your requirements now

potent ice
#

@dawn quiver Maybe look into sprites in the pygame docs

#

There are many examples

fierce wraith
#

i had a massive brainfart earlier.. i was trying to zoom out further but i forgot to set the far plane so something larger... i was very confused why it nolonger worked when i zoomed out haha

potent ice
#

ah. A good default is 1 -> 1000 at least 🙂

#

@fierce wraith 2.0.5 is on pypi now.

fierce wraith
#

i now have 7e15 hah

potent ice
#

Yes, but update your requirements.txt so us other poor bastards can run your stuff 😄

fierce wraith
#

haha ok!

potent ice
#

@dawn quiver There is also a pygame discord

#

I think the way you are doing your main loop is not very optimal

#

I would use callbacks for key events and also try to force a 30-60hz screen update

#

I don't know how they do that in pygame because they don't have vsync

#

But probably not complicated

#

Take advantage of all the examples they have 🙂

#

It's really an enormous amount

potent ice
#

Leterax, you are not allowed to find any more bugs today, just sayin..

echo schooner
#

what are the advantages/disadvantages of making an incremental game with python vs javascript/html/css?

mortal bridge
#

well, if you do them in python only, you'll need the users to install a program to play them, while if you use web tech, they can play in their browsers, but doing them in python means you have more control with how they interact with it, instead of having to care about all possible browsers and also to care about the fact that a browser is easily scriptable so they could just run their own javascript in the page to simulate clicks. if you do it in python, you have multiple very different technologies to define your interface, each with their specificicies, though a clicker game like this probably doesn't need a very elaborate UI.

dawn quiver
#

if you turn them into exe you don't need to download

fierce wraith
#

i think tshirtman means you need to download the game not python

mortal bridge
#

and windows might not be the only platform you want to target, so exe is not enough

dawn quiver
#

people who game don't use linux tho

#

same for Mac

fierce wraith
#

hey @potent ice is there a reason this is somehow resulting in nan/inf?

(f/m)*DT```
#

f is just a (0,0,0) vector, m is extremely large (2e25) and dt is 1

#

i would have thought 0/x is always 0...

potent ice
#

Are you mixing double and single precision floats in that formula?

#

Try doing the same in python

#

I think you're going to hit several issues by using doubles

#

I'm not even sure if a vertex shader can emit them through gl_Position

#

So, you might be going down a treacherous path with this, but you'll certainly learn something

mighty rose
#

@dawn quiver maybe you mean "most people who game don't use linux to do so" because, I'm on linux, and all of my kids' computers are as well, and quite a few friends. It's definitely a thing, just a much smaller user base than windows 😉 https://www.reddit.com/r/linux_gaming/

regardless, one can certainly build binaries of python games for distribution on each desktop platform, and it's not too bad. Kivy provides a path to mobile as well.

dawn quiver
#

linux_gaming that is really a thing ?

mighty rose
#

for sure! It's been growing rapidly since Valve made Steam Play a thing. Check out protondb.com, it's a database of game compatibility for steam games using proton (steam "fork" of wine, which enables most windows games to be played on linux).

It's not as good of performance for running games made for windows, but the performance difference is normally 0-15% is all. (still totally playable)

Five years ago it was a very different story!

fierce wraith
#

@potent ice no im only using doubles in the compute shader

#

I cast to float for the vertex shader

potent ice
#

okok. I don't really have much experience with dvecs to be honest. I've used them a couple of times in compute shaders, but they were not involved in any fancy calculations.

#

And yes. Linux gaming is not a complete joke any more. It's getting somewhere.

#

OS X gaming.. that's the biggest joke now. I say that as an OS X user 😄

frozen knoll
#

I was really disappointed that they are going to drop additional OpenGL support on OS X.

potent ice
#

Yes. That has been bothering me for a long time.

#

and I know it has made porting games to the platform a lot more difficult.

#

If they had at least stopped at 4.3 it would be a lot easier, but stopping support at 4.1 is a dick move 😄

#

Still.. a lot can be done with 3.3 -> 4.1, so it's not all bad. It's just that not having compute shaders adds a lot of limitations for games.

#

You can use transform feedback instead. That is 3.3s "compute shader", but if you need to process data in a non-linear way you have to provide it through textures or UBOs if it can fit inside 64k

vital skiff
#

this me after 5m from starting a game project

fierce wraith
#

hmm @potent ice im running into a bunch of nans and i have no idea why.. like even in areas i dont write to..

#

the initial condition in the buffer for one of my planets is

pos: (-100.0, 0.0, 0.0, 1.0)
vel (vel.w is mass): (0.0, 0.0, 0.0, 10.0)
force: (0.0, 0.0, 0.0, 1.0)
color: (0.15000000596046448, 0.5, 0.5, 1.0)```
#

and after calculating the force and then applying it once i have a bunch of nans

(-100.0, 0.0, nan, nan)
(nan, 1.0, nan, nan)
(nan, 0.0, -0.0, -0.0)
(0.0, -0.0, 0.0, 1.875)```
#

and its sets the color???

potent ice
#

Just writing out a copy of the input gives you what values?

fierce wraith
#
(-100.0, 0.0, 0.0, 1.0)
(0.0, 0.0, 0.0, 10.0)
(0.0, 0.0, -0.0, -0.0)
(0.0, -0.0, 0.0, 1.875)```
#

well thats with me setting the force

#

but not doing anything else

#

if i dont set the force it stays the same

#

but how can setting the force change the color

#

this is the struct:

struct Planet
{
    dvec4 pos;
    dvec4 vel;
    dvec4 frc;
    vec4 col;
};```
#

and i set the out planet with:

#
    Planet out_planet = Planet(in_planet.pos, in_planet.vel, dvec4(-f_i, 1), in_planet.col);

    Out.planets[x] = out_planet;```
#

where f_i is the force dvec3

potent ice
#

Not sure. No time to look into it now

#

Is this just som buffer issue or compute shader issue

#

.. is the question

fierce wraith
#

i might also be reading the buffer wrong

frozen knoll
untold lodge
#

sweet!

#

looks great

potent ice
#

Nice. Completely forgot about that game

trim raptor
#

Does the term GUI apply to all things displayed to the user?

potent ice
#

Well. "Graphical user interface" would at least certainly imply that.

dawn quiver
#

so, i know this isnt exactly python, but im making a game in unity and i have two terrain generating scripts, one generates a bunch on tiles underneath a parent, and the other determines how many parents to place in the world. I want to generate caves, but if i put it in the parent class, the caves might get cut off since those parents are just one chunk of the whole, and if i put it in the parent-placing class, it would be harder to access/destroy the cubes that make up the parent classes in order to generate caves. With you guys having a coder's mindset, i was wondering if i could help get some insight on where to add my terrain generation process.

mortal bridge
#

well, text displayed to the user in a terminal is often not considered GUI (but strictly speaking i disagree and certainly would count it as part of it) (sorry it's not a response to your message AOTLevi but to the previous question)

night coral
#

unless you're salt I'd veer on the side of text not being graphical

fierce wraith
#

@potent ice are doubles known to drift somehow?

#

ah ok it looks like for some reason vec3(0)/other_value will result in a non 0 vector...

potent ice
#

You got to be careful what types you combine them with when calculating stuff

fierce wraith
#

oh sry i meant dvec3(0)

#

its double vec divided by a double

potent ice
#

In GLSL 4.00 and above, double-precision floats are available. By default, all floating-point literals are of type float. To create a double-precision float, use the lf or LF suffixes. This will force it to the double type.

fierce wraith
#

what is a suffix?

potent ice
#

They are for defining types of literals.

fierce wraith
#

so lf myvar?

potent ice
#

I think that would be 1.0lf. Same as in C/C++

#

The glsl spec is based on C

fierce wraith
#

but im not using any constants that i could add that

#

to

#

im just reading the data from the buffer and then using it

#

My buffer is filled with planets like this:

struct Planet
{
    dvec3 pos;
    dvec3 vel;
    dvec3 frc;
    float mass;
    vec4 col;
};```

then in the compute shader i do some simple math to update their position/velocity
```glsl
    Planet in_planet = In.planets[x];

    dvec3 p = in_planet.pos;
    dvec3 v = in_planet.vel;
    dvec3 f = in_planet.frc;
    double m = in_planet.mass;

    dvec3 new_a = (f/m)*DT;
    dvec3 new_v = v + new_a*DT;
    dvec3 new_p = p + new_v*DT;```
#

and in the linedvec3 new_a = (f/m)*DT; it messes up

potent ice
#

m is a float. That might be a problem?

fierce wraith
#

ohhhh

#

shit...

potent ice
#

I don't really have much experience with dvecs. I'm just trying to make sense of it

fierce wraith
#

will glsl do implicit casting if i try to read as a double?

potent ice
#

read how?

fierce wraith
#

double m = in_planet.mass;

potent ice
#

Cast it with double(in_planet.mass)

fierce wraith
#

hmm nope still doing that weird drifting

#

initially:

pos: (0.0, 0.0, 0.0)
vel: (0.0, 0.0, 0.0)
force: (0.0, 0.0, 0.0)
mass: (10.0,)
color: (0.5, 0.15000000596046448, 0.15000000596046448, 1.0)```
and after a few sec

(0.0, 1.9053571453340377, 9.303502992384605e-05)
(0.0, 0.0, 0.003410035108620464)
(1.66505643915018e-07, 0.0, 0.0)
(10.0,)
(0.5, 0.15000000596046448, 0.15000000596046448, 1.0)```

#

even though nothing should be happening

#

also weird stuff like having a force in the x axis, a velocity in the z axis and a displacement in the y axis...

potent ice
#

I would make them 32 floats and see you get the get same problem (temporarily)

fierce wraith
#

no, it was fine with floats

potent ice
#

What is DT?

fierce wraith
#

delta time, .1

#

just using #define

potent ice
#

paste the definition

fierce wraith
#
#define DT 0//%DT%```
#

and i replace the last part in python

#

so it will be
#define DT 0.1

potent ice
#

#define DT 0.1lf ?

fierce wraith
#

i can try 🙂

potent ice
#

That define is a literal, so I think that is a problem

fierce wraith
#

now its:
#define DT 0.1lf

#

still the same problem

#

should i use a const double DT = .1?

potent ice
#

Worth a try

fierce wraith
#

nope 😦

potent ice
#

hmm. What happens if you do the same calculations in repl?

#

Are you struct unpacking them and writing them again to the buffer every frame?