#⌨coders-cave
1 messages · Page 60 of 1
roblox 
well I promised to make the script
seems that Roblox devs are shit at making readable code
I was trying to steal their code
but all code I can find so terrible
Hello
yo mama
joe*
u moms so fat it made you say joe*
Ur mom so fat that it takes 3 panoramic photos to take only one side of her
u mom is so fat when she goes to mcdonalds they call wendys for backup
ur mom so stupid that she sees John Cena
Hamza
your mom is so fat
you have to insult other people mom to feel better about yourself because of your mom
My mom is so cautious about covid
she even hired anti covid
but your mama is even more fat
hamza
yes daddy
:o

all the data I have of discord moderators mom's fatness is my mom and that data suggests that discord mod's moms indeed aren't fat
1% of your mom fat takes up 1PetaByte of storage
so i think I might've found out a way to make better games in discord
unless someone found that out before i did
How?
you know how discord bots are just text
and images with stats and whatever like idlerpg
ye
so how about you take an array/list/whatever you're using to store data
attach the values to a "tile"
which could be terrain, an item or anything you want to add
and then have the bot make a X by Y image by merging many of those tiles together
creating a 2d tiled map
It'd be very slow to update the map for movement if you mean that
you think?
and people do that on some places
can you gimme a few links to bots that do that
i wanna look deeper into how they do it
now im not sure about that
the map doesn't have to be big
break it up into chunks if you're making a global map
I don't really know any bots but I used similar technique in AMP clans but scrapped the idea for the time being because it was too big
hmm
well
i think the breaking up stuff into chunks should solve the issue or at least part of it
ratelimit won't affect it
all the bot needs to do is send the image back and take the input from the user
all the processing is done on my side
ye
that'll put more strain
to your memory
ive been using an imaging library
takes alot of memory

what was the image size you were working with
small
I'm gonna do a performance test tomorrow
by small i mean 1024
1024px?
wew I'm talking about things like 16x16 / 32x32
ah
well that's per one tile
holy nuts
nothing stops me from reducing it down to 8x8 when i have to
like if i have a 200x200 map or something like that
are you gonna use an async library for the bot
not sure atm about what I'm gonna do to implement it tbh
how do you see the image in discord without scaling it up which takes a bit of recourses too
i think discord only messes with images on mobile
but that's just what i read
which makes small images look reeeally bad
i tried a 160x160
image on embed are pretty similar for both pc and mobile
it was really blurry
so in embeds they're ok?
depends
it shows the original resolution
embeds are shit to work with
why so
images need to be uploaded to web so they can be used in embeds
or no
because embeds use links not images
oh
so if you have a file named file1.png
good to know that few months after it would've been useful
i really need the performance test to see how many 8x8, 16x16 and 128x128 maps my laptop can put out
it wont show the file only the embed
bad idea
use small one
like a raspberry pi
or aws

don't have access to that yet
okie then
might be good to put a limit
fair enough
i dont
i like to torture my devices

last time i forked a shell thousands of times
im concerned that write speed might affect the speed
and crashed my phone
well everything is done in memory
so dont worry
as long as you don't store in on disk
its good
yeah but i need to save the files to pc to upload

lmao
OH


nice
you can read the dev docs
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
docs are for noobs, real chads use trial and error
dimwits
yeah but im pretty sure discord added buttons
and annoying to write
actual buttons with text
oh yeah but they're as slow
ah that button
yeah
nope
it is
dapi
#💰worldbox-casino uses it atleast
pain
no
definetly not
it looks better
since it doesn't require you to bloat your bot server
to have every emojis
for every options
look how much 4 buttons take

yeeeah
not good
I'll use them for critical things like quit, next turn or whatever
speaking of turns
ill use it for text based
how about actual AI
wha-
what do you mean-
ah
I started scripting on some random roblox game today for some stupid reason, which is very different to this
roguelikes like Dwarf Fortress are turn based anyway
SEND ME CODE
they make entities take a turn when you move etc
mhm
So much recourses 
that sounds hard
I haven't finished anything
not if it's simple AI
i can't even make a good pathfinder
DID I STUTTER
math

math works
i already figure that out but movement
its not smooth
because i love you 
don't need smooth if its turn based kekw
the whole turn based thing is great
literally 0 resource usage if there are no interactions
ah yes
lazy loading
good choice young person 
lazy loading is always good
unless you're synchronous
we do little loading

