#⌨coders-cave

1 messages · Page 85 of 1

main brook
#

overriding input

#

also

#

there's gonna be an error

wet girder
#

I don't think python let's you but if it did it'd be damn funny

main brook
#

oh wait nevermind

wet girder
#

oh lol

main brook
#

its a global variable

#

not even write protected

#
>>> input = 1
>>> input
1
>>>
wet girder
#

could you replace input as some other function

main brook
#

yes

#

but why

wet girder
#

but how tho

main brook
#

you can just read the stdin

#
def foo(text):
    print(text)

input = foo

input(1)
#

this works

wet girder
#

so I could just replace my own function as input to fuck with people reading my code

main brook
#

yes

wet girder
#

amazing

main brook
#

but you can like

#

rebuild input

#

its not that hard

#
import sys

def input(prompt=None):
    if prompt:
        sys.stdout.write(prompt)
        sys.stdout.flush()
    return sys.stdin.readline().strip("\n")
#

this

#
>>> def input(prompt=None):
...     if prompt:
...         sys.stdout.write(prompt)
...         sys.stdout.flush()
...     return sys.stdin.readline().strip("\n")
...
>>> input()
hi
'hi'
>>> input("name:")
name:hi
'hi'
>>>
wet girder
#

hmm noice

orchid frigate
#

With altitude you will end up like me

#

Making an os

#

Taking 3 months to implement a feature and not having much fun coding

#

For something I will never finish and will 100% abandon

#

You forgot learning about pointers

#

The worst best thing in the world

#

I love hate pointers

main brook
#

@IHaydot#1126

#

haydot

#

i found a way

#

for resizing the partition

#

actually nevermind

#

its a bad idea

#

the uuid changes

orchid frigate
#

what does that mean

#

will fstab not recognize it with a different uuid

#

@main brook

orchid frigate
#

the end parts look like bitwise operations in C

orchid frigate
#

I think is like how you declare functions in py

#

also

#

starting the os project over

#

found a more reliable source of info but it uses a completely different method of booting and also does alot of memory mapping and a file system

orchid frigate
#

which

#

im guessing

#

will make things go bad

#

as the fstab will be broken and thus the os wont even try to boot

pine wharf
#

pretty cool that maxim uses github for worldbox xD

orchid frigate
#

I mean

#

doesnt everyone use github

#

its the best way for multiple people to work on a project

#

and to back up your code

main brook
#

and also

#

for stealing code

#

its kinda normal it happens

#

usually codes are like when your teacher said

#

"why your answer is the same as the other kid answer"

#

we are solving the same poblem

orchid frigate
main brook
#

yes

orchid frigate
#

A special type of sharing

#

Where you copy and paste everything

#

Or just download the project

hoary hound
main brook
#

i call it oss

#

basically

#

anything you put online

#

is open source

#

and they can legally take it

#

one example nft

#

instead of buying it

#

just save it

hoary hound
#

basically trained their ai on all public code on github

main brook
#

yes

sly nimbus
#

👀

knotty root
#

Hello

#

Do someone Use C++?

orchid frigate
#

me

#

and C

near delta
#

Sup

#

Print("I have awakened")

main brook
#

got new mouse

#

now I don't misclick with the touch pad

#

imagine accidentally deleting

#

a whole line

#

because you accidentally touch the pad

wary matrix
#

mousepad

#

or no mousepad

main brook
#

no

#

mousepad

knotty root
#

Haha im stupid and can't code

knotty root
#

Okay

exotic vessel
#

Ah yes... The nerd cave

tropic dagger
tropic dagger
#

Or just put time into it.

#

I didn't get good at Civ 5 until I put in about 600 hrs.

#

I'm still not as good as I want to be with coding yet.

#

But when I hit 1k hours on notepad it's about to get crazy.

orchid frigate
#

Please dont leave us unemployed Dave 😔

exotic vessel
#

I will never leave my friend

main brook
#

nice

loud badger
#

I need mental help.

main brook
#

same

wary matrix
#

I don't 😎

wet girder
#

I went to class, got my laptop and windows immediately started updating

#

for fucks sake

main brook
#

o

wet girder
#

thankfully school gave me a good laptop so it updated in like 2mins

wet girder
#

no

#

just normal win10 update

#

my school doesn't want to update to win11 even if it was possible

bold rover
#

Nice, Because It would be so cursed, Knowing you can work on w11

wet girder
#

and my laptop is in the school network so it can't update

bold rover
spiral sonnet
#

Help

#

I forgot

#

Language is python

#

Oh, no problem found it

barren shale
orchid frigate
#

Hamza

#

How are you

#

@barren shale

barren shale
#

Good

orchid frigate
#

Nice

#

Hi

#

