#⌨coders-cave
1 messages · Page 44 of 1
I personally really love Sololearn
it let's me learn little bits in bus, in breaks in school, in car driving home
etc.
I don't need to sit on my PC to learn with it which is the only reason that makes me really motivated to use it
Woah, I looked it up. Looks very good to learn
It's amazing
There's stuff about most big languages
some data science, machine learning etc.
This?!
the fact that unity lets me make clean movement with only like 10 lines of code is amazing
i could probably make the code smaller but the it would be unreadable
it's also mobile application
yeah readable is better than compact
i remember when it took me 100 lines of code to get the cube to move on the x axis alone
lol
I think I've been learning C++ too much
I just typed discount as discout
because I am so used to typing cout
I-
atleast I finished this after a bit of head scrathing
and I know my main function doesn't have return 0; because I was a bit lazy
Which code is best for beginners
If you are planning on making games I recommend c++ and/or c#.
Ye
I dove directly into c#
I ended up fine
But I wished I used something like python or js to learn basics
Can u use python on unity
Nope, with Unity you should use C#
how tf is my output wrong
well maybe it's because my code is uhh not what it's supposed to do but technically it should work
file = open("/usercode/files/books.txt", "r")
#your code goes here
data = file.readlines()
x = 1
for name in data:
if x != 4:
print(name[0] + str(len(name) - 1))
else:
x += 1
print(name[0] + str(len(name)))
file.close()
oh wait now I see it
Don't ask why I'm doing python problems 1am
Can u use c++
unreal engine supports c++
am I only one who using xml? :<
dying noisy after finishing script
I have to do Another translate ahhhhhh
really small lines for expert scripters but- I just started scriptting yesterday :3
What's this place for? Coding for what?
Anything that includes coding.
This is the place to share all of American nuclear missile code
Coding
the god damn
I added Two new codes for my mod :D
<incident id="rep_bus_line" properties="type+=crime; popularity=5; visibility=1; stage=1; tag=morning{+2};">
<scene id="scene1" background="CarBackground" properties="onMove=1; vehicle=ve_civil_car; timeToReact=300; avoidPolice=0; solvableBySpeedCamera=True;" >
<suspect id="driver" properties="bill=[100,500]; aggressiveness=0; weapon=e_fist; prison=0; spawnArea=trapped1; isActive=1;" actionOnIgnore="opinionOnSuccess+=1; opinionOnIgnore+=-1;" actionOnEnd="opinionOnSuccess+=2;"/>
</scene>
</incident>
<incident id="rep_vio_lane" properties="type+=crime; popularity=5; visibility=1; stage=1; tag=morning{+2};">
<scene id="scene1" background="CarBackground" properties="onMove=1; vehicle=ve_civil_car; timeToReact=300; avoidPolice=0; solvableBySpeedCamera=True;" >
<suspect id="driver" properties="bill=[250,600]; aggressiveness=0; weapon=e_fist; prison=0; spawnArea=trapped1; isActive=1;" actionOnIgnore="opinionOnSuccess+=1; opinionOnIgnore+=-1;" actionOnEnd="opinionOnSuccess+=2;"/>
</scene>
</incident>```
Two new script.
Two new Translate
KR
"incident.rep_bus_line.description": "승용차가 버스전용차로를 쓰고 있습니다. 금융치료가 필요합니다.",
"incident.rep_bus_line.driver": "운전자",
"incident.rep_vio_lane.rep_vio_lane": "지정차로 위반"
"incident.rep_vio_lane.description": "차량이 지정된차로가 아닌 다른 차로를 쓰고 있습니다. 금융치료가 필요합니다.",
"incident.rep_vio_lane.driver": "운전자",```
EN
``` "incident.rep_bus_line.rep_bus_line": "Bus Only Line"
"incident.rep_bus_line.description": "a Sedan started using Bus only Line. we have to give them Ticket"
"incident.rep_bus_line.driver": "Driver"
"incident.rep_vio_lane.rep_vio_lane": "designated lanes"
"incident.rep_vio_lane.description": "A car started using other designated lanes. we have to give them Ticket"
"incident.rep_vio_lane": "Driver"```
total work today : 10 hours
1 hours : writing rep_bus_line
7 hours : fixing rep_bus_line
1 hours : writing rep_bus_line 's Translations (KR/EN)
30 mins : testing
1 hours : writing rep_vio_lane
30 mins : writing rep_vio_lane
wait cant you just copy paste the code and then translate everything else or did the translation itself take along time
writing most of existing lines are easy to make like, just press i and press enter then "incident" will pop up :3
and yea. it mostly only took less than 10 mins but just wanted to make 30, 60 stuffs
filling out hundreds of key value pairs is my favourite part of coding scavenging
thankfully the rest of my game bot's code is reusable function to function which is pretty good.
i should probably start using lambda but i am way too stupid / lazy for that
and you know what my favourite part is?
writing math.something or mathf.clamp for the 3000 time 🥲
if your making a 2d roguelike....good luck
Making swat team
oh no dude not in a million years
i touched that once and died because my NeutralMonster class was beyond cursed, even the big brains at the python discord couldn't fix it
well thats rude towards my favorite genre of games
i love roguelikes
why are you making a game in python use a game engine
its easirt
i know but i want to learn python more than i want to make a game
not having the visual representation of your game while making it is truly insane
rn im making a discord bot, something like a turn-based zombie survival idk
good for learning pandas and discord.py
currently making a roguelike in unity, even with unity's easier made c# its hard af
to make the rooms
and the board in general
but thats pretty much everything not including items
lol, i snatched code from a tutorial and tried to add a neutral monster class that would become aggressive when attacked
amd art
it did not work out
yeah, the problem was in the class and the tutorial code
it was around 1k lines and super intertwined
so you touch one thing you have to rewrite 10 other things
meanwhile rn I'm making my bot in a way that lets me add new things easily as time goes on
so i have an idea for how it would work, basically you need a bool to check if the enemy is being attack(assuming you already have a fighting script), the you check using an if statement if this bool is equal to ttrue and if it is you call a function for chasing and attacking
wait does python make you write the whole game in one script
why tho
I used it only because the other one with several modules was pure decorator hell
its always best to have multiple scripts for multiple things to simplify things if things need to be fixed
i learned that from experiance
it is
but ig that tutorial was mostly just to figure out how to make python roguelikes in general
messing with the map generation broke it, messing with classes broke it
i feel like in python it would be easier to make an algorithm to make a board for a roguelike duo to the fact i think its betetr for algorithms in general
idk tho
algorithms are always hard
i ditched that project really fast
writing a roguelike from scratch would've been a better decision
lil sneak peak on all of the scripts for the roguelike(gamemanager doesnt have shit in it currently other then an alternative way to exist the game using alt + f4)
interesting
I'm more in favour of a turn-based approach
and a bot
instead of a game
it's easier to make
and can have mp
mp is probably gonna be limited to trading and forming survivor groups
hmm interesting
if you want to learn how o make a roguelike i suggest following this tutorial, sadly its in unity but some things might be useful
they are making kinda a turn based game too
- IMPORTANT - This projects requires Unity 4.6 or greater *
Watch on Unity's learn site here -
http://unity3d.com/learn/tutorials/projects/2d-roguelike
This 2D Roguelike project guides you through creating a turn based, tile based game with procedurally generated levels. In the game you play as a lone man trying to find food and survive the was...
you could change
directionInt = directionInt % 4;
to
directionInt %= 4;
Just saying lol
i will probably do that when cleaning up the script
idk if it improves performance but doesnt but still
It doesn't but it takes less time to write lol
well i uh
kinda so clean up my code but it's probably not fast... at all
look at this beatiful game manager its almost like its done by a 5 year old
I don't like the coding part of programming. Best part of programming is the logical thinking and planning not typing the code so I always try to make my writing faster
I should check the time needed for my registration command
logical thinking and planning is really useful when making item types

