@khalby7862Trying out Rust for the first time! After a few days of struggling with move-before-use situations and just Rust in general, I managed to have a triangle move around my screen when arrow keys are pressed. I have possibly written really bad code, but I'm just happy I managed to give a triangle wings. Would love it if y'all could give me feedback on my messy code: gist.github.com/khalby786/c4211667fd399a96ba39c0d3a1eb377b.
@ced0I think the last time I posted here neither the physics nor the sword were a thing. well. they are now!
I also wrote like a six paragraph summary in DMs with someone somewhere about what I'm doing differently this time 'round other than simply writing it in C. it's a neat overview of some of the things I've learned about making games in the past year+ since the Rust version. could probably turn that into a neat blog post at some point.
I also got the game working on mac. still looking for someone to try it on Windows to see if DirectX has the rendering bug I think it might have.
now all that's left to do for feature parity with the original version is um, I guess, physics for the sword, enemy AI, combat, then the bow and arrow, inventory ui, then quests.
I want to add cool things you can interact with in the forest like pots you can break, grass you can cut, other assorted RPG tropes.@ced0the C port is coming along nicely :) :c:
๐ณ ๐ณ ๐ณ
it can render the same forest, but with much better fps than the Rust version because of a handful of graphics programming tricks I've picked up since then.
similarly to @AakankshaRangdal-U02F16CHZA4's post, also made mostly with circles! (okay, nonagons, but still hehe)
actually, on that note, I've attached a picture of the original version I made in Rust:
do you prefer its circles to the nonagons? let me know by reacting with ๐ข or :stop-green: (technically an octogon, but close enough)
repo here: :githubparrot:github.com/cedric-h/rpgc
if anyone has a second and would like to try to build and test the native executable on windows, shoot me a DM.
I suspect I might have some depth sorting issues on DirectX but want to make sure. ๐ง
:blender: I've also attached a picture of what the map looks like in Blender, as well as a tiny glimpse of the script I wrote to export it.
if you've played the Rust version then maybe you can guess what each line, diamond, square and circle means ๐
@matt0I made a little blinker in rust on the raspberry pi! I am using the raspberry pi HAL (hardware extraction layer) to control the GPIO pins on the pi. Next I am going to implement a crate for the Adafruit CharliePlex LED Matrix Bonnet! Here is the code if anyone is interested:
github.com/gleich/rust_rpi/blob/main/src/main.rs@ced0as I port a game I wrote a while ago in Rust to C to try and see how much smaller I can get the WASM bundle size, I've found that what has the biggest impact is the "culture" of the languages.
for example, the maps in the game I made are laid out in blender, and then exported to JSON with a custom python script I wrote using blender's API.
it's easy to add a Rust dependency to parse the JSON for you, but that bites you in the ass later; serde can inflate your compile times AND your WASM bundle size.
in C, however, package management looks different; there are single header libraries that are pretty easy to include, but using libraries isn't very C-like, and unlike Rust, C has a stable ABI.
that means that if I change my python script to dump a bunch of floats into the file as binary, I can fread those directly into a bunch of C structs. (I do have to handle endianness for integers, though)
in Rust, even if I used #[repr(C)] to force a stable ABI for those structs, I'd still have to jump through a bunch more hoops (unsafe) or pull in a dependency like bincode (which would in turn pull in serde ...).
anyway, so I quickly wrote a python metaprogram to generate a C header that can fread (or just memcpy) in all of the binary data into the fields in the game map object that the first python script pulls out of blender
@ian5Finally learning rust! Just wrote a hello world
@JinmayJhaveri0After some hardwork got folder based project query to work for github.com/Borrus-sudo/Zeus It now can filter out stuff based on whether a folder is a git,node,rust (and many more!)project. Now adding support for time based filter for it! . Edit: So if you wanna see all your node projects which have git intialized in your sea of files, the filter can help it for you. It uses a technique to find if the folder is that project or any of its direct children is one or any of its depth is one. In this way it decides whether to show or remove that directory.
@Andrew0i did some stuff on github.com/gem-app, getting closer to finishing the waitlist page for it I also read up on rust docs since Im still learning that :cooll-thumbs:
@Andrew0Not that much coding today other then my current rust project but I made a pan cookie :kekw:
@Skye0Just started learning Rust. I kinda like it!
@JonathanTao0trying out rust for the first time, seems interesting
@kognise0Made a super simple tool to automate fixing up this documentation I have to take from a shittily formatted PDF and put in my Rust code, since I realized that was taking a lot of time.
@caleb0woooooooooooo i got a svelte app embedded in a Rust binary ๐ :ferrisbongo: ๐
(for clb.li/shorty of course)
@matt0Over the past few days I have been rewriting my first GitHub action,ย profile_stackย , in rust from python! The action now runs 4 times faster, has some rock solid unit tests, improved documentation, aย superย clean codebase, and an army of crabsย :ferrisbongo:! Super glad that I am finally getting comfortable with rust :)ย ~I am starting to see why there is a rust cult~
github.com/Matt-Gleich/profile_stack
@matt0got my docker install of cargo-make to install the existing binary so my images donโt take 8 minutes to build!
@Khushraj0lets go, I'm rewriting repl.deploy in rust and I HAVE TESTS! A 100 LINES OF TEST CODE FOR 96 LINES OF CODE
@matt0Created my first microservice in rust! It automatically gets the social media accounts from gql.api.mattglei.ch and sets them as shorty links in links.mattglei.ch!
@aaryan1Reading "Ray Tracing in C++ in One Weekend" this weekend. 10/10 worth a read. I'll try to re-implement this book in rust after I'm done with this!
@matt0The PRs I made to the cargo book and crates.io website got merged today!
@caleb0i made that previous snippet โฌ๏ธ look nicer
@neel.redkar6I decided to learn rust and wrote a simple tts server :owo:
Its cool because I can run it on my computer and people can just randomly say stuff
github.com/neelr/speaker
(i also have to concede rust with vim is pretty cool)