#game-development

1 messages Β· Page 81 of 1

grand imp
#

what does this mean?

chilly coral
grand imp
#

is this drawing it in the terminal or on some sort of 2d drawing surface?

chilly coral
#

terminal drawing

grand imp
#

hm

#

when you said "it doesn't work like that", do you mean that it doesn't draw pixel images in color?

chilly coral
#

every line is a +1 on the y axis

chilly coral
grand imp
#

well

#

you said there were hitboxes that have arbitrary polygon boundaries, right?

#

and you want to use tiles as the basis of collision detection?

chilly coral
#

me:
so i want 2 separate worlds
the rendering one
and the collision one

every object got its side on each world

sprites for the rendering one (visuals)
and a collision range for the other one

grand imp
#

sprites for the visuals?

#

so this is a pixel based engine, in a sense

chilly coral
#

ascii drawings

grand imp
#

but it's drawing ASCII for the pixels

#

when you say collisions, are you imagining hitboxes like this but polygons?

chilly coral
grand imp
#

so you want to use the overlap of the polygons to determine collision, not how the tiles are drawn?

chilly coral
#

ye

grand imp
#

ok, then you want a different algorithm than calculating each point along a line

grand imp
#

you can simplify the issue by not allowing concave polygons

#

but

#

there's no solution that's both flexible, simple, and efficient.

#

you have to choose two of the three

chilly coral
#

so

#

how can i do it

#

I want only calculate the edges

grand imp
#

what do you mean

chilly coral
#

as you saw in my drawing, i only did points for the edges, not the inside

#

this is what i want

grand imp
#

are you actually trying to ask about edges, or are you trying to find ways of answering the question of whether two shapes made of arbitrary polygons overlap?

chilly coral
#

this

grand imp
#

i think this is a solution people use

#

yeah i am too

grand imp
#

i think it might be easier to break each shape into a bunch of triangles

chilly coral
#

this

grand imp
#

that'd be my approach

chilly coral
#

i am confused

grand imp
#

look at that page

#

the idea is that you can break any polygon into a bunch of triangles

chilly coral
#

i dont want to do that

grand imp
#

then choose a way of checking of the triangles overlap

#

why not?

chilly coral
#

oh my god i lost it

grand imp
#

if you only check if the edges intersect, then you might end up with a situation where a fast moving object clips through stuff

#

and ends up inside another poly

#

that's bad

chilly coral
#

i have a solution

grand imp
#

what is it?

chilly coral
#

for every edge, get the edge that is past another one like:
edge1 edge2 edge3
edge1 with edge3
and we do this so that we can make a sort of X
and this will only happen to 4 edges

grand imp
#

im not sure i understand. are you treating the center as another point to make triangles with?

chilly coral
grand imp
#

well, I'm confused

#

you can try the solution you have and see if it works

chilly coral
#

but idk how to get positions in between

#

when i will, i can make it then

grand imp
#

but i think the algorithms i mentioned, and the general category of shape intersection algorithms, will be of help to you

dim loom
#

hi

chilly coral
#

so i said

#

we start from the first point, and get the other one
the other one will be: skip the second point and get the third
make a line between it
and now we start with the second point

#

but i just need

#

a sort of code

#

to get positions in between points

grand imp
#

the positions between points
there are two things i'm confused about, but this one is the most important

#

if you are only looking at integer positions between points, then you are effectively drawing pixels

chilly coral
#

i am drawing characters instead of pixels

grand imp
#

no, you don't understand

#

if you generate a list of integer points between (1,1) and (1,5)

chilly coral
#

exactly how the coordinates are
[x, y]

grand imp
#

then trying to intersect the set of points from (1,1) to (1,5) and the set of points from (1,3) to (5,3) is the same as checking if two bitmaps with lines drawn on them overlap

#

and at the resolution you're working at, it's like checking if the sprites overlap

#

unless you have two different resolutions for sprite drawing and the collision bitmap masks

chilly coral
#

the user will give the resolution he wants to...

grand imp
#

do you have any experience with binary logical operators?

#

like ANDing two numbers, one that's 0b11100 with 0b10100

#

or whatever their hex / decimal version is

#

i don't mean image size btw, i mean relative resolutions of images

#

you know how the shadows in games on low are jagged and pixelated?

#

but then the texture of the object the shadow is projected onto is much higher resolution?

grand imp
#

that's the same sort of difference I mean

#

where unless the collision mask is generated with a higher resolution like the object receiving shadow relative to the shadow projection, there is no difference between checking for overlap between the sprites themselves

chilly coral
#

so, you are telling me that getting points between start / end points is a pain?

#

i would just like to know how

#

i have a solution

#

for if the polygon is inside

grand imp
#

I'm saying it makes no sense because you might end up with a situation like this, (0,0) in the upper left:

#

where red and green are the lines of two different polygons

#

as sets, green would be the set of integer points from (0,0) to (5,5)

#

red would be the set of integer points from (0,5) to (5,0)

chilly coral
#

and i will get, that There is a collision

grand imp
#

there isn't

chilly coral
#

wait

#

what

#

they are intersecting....

grand imp
#

oh i gave them six instead of 5 but

#

each square represents and integer point

#

there is no tile that is both red and green

#

so if you only look at the integer points in between the vertices of polygons, there will be cases where the lines of the polygons do not intersect when rendered to tiles

chilly coral
#

uh

grand imp
#

er wait

#

i did that wrong

#

i should have used python to generate those πŸ˜…

chilly coral
#

anyways

#

how. are. you. generating. with. python
what code are u using

grand imp
#

im not using python to do it

#

im drawing it in a js pixel editor

#

here's a very minimal example

#

green is the line from (0,1) to (1,0)

chilly coral
#

k

grand imp
#

red is the line from (0,0) to (1,1)

chilly coral
#

AHH

#

yes

#

they are not touching

grand imp
#

green: (0,1) (1,0)
red: (0,0), (1,1)

#

now do you see why only looking at the integer points between places will fail sometimes?

#

it will work a lot of the time, yes

#