i halved the amount of my player. dataframe columns because a lot of them were nearly useless
and got rid of 2/3 of my raw item .csv files (subcategories) because i was able to shove them into consumables
i started doing more planning, better code and less mistakes after watching this presentation
https://youtu.be/azcrPFhaY9k
Learning to program is hard because programming feels different than other skills. But programming isn't about the languages - it is about the way one should think.
SPEAKER:
Andy Harris
Interested in the stock market? Love trading? I developed my own Market Model which provides BUY and SELL signals on S&P500. Check it out here: https://...
why make a separate healing item .csv when you can just add a hp gain column in the consumables category and that's it
i am pretty stupid when it comes to planning
I'm still too but that presentation really helped me understand to do it well so I'm slowly getting thete
i think i have the thing figured out and just as i finish writing it i realize that I could've done it way way better
what i like to do with items is make a general script for all items and then just make each do different stuff, this is especially useful with roguelikes because picking up all items generally have same animations
it's a bit different with bots
you don't really pick up anything, it automatically goes into your inventory if you find it
and you have the space ofc
Well OOP could be used there too
OOP is amazing
i have ptsd after dealing with cursed oop
makes code clean, easier to create and more readable
oh right its a bot, well still cant you just make an item have a stats script to update the player,monster,AI stats upon pickup i guess
but tbh so far I don't need oop
well with OOP you don't need to do repetitive shit
i have code that updates player inventory etc as soon as something happens
and it's easier to change something
I love oop but hate lambdas lol
when i need to do repetitive code i just put it in a region, close the region and pretend it doesnt exist 
lmao
i have a feeling like dataframes sort of replaced classes and objects in the bot code
works well before you have gigantic game file
"eh i will buff it out later"
pandas dataframes are a godsend tbh
maybe next update
I should learn more about pandas
I started learning data science once snd learned some pandas but then I got bored of it
pandas and coding...i think this is made either for me or by me
anything that the bot can pull that isn't ctx / input? read fron csv
lmao, pandas is data manipulation library in Python
AMP just uses firebase so ai never needed pandas with it
data science is boring af Imo lol
c# watching in the corner telling itself:
"im good at oversimplifying everything"
Only reason I'd ever use C# is some .net stuff
can't execute malicious code if you can't fit it in! always works
I always just google regexes. Regex is like a nightmare for me but I need it way too often
the rest is just gonna be reactions
Oh yeah
thing is even googled regex didn't work so i gave up
lmao
i wonder how easy is it to make a simple algorithm for generating things like graphs or structures in python
lmao
Pretty easy actually
like 10-30 lines
🥲 not in unity
Yeah there is
generating a board...and then a room...a corridor for the room... things inside the room...
nightmare
is that the name
lemme check from the platform I learn this stuff from
i think i saw it in a pandas jupyterlab tutorial
jupyterlab is cursed
i do not like working in it
when in doubt stack overflow it out
lol yes
Matpotlib
alright
there were some graph things in the tutorial but I didn't really need them so eh
Graphs might be useful later on though
when I'm gonna start updating the bot after i release it
for balancing reasons
Sololearn has really amazing Data science course if you're interested
its best to make all the updates before the release i think
I used sololearn a long time ago, it messed with my phone keyboard so i stopped using it lmao
lol, I use it in daily basis
true but i want to keep updating after release
ofcourse updates are still mandatory but if you have planned updates from now its best to do them now
balancing, new mechanics all that stuff
I'm 5th most active user in Finland 
holy shit
nah I don't have anything planned other than release
all i have rn is a very very basic scavenging system
fallout 76 and cyberpunk would like to speak to you
lmao
true
weighted random choice be like:

