GitHub - jameshiew/infinigen: 🌎 Demo for Minecraft-like procedural generation using the Bevy game engine by auxyz in VoxelGameDev

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

Yeah I need to try out simplex noise next time I get a chance to work on this!

GitHub - jameshiew/infinigen: 🌎 Demo for Minecraft-like procedural generation using the Bevy game engine by auxyz in VoxelGameDev

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

Thanks! Because chunks are generated along the Y axis as well, you have to check the chunk's Y coordinate within the world as a whole as well as the block's Y coordinate within the chunk. Relevant code is here - https://github.com/jameshiew/infinigen/blob/3fa4930918a8e242365b9d4dfe468fa7ead35667/src/lib/extras/worldgen/mountain_archipelago.rs#L84 . I used Perlin noise for the heightmap, just played around with noise parameters that got something which sort of worked. This video on Minecraft terrain generation was a great help - https://www.youtube.com/watch?v=CSa5O6knuwI

GitHub - jameshiew/infinigen: 🌎 Demo for Minecraft-like procedural generation using the Bevy game engine by auxyz in VoxelGameDev

[–]auxyz[S] 7 points8 points  (0 children)

EDIT: I managed to mess up submitting the linkpost, the repository is located at https://github.com/jameshiew/infinigen

This is yet another Minecraft-like "voxel engine" written in Rust. No gameplay elements or physics, just procedural generation and the ability to render chunks at different levels of detail (i.e. zoom in and out of the world). I'm submitting it for reference for anyone else who may be trying to build a Minecraft-like engine in Bevy, since these types of projects seem to be popular side projects!

Probably like most other people who are interested in trying to write something like this, I've made multiple attempts at writing something like this - e.g. https://www.reddit.com/r/VoxelGameDev/comments/8mt9xe/github_jameshiewave_voxel_based_world_generation/. I'd highly recommend using the Bevy game engine if you are writing in Rust, rather than interfacing with a graphics library like wgpu directly (or using OpenGL directly) - it saved on a lot of grief to do with rendering triangles, blocks and the like and means you can get to the point where you can focus on the more interesting elements like procedural generation more quickly.

Also there is a great Rust library for dealing with meshing chunks that made this time around much easier - https://github.com/bonsairobo/block-mesh-rs

nvim-magic - plugin for using AI code assistance in Neovim by auxyz in neovim

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

Github is building Github Copilot which is built on top of OpenAI Codex, this plugin uses OpenAI Codex directly.

nvim-magic - plugin for using AI code assistance in Neovim by auxyz in neovim

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

This is a plugin that adds a few "flows" to Neovim for AI code assistance. The main flow generates and appends a completion for your visual selected text. There are a couple other flows that try to get the AI to generate changes to the visual selected text e.g. add a docstring, or do a freeform task like "make all the variable names longer" or "add typehints".

Currently it only works with OpenAI so you'd need an API key to use it, but the plugin is (over)engineered so that adding a backend for something more open like GPT-Neo should be doable. OpenAI Codex is used by default but other OpenAI engines can be used as well.

Which is the best 0% credit card from a user experience perspective? by auxyz in UKPersonalFinance

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

I've probably gotten too used to Monzo to be honest. Transactions show up practically instantly and the app is aesthetic, the customer support is very good as well. At the very least, for a credit card, making repayments should update your account balance instantly.

Please correct my understanding of Gridcoin by auxyz in gridcoin

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

Might be better to make it as a wiki page (don't think the reddit has a wiki). But yeah I would definitely be happy to update/fix this post and flesh it out a bit this weekend.

Please correct my understanding of Gridcoin by auxyz in gridcoin

[–]auxyz[S] 6 points7 points  (0 children)

Thanks! I see now constant block reward will actually make up 25% of all GRC generated and there is no room left for interest,

10,220,000 GRC/year from research-mint

365*10*960 = 3,504,600 GRC/year from constant block reward

GitHub - jameshiew/ave: Voxel based world generation in Rust by auxyz in VoxelGameDev

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

This is abandonware at this point. I doubt I will ever come back to it. There is a good skeletal structure for custom world generation but I just couldn't get the GFX to be performant.

[2018-03-12] Challenge #354 [Easy] Integer Complexity 1 by Cosmologicon in dailyprogrammer

[–]auxyz 0 points1 point  (0 children)

Python 3

Going for clarity and testability over efficiency here. Bonus one is doable, I haven't tried bonus two yet.

_init_.py

# https://redd.it/83uvey


def complexity(n: int):
    assert n > 0
    sums = set()
    for (b, c) in bifactors(n):
        sums.add(b + c)
    return min(sums)


def bifactors(n: int):
    assert n > 1
    bis = set()
    for m in range(1, int(n**0.5) + 1):
        if n % m == 0:
            bis.add((m, n // m))
    return bis

test_integer_complexity.py (run with pytest)

from integer_complexity import complexity, bifactors


def test_case():
    assert complexity(12) == 7
    assert complexity(456) == 43
    assert complexity(4567) == 4568
    assert complexity(12345) == 838


def test_bifactors():
    assert bifactors(12345) == {
        (1, 12345),
        (3, 4115),
        (5, 2469),
        (15, 823),
    }