this is still pretty much all in my mind atm
ah
nah who needs that
it's kinda slow tho
why use csv
well it doesn't work like a table
so yes its slow
its dynamic too
when you can make your mysql server 
why make mysql server when you can make a non sql database
but really though csv is pretty pog
because I only studied how to make mysql server 
easy to use too
not me the person who made like 100 database in the span of 1 year
just don't forget to do the sanitizing
might wanna learn about Graph databases
of course
let me just
and just feeding it into the graph-i-nator
and balancing the bot based off the data
int a = 1;
int b = 2;
int* c = a;

sounds complicated
nah
all i do is make bots for fun
even random things
like the one that shows how gay you are
im making this bot because im bored

what does the bot do?
you get to run around, loot and kill zombies
i think its better to make a webgame
with discord data synchronization
rather than a game
in discord
nah
trust me
that's the whole point

making a game in discord
why would i bother making it elsewhere when CD:DA exists
its C:DDA
cataclysm: dark days ahead
if you ever heard of project zomboid, cdda is the real man's project zomboid
and it's a roguelike
good game.
so, back to the point
discord game
interesting name
i feel like it's something worth doing because well
it's a pretty new thing, the 2d map i mean
and if it ends up being fast enough to be viable
maybe other people will do it too
the generic "numbers go up" games have gotten a bit boring
and i also haven't seen a zombie apocalypse survival bot before so yeah
I'll make it suitable for discord
alright cya
how tf are you gonna host bot for that without paying a fortune. The idea seems so heavy that ordinary cheap hosts aren't good enough for it
maybe
im willing to bet it won't be as bad as you're saying
after all I'm not gonna be working with huge databases or dozens of images per second
i seriously doubt it'll ever blow up like idlerpg or other bots of that nature
in the end it's just math with some sparkles on top to make it look like its complicated
i had a prototype text based version that had around 700 lines of code and did some basic things that players would usually be doing and it was quite fast save for a few dumb choices i made while coding
It coild be heavy or could not be heavy true. Depends how much you do it probably
in my experience tho opencv is pain to work with and takes lots of recourses
I'll test alternatives to it too obv
maybe i could write my own script even
don't really need any complicated things, just gluing images together
either way, performance test
coming soon (tomorrow)
Copilot I'm coming 
They asked me why I would be a good canditate for the copilot, I guess they don't really let everyone in
noice
This went as I expected
https://youtu.be/sJC3JsvhM9o
Which language produces the fast apps? How do C# and Java Compare? How are bytecodes and IL different?
Dave takes you on a tour of C# and Java and then drag races them by running them through their paces with a prime number generation benchmark in Episode 03 of the epic Computer Language Drag Racing Series episode 03. This series tests more ...
the speed difference in this particular test is 3% so Java didn't win by a huge margin
well Java is always slower than C language
@hasty bane btw you're gonna need crap tons of concurrency
if you're gonna handle multiple images every second

well ye
so i did the performance test
not as bad as you thought
around 20 4 by 4's per second

also why not
make the bot open source
so people can host their own
and reduce loads on yours

maybe
feels good to be back in python after 2 months of c#
now i need to find a way to quickly load data from csv to objects
you can't with async
also
make an object

use it in a mapping style or object style
def parse(fs) -> list[dict[str, str]]:
columns = fs.read_first_line()
datas = []
for values in fs.read_all():
datas.append(dict(zip(columns, values)))
return datas
or something similar
this is just an example 
I made actually working thing in roblox studio 
I also managed to break my roblox studio it seems like
nice
only reason I might ever change back to windows is because developers don't make anything work on Linux
well WorldBox works flawlessly atleast
lol
I'll probably switch to Linux because why not
literally free and literally safer
gotcha
I made that mistake because I didn't know how bad some things are
now I am too lazy to set up another distro
win10 is the same
tfw update deleted graphics driver for the lulz
and another time i had to restore because it screwed up the update
lost some files
true, POP!_OS still better than win10 but like KDE Neon or Open Suse would've been better options for me

it is
can i see 
I'll do it anyway
no amount of optimizing scares me after trying to make a RTS in unity
ah
i feel like i wanna stream code
do people watch that
you're the opposite of me
why so
no but it'll make you more anxious
lmfao
i got the backend worked
ahh
me too
it was just a couple buttons to spawn things where you needed them
pretty much lmao
unity is really slow
atleast faster than Java engine
im sure it has to do sth with the quality of my code too but
yandere dev
it's way too slow for what i was trying to make