especially when you go with wrc + nested list
"yea half the game isnt nearly done but we can fix it with updates nothing we cant buff out"
@hasty bane so you're working on discord bot or what? I tried understanding it from what you've been talking but I'm honestly still not 100% sure
lmao
then you are speaking with the right man
I have 7 months of experience in discord bots and almost none in any other development with python or any other languages
amp.exe
i have like 1 month of python experience lmao
some bits here and there over the last year but i couldn't stick to it till march
1 year old c# experiance be like
I have techinally been learning python since I was 10 but not that actively
based
also today i learned how to use switch and enum its been a fucking year
I haven't run into any problems with the bot so far
I've been learning about IT though basically daily since I was 9
and i havent used the most useful shit ever
even got scavenging to work first try
you'll get to the problems
I'd need to remake basically everything for #🔁map-conversion , create amp clans, finish modmail, fix other random bugs
way too much for mr
when I'm not getting a penny for any of it and I don't get that much enjoyment or learning from it anymore
how does map conversion even work
processing image into map file
its always been interesting to me because it looks complex af
well for first 2 months yes, after that it sucks
i used to suffer from bad burnout really fast
until recently
It's complex but I can explain it if you're interested
ye i am
got hit with le depression and I'm so bored of everything including school i just code
it's fun
after you get through the basics and you learn enough to work on projects it's great
this bot is my first large project
i had to write half a notebook of math so im kinda sick of code that includes numbers rn but litteorly everything in unity is math based
i try to avoid math, I'm not good at it
granted you can google things but eh
it can get confusing real fast
the good thing about unity is it does most math for you
the bad thing is it doesnt tell you when to use it
Well first you get process the image to have only the colors that you can have with tiles in WB with some image manipulation code, pretty simple at this point.
After that you check the resolution and through that decide how big it needs to be.
Then it goes through this script I don't understand that somehow makes all the data collected into the file which I'd need visualization to explain how WorldBox map files work
There's actually only one for loop
for every chunk of the image
🤔
or even pixel
Chunk, don't remember how many pixels one chunk was
but 1x1 map would be 12x12 chunks if I remember correctly
chunks... interesting
i mean i think you can set it to as much as if you want if you decide to make the chunk....watcher script(???) yourself
50x50 wb map when
Yeah you
600x600 chunks maybe so it would be easy for amp to create
I sent my message way too early
lmfao
on accident
happens sometimes
wait i have an idea
why dont you just do sprite editor type thing(unity) and look at the image that way using a for loop
I'm already tired enough that I lost my ability to write well
lmao
brb ima give an example
lol
doesn't load, discord is cursed
damn
What are the plans?
25 locations (5x5 city), each location can have player safehouses in it, locations will have threat level and loot saturation level
stuff like that
slightly sophisticated combat
You have to settle with something small for first version most likely
yeah
im back
most of the stuff is in a "maybe" trello column
I see what you mean
as long as i dont save this slice unity might not crash for a while
saving this will definetly cause some file issues
hmm
I'm gonna have my first paid programming job next summer for 2 weeks. I'm gonna go create website which is gonns totally be new programming experience as I've never actually done web development nor have I never done anything for someone that I'd get paid for
lots
based
I'm thinking about maybe making discord bots in the future
for people
too early to think about it lol
congrats! In what language
I was thinking of doing that freelancing style but then I was like, ehh
I'm gonna get email next week with more info, I only know the time and how much I'll get paid so far
if i could get a programming job I'd go work for a company
high salary + stable income, pretty nice
if i become a programmer i will become an indie game dev or work for ubisoft
imagine front end lOL
Front end is boring af to do
well yes but then i get to say "i made far cry 69"
Fair enough
It's way cooler to say I own a business or something
true
i might also be on the credits which only like 0.1% of people read
but like... what business
and I'm honestly not satisfied with how companies deal with internet security nowadays
yeah that sucks
hm
tbh
you can develop software and sell it
that's pretty good ig, probably requires a team though
That's exactly why I want to create company teaching about internet, your data and want to affect the legal boundaries of internet
maybe something that helps you keep track of crypto
or you can be the next ea and make a series of games and just release a game every year with a different number on the front
that works too
ea will probably buy you if you try that
im not gonna be suprised if the next fifa game is litteorly a copy paste of the last
with 2 new models
and maybe an extra script for good messure
My classmate is obsessed with FIFA and I don't understand why
Sports games are cursed
obviously, there's nothing telling not to. There's nothing against tech monipolies or anything like that otjer than public opinion but like monopolies would care
ea is kinda like da beers
found a gold mine and became rich off if it
Well there are anti-monopoly laws
They don't really work in tech
but it's mostly in the us and we all know the politics in that country
no but they work in diamonds
so
They aren't made for tech
yeah
Also data being sold
because idk
people don't care about reading long documents
oh wait the laws...no laws for tech really other then "dont hack pleawse thx"
They tell that to users but users don't read that
yeah
so it's perfectly legal because average consumers are idiots
My dream is to work to make these problems minimal
meanwhile corporations like youtube manage to break their algorithm SOMEHOW
yep lol
dont question it im sure its not a bug its a feature
if YouTube can break such a giant part of their entire system even though they have a lot of skilled programmers
imagine the amount of vulnerabilities everywhere
Software bugs always happen
i saw the spiffing brit video
and then i saw the socialblade of a guy who followed the instructions
i think it was a 110000% sub increase
no no no guys we cant use the word bug or big company bethesda might get mad we want to call them unintended features
My dream job is ethical hacker working to make those less during days and firefighter during nights or other way around idk
lmao
he's good YouTuber tho
He has the true hacker mindset: "How could I fuck up this very important thing for this very big tech company"
next "bitcoin mining is broken"
There has been like million hackers that have tried to break Bitcoin so I don't think that'll happen
"the world economy is completely exploitless 100%"
where some professionals hacked into us gov stuff
Anonymous has done that few times at this point
sorry that was me i didnt intend to call that function so early in development
lmao
anonymous are good i wanna join em
anonymous is weird
but i dont have half 1/9000 of there knowladge so...
they disappear and then they break government websites
Anonymous never do anything for money, they're political group
and then they disappear again
im not about the cause im about the action
They only come when they need to protest against something
they just do it in very agressive way
"the prices at walmart are too big ima hack the government and tell them thats not cool"
i want to believe that Anonymous is working on the super virus that will take down the internet
like brick all servers world-wide
that would be funny
funny....
Why would they do that
for the lulz
Thing is anonymous would never do anything just for the lulz
Maybe they are anprims
every attack risks some pf their hackers getting caught
And think that the industrial revolution was a disaster
imagine someone deletes the internet and when asked why they say "i felt like people would make great memes about it...then i remembered no internet = no memes"
club penguin shuts down for good 😔