but sometimes you'll have weird situations where shapes going fast enough will fly through one another and end up stuck inside each other like a bethesda game going wrong

chilly coral
#

so

#

i have a solution

dusk dome
#

One message removed from a suspended account.

chilly coral
grand imp
#

the bigger point I'm making is that there are actually multiple kinds of collision detection used in games

chilly coral
#

so i can simply check the corners like left by 1 pixel and right by one pixel

grand imp
#

hmm

#

maybe

#

that will work for lower speed objects

#

but what if you have a very tiny object going fast at a larger line?

chilly coral
#

oh

#

now a line

#

doing collisions is a pain

grand imp
#

lmao, absolutely

#

imagine the little green rasterized diamond

chilly coral
grand imp
#

is going really fast to the right

chilly coral
#

i think

grand imp
#

well

#

sort of

#

here's the thing

#

FPS engines actually sometimes have two kinds of collision detection

#

one for fast objects like bullets

#

and one for less fast objects

chilly coral
#

a solution

#

i got one

grand imp
#

the point I'm making is that a game engine on its own can't be that general

#

or it will suck at stuff

#

you have to choose what sorts of problems you're going to solve

#

and to do that, it's a good idea to have an idea of what kind of game you want to make in the first place

#

Unreal and Source were written and optimized with FPS games in mind

chilly coral
grand imp
#

you can do some other kinds of games with them

grand imp
#

only they use complicated math rather than integer spaces

chilly coral
#

but

grand imp
#

with Beth games, usually you aren't supposed to drink 5000 bottles of skooma at once

chilly coral
#

that will work

grand imp
#

it might!

chilly coral
#

wait

grand imp
#

but doing it only on integer spaces might also be kind of inefficient to do on CPU

#

if you're limited to only what's on the size of the terminal, it'll be fine

#

but if you have an off-screen world, it might start getting ugly

chilly coral
grand imp
#

you know how minecraft water updates really slowly?

grand imp
#

yeah if you tried to make it go fast the simulation might have trouble working fast enough for the game to be playable

#

you could make a program that's a really good water simulation, but it would restrict the CPU and GPU time you have available to do stuff in the rest of the world

#

well

#

ok

#

you've made a choice

#

and a limitation

#

that's good

#

successful games development is really about choosing your limitations and assumptions

#

and then working with them

#

you played any source based games?

#

TF2, CS GO

proper peak
chilly coral
#

no

#

i didnt play any of these

grand imp
#

ok, i'll send a video

chilly coral
#

my pc doesnt even have a gpu

grand imp
#

just turned down to really low lol

chilly coral
#

anyways

#

all i need now

#

is something

proper peak
#

also, check out this beautiful thing

#

This is the interactive demos for the Rust-writter nphysics engine

grand imp
# chilly coral anyways

https://www.youtube.com/watch?v=YBVdtXxrUyk you can watch videos about it later but in source, if there's a steep angle, you can fly along it if you approach it from the side

hi, this vid took me a long time so gimme feedback pls
btw i surf on resurfed servers

My Twitch Channel: https://www.twitch.tv/lakitooyt
My Twitter Account: https://twitter.com/Lakitoo_
My Steam Profile: https://steamcommunity.com/id/lakitoo