that's why i dont use blender
if you never need a model
you don't have to handle making them

can't argue with that lmao
i do need to draw the tiles for my game though
gonna be sliiiightly difficult
just a little bit
good thing im good at 2d games
by bit you mean 100 years long?
yeah, most likely.
take a look at this
it's bad.
but im not quite sure how i can make my tiles better
gonna have to look up pixel art tutorials again
Depth
Add depth into them
Also why mostly all of them have a brick like texture?like Single directional line
oh nice
im not the only one with shitty drawing skills
they are too bright too
and make edges when the grass meet the water
ye
when you enter a location you end up on a random spot on any of the edges
move outside of the map area and you leave the location
don't think I'll be making some sort of free roam mode so it'll be just a way to leave locations
i am kind of getting worried about the performance though
finished the registration command
well i did test it
100 4x4 images took 4,26s
that's on a potato laptop from 2014
It seems that it generates images much faster after that one 4,26s try
for some reason
time dropped to like 0,45s
Well,That kinda should be expected,But a 100 4x4 that's seen strange
4x4 tiles*
the tiles are 16x16
each weighs like 150-300 bytes tho
a 4 by 4 is 8,5kb
and the 10x10 i sent above is actually 2,41kb
( the original one )
not the upscaled one i sent
yea
now i need to do actual game designing
and think about what i really want to add
That's honestly really smart doing concept first than Art later :v
it's kinda hard to do though lmao
you have to make all the elements work well together
Well it's game development
aye
You'll find The Path I guess

i have entered numpy hell
help
i also need to make a random map generator... aaaaaaaAAAAA
though it's not gonna be as bad when i get the numpy stuff working
or maybe I don't even need to do the numpy hell stuff
wait
i actually don't
lmao
turned out i do
so far I've tried shoving numpy arrays into a list (did not work) and appending numpy arrays to eachother (hello 1x49500px image)

Thats not how it works
If the tiles have the same texture
It wont be loaded again
which is good for not using as much internet
Uhmm
do not question it
bad idea
I don't recommend
i know that python is bad for games
Just iterating over a 500x500 array in python takes like 5 seconds
mmm
or
i could do it the hard way
and make every single location on my own
which is probably gonna make the experience much better
but it's a lot of work
mmmmm
i think I'll go with the designing them myself option
Can someone point out everything that's wrong with this image, I'm asking because Idk if it's even possible
Creating games is pog
Creating game engines tho...
Not so pog
It is
But creating a game engine is incredibly difficult yet very rewarding
But still incredibly difficult
it is indeed very fun/rewarding, i had to make one for a school project using SFML and i can say that it was probably one of the most fun projects i had done in a while
I don't really like making games, it's quite fun but I don't like the visual psrt of it
i don't even want to think about making the visuals
Lua is a real coding language. If I remember correctly unreal engine uses it sometimes too.
Yeah I don't think I could have learned lua at the beginning of my interest in these things
python is a great start
same
very weird
but then i tried c# for gamedev because python isn't really a game dev language
spent 2 months writing around 500 lines of code
now im back to python
Yeah python is for algorithms nore than games
I haven't tried C# what's it like
Why don't you like that?
it's okay
Also the space isn't supposed to be there
I know I made a typo
i got used to the lack of curly brackets
End is because you can easily make multiple functions in the same script
You need to determine when one ends and the next begins
why not just use spacing or curly brackets
it's way too easy to write bad code in lua
Although curly brackets are used for tables
it's also easy to write bad code in c#
It's easy to write bad code no matter what
agreed
like every publicly available Roblox part has shitty code
not so much in Python
python is way easier to read always
that's why it's publicly available
That's why you don't use public things
Bad Lua is impossible to read
yess and this makes it much more easier to fix
And half of them are written like that to hide viruses
mm nice
Bad anything is hard to read
virus in the roblox equivalent of a unity asset
not so much in Python
not true
It has to be easy to read
no definitely not, it's for scripting and data stuff
And also for 6th grade coding
yeah that too
But yes it's used for machine learning as well
ml is fascinating
I just use lua because it's easy to get people to play when they don't need a download link
Ml is awesome
i use python because it's easy to get people to play when they don't need a download link
bot go brrrrrr
What
yes
what no
they're made for small to medium sized application
python on the other hand
can go much more
that's bs
my teacher told me
coding is useless

your teacher is useless
anyway
i finished the algorithm that converts a manually made 2d array into an opencv image
Ik