@knotty root Thanks for trying to promote me but it ain't gonna happen

#

Too inactive in moderation

#

How

#

Basically

#

You first have if

#

Afterwords you have else or else if

#

Else if = another if

#

Else = every other case

#

Many reasons

#

One of them us I cant find time fir everything nowdays

#

Trying to learn arch while working on the os while getting good grades

#

While being social

#

School and programming dont go along

#

Unless you are in a school for programming

spiral sonnet
#

I'm satisfied with the results xzibit

#

Not bad for a rookie huh ?

main brook
#

what

#

also

hoary hound
main brook
#

that's nice for a rookie

main brook
#

random.choice(iterable)

#

its basically

#
iterable[random.randint(0, len(iterable)-1)]
hoary hound
main brook
#

yes now you know

bold rover
#

Runs out of pics to use

knotty root
#

Is it possible to link python and unity?

main brook
main brook
#

there's this thing called

#

Shared Object

#

and also IPC

bold rover
knotty root
#

Ok thanks I'll look into that

barren shale
#

not a good idea btw

#

python is extremely slow for making games

spiral sonnet
#

It's true

#

What language lol

foggy beacon
#

Find the error, C#:

using System;

namespace Main
{
class a
{
public static void Main()
{
int A = 0;
int R = 0;
B(out A, R);
}
static int B(out A, int B)
{
if(A > 5)
{A = 5;}
return B;
}
}
}

#

A: ||replace keywords "out" with "ref"||

gilded bobcat
#

Ok

spiral sonnet
#

Lol

#

Unfunny program

main brook
#

its nice for beginners

#

also

#

use a boolean

#

instead of expression

#

since 5 will always be equal to 5

#

so it can be replaced with

#

True

spiral sonnet
#

Yes

#

But 5 == 5 is easier to understand lol

#

But I get it man, it's less professional

main brook
#

no

#

its not categorized as "professional"

#

its just considered as "the usual and efficient" way

#

since while loop will reevaluate the expression

#

every iteration

#

its gonna take a bit of time

#

but you do you

#

just make sure to not use it often

#

it can be muscle memory

#

and you subconsciously do that

#

instead of the other one

spiral sonnet
main brook
orchid frigate
#

I wonder how do compilers see booleans

#

They dont exist in assembly....kinda there is the cmp(compare) instruction but its not really the same

#

So they must be a compiler thing

#

They are probably just values like 0 and 1

#

For simplicity

#

But then again simplicity really isnt a thing in compilers considering how complex object files are lol

wet girder
exotic vessel
#

Ah yes... The nerd cave

orchid frigate
#

You are supposed to say that once a month

exotic vessel
#

My bad master

orchid frigate
#

Take a break you know

#

Doing this is hard work

foggy beacon
#

Its a conditional statement, it's used after an if statement when if something else happens it will execute a different block of code instead. Usually the else if or elif goes first then the condition then the block of code being contained by it.

orchid frigate
#

AIght alot of progress today

#

due to switching to arch the last HexaOS project couldnt compile from windows to linux so had to start from scratch

#

But managed to make a lil bootloader and link it with the kernel

#

tommorow will do some printing and interrupts

foggy beacon
#

Awesome

orchid frigate
#

idk why I said this but Im really tired and which server is this

foggy beacon
#

Worldbox

orchid frigate
#

oh uhhh yea I think I meant to come here

foggy beacon
#

Aight

foggy beacon
orchid frigate
#

I mainly do cpp

#

But im best at rust

#

I also know a moderate ammount of assembly

foggy beacon
#

I do C# mostly and a little of python and i know HTML5

orchid frigate
#

Nice

#

Actually productive languages

#

I mainly code low level so nothing I do makes any sense to be done nowadays so I will probably have a hard time getting a job in the future

foggy beacon
#

Oof

orchid frigate
#

Ok I will go sleep cya

#

have a good...day, night

foggy beacon
#

Cya

wary matrix
#

whats the c# equivalent of c++ typedef

#

never mind i found it out

#

basically like:

using I = Ammo.ISystemInstancer<Ammo.ISystemInstance>;
toxic loom
#

Help

spiral sonnet
tropic dagger
tropic dagger
barren shale
#

so that would be

public struct S {

}
tropic dagger
#

I may have the order wrong here but here's a C/C++ typedef:

typedef int bruh;
#

There is a

typedef struct {} bruh;
barren shale
#

is that in C too ?

#

cuz i dont use c++

tropic dagger
#

But that's because if you a declare a struct like this:

struct bruh {};
barren shale
#

i thought it would be the same

tropic dagger
tropic dagger
barren shale
#

yeah that's why i dont use C++/C

#

one thing does too many things

tropic dagger
#

Not really.

#

Typdefs create a type alias basically.

