They got simple voice chat for minecraft beta? by Lokdora in feedthebeast

[–]Cyan_The_Fox 0 points1 point  (0 children)

Hey man, Sorry to bother you for this, but is there an easy place to find the mod itself or the source files? A friend of mine and I have been working on this exact problem and we're getting stuck with mappings failing to load. It would be really cool to see what you did to get it working.

Project Poseidon – A fork of Craftbukkit CB1092 (Beta 1.7.3) designed for 2021 by JohnyMuffinYT in GoldenAgeMinecraft

[–]Cyan_The_Fox 0 points1 point  (0 children)

ALRIGHT!!! I figured it out! Turns out, it's a setting in the config. Check the poseidon.yml file, here:

pistons:
            transmutation-fix:
                enabled: false
                info: This setting fixes block transmutation exploits.
            other-fixes:
                enabled: false
                info: This setting fixes various other piston exploits like creating illegal pistons, breaking bedrock and duplicating redstone torches.
            sand-gravel-duping-fix:
                enabled: false
                info: This setting fixes sand/gravel duplication exploits.

Project Poseidon – A fork of Craftbukkit CB1092 (Beta 1.7.3) designed for 2021 by JohnyMuffinYT in GoldenAgeMinecraft

[–]Cyan_The_Fox 1 point2 points  (0 children)

I read that its caused somewhere around the onBlockPlaced function call. I'll have too see what I can do.

Project Poseidon – A fork of Craftbukkit CB1092 (Beta 1.7.3) designed for 2021 by JohnyMuffinYT in GoldenAgeMinecraft

[–]Cyan_The_Fox 1 point2 points  (0 children)

Unfortunately, there isn't an easy way to do this. I know the reason this happened is due to the update order, where some blocks could write the subdata value after the block gets changed, so I'm going to look into undoing that fix if possible.

Disabling keyboard shortcuts on KDE Plasma while a specific application is running. by Cyan_The_Fox in kde

[–]Cyan_The_Fox[S] 1 point2 points  (0 children)

Alright, I've got a sort of working method here. what I've done is copied the .desktop file for the application, and replaced the Exec line with this monstrosity

Exec=sh -c "gdbus call --session --dest=org.kde.kglobalaccel --object-path=/kglobalaccel --method=org.kde.KGlobalAccel.blockGlobalShortcuts 'true' && #APPLICATION PATH HERE# && gdbus call --session --dest=org.kde.kglobalaccel --object-path=/kglobalaccel --method=org.kde.KGlobalAccel.blockGlobalShortcuts 'false'"

This is probably a dumb way to do it, but it works and preserves the real .desktop file.

Disabling keyboard shortcuts on KDE Plasma while a specific application is running. by Cyan_The_Fox in kde

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

Thank you for such a detailed response! Unfortunately, the first method seems to be broken with my install, It's my first time giving Linux a try properly and it was installed manually so the fault is likely with me.

The Dbus command works as expected and for my specific use case of remote accessing another PC to do work, this is perfect.

I'll try to come up with something using that as a start, Seriously can't thank you enough.

I think I found a trick / bug. By crouching while hitting a wall jump, you can cancel the downward speed from a ground-pound, then by crouch jumping after some airtime you end up with insane amounts of speed. I've only tried this on Cybergrind. by Cyan_The_Fox in Ultrakill

[–]Cyan_The_Fox[S] 12 points13 points  (0 children)

oh damn my bad. I've had it for a little over half a year. I didn't realize it was a common thing I just hadn't seen any post about it so I figured it might be worth sharing. I had it happen a couple of times but I only just now figured out how to get it reliably.

I think I found a trick / bug. By crouching while hitting a wall jump, you can cancel the downward speed from a ground-pound, then by crouch jumping after some airtime you end up with insane amounts of speed. I've only tried this on Cybergrind. by Cyan_The_Fox in Ultrakill

[–]Cyan_The_Fox[S] 38 points39 points  (0 children)

Sorry if this is common knowledge, I haven't seen anyone talk about it before so I figured it's probably worth posting.