I use FlawHUD (https://huds.tf/forum/showthread.php?tid=252) but I've changed the background to this im...

β–Ά Play video
proper peak
#

you can look at how 3d and 2d simulations change with changing parameters, in real time, in your browser

grand imp
#

people call it "surfing"

#

it's a glitch in the source engine's physics

#

valve didn't waste their time on fixing it because none of their levels had surfaces like that

chilly coral
#

to get the positions in between a starting and end point

grand imp
#

well

chilly coral
#

just this

grand imp
#

i told you, bresham will do that

chilly coral
#

k

grand imp
#

BUT

chilly coral
grand imp
#

the more complicated solutions people use for collision detection are used because they are reliable and efficient

#

now

#

what you can also do

#

is do a modified version of bresham where you draw the left and right bounds at each y position of a polygon

#

then fill each x position between the Y ones

#

that would let you use the set object in python

#

however, i think you could be more efficient than that

chilly coral
#

so this?

grand imp
# chilly coral so this?

if this is what you're describing earlier, where you expand the number of points drawn by drawing all points within a radius of 1-3 (or really N) points from the line

#

that's pretty similar to drawing a line in photoshop with a pencil brush size of N rather than a size of 1

#

even if you're confused by all of this, what I want you to take away from this is that efficient collision detection in games is hard

#

and there's no perfect solution

#

you have to pick the weaknesses your solution has to suit the game you want to make

chilly coral
#

and also consider the pain because i wont use any libs

grand imp
#

you're not using libs because you want to learn, right?

chilly coral
#

yes

grand imp
#

ok, let me ask another question

#

are all parts of the environment able to move

#

or are there some shapes that will be unable to move

chilly coral
#

everything can move

grand imp
#

hm

#

so if you want to try doing your line solution

chilly coral
#

not everything

#

can

grand imp
chilly coral
#

have collisions tho

#

if the user doesnt give collision points

grand imp
#

or an algorithm like it

chilly coral
#

then the object would'nt have collisions

grand imp
#

btw, red blob games is good to check for other topics

#

the author makes really good articles

#

the example code is in JS but it's still pretty clear

chilly coral
#

k! i will stick with bresham

#

Bresenham*

grand imp
#

also lol they mention the diagonal non-intersection issue on that article

#

hmm

#

this might help your integer location collision mask approach work

#

ok, so if you want to try it

#

what you could do is one of the line drawing algorithms described, but instead of drawing, you take the current coordinate, and add it to a set in python

chilly coral
#

hmm, i have another easier approach

grand imp
#
shape_intersection_boundaries = set()
# you probably won't have a function like this, but i wrotte it this way for clarity
if point_is_on_line(x,y):
  shape_intersection_boundaries.add((x,y))
#

well, the easiest and most efficient approach is disallowing rotation and having only rectangular hitboxes

#

streetfighter 2 did that

chilly coral
#

but my approach is

chilly coral
grand imp
#

not sure what you mean rn and i should probably get back to work on some stuff, but I hope discussing this at length helped at least a little

chilly coral
#

so i check 1 more bit to the left and right

grand imp
chilly coral
grand imp
#

i suspect you're still going to run into issues at some point

#

but if you set a hard upper limit on movement speed, you might be able to avoid the issue somewhat

blissful depot
#

My pygame ZERO code doesn't work.

#
def move_player():
    if keyboard.w:
        player.y -= 2
        clock.schedule_interval(animate, 0.5)
    if keyboard.s:
        player.y += 2
        clock.schedule_interval(animate, 0.5)
    if keyboard.a:
        player.x -= 2
        clock.schedule_interval(animate, 0.5)
    if keyboard.d:
        player.x += 2
        clock.schedule_interval(animate, 0.5)
    else:
        player.image = "player"

def animate():
    global frame
    curr_img = "player-walk" + str(frame)
    player.image = curr_img
    frame += 1
    if frame > 2:
        frame = 1
#

It is for animating an image

#

but for some reason, it is only animating when I do the "d" button

#

wait

#

problem solved!

#

nvm

restive lantern
#

i was thinking of recreating this game on pygame. do you think this might be too heavy for python?
https://www.youtube.com/watch?v=YIlTXTbd7FY

#

its called pixel breakout

normal silo
restive lantern
#

never heard of moderngl what is it?

normal silo
#

like PyOpenGL, but nicer.

#

(specifically wraps opengl 3.3 core)

#

Another option is to write some cython code for the particles / collision.

dawn quiver
#

</shamelessselfpromotion>

finite badger
#

Where would I start with a platformer game in PyGame

last moon
finite badger
#

ight thanks

foggy moss
#

I need help regarding the best ides for python and pygame and neat

drowsy rampart
#

any latest pygame 2.0.1 documentation(pdf)?

finite badger
#

If I wanted to draw something, let's say a bullet, in the main loop, before I use screen.fill(), how would I do this. (I need to draw something in an event.) This is in PyGame obviously

potent ice
#

Make the event set some state instead

#

Check that state in the beginning of the draw loop

#

I would avoid drawing in events completely

finite badger
finite badger
#

Wait so how would I draw something when the player fires the MOUSEBUTTONDOWN event? @potent ice

potent ice
#

You might have a list of active projectiles for example

finite badger
finite badger
potent ice
#

There is only one rect?

#

I'm saying you can add a new rect to a list of active projectiles in the event (just an example)

#

The draw code will just that those rects

dawn quiver
#

i hope i am not interrupting anyone but what is python i don't know anything about coding

potent ice
#

Might be better and faster ways

potent ice
#

Much better place to start if you are that new πŸ™‚

finite badger
potent ice
#

you can remove from the list if needed

#

I would think sprites and sprite groups could work better for this?

finite badger
#

Ok

short meteor
#

hi all does anyone know the best way to position objects relative to each other in panda3d. for example suppose i want my characters feet to be resting on a the top surface of a cube but not inside the cube. im fairly new to panda3d

abstract light
#

bruh

#

@short meteor

#

same

#

Except I'm using Ursina

#

does anyone know how to use Ursina? I'm more of a trying it out learner than just watching learner.

lament carbon
#

can someone show me how to do stuff in python by the user clicking a key

#

for example clearing a list by user clicking spacebar

abstract light
#

ah

#

ok

#

@lament carbon you need to do a thread. Well Actaully that's what I did considering that was easy for me. But for you I would recomend using a while lloop

#

@lament carbon are you using pygame?

lament carbon
#

oh no I know how to do it in pygame

#

I was asking if something similar can be applied

#

to more everyday programming tasks

#

such as clearing a list etc

#

could I import pygame and use it to clear stuff or anything of the sort by asking the user to click a button?

#

@abstract light

abstract light
#

I think so yeah

#

so you know how to make a key right

#

you just need help on cleaning the screen

#

is that right?

#

@lament carbon

lament carbon
#

more or less

#

I am thinking of K.LEFT

#

or whatever the syntax is

abstract light
#

ok

lament carbon
#

do I have to make a python game loop?]

abstract light
#

well not really

#

are you asking the palyer to clear the screen?

#

if not and you just want them to screen

#

anytime

lament carbon
#

no no players

#

its a normal program not a game

#

do you wanna see the whole thing?

abstract light
#

yeah

#

that might help

lament carbon
#
user_input = int(input("Enter a number to find out if it is alternating or not: "))

def split2(AN_input):
    return [char for char in AN_input]

string_ver = str(user_input)

temp_list = split2(string_ver)

length = len(temp_list)

iteration = length

split2(string_ver)

print(temp_list)
print("")

increasing_num = 1

even_or_odd = []

orig_length = length

while iteration>0:
    if temp_list[length-(length+increasing_num)] in ("0","2", "4", "6", "8"):
        increasing_num = increasing_num + 1
        even_or_odd.append("even")
    else:
        increasing_num = increasing_num + 1
        even_or_odd.append("odd")
    length = length - 1
    iteration = iteration - 1


print(even_or_odd)

length_of_even_odd = len(even_or_odd)

print("")

break_or_not = "temp"

for x in range(len(even_or_odd)-1):
    if even_or_odd[x] == even_or_odd[x+1]:
        break_or_not = False
    else:
        place_holder = 0

if break_or_not == False:
    print("This is not an alternating number!")
    alt_num = False
else:
    print("This is an alternating number!")
    alt_num = True

alt_num_true = "This is an alternating number!"
alt_num_false = "This is not an alternating number!"




alternating_num_storage = open("alternating_numbers_storage.txt", "w")
alternating_num_storage.write(str(user_input))
alternating_num_storage.write(", ")
alternating_num_storage.write(str(even_or_odd))
alternating_num_storage.write(", ")
if alt_num == True:
    alternating_num_storage.write(alt_num_true)
elif alt_num == False:
    alternating_num_storage.write(alt_num_false)

#

it basically just takes user input as a number, finds whether it is an alternating number and then tells me whether it is or not. after that it appends it to a text file