barren shale
#

or too many things do one thing

tropic dagger
#

So instead of int you type bruh.

barren shale
#

why would anyone use that

tropic dagger
barren shale
#

never used int to ID things

tropic dagger
#

typedef char byte; // number not character

barren shale
#

so a byte doesnt exist in C++ ?

tropic dagger
#

It's a char technically.

#

So char x makes a byte.

#

They become ASCII characters using traits.

barren shale
#

yeah ill stick to C#

tropic dagger
#

The only difference between int and char besides size is chars are usually used for output and thus have special traits passed with them to certain instantiations, like in std::string, which has two template parameters, the character type and traits. Don't mess the second one you'll mess things up.

#

So you could make a string of integers

#

Or you could be normal and use chars

#

Or you can wchars which are 2 bytes.

tropic dagger
barren shale
#

never have been limited by C#

#

only in AI stuff

tropic dagger
#

Ok

#

Damn AI.

#

AI seems so daunting.

barren shale
#

only python tho

#

you can find wrappers

#

but they are really not that good

tropic dagger
#

Yeah but python is probably the language I'd do AI in.

barren shale
#

only problem is that its slow

#

so it sucks for RL

#

if you have the game written in python

tropic dagger
#

Yeah but I can then translate to C++.

barren shale
#

so you have to make a server in another language

tropic dagger
#

Or C# or Java or whatever I need.

barren shale
#

the libraries

tropic dagger
#

Python is great for prototyping.

barren shale
#

you cant do real machine learning without using a library

#

writing it from scratch is too hard

tropic dagger
#

Yeah probably not.

barren shale
#

gpu stuff

tropic dagger
#

Not unless you're a genuis

barren shale
#

still takes long time

tropic dagger
#

Yeah but being genuis definitely makes a lot easier.

#

But still hard.

#

So just use the real geniuses for your own advantage.

tropic dagger
#

C'mon C# isn't doing it right.

#

Although it's kind of annoying that half of them are pretty much macros.

barren shale
#

we have two

#

Stream.Write

#

and Stream.WriteLine

#

and they are technically not the same thing

wary matrix
#

sorry for the confusion

barren shale
#

idk why but nobody uses that in C#

#

and i dont see where i would use it

wary matrix
#

i use it because I dont want to type again and again the same thing

#

so i just use an alias for convience

barren shale
#

just make the class name shorter

wary matrix
#

but the intent tho

#

i like making class names explain themselves in one look

#

instead of reading what i wrote in a comment

#

its just my style

barren shale
#

but what's the point

#

if you are using an alias

wary matrix
#

to make it a bit shorter

#

like:

using MagazineTypeInstancer = MagazineType.IInstancer<MagazineType.IInstance>;

barren shale
#

but then it doesnt explain itself

wary matrix
#

im trying to convert it to scriptableobject but idk if its worth it

#

but im already in the midpoint so eff it

#

anyways gotta go back

#

good day 2 u

barren shale
#

hmm the way you structure your code seems a bit odd

#

bye

wary matrix
#

bye bye

#

btw its odd bcuz of how it used to be b4 im trying to force it into a scriptableobject

barren shale
#

you mean unity stuff ?

wary matrix
#

yeah

#

i need to individually create a new instance each time i instantiate a prefab bcuz they arent suppose to share some variables but are supposed to share some information

#

for example, each of them must know the max magazine capacity but each of them does not know each other's current capacity

#

so i need to do it weirdly

#

b4 i just used prefabs w/o any scriptableobjects

barren shale
#

i normally dont connect the objects in the game to the objects in the code

#

makes life easier

#

because then you can just connect whatever object in code to whatever object in game

#

makes drawing sprites more efficient

#

and also helpful for other things

wary matrix
#

i used scriptableobjects bcuz i noticed they shared information

barren shale
#

maybe just use a static or singleton manager

#

that they can get that information from

wary matrix
#

i intend for it to be like:

  1. create weapon settings
  2. plug the settings into ur prefab
  3. prefab share information!
  4. profit??
#

and the info dont change

barren shale
#

share information to what

wary matrix
#

how many magazines, capacity of each magazine, how many rounds in a burst (if u checked there is burst or added 3 different burst modes for some reason)

barren shale
#

just create a static class

#

that you can add information and get information from

wary matrix
#

hmm no thx

barren shale
#

well then good luck suffering

wary matrix
#

i feel like static is more suffering

barren shale
#

nope

#

i use them all the time

#

makes your life easier

wary matrix
#

hmm im considering now

#

but then howd u have different settings for different weapons

barren shale
#

a list of settings

wary matrix
#

just have 1 file for each weapon>

#

?

barren shale
#

WeaponManager static class would have a List<WeaponSettings> in it