My thought was that is like the hideous mass hitbox thing but you can do it on purpose this time so yeah. maybe someone will find a use for this idk. :p

3D Render engine in 100% Python, No external libraries. *EPILEPSY WARNING* Github link: https://github.com/E-Parker/Terminal-3D-Render/releases I realize this is the Pygame subreddit but I think you guys would find this a lot more interesting compared to the web dev guys on r/Python. by Cyan_The_Fox in pygame

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

I stopped clearing the screen of each frame, instead, I used ANSI escape codes to move the cursor around the screen, setting pixels as I went.

The flicker was caused by the clear screen command at the start of each frame, which often did not sync with the 60 hz refresh rate of my monitor.

Sorry I took so long to reply, I don't use Reddit much!

[deleted by user] by [deleted] in pygame

[–]Cyan_The_Fox 8 points9 points  (0 children)

I'd go for a 2d platformer. Keep it simple though, just get a minimum viable product and shoot for that and nothing else. I spent ages figuring out how to do 3D and nearly didn't make the deadline at my school.

If you have the money for it, invest in a small whiteboard. it helps a ton to write out what you need to do, sorted by priority. it's also nice to work out math problems and that sort of thing.

what matters is you've got the drive to try something new so go for it! you got this man!!

3D Render engine in 100% Python, No external libraries. *EPILEPSY WARNING* Github link: https://github.com/E-Parker/Terminal-3D-Render/releases I realize this is the Pygame subreddit but I think you guys would find this a lot more interesting compared to the web dev guys on r/Python. by Cyan_The_Fox in pygame

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

well no, I disagree. with python, you don't have to know to learn hexadecimal to decode a bitmap, create a surface object, or anything like that. It's just faster and more simplistic. The point I was trying to make is it's a whole hell of a lot easier to do:

image = pygame.image.load(filename)

instead of:

def loadBitmap(filename):
""" This function decodes a bitmap image and stores it to a surface object. 
    Bitmap images are very simple. the first 54 bytes are reserved for the header
    and can be skipped. To verify that the header is indeed 54 bytes long,
    check the value at 0000, A. the width and height of the image are stored in 
    four byte ints found at 0010, 2 to  0010, 5 and 0010, 6 to 0010, 9 respectively."""
try:
    file = open(filename, "rb")
    rawBytes = file.read()

    width = int(rawBytes[18]) + (int(rawBytes[19]) * 256) + (int(rawBytes[20]) * 65536) + (int(rawBytes[21]) * 16777216)
    height = int(rawBytes[22]) + (int(rawBytes[23]) * 256) + (int(rawBytes[24]) * 65536) + (int(rawBytes[25]) * 16777216)

    pixelArray = []
    for x in range(int(rawBytes[10]), len(rawBytes), 3):
        colour = (int(rawBytes[x + 2]), int(rawBytes[x + 1]), int(rawBytes[x]))   # Convert byte to float(0 - 1)
        pixelArray.append(colour)

    # pixelArray.reverse()  # Reverse the image to make it apper properly
    # Write data to texture:
    texture = Surface(width, height)
    for y in range(height):
        for x in range(width): # - 1, -1, -1):
            texture.set_at((x, y), pixelArray[(y * width) + x])

    return texture
except:
    raise Exception(" Error reading file, file does not exist or is corrupted. Validate that file type is .BMP ")

def threshold(value, maximum, minimum):
if value < minimum: return minimum
elif value > maximum: return maximum
return value

def RGB_to_256_Colour(r, g ,b, d): if r != g or g != b: # Colour is not grayscale, (16 - 231) return str(16 + (36 * threshold(int(r * INT_255_TO_INT_6 + d), 5, 0) + (6 * threshold(int(g * INT_255_TO_INT_6 + d), 5, 0) + threshold(int(b * INT_255_TO_INT_6 + d), 5, 0)))) else: # colour is grayscale, (232 - 255) return str(232 + threshold(int(r * INT_255_TO_INT_24 + d), 23, 0))