abstract light
#

ok so what I did was I made a input and told the player if you want to clear the screen press enter and if they did I would make screen clear using the os system

#

I also did a sleep system

lament carbon
#

hmm im on windows sorry

abstract light
#

yeah that is ok

lament carbon
#

will it still work?

#

ok

abstract light
#

Os system is a module

lament carbon
#

oh import os?

abstract light
#

not the operating system

#

yeah

lament carbon
#

ok

abstract light
#

and you name the function clear if you want

#

and after the input you would do clear()

#

so like this:

#

import os

#

def clear():
os.system("clear")

#

account = input("What do you want to do? ").strip()
if account == '1':
sleep(2)
clear()
block()

#

wait

#

I'll show you my whole code

lament carbon
#

ok

abstract light
#

how did you do that thing again?

#

like with the highlights

lament carbon
#

btw mind using ```py

abstract light
#

py def account():
from replit import db
import os
from time import sleep
from stdiomask import getpass
def clear():
os.system("clear")
def signup():
username = input("Username: ").strip()
password = getpass(prompt = "Password: ").strip()
confirm = getpass(prompt = "Confirm password: ").strip()
if password == confirm:
db[username] = {
'password': password,
}

else:
  print("Invalid. Try again")
  sleep(2)
  clear()
  signup()    

def block():
print("Log in")
username = input("Username: ").strip()
password = getpass(prompt = "password: ").strip()
if username in db and db[username]['password'] == password:
print("User found")
else:
print("invalid")
clear()
block()
print("""

  1. log in
  2. sign up
    """)
    account = input("What do you want to do? ").strip()
    if account == '1':
    sleep(2)
    clear()
    block()
    elif account == '2':
    sleep(1)
    clear()
    signup()
    print("Good made your account now log in")
    sleep(2)
    clear()
    block()
#

that did not work

lament carbon
#

why cant I write it

abstract light
#

write waht

lament carbon
#

you have to put the slashes

#

and then py

#

its in the top left of your keyboard

abstract light
#

`py

lament carbon
#

no three of those

#

dashes

#

and then three more once your done

last moon
#
alternating_num_storage = open("alternating_numbers_storage.txt", "w")
alternating_num_storage.write(str(user_input))
alternating_num_storage.write(", ")
alternating_num_storage.write(str(even_or_odd))
alternating_num_storage.write(", ")
if alt_num == True:
    alternating_num_storage.write(alt_num_true)