wary matrix
#

what i intend is just a folder then inside the folder is a list of weapon settings and u adjust parameters instead of typing

#

id rather do my scriptableobject way in this case

barren shale
#

so you want a class for each setting ?

wary matrix
#

thx for the advice too

wary matrix
barren shale
#

or each weapon

wary matrix
#

like i think what ur thinking is a list like:

{
Glock18setting
ak47setting
}

etc.

but not rly named but more like indexes

#

and in each prefab, i just assign an index of which setting they use

barren shale
#

Just make an abstract class called WeaponSettings that would have the properties of a weapon abstract too like

public abstract class WeaponSettings {
  public abstract string WeaponName { get; }
  public abstract float FireRate { get; }
}

and then you can just make a new class for each settings like this

public class AK47 : WeaponSettings {
  public override string WeaponName => "AK47";
  public override float FireRate => 9.7;
}
wary matrix
#

o ok

#

thx for the advice

barren shale
#

that's the most efficient way to do it because then you would instaniate each settings once and reuse it on every weapon of that type

#

and unity is all about efficiency cuz one single thing can drop your frames a lot

wary matrix
barren shale
#

they seem a bit under documented

foggy beacon
main brook
#

@haydot i have 2 usb

#

*pov: im the doorbell guy flexing on my neighbor*

bold rover
#

Didn't know there's still laptops that have 2usb ports

wet girder
#

my laptop has 2 USB A and 2 thunderbolt ports

barren shale
#

My laptop has 3 usb a and a thunderbolt

wet girder
#

idk what to use the thunderbolt ports for tho as everything for them is pricey af

barren shale
#

And a SIM card slot

wet girder
#

well I have sim card slot too and full size HDMI and SC port whatever the fuck that is and a 3.5mm headphone jack

#

I think that's quite good IO for laptop nowadays

wary matrix
barren shale
wary matrix
#

it made me chuckle a bit

wet girder
#

it actually makes sense

#

in work laptops atleast. Because you can just have internet everywhere

spiral sonnet
#

Yo

#

Help

#

Wait

#

Issue fixed

#

Easy one it was

#

Don't help

#

Lol

candid lynx
#

Is this pydroid?

main brook
#

yes

orchid frigate
#

Ok so uhhh

#

I was playing csgo on arch

#

And then the monitor lost signal

#

After cold rebooting

#

Still no signal

#

Arch is so much fun lol

#

Ok it was a cable issue

#

God fucking damnit im so on edge every time I use my pc nowdays

barren shale
#

that's called linux

orchid frigate
#

You know I dont think you have said anything positive in the past 3 months

#

Or more

#

Which is impressive

barren shale
#

i have

#

just not to you

orchid frigate
#

Why tho

orchid frigate
#

ok well

#

I have officially used 100% of my 10Gs

#

im...fucked

green sedge
#

HTML easy to learn

#

Python easy to learn

#

C++ very very very very very hard to learn

wet girder
tropic dagger
#

Headphone jack, HDMI and one other but I have no idea what it is not do I really care to know.

#

My laptop is kinda old so only of the USB slots actually work, one doesn't at all pretty much and the other will sometimes give up and needs a pep talk in the form of reconnecting whatever is plugged in there.

#

My computer is worse though, 2 of them will give up randomly (and when they go they stay gone) until you unplug the computer.

#

I'm blaming it on windows.

#

But it's probably just because the computer is old af

orchid frigate
green sedge
orchid frigate
#

If you know c# you basically know cpp with a few exceptions of course

#

and c# is easy to learn with unity

#

it does take a lot of time tho

tropic dagger
#

If you're dedicated you'll pick it up.

main brook
main brook
#

haydot

#

haydot

#

please buy a usb

#

and burn an iso image there

#

like gparted

knotty root
#

Me Using Java: Prints Hello World
Me Using Python: Staring at the compiller for an hour
USING C#: I recreated Minecraft

wary matrix
#

My programming language is PPTX and HTML

barren shale
#

just google things when you need them

wary matrix
barren shale
#

Use Maui

main brook
#

Me using Javascript: hours of debugging
Me using C++: "so how does class works again?"
Me using Java: "WHY THE FUCK IS EVERYTHING SUPPOSED TO BE IN A CLASS"
Me using CSS: dying
Me using HTML: *happy noises*
Me using PHP: "i wonder what this headers do.. wait fuck NOOOO"
Me using Go: "why the async model are threads"
Me using Rust: "so uhm can i borrow this?"
Me using Python: banging my head in the wall

barren shale
#

then just use C#

wet girder
barren shale
orchid frigate
spiral sonnet
#

Banging heads on the wall

#

In python

main brook
#

because

#

i choose to

hasty bane
#