now that would be the end of the internet
even more interesting slogan
i swear anonymous are just a group of editors who try to fix the internet but end up attacking governments
reditors
Weow. Building a interpreter for a custom coding language is harder then I thought.
at least harder then I thought
First time to fingure out how to make event bois :D
<incidentTypes id="events_incidents" >
<incident id="rep_int_drunk" properties="type+=road;
popularity=1;
visibility=0.5;
tag+=night{+3};
stage = 1;">
<scene id="inten" poi="ROAD" background="Road1Background" properties="timeToReact=10000; AddMoney(5000); iconMap=important;
opinionOnSuccess=5;
opinionOnIgnore=-1;">
<policeWork id="sive" properties="workAmount=2000; " actionOnEnd="AAR+=gears"/>
</scene>
<aar>
<reportElement id="gears"/>
</aar>
</incident>
</incidentTypes>```
Holy colorful codes
It just highlights...It hurt
My god...
highlighted code is fuckin awesome
coding without highlighting is like like doing electrical engineer without color vision
most IDEs yes
XD it really is
so awesome
After I learn how to make events one
<incidentTypes id="events_incidents" >
<incident id="rep_int_drunk" properties="type+=road;
popularity=0; tag+=night{+1};
visibility=0.5;
stage = 1;">
<scene id="inten" poi="ROAD" background="Road1Background" properties="timeToReact=10000; AddMoney(5000); iconMap=important;
opinionOnSuccess=5;
opinionOnIgnore=-1;">
<policeWork id="sive" properties="workAmount=2000; " actionOnEnd="AAR+=gears"/>
</scene>
<aar>
<reportElement id="gears"/>
</aar>
</incident>
<incident id="rep_int_drunk2" properties="type+=road;
popularity=0; tag+=night{+1};
visibility=0.5;
stage = 1;">
<scene id="inten" poi="ROAD" background="Road1Background" properties="timeToReact=10000; AddMoney(4000); iconMap=important;
opinionOnSuccess=5;
opinionOnIgnore=-1;">
<policeWork id="sive" properties="workAmount=2000; " actionOnEnd="AAR+=gears"/>
</scene>
<aar>
<reportElement id="gears"/>
</aar>
</incident>
<incident id="rep_int_crack" properties="type+=road;
popularity=0; tag+=day{+1};
visibility=0.5;
stage = 1;">
<scene id="intcc" poi="ROAD" background="Road1Background" properties="timeToReact=10000; AddMoney(1000); iconMap=important;
opinionOnSuccess=2;
opinionOnIgnore=-1;">
<policeWork id="sive" properties="workAmount=1000; " actionOnEnd="AAR+=gears"/>
</scene>
<aar>
<reportElement id="gears"/>
</aar>
</incident>
<incident id="rep_int_crack2" properties="type+=road;
popularity=0; tag+=day{+1};
visibility=0.5;
stage = 1;">
<scene id="intcc" poi="ROAD" background="Road1Background" properties="timeToReact=10000; AddMoney(500); iconMap=important;
opinionOnSuccess=2;
opinionOnIgnore=-1;">
<policeWork id="sive" properties="workAmount=1000; " actionOnEnd="AAR+=gears"/>
</scene>
<aar>
<reportElement id="gears"/>
</aar>
</incident>
</incidentTypes>```
Ye
3 new bois
you want this?
You know what
The white background is better :hagrid:
We can steal see the code better
well I mean, my codes are only available on 112 operator game SO... yea, do it if you want >:3c
I mostly use White theme so I won't get feel comfortable :D