elif alt_num == False:
    alternating_num_storage.write(alt_num_false)```you might be fine using this for now, but you're leaving yourself open to memory leaks + really slow code,
you can use `with` to open your file so that you don't have to worry about closing it + you can use fstrings so that you've only got 1/2 writes
```py
with open("alertnating...", "w") as f:
    f.write(f"{user_input}, {even_or_odd}, {alt_num_true if alt_num else alt_num_false}")```
abstract light
#
  from replit import db
  import os 
  from time import sleep
  from stdiomask import getpass
  def clear():
    os.system("clear")
  def signup():
    username = input("Username: ").strip()
    password = getpass(prompt = "Password: ").strip()
    confirm = getpass(prompt = "Confirm password: ").strip()
    if password == confirm:
      db[username] = {
        'password': password,
        }

    else:
      print("Invalid. Try again")
      sleep(2)
      clear()
      signup()    
  def block():
    print("Log in")
    username = input("Username: ").strip()
    password = getpass(prompt = "password: ").strip()
    if username in db and db[username]['password'] == password:
      print("User found")
    else:
      print("invalid")
      clear()
      block()
  print("""
  1. log in
  2. sign up
  """) 
  account = input("What do you want to do? ").strip()
  if account == '1':
    sleep(2)
    clear()
    block()
  elif account == '2':
    sleep(1)
    clear()
    signup()
    print("Good made your account now log in")
    sleep(2)
    clear()
    block()
#

see I used clear

#

that would will work

lament carbon
#

alright thank you guys, I have to got soon but I will look over this. tysm

abstract light
#

your welcone

#

also

#

do you know how to use Ursina

lament carbon
#

@last moon thank you too dude

abstract light
#

or any game engine that is free

lament carbon
#

ursina?

#

no I dont really do games

abstract light
#

ok

lament carbon
#

I was just curious about this and it seems like something a game oriented person would know

abstract light
#

@last moon do you know how to use any game engine that is free?

last moon
abstract light
#

Ursina

#

oh you mean that arn't

#

uh Unreal

last moon
#

ya

abstract light
#

Unity

last moon
#

unreal's free?

#

so is unity

abstract light
#

it isn't

#

Unity costs money

last moon
#

ik unity isn't fully but UE is

#

you can use unity for free tho

abstract light
#

how

last moon
#

there's just another payed version

abstract light
#

wait

#

can I use python for it?

last moon
#

unfortunately no

#

only c#

abstract light
#

ah I knew there was a problem for that

#

what about Unreal

last moon
#

i think it's only c++?

abstract light
#

do you know how to use any game engine?

#

with python?

last moon
#

if you want a python engine, it really depends on what you want to do but arcade is a great one

#

it's not the same type of engine as unity/UE tho

abstract light
#

that's ok

#

so do you know how to use it?

last moon
#

actually im not 100% sure it's technically an engine?

#

ya they've got tones of tutorials n' stuff

abstract light
#

wait you know how to use a game engine?

last moon
abstract light
#

can you help me learn it? like seriously videos don't help me. I need to do stuff.

last moon
#

not really lol, I'm working on a arcade project rn but I've tinkered with ue

#

there's a bunch of how-to examples on the site

abstract light
#

ok

#

thanks though

#

bye

last moon
abstract light
#

thanks

#

@last moon

true dagger
#

@abstract light

#

do !close

#

wha sup , im doing a maze game with turtle . i dont want the turtle to go outside the maze how to do this?

#

like i want the turtle to have a limits

#

how?

#

like border

muted oar
#

is there any way to create games with python without having ultimate optimizing skills

remote bluff
#

Today with some help form @mighty gale on my dice game i was able to follow a tutorial and made a snake py game thanks :)

mighty gale
#

brilliant - glad to hear it!

true dagger
#

wha sup , im doing a maze game with turtle . i dont want the turtle to go outside the maze how to do this?
like i want the turtle to have a limits
how?
like border

abstract light
#

@true dagger

#

you set limits to it

grim abyss
#

@true dagger something like calling the method of a 'containsPoint' check...

abstract light
#

like you say if the character is gerater than the width of screen then you block it

#

that's how I have done it

#

it's been sometime since I've use trutle but let me get some facts

grim abyss
#

yeah you need to run a check to make sure his current or projected co-ordinate is not going to cross a line...

abstract light
#

@grim abyss do you use Python?

grim abyss
#

@abstract light I do, I also have a script that plots doom levels using the Turtle module..

abstract light
#

so

#

wait

grim abyss
#

?

abstract light
#

I see

#

you are very talented

#

I'm more of a pygame user

#

but not a professional

grim abyss
#

cool, I've dabbled in some pygame...

abstract light
#

more like a beginner and intermeditate is

#

h

grim abyss
#

I'm by NO MEANS a "professional". I'm intermediate as well....

abstract light
#

XD

#

nice

#

do you have experience in other video game engines with python?
\

grim abyss
#

I don't. I would like to but I'm not aware of any game engines that support scripting via Python. I'm sure there are some out there but.....

#

It's an area I'm interested in to be sure...

#

It's a shame all the cool stuff uses Lua

abstract light
#

yeah

#

but

#

Unreal is cool I guess

grim abyss
#

yeah, plus Unity...

abstract light
#

Unity is bad

#

c++

grim abyss
#

I like it's C# scripting though

#

I'm interested in C#

#

I need to learn C++ first though....

#

@abstract light Why do say Unity is bad because of C++? Explain...

#

Unity is coded in c++ and c++ is FAST

#

the scripting is done via C# and something else as well.....

abstract light
#

see

#

C++ is cool and all

#

but many people just use it as a cruth

#

crutch*

grim abyss
#

hahahahahahha

#

how is c++ used as a "crutch"? I believe you are misinformed bud. πŸ˜‹

abstract light
#

nope

#

I've seen it before

#

but

#

I'm not saying C++

#

is a bad tool.

#

It's amazing.

#

I just feel like people should learn C

grim abyss
#

c++ advocates would say that Python's type-system is used as a "crutch". Python's type system is Dynamic and C++ has a Static type system.

#

Before I learned Python and OO concepts and could of used C. Not now though....I can't tolerate a language that is purely procedural with no OO support..

#

Python has ruined me

abstract light
#

I know right?

grim abyss
#

It's like my first experience with VR was Half Life:Alyx

#

it ruined me

abstract light
#

I was trying to learn C++ because I wanted to use many types of game engines

grim abyss
#

I can't tolerate any other VR game now because Half Life: Alyx was sooooo good

abstract light
#

Unity doesn't support python

#

VR games are amazing

grim abyss
#

and that's why I haven't dabbled in it much lol

#

indeed they are

abstract light
#

I suggest you play the new Jurassic World game

grim abyss
#

really?

abstract light
#

the one vr

#

the one that is VR*

#

it has so much suspense

#

and thrill

grim abyss
#

it's not 'on rails' is it?

abstract light
#

but the problem is that it costs money

grim abyss
#

what genre would you say it is?

abstract light
#

XD

#

sure

#

uh

#

horror

#

thriller

grim abyss
#

do you have full 3d movement?

abstract light
#

and maybe comedy the way you look at it

#

yeah

grim abyss
#

oh ok.

abstract light
#

some times they won't let you go to specific places like in all games

#

you have to finish something

grim abyss
#

well I don't actually own a VR headset but I'll keep my eyes peeled

#

i'm ready for starfield!

abstract light
#

the game?

grim abyss
#

yes

abstract light
#

kind of excited here to

#

too*

grim abyss
#

it's going to make up for the debacle that was Cyberpunk 2077!

#

and then some!!!!!

abstract light
#

nice

#

what games do you currently play?

#

I'm not a super game person

#

so I won't know that much

grim abyss
#

There's no way they just were purchased by MS and StarField is bad. MS must of seem something about that game that really grabbed their attention...

#

currently? Total War: Warhammer 2

#

No Man's Sky

abstract light
#

what about uh valorant or Rocket league

grim abyss
#

nah, not my cup of tea

abstract light
#

XD

abstract light
#

it is what people call checking the coordiantes of the player

#

I think

#

I forgot terms

grim abyss
#

@true dagger Well If you are using a 2D geometry library like "Planar". Then you can have line objects and they have a 'contains point' method...

abstract light
#

yeah

#

well wait

#

no never mind

#

3D games will be hard to do

#

unlike the 2d games where you only need to axis

#

you will need 3 axis

#

a Z axis, a Y axis, and a X axis

grim abyss
#

vectors

abstract light
#

X and Y you already know

#

Z is the top to bottom axis

#

if you want to set a hegiht limit

grim abyss
#

yeah z is depth

#

top to bottom is Y

abstract light
#

wait

#

no

#

it;s like

#

a normal coordinate sheet of paper

#

but when you make it 3d the perspective changes

grim abyss
#

and there are multiple perspectives

#

world,screen,local etc

true dagger
abstract light
#

you mean what do you mean?

#

@true dagger

#

I think when he says vector support

#

he means the axis

#

I'm not sure

#

@grim abyss

abstract light
#

that might be alittle to much for him

grim abyss
#

useful abstraction

abstract light
#

he is only a beginner right?

grim abyss
#

idk....lol

#

hmmm

abstract light
#

actaully i think he can do it

#

can we see your code?

#

we will not steal don't worry

grim abyss
#

@true dagger what's you Python skill level? How long have you been at it?

abstract light
#

you mean turtle

grim abyss
#

@true dagger you have a firm grasp of classes and OO yes?

abstract light
#

classes are so annoying

grim abyss
#

I think he nodded off

abstract light
#

yeah

#

he did

#

I keep on forgeting to make variables global

grim abyss
#

encapsulation is annoying? hmmmm...

#

polymorphism is annoying?

abstract light
#

...

#

XD

grim abyss
#

you must be an OG C programmer?

abstract light
#

yeah right

grim abyss
#

use Linux/GNU ?

abstract light
#

who are you even asking

grim abyss
#

hahahah

#

but why do you say classes are annoying?

abstract light
#

beacuse there are some varaibel I would like to use

#

and then I have to make them global

#

and I forget to do that

finite jay
#

yo gusy I need help on my game

abstract light
#

yeah

#

which module?

#

Pygame

#

Pyglet

grim abyss
#

@abstract light no you don't.

abstract light
#

yeah you do

finite jay
#

python

abstract light
#

oh

#

so like terminal?

#

a terminal game?

finite jay
#

I making like tile frenzy

#

for fun

abstract light
#

on the terminal?

finite jay
#

no

abstract light
#

you just said python

#

python only has terminal unless you use a module

#

can we see your code?

#

@finite jay

grim abyss
#

@abstract light I don't have a single global variable in that script I linked. If you need Globals your design is flawed....

#

classes provide the encapsulation

abstract light
#

wait

grim abyss
#

this is python not C

abstract light
#

I think we are talking different stuff

grim abyss
#

ohhh?

abstract light
#

in pygame I make a player clas

#

and in that player class I make a varaible called coins

grim abyss
#

yes

abstract light
#

and I have the player's movements

#

and then I have the computer see if they have gotten a coin

#

and add it to it

#

it has worked

#

trust me

grim abyss
#

yeah you lost me there

abstract light
#

I was making a little rpg game

#

oh wait

#

I see the mistake

grim abyss
#

show a code snippet

abstract light
#

no I understand

#

it was my fault

grim abyss
#

you're not explaining it well

#

I guess the other guy disappeared

abstract light
#

i've been focused on def functions and using it in classes

#

yeah

#

I put the variables in a function called coins and use it class

#

I need to see if I have the code still

#

wait

grim abyss
#

@abstract light self.coins is fine

#

that's your problem

abstract light
#

I know how to do that

#

but I don't like to see so many selfs

#

wait

#

you want to make a project togethter?

#

just for fun

grim abyss
#

sure. what type of project

abstract light
#

anything

#

what do you want

grim abyss
#

what's your experience level with python and 3rd party libs ?

abstract light
#

eh

#

kind of

#

wait

#

I have to go

grim abyss
#

lol

#

that was quick!

dawn quiver
#

I read about a guy developing a game called Lumberjack solo..so cool

abstract light
#

what is it about

#

@dawn quiver

abstract light
#

@grim abyss

#

so what do you want to do?

grim abyss
#

@abstract light so you're back eh? You never answered my question...

#

the only about you being familiar with 3rd party python libraries. your python skill level?

#

@abstract light Regardless, I'm ready if you are!

abstract light
#

hmm

#

I'm familiar with 3D python libraries

#

and my python skill is ok I guess

grim abyss
#

which ones?

abstract light
#

Ursina

#

not that much of it

#

but a little bit

grim abyss
#

ursina, let's do something in that!

abstract light
#

sure

#

how though

#

was that you

warm apex
#

what ?

abstract light
#

the picture

#

nah

#

it wasn't

#

nevermind

grim abyss
#

0.o ?

warm apex
#

i'm french sorry i don't understand you @abstract light

abstract light
#

@grim abyss you didn't see the picture?

grim abyss
#

@abstract light no, nothing popped up

abstract light
#

wow

#

ok

grim abyss
#

as of yet

abstract light
#

he deleted it

grim abyss
#

if it's not on your screen it certainly isn't on mine?

#

;-p;

abstract light
#

there

#

see

warm apex
#

ta cru

#

frΓ©rot qui est french ?

grim abyss
#

hahaha gone again, i saw it this time

abstract light
#

yeah

warm apex
#

qui est fort en dΓ©bitage ?

#

wsh le gang

abstract light
#

boy I speak spanish also

warm apex
#

le salng

abstract light
#

so you better speak spanish

warm apex
#

tu connais

grim abyss
#

@abstract light dm it to me please so I can actually see all the frames

abstract light
#

what do you mean

grim abyss
#

oh he has it

abstract light
#

yeah

grim abyss
#

lol

warm apex
#

ta encore cru lol

abstract light
#

got it

warm apex
#

mdrr

grim abyss
#

why do they keep disappearing?

warm apex
#

ptdr

abstract light
grim abyss
#

privacy? i hope those aren't his children

abstract light
#

bam

#

XD

grim abyss
#

BAM!

warm apex
#

Xd

#

gg

grim abyss
#

@abstract light I wanted to see the GIF one though...

warm apex
#

can i send XXX image ?

#

it's just a question

grim abyss
#

no

#

lol

warm apex
#

ok man no problem

abstract light
#

what does that mean

#

what is an XXX image

warm apex
#

because the 16 april.....

grim abyss
#

nsfw,porn, etc

abstract light
#

...

warm apex
#

nsfw

#

tu connais fΓ©rot

grim abyss
#

that question basically answers itself though..hahahaha

#

funny he even asked!

#

contexual awareness!

warm apex
#

ah ta cru

#

petit screenshoter

#

@abstract light

grim abyss
#

lol

warm apex
#

how old are you ?

grim abyss
#

@abstract light So about this 'project' we are supposed to work on....ideas?

#

i'm 37

warm apex
#

ooooooh

grim abyss
#

@warm apex and you?

warm apex
#

i'm 13

#

lol

abstract light
#

wow

grim abyss
#

hahahhahhaha

abstract light
#

ok

grim abyss
#

indeed!

#

that explains the 'nsfw' question...

warm apex
#

who understand me when i talk in French ?

grim abyss
#

not me

abstract light
#

a french guy

grim abyss
#

^ this!

#

hahahahahahha

#

yes, a french person

#

understands you...

abstract light
#

XD

grim abyss
#

@abstract light 3rd time: So......about that project...

#

;-p

abstract light
#

yeah

#

what do you want to do

#

sory

grim abyss
#

@abstract light how about something messing with requests ?

warm apex
#

are you american or british ?

abstract light
#

mean

#

meaning*

grim abyss
#

<--- american

warm apex
#

cool

grim abyss
#

@abstract light <--- martian!

#

πŸ˜„

#

the red planet!

warm apex
#

la par exemple personne me comprend en gros si j'essaye d'insulter vos mΓ¨re en dΓ©bitage vous Γͺtes HS lol

grim abyss
#

@abstract light like cards? Playing Cards?

#

@abstract light how about a networked spades game, through a browser...

warm apex
#

@abstract light answer, he wait

grim abyss
#

LOL yeah, I'll wait a loooooong damn time....lol

abstract light
#

@abstract light

#

sorry

#

bruh

#

why did I do my own

grim abyss
#

@abstract light do what on your own?

abstract light
#

I called my own name

#

XD

grim abyss
#

oh that

abstract light
#

yeah

#

XD

#

we should do something no one else has

grim abyss
#

ok, like?

abstract light
#

there aer so many card games in the web alread

grim abyss
#

true

abstract light
#

I mean you are 33 years old

#

don't you have an idea

grim abyss
#

hahahaha, how old are YOU

#

ok you know something I'm tired of? http://news.google.com

abstract light
#

old enough to live in this world and not be like a baby eating fluid food

#

the news?

grim abyss
#

yeah, they put links on there that are pay-waled

abstract light
#

and..

#

you wan to make a news

#

thing

#

that is free

frank fieldBOT
#

Hey @warm apex!

It looks like you tried to attach file type(s) that we do not allow (.bat). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

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

grim abyss
#

let's do a news aggregator

abstract light
#

...

grim abyss
#

hahahahahah

#

ok, let's not

warm apex
#

fuck off @frank field

abstract light
#

you do realize we are in a game development channel

grim abyss
#

indeed

abstract light
#

and you want to make something that old people like you do

grim abyss
#

ok a 2d side scroller

abstract light
#

or 3D

#

either way I'm ok with

grim abyss
#

can you model?

abstract light
#

you mean draw

grim abyss
#

create game assets?

abstract light
#

?

#

that is not my area of expertise

grim abyss
#

i might can create some music/sounds....but other than that. I can only code systems.....

abstract light
#

I am doing a project right now

grim abyss
#

LOL

abstract light
#

I wanted to do another one also

warm apex
#

in what project do you work, guys

abstract light
#

Python

#

...

warm apex
#

no, seriously..... lol

abstract light
#

the most I am familiar with is Pygame

grim abyss
warm apex
#

cooooool

grim abyss
#

i wanna move it to something better than 'Turtle'

abstract light
#

wait

#

I have to go

grim abyss
#

refactor the code and implement a GUI

warm apex
#

what is your job, guys

grim abyss
#

my job is currently....unemployed.

warm apex
#

oh !

grim abyss
#

thanks covid!

warm apex
#

lol

#

me, i'm at school

finite badger
#

damn this chat is actually active

#

that's a first

grim abyss
#

i'm a victim of the collateral damage unleashed by the destruction of the restaurant industry!

warm apex
#

ah

grim abyss
#

no more jobs

#

anyway, i code for fun. it's a hobby of mine! one of many

warm apex
#

fucking Covid, my father is dead

grim abyss
#

sorry to hear...

#

@warm apex are you experienced using Python?

warm apex
#

yes

#

i like that

grim abyss
#

like what?

warm apex
#

i begin

grim abyss
#

?

warm apex
#

Python

grim abyss
#

so yes you are experienced or you are a beginner?

warm apex
#

beginner sorry

grim abyss
#

ahh

finite jay
#

I am making this tile frenzy game and I need help getting started1

warm apex
#

ok thank

finite jay
#

I am making this tile frenzy game and I need help getting started1

grim abyss
#

pygame?

finite jay
#

yeah python

#

I am a beginner

warm apex
#

what is the concept of your game ?

grim abyss
#

a beginner too in the parsing of the english language it seems! lol

#

pygame is not "python"

finite jay
#

I am just making it for fun but its likes a aim trainer

grim abyss
#

oh a cheating script eh?

finite jay
#

nah

grim abyss
#

which will be executing on which digital distribution platform? Steam?

finite jay
#

why would I cheat I just need a headstart

warm apex
#

what time is it, in America ?

finite jay
#

432

grim abyss
#

You need a headstart, in coding an 'aim trainer'. A exploitation tool!

#

Cheater!

#

lol

finite jay
#

what

grim abyss
#

i care not young grasshopper. carry on...

finite jay
#

k buddy

grim abyss
#

tile frenzy?

tranquil robin
#

Is there a way to run Pygame in a separate thread, and allow code from the main loop to effect the Pygame thread?

abstract light
#

yeah

#

@tranquil robin

lilac radish
#

Hello, is ursina engine good for 3d game development?

tranquil robin
#

@abstract light Great I'd like some help in doing that. I have a text based game in vanilla python that works entirely in the Prompt and I would like to use Pygame to display a separate screen for graphics for certain events

abstract light
#

yes it is

#

@lilac radish

#

@tranquil robin

#

how

abstract light
#

@lilac radish Urania is a good engine. It is easy to comprehend

#

Ursina*

analog barn
#

In Pygame, does it hurt or help to do a simple rectangle collision before doing a pixel mask collision?

#

Odd question, just pinging any pygame experts

round obsidian
#

@analog barn without knowing Pygame directly, I would say that is actually good to do - perform a coarse collision test first, then a fine test

#

the coarse test is faster

analog barn
#

Alright, that makes sense to me. I am curious though... the way that Pygame detects mask collision is by simply comparing a 2d list of 0's and 1's, once the mask is created it should still be fast, just not as fast as rectangles.... I will time it later

abstract light
#

Wait do you need help?

analog barn
#

Not necessarily, just messing around learning masks

round obsidian
#

collision tests are always best if you do coarse first, then fine

analog barn
#

Errr we go! gotta love Pygame for how easy it is```py
# get collisions using rectangles
collisions = pg.sprite.groupcollide(self.ship.bullets, self.alien_fleet,
False, False)
for bullet, hit_list in collisions.items():
for alien in hit_list:
# use pixel mask collision
if pg.sprite.collide_mask(bullet, alien):
self.scoreboard.player_score += alien.point_value
alien.blow_up()