me using python
me staring at compiler
suspicious

hasty bane
main brook
#

which part

#

is this for

orchid frigate
#

me using c#: too many english words to remember
me using C: too little English words to remember
me using c++: A linker error? "error at 0x00000000001" ah I see Im fucked
me using assembly: Did you know that when you put this exact value into this exact varient into this exact register you can do this exact thing which doesnt help you at all and you can only do it if you have these exact things set up and if you do this exact thing?

main brook
#

nice

foggy beacon
#

Who here uses brainfuck and malboldge?

#

No one? That's what I thought...

orchid frigate
#

Will probably try to do it this summer

foggy beacon
#

Good luck

main brook
#

jupe

wet girder
#

yes?

orchid frigate
foggy beacon
#

Here's a free image jupe

orchid frigate
#

Doesnt look pleasent to look at

foggy beacon
orchid frigate
foggy beacon
#

Why did apple throw away objective-c

orchid frigate
#

Because its...

#

How do I say this...

#

Shit

#

Its bad

foggy beacon
#

Yeah

#

What would you say is the worst programming language to code a game in

main brook
#

i say

#

brainfuck

#

and php

#

because you can't do shit

hoary hound
#

Only true chads make games in assembly wbsmirk

spiral sonnet
#

Hiring web developers

sly nimbus
#

k

orchid frigate
#

If its text based

#

It aint that hard

#

I would say it requires less code than c, cpp or c#

#

Graphics

#

Hell nah

hoary hound
orchid frigate
#

True

#

I saw the assembly inside a normal c object file

#

The code was clean af

#

Really difficult to understand tho it used many different registers and commands

hoary hound
orchid frigate
#

Sometimes that aint good tho

hoary hound
orchid frigate
#

I once had an error that took me 2 weeks to fix

#

And the fix was to get rid of gcc optimization

orchid frigate
#

You have command

#

Then some either register or name of command

#

Variable*

#

Then extra

hoary hound
#

Optimizations can do trouble yes

#

On conditions for example

orchid frigate
#

But there are so many commands and registeres that....jesus

#

Its difficult

hoary hound
#

For example, if you have an if with more than one condition and an OR operator linking them, the compiler will make it so if the first condition is met, the second isn't even evaluated

#

Since you have an OR operator you just need one of them to be true

#

That can cause trouble if you need the other condition to be checked too

orchid frigate
#

Hmmm

#

Haven't used or alot but I see where that can cause issues

hoary hound
#

I don't know if this is true for all compilers

#

So don't take my word for itwbshrug

orchid frigate
#

Because...well

#

There aren't many ways to do something in the lower levels

#

Like assembly

#

I saw that while making the os
Even high level code felt really closed and...useless

#

Everything felt like it had to be done in one way and anything else would fail

spiral sonnet
#

Yo @orchid frigate

#

I need help

#

Is there a way to turn code into application files

hasty bane
spiral sonnet
#

Help

main brook
#

can you

#

add number

#

and a word?

#

like

#

1 + a

spiral sonnet
#

No

main brook
#

then you have an answer

spiral sonnet
#

But they are variables

main brook
#

exactly

#

see

spiral sonnet
#

I tried to add 2 variables

main brook
#
a = "1"
1 + a
worldly vessel
#

2+2=9

main brook
#

this doesn't work

hasty bane
#

yeah cant merge 1 and "egg"

main brook
#

because

hasty bane
#

it wont be "1egg"

main brook
#

those are different types

hasty bane
#

need to turn 1 into string first^

main brook
#

or

#

if you want to like

#

sanitize/parse user input

#

you convert them to int

#

like

spiral sonnet
#

Like health = 100
enemydmg = 5
So health = health - enemydmg

main brook
#
a = int(input("number: "))
main brook
#

we can't really help without code

spiral sonnet
#

Ok why not

#

The problems into the fight def

main brook
#

don't screenshot

#

copy paste it in codeblock

#

```py
code here
```

spiral sonnet
#

Ok

spiral sonnet
#

Lol

main brook
#

would you read a text from an image

#

or read a text

#

from an actual text place

#

either way it also because muscle memory

#

and most programming server here doesn't like screenshot

spiral sonnet
#
print("Version 0.0.1")
ci = []
attdmg = 1
health = 100
dfnd = 4
haseq = False
enemyhealth = 50
enemydmg = 3
def fight(health, attdmg, enemyhealth, enemydmg):
	while health > 0 or enemyhealth > 0:
		cf = input("Commands ? : ")
		if str.lower(cf) == "stk":
			enemyhealth = int(enemyhealth - attdmg)
			print(health + " is your health")
			print(enemyhealth + " is enemy's health")
			health = int(health - enemydmg)
		elif str.lower(cf) == "dfd":
			health = int(health + dfnd)
			health = int(health - enemydmg)				