White theme hurts my eyes and soul
Whar the hell is 112 operator 
game
112 Operator allows you to manage emergency services in any city in the world! Dispatch units, take calls and face situations caused by weather, traffic or changing seasons. Help the city survive escalating events like riots, organized crime, terrorist attacks, cataclysms, natural disasters and many more!Danger has escalatedHelp on a scale bigge...
$24.99
1826
73
and my work bois
https://steamcommunity.com/sharedfiles/filedetails/?id=2368120184
You're learning cpp?
What does that code exactly do
I never feel very safe installing random code files
I still don't like installing them and I'm updating windows atm lol
nice
ye I know
I've been learning cpp last 5 days or so
Cool code ngl
C++ 
noice
C++ is amazing man
C is even more amazing
but I'm just trying to think of a project to do with C++ to learn it better
but I've got no ideas
I would grade it an A+ imo
Eh it's totally not A+ by any means if we look only at technicalities
wanna see something worthy of an S?
Debug.Log("Hello World!")
It's pretty general opinion that C and JS are the best 2 languages
i feel like if you asked 30% of programmers what their favourite language was they would tell you python, 20% java, 20-15% javascript, 10% C and the other 20% are for everything else
the c# people mainly like c# because its a really good lanaguge for games and its very easy to make applications on it
especially with visual studio
actually senior devs rather use C++ than C# most of the time for game dev
indie game devs say otherwise
Yeah indie true
c++ is great for big companies who want to make great readable code that everyone can work on while c# is practically unreadable if you have more then 500 lines in a single script
especially if you arent the one who made it
Just imagine reverse engineering someone's code
the code makes literally so little sense after reverse engineering
lmao yea
but just imagine what a script for a unity game like hollow knight looks like
oh gosh
trying to read the code for the game manager might be like trying to read binary when you dont even know what that is
game managers are both great and suck
if you have a mistake in one you will need to go through every singe line of it to find it, and then comes the fact that game managers dont do one thing
meaning finding what you wrote 2 years ago and fixing it would be a nightmare
aight gn
Wot
Why are you sharing this here tho?
Pretty sure it's a pyramid scheme, but it's also a free download so idk
This is coders cave
Haha okay I guess
I mean, the developers seem legit. Nicholas Kokkalis and Chengdiao Fan
The problem is that the way you get more power is by referring to others, very pyramid schemey
Hey, i have a question, is it possible to edit a characters items using a world file? I can use the discord bot for editing traits but idrk how to do the same with items
Uhm I haven't looked enough at the decoded text yet but you can use ~decode in #🔁map-conversion
Then open the txt file and search the person you want to change things for
@upper wagon
~decode with the map attached
whats the point of advertising a crypto except for a pump and dump scheme
Some free money
in this case like 0.001 cents
the currency sucks so much
I've mined it a bit but wasn't worth it
Ok
mm yes
today i did almost nothing
because i kept rewriting the combat system
first i wanted to make several different units that could stack and took turns attacking, then i decided that was pretty dumb
Decided to change to a system where i had minor enemies which had a hp pool and major enemies that had a unit pool (damage dealt would stack to 100 and once it goes over 100 one unit is removed from the pool)
That was very dumb too, because it would require predetermined enemies pretty much
Happens to me all the time

At least i got it right in the end
my current system lets me generate any amount of enemies
Or it's just, I do so much that goes wrong that I don't see any progress
randint + several factors = win
tfw you start working on thing x and notice that thing y that you did weeks ago looks bad and you just spend the entire day optimizing
and then you realize it was pointless because the command executed in under a second anyway
i managed to make the movement script for the player shorter
i legit wrote 6 lines of code and managed to make movement that is pretty much great, not including the fact its very simple
I had busy day but still managed to pull out 30 mins of C++ training somehow.
I had firefighter trainings and wanted to stream some tetris + school.
I really need to start project with c++ tho
I'd also need to do amp stuff but I've completely lost motivation, and when there's no motivation nothing gets done
exactly, it's a lot slower atleast
Lol i found this
https://calcur.tech/all-in-ones
Free for now. Normally $399
i disagree, motivation usually comes suddenly and goes away steadily
+1 Cody, I agree with you - it comes and goes
and motiviation aside, burnout is a serious problem if you commit to anything for too long
Yeah
you could be fully motivated to do something but feel burnt out because you've been doing it for so long already
ive been a bit stuck in that boat for a while
Spammer for what
why would you create or especially use that tho
why not
Ehh idk I just don't like to create any harm to anyone in any way
Like annoying so I count it as harm, light but still counts Imo
if annoying counted as harm i'd be hurting all damn day :(