it's gonna be a lot of manual work
so
they don't teach us shit here
wait
wait wait wait
if i made that
why can't i make a random map generator that just fills in the nested lists of the 2d array
maybe i just solved my problem

why use numpy
idk
but I don't have to anymore
except I'll have to save a lot of .npy files
in the thousands
lmfao

nah
oh btw if you're accessing the file
make sure not to use any await
before closing it
mm
or have a lock
mhn
still not sure how I'm gonna implement the tiles and movement
i have an idea
hm?
store the player position
from the map
so since it's 2d array
player.pos = map[5][2]
x = 5
y = 2

good idea too
but
oh nevermind
but how do you know
the next tile is gonna be
without iteration
like pathfinding?
mhm
yeah
my main focus rn is gonna be adding players to the map
as a thing
that moves around
entity?
yep
it is kinda hard ngl
I might have to make a separate dataframe for:
floors
entities (player, enemies, impassable objects, interactable)
loot lying on the ground
but im not sure
it's uhhh
a lot of image layers
thankfully they generate pretty quickly

impassable object should be static objects not entities
ye
not sure if im gonna give them a separate layer or keep them in the floors one
ig floors
you should make a index for the sprites
tiles = 0
background = 1
foreground = 2
entity = 3
Haven't coded in so long I finally started thinking like a human being again
okay.
interesting thing happening rn
i have a command that reads an image from folder and sends it into channel
i noticed that it sent it twice
even though i only have one ctx.send for it
so i commented out the ctx.send
it still sends one image
i commented out the entire command
still sends one image
there is no other command that does that
ok i fixed it
apparently it was somehow running in the background
even though i stopped it
guess what
ive been thinking this
"if god exists, would they use multithreading, async, or multiprocessing to handle the universe"
but i think it'll be multithreading
since quantum tunneling exist
ThEy ArE bAsIcAlLy ThE sAmE
Nah
Synchronous asynchronous method
funny though

No
yes
In C# its a different thread
same with Lua
its aliased as
Thread
in Luau its
technically green thread
but normal Lua
no threading implementation

Sounds slow
Wtf is 5 threads per core
oh like hardware thread?
No
its like a constant for me
there's a thread that runs in parallel
2 cores 4 threads
my phone cost cheaper than a laptop
but its sick

3gb ram and 8 core
enough to fork atleast 100 shell session
So fast

Im gonna still use it even if the gpu cant be fixed
The cpu is just too good
You can feel the difference between a U cpu and an HQ one
This potato had 2 cores on 2.7 max
U cpu sucks
The beast had 6 cores on 3.4
the one im using

I want it NAW
cpu gaming
It actually trains neural networks faster than the 970MX in the potato laptop
Ive never tried training anything on the gtx 1050 it has
Cuz it got fried before i got into ML
I can just dream about the speed

meanwhile im pretty sure my cpu is a massive bottleneck
Idk ask Google
why make a .npy
when you can just write the 2d array into a txt
I don't even know what that is but I will tell you to ask google
bad

why

or use JSON atleast
JSON is really nice I need to use it some time
don't really need json here
Not very useful for what I'm doing but still
yes you do
w h y
mmmm
yes its good sometimes
Completely different topic but if anyone wants to start learning hacking this website is really good
https://picoctf.org/
And because I am staff here and don't want to get attacked
Disclaimer: Never use the material to malicious purposes
.json can store arrays
lmao
but js array are array
No I mean wasn't [] for containing objects
im just gonna use text anyway
admin promote black hat hacking Ban demot
🥶

how Small

it matters on scale
the one im testing rn is 6 nested lists with 6 elements each
and they're all one letter
So char

not a thing in python though iirc
char
one char
character
okie
in python it's string
i still need to test something
stuff's getting a bit complicated
well not really but
it's hard to make this work properly
cuz im not quite sure how im gonna edit the 2d array
once i figure it out tho everything else is gonna be a piece of cake
Char
More like
Completely broken in cpp
I thought a.char was supposed to be a single character but boom now you can also use them as a string with "

In fact you have to include string if you want to use it in cpp which basically means noone uses them
Such a weird language
huh
Hmmmmmm
Hmmmmm
I win
When you come to coders cave you talk about coding

:)
Do i look like i know what that is?
@knotty root what do you have to say about this
State your opinion on the topic at hand
And apply arguments to it
vectors are bad (very)
the only amazin vector is the vector3 in unity
Better then arrays imo
