while True:
	c = input("Commands ? : ")
	if str.lower(c) == "g":
		ci.append("Ore")
	elif str.lower(c) == "i":
		print(ci) 
	elif str.lower(c) == "e":
		break
	elif str.lower(c) == "ci" and onum < 1:
		print("Not enough resources")
	elif str.lower(c) == "ci" and onum >= 1:
		ci.append("Ingot")
		ci.remove("Ore")
	elif str.lower(c) == "cs" and inum < 3:
		print("Not enough resources")
	elif str.lower(c) == "cs" and inum >= 3:
		ci.append("Sword")
		ci.remove("Ingot")
		ci.remove("Ingot")
		ci.remove("Ingot")
	elif str.lower(c) == "eq" and haseq == True:
		print("You already have equipment")
	elif str.lower(c) == "eq" and haseq == False:
		ci.remove("Sword")
		attdmg = attdmg + 8
		haseq = True
	elif str.lower(c) == "atk":
		fight(health, attdmg, enemyhealth, enemydmg)
	else:
		print("Wrong Command lol")
	onum = ci.count("Ore")
	inum = ci.count("Ingot")
#we need to fix the ints and stuff. tomorrow.```
#

Here you go

main brook
#

btw

#

don't use concat

#

there's string formatting

#

but for print

#

you can just

spiral sonnet
main brook
#
print(1,"+",1,"= 2")
#

it outputs

#
1 + 1 = 2
#

there's also fstring

#
a, b = 1,1
f"{a} + {b} = 2"
main brook
#

combining two iterable together

#

like

#

"ha" + "he"

#

became "hahe"

spiral sonnet
#

Yes

#

Why not

main brook
#

because

#

its bad

#

not only we have string formatting

spiral sonnet
#

Why

main brook
#

in your case its absolutely

#

useless

#

string concat is good if you need to actually

#

add a string

#

but you're just formatting it

#

you wanna output a string

#

with a variable value

#
"hi {}".format(name)
"hi " + name
#

top is format

#

bottom is concat

spiral sonnet
#

Format

#

What is the difference

main brook
#

you can't add int

#

to a string

#

its barely readable for long strings

#
"hi " + name +" how are you this lovely " + time
spiral sonnet
#

Wait a minute

main brook
#

this can be like this

#
"hi {} how are you this lovely {}".format(name, time)
#

you can still see the string

#

fully

#

and also

#

you can format other datatypes

#
"{} + 1 is 2".format(1) # yes
1 + " + 1 is 2" # fuck you no
#

the comments is python interpreter if it can talk

spiral sonnet
#

Oh

#

So

#

If I do that stuff

#

There gonna be no errors ?

spiral sonnet
#

Oh

#

I remember

#

I hav e a fix

coral lance
#

is there any docs about the dev specs of the game and/or mathematics/physics used in the game?

coral lance
main brook
#

fstrings are good

spiral sonnet
main brook
#

but only on new versions like 3.8

spiral sonnet
#

This no work

main brook
#

because that's not how formatting works

coral lance
spiral sonnet
#

How it work

main brook
#

so

coral lance
main brook
#

not really but yes

#

if its like

#

a constants

coral lance
main brook
#
match a:
    case 1: ...
    case 2: ...
spiral sonnet
#

I want to fix my code

main brook
#

remove the concat

#

completely

coral lance
main brook
#

don't do

#

health + "..."

spiral sonnet
main brook
#

just do

#

f"{health} ..."

#

you can google

#

"python string formatting"

spiral sonnet
#

I googled

main brook
#

you might wanna read more

spiral sonnet
coral lance
#

the great thing of the match is that differently from switch that dont parses strings, match also parses strings

main brook
#

match is also a soft keyword

coral lance
#

yeah

#

I like it, even tough I'm not a python dev

main brook
#

i don't yet

coral lance
#

I prefer Go or Rust

main brook
#

although for like

coral lance
#

in case of "substitutions"

main brook
#
if a:
    a()
elif b:
    b()
#

its better to just

#
func = {...}
func[a]()
#

if you're using it more than once

#

it also makes it easier to add functions

main brook
coral lance
coral lance
main brook
#

fast

#

which part

#

the making or

#

the speed of execution

coral lance
#

well, the making of

main brook
#

o

#

well kinda

coral lance
#

in case of speed of execution is actually pretty slow

main brook
#

python is also good for large projects

#

its multi paradigm

main brook
#

but you can compile python to C/C++

#

so it runs faster

coral lance
#

bruh, my dwarfs were like 90 and when I came back to the game they surpassed humans and are now 800

main brook
#

what

coral lance
main brook
#

its still python

#