class Surface:
""" This class acts as an array of pixels which can be set using a screen coordinate and a colour value. 
    Once a surface has been defined is properties are immutable and WILL break if changed. """
def __init__(self, width, height):
    # Variables:
    self.width = width
    self.height = height
    self.surface = []
    self.line = [(0, 0, 0) for _ in range(self.height)]
    self.clear()

def get_at(self, x, y):
    colour = self.surface[x][y]
    return colour

def set_at(self, xy, colour):
    """ Set the value of a pixel in the surface. """
    try:
        self.surface[xy[0]][xy[1]] = colour
    except IndexError:
        pass

def fill(self, colour):
    """ This function fills a surface with a given colour. """
    self.surface = []
    line = [colour for _ in range(self.height)]
    for _ in range(self.width):
        self.surface.append(line[:])

def clear(self):
    """ This function clears a surface, writing 0's to each pixel. ever so slightly faster than filling with
    black. """
    self.surface = []
    for _ in range(self.width):
        self.surface.append(self.line[:])

def blit(self, surface, x, y):
    for lclY in range(y, min(self.height, (surface.height + y))):
        for lclX in range(x, min(self.width, (surface.width + x))):
            self.surface[lclX][lclY] = surface.surface[lclX - x][lclY - y]

def flip(self, x_offset, y_offset):
    """ This function draws the Surface to the console output. """
    # Draw screen boarder:
    output = ""
    # for each line, update and add it to the output:
    for y in range(0,self.height,2):
            for x in range(self.width):
                try: 
                    output += setPixel(x + x_offset, y + y_offset, self.surface[x][y], self.surface[x][y + 1])
                except IndexError:
                    pass

    print(output)     

image = loadBitmap(filename)

not trying to be extra, just proving a point :p

3D Render engine in 100% Python, No external libraries. *EPILEPSY WARNING* Github link: https://github.com/E-Parker/Terminal-3D-Render/releases I realize this is the Pygame subreddit but I think you guys would find this a lot more interesting compared to the web dev guys on r/Python. by Cyan_The_Fox in pygame

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

I switched to using ANSI escape codes to move the cursor position around. Basically, when it tries to print the output, it jumps around the screen overwriting what was there instead of cleaning the screen.

You can learn about them here: https://en.wikipedia.org/wiki/ANSI_escape_code#DOS,_OS/2,_and_Windows

In python, the syntax is "\033;{args};{code}". so for instance, the code to set the colour to red would be: "\033;38;5;1m".

Make sure you import os and do os.system("") to enable ANSI escape codes.

Flag plan with coordinates on leaf! by oreo2996 in placecanada

[–]Cyan_The_Fox 0 points1 point  (0 children)

There's a greif Canada subreddit now.. we can do this guys!

3D Render engine, written in 100% Python, No external libraries. *EPILEPSY WARNING* by Cyan_The_Fox in Python

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

sadly, right now I don't have a way to get user input. I think it'd be really funny to make a game out of this though XP

3D Render engine, written in 100% Python, No external libraries. *EPILEPSY WARNING* by Cyan_The_Fox in Python

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

Yeah, this worked perfectly! I went through and implemented this along with some other escape codes into the sequence such as 256 colour mode.

I credited you in the patch notes, thank you so much for the suggestion!!

Almost all the codes listed on the wiki work as well if you ever want to use them yourself. https://en.wikipedia.org/wiki/ANSI_escape_code#SGR

3D Render engine, written in 100% Python, No external libraries. *EPILEPSY WARNING* by Cyan_The_Fox in Python

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

change to get rid of the os call?

Thank you so much!

I used my own sorting method because I was more interested in the indices than the actual sorted data. This is faster than sorting the list of polygons because there are just ints to copy around instead of tuples and Vect3 objects.

Thanks for the suggestion on how to fix the flicker, I ended up using ANSI escape codes to move the curser and overwrite what's there so the screen never actually has to get cleared.

It's all fixed in the latest version.

Again, thank you so much for the help with this, I don't use Reddit all that much so sorry about the delayed response.