i like how this room is only sometimes about code btw lol
lol, it's still kinda about it
When you release your code is wrong but it was too late to change :
The car is so big you can isekaie Godzilla with it
lol true
I had to deal with it 2 hours and now I finally updated it :D
https://steamcommunity.com/sharedfiles/filedetails/?id=2455724735
and don't worry about why it showing error.... I wanna yeet that too
Ok but what this
hospitals
What about new tool
and vehicles needs this too :>
tool?
is that supposed to be a pic or the code file
That's pic
Isn"t there is like tool in that game
Like tazer or something like that you can equip to personal
Thats what a tool is 
hope you know I just started coding 3 days ago
Like start coding the mod or start learning coding
?!
starts learning coding
this is my first coding
discord
then dont
pls dont hardcode 😦
Wdym hardcode?
eh?
My project for my final school exam is going to be a vr version of zoom, basically a virtual class. The idea excites me, but I have to use unity and I've never used it before, not counting that I have to make it vr compatible, but there are already some plugins that do a lot of the technical stuff so that's good 
VR is actually pretty much ghe same difficulty in unity than other 3D stuff from what I've heard
but that sounds tough
It's only going to be a prototype with basic features, I have only one month to do the whole thing, with school on the way of course I have much less time
They give us some school hours to continue our projects, it makes sense since it's a school project 
YouTube planned a live VR feature once, don't think they even made it tho
I have used blender to make a 360 video for youtube. Video works but when I tried audio it's just a bit stuck to a line from left to right, not really sounds like it's in 3d space.
In blender I used a Equirectangular camera and after rendering a plugin to convert and a edit the metadata of the video so that it became 3d
do you plan on making students faceless or maybe giving them avatars? or how else might you solve the situation of having no webcam/facial input for video
interesting project
i think theres a few things on the oculus store that attempted similar
for the simplicity of the project I think I'm going with regular avatars, maybe with some way to distiguish students aside of the name, I have limited time and not too much experience with this stuff... yet, so I'll keep my goals realistic for now
okay nice, good luck
you never use unity?!
So you use something else to make worldbox mod
unity engine is used to make games and apps
other programs are used to make worldbox mod
ou
mostly DnSpy for modding
I never thought lists in c# unity would be so damn good 
Hahaha I ignored that fact for so long until I found a very good use case and started to learn about it. Now I want to use them way more
lists are love
learning to use lists and loops changed everything lol
and the most memorable thing ive ever done was use a list of lists to create some sort of undo system
but using a list inside a loop is 50/50 chance for a fun time
cant edit the list while its in use by the loop or you cause error
I'm still learning about using loops, but I should be able to learn them fast because I'm making an algorithm to generate random dungeon rooms
And I'm 100% that uses alot of for loops
But yea lists are amazing
i personally use a lot of foreach rather than for loops, but it should be case by case
I'm making an algorithm to generate random dungeon rooms
sounds sick
post progress
anything that has something to do with random mapgen gives me ptsd
I'm currently learning about it and what I know is that at some points in development there are many for loops going into eachother a bit like this:
for(i = 0, I < maxRooms, I++){
for(g = 0, g < columns, g++){
for(h = 0, h < rows, h++){
Debug.Log("don't remember the rest");
}
Not an accurate representation, but just a thing I came up with on the spot
(may have forgotten some curvy brackets but eh ¯_(ツ)_/¯)
This is the first time im making an algorithm of this complexity so this may suck at the start
01001001 00100000 01010011 01010000 01000101 01000001 01001011 00100000 01000010 01001001 01001110 01000001 01010010 01011001
nested loops
very fun
(not)
the ingame image to map conversion is done with nested loop
maxim's code, all i did was apply it to other pictures
Interesting I was always interested in seeing how map conversation was done
But yea nested loops aren't alot of fun
this is the worst version of map conversion possible, but its definitely interesting how maxim made it happen
how he uses tile height in general is just awesome
i assume the discord bots doing conversions also have to have nested loop for the same reason, getting x tiles and y tiles seperate
this is possible because of maxim making tiles have height with naturally generated maps
for some reason once you save the map and load it, the heights are all kinds of fucked, i think tile types have a default height and map generation overrides it
i have no idea what this all means but it looks cool
lmao
Wait so does this mean that naturally generated maps have got different heights then loaded once?
Ones*
I can't really explain to myself how this is possible because doesn't it just save the heigh values for individual tiles or maybe loading a map is done in a different way
time to start learning unity
right now I'm just following a tutorial to add oculus libraries 
What if a duck quacked so loud that thanos die ?
combat is really annoying to do... fortunately for me roguelikes dont have a super complicated combat system so most of the code is "You collide with something, you take damage" or "You collide with someone, you take damage"
the best way to learn that im currently doing is to think of a big project to work on and whenever you get stuck to search up the results and try to understand what the code does
then their damage is calculated using (log(enemycount, base 2) /3)*10
every time some enemy dies, damage is recalculated
i cant stop thinking of intRange its too good
random.randint
but there are a bunch extra factors
it tended to spawn enemies in multiples of 5
so i added slightRandom (0.8-1.1)
intRange is a lil script used to generate a random int in the range of a certain range of numbers in unity
i will give the code here if anyone is interested
(im pretty sure it works in nomral c# too :))
so far I didn't code anything, luckily someone made a nice oculus integration plugin, so I can already play the game on vr with hands (maybe hand tracking too), also been playing around with grabbing stuff
i had to use random.uniform for some stuff and round it
here's an example of how it looks rn
I'm gonna shove it into an embed later
unity has a similar command that is maid by the devs but intRange is usually made by the owner of the project so that he doesnt have to write the same long command over and over
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class IntRange
{
public int m_min;
public int m_max;
public IntRange(int min, int max){
m_min = min;
m_max = max;
}
public int Random{
get {
return UnityEngine.Random.Range(m_min, m_max);
}
}
}
Probably gonna add some shit like support items
Smoke bomb or something
increase damage, decrease damage taken, increase chance to flee
combat isn't really the focus
intRange is usually made by the owner of the project so that he doesnt have to write the same long command over and over
example of this in worldbox:
i thought it was weird at first but then i learned everyone does something similar
like you said, the original is pretty long to type every time
its really useful especially when you are trying to make random things
yes
yes
no
Keep this chat on topic
That's true Jupe

never
i spent 3 hours fixing reactions today
apparently the wait_for check was fukd so i had to fix it
it no longer lets other people end your scavenging runs
Checks never work for some reason
I once had an if statement and 9/10 times it would count the if statement as a false when its value was always True
1/10*
its kinda my fault tho because i didnt know what other statements and loops there are so i just made 20 bools with 30 if statement checks and hoped for the best
in a single script may i add
haha
Hey guys, I have a question on unity c#.
So I want an NPC to run away from someone. I use unity's NavMeshSystem and my idea is to run away to the opposite direction. Here's a drawing showing my idea. (Simplified version)
Currently I just use the negative position value of the enemy as the destination
But as you can probably understand, it's janky
Is it 3d or 2d c#, I may be able to help if it's 3d as I have more experience but not as much if it's 2d
It's 3D
I once actually had something like this happen, I was attempted to make an enemy come towards me whenever I'm in a certain redius but ended up launching him thousands of meters a second whenever I got near him
It was when I was first learning 2d
Anyway, back to the subject
So here is a question: do you want him to run away in the same direction you started chasing him or do you want him to run away in a random location that isn't the one you are chasing him in
Yea I get that but is it in the opposite direction or in a random direction sorta opposite you
Usually my first thought to do that is to take your transform and do the same thing if you wanted him to chase you but with negative values, but I understand that doesn't work
Hmmm
It doesn't really matter. What's important to me is that the enemy will run away, so what's easier will be a better choice
Alright
Do you have the nav mesh set up on your platform/place that you and your AI are walking on
Yeah
If yes then just putting negative values shouldn't be a problem
I tried that, it was janky
I haven't done this before so Im just thinking of a solution
var enemdist = Vector3.Distance(FindClosestOBJ("Enemy").transform.position, transform.position);
if (enemdist <= spottingRange)
{
agent.SetDestination(new Vector3(enemdist + transform.position.x, 0, enemdist + transform.position.z));
}
Ah wait
Let me clean it up a little bit
So let me explain what I'm doing here
I'm taking the X and Z and adding the distance (Magnitude if we're speaking vector)
So one think you can do is:
Vector3 moveDir = aI.transform.position - player.transfrom.position;
Transform.translate(moveDir.normilized * aISpeed * Time.deltatime(put this only if you want the movement to not be framerate independent, but you probably already knew that so idk why I wrote this));
Jesus that's hard to read
Im on mobile so I don't really know how to set up text to be for code
You can use the `
Ah thanks
Huh
It's the tilda, not the upper comma
Damn I hate discord mobilr
lol
Transformer.translate(moveDir.normilized * enemySpeed * Time.deltatime);```
Yea I finally figured out how to make my text slightly more readable
I need to use transform.translate more it's pretty useful
Yeah, but what I need to find is the next destination for the AI. Not to manually move it
Yea right I forgot about that
I tried using moveDir as the next destination
But the npc runs towards the enemy instead of running from it
Sometimes it does work
But only if the stars are aligned
Unity is janky af sometimes in 3d, maybe try -moveDir so it returns the negative value(I'm talking about this new moveDir)
It didn't work
So what other code do you have for the ai movement, maybe the problem comes from the fact that you are trying to walk towards and away from the player at the same time
Do you have like an idle movement script that just moved the enemy in random directions
Moves*
No. I think the problem is in the destination itself
Anyway, I think it's not a bug, it's a feature. It doesn't need to be fixed
Thanks for your help
Sorry I wasn't able to help in doing what you wanted, hope you have alot of fun while working on your game
It's alright
For anyone who knows Discord.py (Or just Python), how do I add a list to json?
right now, I have
TestUser[str(user.id)]["wins"] = 0
where TestUser=message.author.id
and I get: TypeError: 'int' object is not subscriptable
so you first gotta declare dictionary or load dictionary from json:
dictionary = {}
This creates empty dictionary
import json
with open(jsonfilename) as file:
dictionary = json.load(file)
This reads json file and stores data in dictionary named dictionary
then you can change the data in the dictionary easily
because in this you're trying to change dictionary data from interger
Python looks so complicated
well dictionaries are a bit complicated true
like this
you add three ` around your text on the top, and bottom
@crystal turret did you understand what I told btw or do you need more help, I'm more than happy to help
Aight thanks
To make this a int
TestUser[str(user.id)]["wins"] = 0
would I do
TestUser[int(user.id)]["wins"] = 0
or is there another way
After you create the empty dic
lemme write yoy some code and explain it a bit better
ok
I use this stuff on amp a lot
Most of the code I wrote for the json is from a youtube video about how to make a economy bot, which is not the bot I am making
I know the basics of what it does.
my pc is taking ages to boot so thw code will take a minute
ok
#create dictionary. Prefered way would be to use json but for the sake of showing concept we create dictionary at the start
winnerList = {
"wins": ["1234567890": 0, "0987654321": 0]
}
#To change add one win to someone you do this
winnerList["wins"][id] += 1
#To add someone to the list you do this
winnerList["wins"][newUsersId] = 0
This should explain it a bit better
#get data from database
ref = db.reference("topic")
topics = ref.get()
#create list of approved suggestions
allowedList = {}
for id in topics["topics"]:
if topics["topics"][id][1] == True:
allowedList[id] = topics["topics"][id][0]
#save list to cache.json
with open("cache.json", "w") as f:
json.dump(allowedList, f)
f.close()```
Here's actual example from my code of this being used but just with firebase
Is "id" effectively just NewUsersId to edit it?
in that place there'd be something like message.user.id but you should maybe also read this https://www.w3schools.com/python/python_dictionaries.asp
Ah thank you
@stark ravine pathfinding in unity is done by navmesh, how it's done is that all AI get a MavMeshAgent which kinda controlls em and alot of game objects get a nav mesh component which tells the ai where it can walk and where it cant
More specific instructions for the AI are done manually by code
One what
Pathfinding
If you mean instruction, here is an example:
Void OnCollisionEnter(Collision collision){
If(collision.gameObject.name("player"){
TakeDamage(10);
}
}```
🗿 fall damage code?!
🗿 go on
The way I do it is that I check if the player has a velocity on the y axis more then a certain number (if the acceleration script is setup) and then when the player collides with the ground I take damage
There is another better way
But more complicated
tell me
We check for how long the player has been falling
And on collision take damage
If the player has been falling for long enough
but i think high velocity has a chance to skip collision sometimes by default or something right?
have to be finicky with it
I mean most games cap the velocity that something can fall at for that reason I think
Btw this is how Minecraft fall damage is done
This is basically how early stage 3d development looks like lmao
more like 3d multiplayer 
Random walking animation
No walking animations look like
Clipping through trees
trying to interpolate where the other players are gonna go
and then the other players lagging out
dont know how i messed up this bad but i do know that he is flyin
lol
hey fellow coders does anyone have experience with tensorflow?
I tried once but gave up, I did some machine learning with visual studio's model builder instead
Okay, well I got recommended I use it, since I have to simulate neural networks in my project
It it difficult or why did you change
It was mostly because of the course I was following, the guy kept saying I didn't have to remember anything so I didn't feel like I was learning anything
And when it became more difficult that didn't really help much
Guess I have to see for myself
what is chunk dirty??
Hm
"dirty" things need "cleaned" aka updated
in this game its used to mean something needs checked behind the scenes for an updated value or changed behaviour


just a lil enemy stats script i made, if anyone is learning unity and is wondering how to create a script to damage enemies or players you can use this
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
public class EnemyStats : MonoBehaviour
{
public double enemyHealth = 150d;
public double enemyDamage = 0.5;
public float enemyMovementSpeed = 1;
public float maxShootDistance;
public void EnemyTakeDamage(double damageSource){
enemyHealth -= damageSource;
}
}```
bruh

I want to make an 8 bit like 2d fireworks game
fireworks in 2d would probably not look as good as in 3d tho
I mean you can make the player POV, Follow the Fire work while looking in a different point like in Minecraft
Wait maybe you mean a different thing
yes
Ow...
the textures gonna be hard to make look 3d ish I think
I think something like literal orthographic view like what mario and people playground have is what i want
haha haven't done it yet
haven't been down to do much lately but started on worldbox again yesterday and it was going fine I guess
That's cool...Nonetheless your game concept is interesting
thanks
It probably depends on the player POV, And How it's gonna faction.Cool
Have a great day to
Ty
you too
What is better to make an app java or javascript?
Android app totally java or kotlin but for iOS you have to use Swift
You could also try c# in visual studio
That's not preferable at all tho
How do you make apps in unity 
This app would load 2000 years and would cost to make so that it doesn't have the "made in unity" at the start
But other then that no reason
In reality it would probably be easier to make
Lol sucks
Legit costs an arm and a leg to what I remember and that's just for a month
Like 200
Wait unity has a lenguage on its own?
Cant i use java on unity?
Unity uses C#, I don't know if you can change that and if you should even use Unity for apps
Very easy imo
In python, I have a function, and inside of it is if statements and variables. If I change a variable value in a if statement, it doesn't carry to the other if statements? How would I allow a if statement to change variables to make it available for other if statements?
Sample code related
async def MyFunc():
MyVar1 = 0
MyVar2 = 1
MyVar3 = 3
if MyVar1 == 0:
MyVar2 = 10
MyVar3 = 13
if MyVar2 == 10:
print(MyVar3)
#Should print 13, but it would print 3
dont define the variables in the function lol
Hm
16: 2 The markup in the document following the root element must be well-formed.
no idea what is wrong with that
1st one = Correct
2nd one = 16:2
when it nonlocal variable
My friends, how can I make a texture pack for the Worldbox game? I would like to slightly change the color of the land, water and trees in the game
ask it in #🔧modding-talk. not here.
finally my work :D
longest update log I've ever made :p
A non local variable is a variable that is not defined in the local scope. Most commonly known as a global variable
so true
also
global and nonlocal are different?
global is global
nonlocal is for nested functions
local scope is for example in a loop
for(var i = 0; i < 10; i++) {
Debug.Log(i);
}
// i doesn't exist here any more
You can define a local scope anywhere with {}
void someMethod() {
{
var i = 0;
i++;
Debug.Log(i);
}
// i doesn't exist any more
{
var i = 0; // this i is a new var
i--;
Debug.Log(i);
}
// i doesn't exist any more
var i = 0; // this i is a new var
i++;
Debug.Log(i);
}
@hasty bane @crystal turret
python doesn't have {}
could be c# or javascript, but idk if js has Debug.Log
what we learned from this is that local, nonlocal and global are slightly different in different languages

function someMethod() {
{
var i = 0;
i++;
console.log(i);
}
// i doesn't exist any more
{
var i = 0; // this i is a new var
i--;
console.log(i);
}
// i doesn't exist any more
var i = 0; // this i is a new var
i++;
console.log(i);
}
someMethod();
look just a few tiny changes