it packs the code to be in C

#

and bundles the python interpreter

coral lance
#

and if you're looking for fast code, use pure C instead, or Lisp in case you want even more fasteness

main brook
#

into the C code

#

it runs a bit faster

coral lance
#

but not actual py

main brook
#

true

#

its still running on the interpreter though

#

which are embedded

#

inside the executable

main brook
#

use bare assembly

#

java sucks

#

imo

spiral sonnet
#

Thanks rei

main brook
#

nice

spiral sonnet
#

But

main brook
#

hm?

main brook
#

errors?

#

btw

#

you can just

coral lance
main brook
#

cf.lower()

#

doing

#

str.lower(cf)

coral lance
#

but if youre looking for actual velocity, use shellcode

main brook
#

is redundant

main brook
#

the fastest you can get

coral lance
main brook
#

with normal computer

coral lance
main brook
#

true

coral lance
#

shellcode is still possible

main brook
#

never heard of that tbh

coral lance
#

oh

#

its like

#

original code > assembly > shellcode > binary

#

shellcode is like

#

is represented in hex

#

example: \x90

main brook
#

ah

#

basically executable but as hex

coral lance
#

the 90 would be a NOP instruction

coral lance
coral lance
calm nimbus
#

/한국어

hasty bane
#

write binary

hasty bane
#

objective fact

main brook
#

true

#

its slower

#

on some occasion

hasty bane
#

java is just cringe

main brook
#

its heavy

#

fuckin 1gb for jre

hasty bane
#

imagine java when {any other language}

main brook
#

python

hasty bane
#

rUST

#

i tried making a game in rust because i had issues setting up diesel cli and decided to test my ideas in a game engine

#

It didnt work

#

because rust doesn't have game engines

spiral sonnet
#

Done

hasty bane
#

