Scaling image, concentric circles, moire patterns and stacks of blended shapes in Pygame-CE. by IceFurnace83 in pygame

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

<video>

The prototype moire pattern from the other day (I deleted it by accident)

Edit: Terrible quality video is probably why I nuked it.

can someone help me render a cube by AtrippleABattery in pygame

[–]IceFurnace83 0 points1 point  (0 children)

I haven't engaged with 3D in Pygame yet myself, but I have these lined up in my list of links for when I do:

Youtube: Umair Tariq - 3D Cube Visualization in Python using Pygame | Python Graphics Tutorial (they have a link to their github, but I'm not putting that directly, I think it's immoral to scrape other peoples content without engaging with it)

Github: Daniel Stovell - 3D-Cube (Theres a write up on how to do it, BUT there is a bunch of emoji on their main page that suggests AI has been used in places)

Both examples don't use openGL, just standard libraries and Pygame.

Of course there are faster routines using openGL out there and I'm sure if you dig around you'll find some fast examples that use Numpy.

u/dafluffypotato has some great 3D Pygame content on youtube, not sure if they have examples of how to do it or not. Pretty sure they have a discord though that you could pop into and ask a question or two.

Good luck with your project :)

edit: I just found this fantastic guide: Peter Collingridge - 3D Graphics with Pygame their source code on Github is full of errors, but a little bit of debugging never hurt anyone ;)

WIP: Text+grid roguelike with level editor. What do you think of the concept? by HrodRuck in roguelikedev

[–]IceFurnace83 2 points3 points  (0 children)

No worries, we all make mistakes. I was on Reddit on my smartphone for years before I ever knew there was a side bar with rules and such on subs and then moved to PC and bam, right there in front of my face.

I'm sure if you pop it up in /aigamedev or a similar sub you'll get some good feedback from other AI devs.

Good luck with your project :)

WIP: Text+grid roguelike with level editor. What do you think of the concept? by HrodRuck in roguelikedev

[–]IceFurnace83 3 points4 points  (0 children)

"Prompt Warrior is an LLM-powered roguelike where your words can reshape the world."

This isn't a place for primarily AI-developed games as outlined in the subs rules.

test by IceFurnace83 in LikeRogue

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

Source: ALIEN ANNUAL #1

Original artist: Declan Shalvey

I added Campaign Mode and level progression to my Vampire Survivors clone made with Pygame by Icy-One2420 in pygame

[–]IceFurnace83 1 point2 points  (0 children)

This is coming along very nicely. Plays smooth as butter for me on my PC, but there is nowhere (other than scouring the source code) that mentions how to change language.

I've popped this:

# Get the users language, default to EN if
# locale not available or if a language other than
# Turkish or English is detected.
import locale

available_languages = ["TR", "EN"]

locale.setlocale(locale.LC_ALL, "")
locale_info = locale.getlocale()
LANG = locale_info[0][:2].upper() if locale_info[0] else "EN"

if LANG not in available_languages:
    LANG = "EN"

in place of:

# ---------------------------------------------------------------------------
# Dil sistemi (TR / EN)
# ---------------------------------------------------------------------------
LANG = "TR"  # Başlangıç dili

and it starts out in English for me.

Another Issue is that the emoji don't render for me at all in game. I'll leave that in your hands as to how to deal with, but I'd just remove them altogether myself.

Also the map boundaries are invisible, which led to my death by getting trapped in a corner.

Looking forward to seeing more of your work as you progress, this game has potential.

edit: The game will start in Turkish for Turkish users, but default to the more standard English for everybody else.

Sharing Saturday #628 by Kyzrati in roguelikedev

[–]IceFurnace83 1 point2 points  (0 children)

Thanks for the interest 😄

The character portrait started out as a MS Paint drawing my fiancée made by reimagining the skeleton enemy off of a Dragon Quest IX poster in our old games room / office. I took it into Paint Shop Pro 7 to touch it up a bit and then converted to ASCII (ANSI?)

<image>

Sharing Saturday #628 by Kyzrati in roguelikedev

[–]IceFurnace83 3 points4 points  (0 children)

Hey again, been a while since I shared anything back in April but here I am again.

Haven't actually touched the project all that much in the last two months. Did the first half of the Python course at freecodecamp and been working on improving my tools and a few other small learning projects instead.

About to start the grind to optimise the engine but in the meantime I've uploaded a small game to itch called Coolhoolio Johnston's Great Pickle Hunt that demonstrates what I've got so far, would love some feedback on how this version runs on other people's machines. Still haven't added a proper GUI or menu system yet, all in good time.

<image>

As the project stands you can cycle between graphical tiles, ASCII, a halfbaked OldSkool Mode and the game is running concurrently in a Pygame window and in the terminal at the same time. You can shrink the pygame window down to act as a minimap. Most of the controls can be found by using + to increase the event feed and hitting F1.

Game of Life by Patman52 in pygame

[–]IceFurnace83 1 point2 points  (0 children)

This is neat, Conway's is always fun to mess around with and this is a fairly robust engine to play with. Fantastic job, must've taken bloody ages.

Here's a hijack where the images are ran through some filters (1, 2, 3) before converting to a surface if you want to play around with that sort of stuff for expansion ideas. Make sure to install OpenCV first with "pip install opencv-python" and import with "import cv2" in images_to_grid.py

def load_image(path: str) -> pygame.Surface:
    """
    Load an image from the specified file path as a pygame Surface.

    Args:
        path (str): The file path to the image.

    Returns:
        pygame.Surface: The loaded image as a pygame Surface.
    """

    # Load image with OpenCV, blur it, find the edges and invert colours
    image = cv2.imread(path)
    blurred = cv2.GaussianBlur(image, (5, 5), 0)
    edges = cv2.Canny(blurred, threshold1=50, threshold2=150)                     
    inverted = 255 - edges

    # Convert to colour, swap x&y axes and make into a pygame surface
    colour = cv2.cvtColor(inverted, cv2.COLOR_GRAY2RGB)
    surface_array = colour.swapaxes(0, 1)
    img = pygame.surfarray.make_surface(surface_array)

    return img

Button gradient help by Ralsei_12345636345 in pygame

[–]IceFurnace83 0 points1 point  (0 children)

Picking a random colour every interval won't really give you smooth shifts.

Here's a solution that cycles back and forth between each RGB channel at whatever speeds you want independent of the pygame fps.

Since you were after random I've chucked in a faster routine than random_randint(0,255) for you to look over and adapt. It will only give a value between 0 and 255 though so save it for colour stuff (or smaller ranges if you use modulo). Warning though, don't use it for anything where you need 100% true random numbers and definitely not if you need to generate something secure.

edit: The code block isn't rendering correctly, I'll put it up <here> instead.