last moon
#

cause ill take it

analog barn
#

What with pygame?

last moon
abstract light
#

Yeah

#

I’m not able to understand what you are saying

drowsy rampart
#

Should I write menu and game in same file or separate

last moon
#

imo separate files allow you do separate your logic out but it's really a personal preference

#

coming back from java, it's hard to not make a new file for every class instinctively πŸ˜„

worldly flare
#
Specify --help for usage, or press the help button on the CMake GUI.``` why am i getting this error
last moon
#

what are you doing to get it?

true dagger
last moon
#

How does arcade/pyglet/moderngl send processes to the gpu?

potent ice
last moon
#

Getting the gpu to run operations rather than sending them through the cpu?

potent ice
#

It's fairly simple. Drawing/rendering operations requires primitives (points, lines, triangles) to reside in a buffer object in vram.

#

That buffer is processed by a shader and things appear on the screen

#

Maybe better to say a "gpu program".

#

The SpriteList in arcade is a good example. The user can change properties on each sprite such as position, rotation, texture

#

It keeps track of what data is changed internally and write that information to vram (a buffer)

#

Just think of the buffer as a numpy array or python array

#

It's expensive to keep data in system memory and vram in sync, but it's worth it when we batch draw everything.

#

The sprite list in arcade is drawn using a single render call

#

We maintain an [[x, y, rotation], [x, y, rotation], ...] list in system memory and write that to a buffer in vram when change is detected

#

(There are more properties of course)

last moon
#

Is that why quaternion math is used in 3d graphics?

potent ice
#

I don't know how that is related

last moon
#

Wouldn’t you store [x, y, z, rotation]?

potent ice
#

oh. In my example the x, y, rotation are just 3 floats

#

It's a 2D example (Arcade)

last moon
#

Ah nvm then I’m still trying to work 3D out conceptually

potent ice
#

The reason quaternion are used is simply that they are simpler to work with because you won't have to worry about gimbal lock.

#

But they are converted to matrixes in the end

last moon
#

So they’re used to make sure the 3 axis remain completely independent from each other?

potent ice
#

They express rotations in a way you dont need to worry about it to put it simple

#

There are some great explanations of gibal lock using a paper plane if you seach

#

You can definitly avoid it using matrices. Still the quaternion way is nicer to work with ar times

#

I would not worry too much about it in the beginning.

#

Start with simple matrices. It's much simpler.

last moon
#

I just can’t wrap my head around the whole 4d rotations in 3D space but I’ll dive into it more

potent ice
#

I would put that on the shelf adding a mental note until you have the other topics sorted

#

It's much simpler to wrap your head around when you know 4 x 4 matrices well. Multiplication order etc.

#

For example the TRS rule (translation, rotation, scale)

#

v’ = T * R * S * v is important to understand

last moon
#

That sounds familiar

potent ice
#

v = 4 component vertex (x, y, z, w)

#

w = 1 unless you are doing something funky

last moon
#

Isn’t v normalized too?

potent ice
#

It's a vertex/position in space. so.. nope

last moon
#

Maybe I’m thinking of rotation matrices

potent ice
#

You'd rely on the matrix library you are using to keep things straight

#

Matrices / quats is a pretty huge topic. It's easy to get lost in the details. I would try to learn from a higher level first and actually use them in a simple project.

#

Unless you are extremely interested in math I would just jump into it and try some simple 3D with projection, and modelview matrix.

#

Play around with a simple solar system for example

#

Get a feel on how global / local rotations and translations works

last moon
#

Jokes on you I’m just here for the math idc about the graphics

#

I’m sure higher level examples would help but I’m honestly a lot more interested in the low level concepts

potent ice
#

ah πŸ™‚

#

Should find matrix normalization, inverse etc

#

and quaternions are under ext

last moon
#

It’d probably help if I understood cpp πŸ˜„

#

Or interfaces or headers

#

I’ll keep that pinned tho thanks

potent ice
#

It's template based so it can be a bit confusing. Still a great reference when you find the implementation (ignore header files that are just template stuff)

last moon
potent ice
#

A common "program" has a vertex shader and fragment shader attached

#

The vertex shader just transforms each vertex. That's it

#

It takes in a vertex and all its additional info such as color (or whatnot) and transforms it using the supplied projection/modelview matrix

#

Based on what primitive mode you are rendering with (points, lines, tringles) all the transformed vertices will go to the primitive assembly stage.. clipping etc.

#

Then the fragment shader will run for each pixel on the screen that are part of the primitive.

#

You get all the information about the primitive as input in the fragment shader. Primitives are always rendered in the order they arrived

mortal dragon
#

Hi my daughter has decided to take computer science as a school option.
I am trying to find ideas for simple but fun ideas that would engage her.
I pitched typical tic tac toe but these are met with just flat 'what ever' 'meh' all she does most days is trawl through reels. I thought about pulling in reels and say YouTube one into one but it seems Facebook api doesn't allow anything more than allowinf you to pull your own info.
I thought maybe we could make a meme caption game but with this idea it would require multiple players and I feel this might be a bit to much. Any ideas how this could be kept simple or any other ideas that might get a 13year old enthusiastic?
Many thanks

potent ice
#

hmm. Very individual what is hit and miss. The most popular project I worked on with my 14 year old nephew was a game were the enemies was his fathers heads trying to reach the middle of the screen were the internet router was located. You had to "pick them up" with the mouse. If one enemy reached the router it was game over. "No more internet" πŸ˜„

#

My brother almost died of laughter when we showed the game. It was not my idea!

lilac mirage
#

I am new to game development , please suggest me a library for

#

it

potent ice
#

What do you want to create?

lilac mirage
#

pls

lilac mirage