(it does. they're just not very good)

spiral sonnet
#

Lol

spiral sonnet
main brook
#

enenydmg

#

nice typo

spiral sonnet
#

Bruh

spiral sonnet
main brook
#

so

spiral sonnet
#

Also, break not working

main brook
#

you name your variable

#

enemy

#

is

#

eneny

#

interesting

#

"you shall be my eneny"

spiral sonnet
#

Oh

main brook
#

also break doesn't work because

#

health is lower than 0

coral lance
# hasty bane physics? what physics?

Game physics, in the case of world box, I don’t believe there’s many physics, but my question is just that, if that are any physics used in the game

#

And what are they

#

Just out of curiosity

spiral sonnet
#

I typed a wrong command and somehow magically it made me win

#

Bruh

barren shale
coral lance
coral lance
barren shale
#

there are books on jumping in games

#

there are books on movement

#

you just wanna see where you are right now in your game

#

and do research on it

spiral sonnet
#

The damage is 8

#

Commandlist : g = gather
I = inventory
Ci = crafting ingot
CS = crafting sword
Atk = battle
Stk = strike (only during battle)
Dfnd = recover 1 heath (only during battle

#

An in game guide will be added few seconds later

main brook
#

nice

spiral sonnet
#

There is smth wrong with this part

#

The def command no work

#

I mean the code in def fight() don't get executed

#

Hmmm

main brook
#

because

#

its not being called

spiral sonnet
#

It's being called

main brook
#
def a():
    print(1)
main brook
spiral sonnet
#

Line 58

main brook
#

you mean 59

spiral sonnet
#

Yes

main brook
#

probably because

spiral sonnet
#

Spacing?

main brook
#

its not atk

#

what's inside fight

spiral sonnet
#

The fight sequence

#

it should be called when typed fight()

main brook
#

what's inside fight

spiral sonnet
#

Ok

#
	while health <= 0 or enemyhealth <= 0:
		cf = input("Attack Commands ? : ")
		if str.lower(cf) == "stk":
			enemyhealth = (enemyhealth - attdmg)
			print(f"{health} is your health")
			print(f"{enemyhealth} is enemys health")
			health = (health - enemydmg)
		elif str.lower(cf) == "dfd":
			health = (health + dfnd)
			health = (health - enemydmg)
			print(f"{health} is your health")
			print(f"{enemyhealth} is enemys health")
		elif str.lower(cf) == "run":
			health = health - 50
			print(f"health is now {health}")
			break
		else:
			print("Wrong command")```
#

@main brook

main brook
#

while enemy health

#

is below 0

#

or equal to 0

#

basically

#

so if your health or the enemy health is

#

below or equal to 0

#

it'll be ran

#

otherwise no

wary matrix
coral lance
wary matrix
#

u said "in the game"

coral lance
#

it's a great game engine (even tough I don't like c#)

coral lance
#

great to know, thx

#

so there's probably no math/physics stuff, since unity already does most of it

wary matrix
#

no, I don't think so

#

Unless the 2D throwing anim is using projectile motion

coral lance
#

yea

#

idk, that's why I asked here xD

wary matrix
#

It's also in their website

#

Can't post link, my msg gets deleted

coral lance
#

okk, true, silly me for no checking it lol

coral lance
#

Good 4 u (if you like it)

#

I’m not actually an game dev

#

But C# is a great programming language for game dev

wary matrix
#

Y u say that? (Aside from being used 4 unity game engine)

coral lance
#

I don’t know much about c# but it’s OOP (what is great for game dev, even tough you can still use struct and related things on non-OOP languages), it’s kind of fast and it has an gc (garbage collector), what prevents one of the biggest problems game devs suffer of, which is memory leak

#

But as I said, I personally don’t like C#

wet girder
#

what languages do you use?

main brook
#

C# is an interpreted language that's basically a general use

#

not like php

#

which is only for web dev

#

this one is literally for anything

#

and of course you can make games without oop

#

but

#

lua do that and

#

it sucks

#

you literally get bugs when writing shit

#

its also minimal

#

it also lack builtin library

#

like networking

barren shale
main brook
#

one time i open hamza message

#

and i see something false

#

see C# is compiled

#

and then interpreted

#

like most language

#

java is one example

#

imagine C# not being adaptive

#

and having to write every single codebase

#

to be compiled

#

for different os

barren shale
#

that means its compiled

#

so i was right and you were wrong

#

and if you google "is C# interpreted" which i just did you will find out that everyone is saying no

coral lance
#

but I'm making a game with some friends and they decided to use lua because of the love2d api

coral lance
#

but C# has compiler and interpreter

coral lance
coral lance
coral lance
# main brook it sucks

I'm not a huge fan of Lua aswell (even though I'm coding a game on it xD), but you can do awesome games with C

cunning turret
#

Kur?

main brook
#

we actually

#

have to have .NET installed

coral lance
#

Yep

hasty bane
#

tfw not native

#

C# can go join lua and java in the cringe corner

barren shale
#

which are the languages that are mostly used

hasty bane
#

attractive hell yeah

#

Niche Language Enjoyers unite

coral lance
#

Let’s all code in pure shell code

#

Fvck Programming languages

muted plover
#

Hello my fellow coders
Console.log("greetings")

hasty bane
#

println!("hi");

unborn harbor
#

guys

#

can someone please send me the assembly.dll file updated

#

im mobile user but i like to mess with the code to understand the game mechanics and hidden stuff

#

someone said there are new hidden traits

#

plis 🥺

#

only the assembly-csharp.dll

#

i already have it, but without dragon slayer and the new traits

#

😮‍💨

rotund granite
#

hi

main brook
knotty root
#

It would be nice if they put the languages ​​of each village on world box so you then create the alphabet, and create skyscrapers and become more intelligent and advanced and the children will go to school, and raise animals.

bold rover
#

@knotty root Wrong channel

#

people in this channel can't do that

main brook
#

i don't get it

#

why some people just

#

assume this channel is where the developers of the game hangout

#

or where you can talk to the devs directly

#

there's also

#

"Thi chat is NOT WORLDBOX RELATED"

#

on the channel topic

knotty root
#

γ

hasty bane
#

Thonk any hardware magicians here?
not sure which 120-250gb ssd i should get

#

i mean
which manufacturer

bold rover
hasty bane
#

and expensive as hell

main brook
#

but reliable

hasty bane
main brook
#

so

hasty bane
#

im on a budget cuz im buying other parts

barren shale
#

oh rei already said that

wet girder
barren shale
#

you shouldnt get a 128-256 ssds

#

you will suffer when they are full

#

cuz you dont wanna use the slow hdd

main brook
#

i remember there's a cheap ssd

#

not that cheap

#

but slightly lower than samsung

#

was it kingston

#

or gigabyte

wet girder
#

kingstone has one of the best ssds in the market

#

gigabyte ssds are not sold in Finland so idk about those

main brook
#

they sold their parts here

#

its quite cheap tbh

#

compared to other hardware manufacturer

#

their ssd are good

#

most warnet here

#

aka internet cafe

#

mostly uses gigabyte

hasty bane
#

instead of ssd/hdd

#

think i found a pretty good ssd

#

600 TBW

sterile ore
#

What’s a sad

#

Sad

#

Ssd

orchid frigate
#

Its a fast hard drive

#

Basically

#

Where your memory is kept

#

Files, os everything

#

Other than bios I guess but thats a whole other story

main brook
#

its a drive that doesn't use a spinning disk like traditional one

main brook
orchid frigate
#

Ye

#

On a chip

#

Its also ROM

#

So you cant really attack it

sacred iron
#

4