• 1 Post
  • 69 Comments
Joined 2 years ago
cake
Cake day: November 20th, 2024

help-circle

  • In a different language that uses whitespace:

    proc blank_map*:void =
     mines_placed = 0
     row8 = newseq[uint8](width); game_map = newseq[row8](height)
     row16 = newseq[int16](width); sum_map = newseq[row16](height)
     rowChar = newseq[char](width); state_map = newseq[rowChar](height)
     for h in 0.uint8..<height:
      game_map[h] = row8; sum_map[h] = row16
      state_map[h] = rowChar
    

    I’m allowed to do it, it’s allowed

    (I don’t use it a lot and I’m sure many dislike this because longer lines especially if they have less display width for whatever reason)


  • Personally I’m in a similar situation with Nim-lang. I like the style and performance, it hits a spot for me that other languages do not*. I wouldn’t call it “easy” though, as you still have to think about typing and other structure stuff (but not to the degree that you’d have to deal with for other languages). Being less popular of a language is probably the main issue here (there are many options for bindings, but you may find yourself waiting on something specific with smaller communities).

    TBH I haven’t used it as much as I should, having other issues. The last thing I did though (sweeper clone), I finished it and it made me feel better about my possibility of understanding complexities.

    * I guess newer changes to Python and LUA might make a difference, though I still get the feeling those are not just-enable-to-be-reasonably-fast options.


  • Somewhat similar thing, this is what I came up with to quantize to 12-bit-RGB (shorthand hexadecimal, e.g. #AC3 --> #AACC33) in a Godot shader:

    COLOR = vec4((round(color.r * 15.0) / 15.0), (round(color.g * 15.0) / 15.0), (round(color.b * 15.0) / 15.0), color.a);

    Maybe there’s a better way (I’m wasn’t sure how to see actual numbers, other than knowing it’s linear color space) but it works. For example it takes #135531 in a bit of AA (between label outlines) and turns it to #115533.



  • insomniac_lemon@lemmy.cafetoMemes@sopuli.xyzborger
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    14 days ago

    Beware of poor fitment though. I got some cheap wired ones years ago (from Amazon), didn’t work so well because they had bad contact and no mechanism for adjustment. Kinda also needed a preamp, though if contact were perfect maybe that’d matter less.

    I also am not so sure I’d trust them to be waterproof, and anything that is would likely have a heftier pricetag. That, and I’m pretty tired of everything having batteries.


  • Nvidia supports 13 year old hardware and newest kernels with 580

    At some point when running your 14 year old GPU

    Pascal (GTX 10 series) and Volta (expensive workstation stuff) cards from 8-10 years ago are forced to 580 too. EDIT: and to be clear this is an issue with all of the 580xx versions of packages, specifically because Arch put them into the AUR (though this directly isn’t OP’s issue).

    Having a 1050Ti… I like the idea of an AMD (Polaris+) card, but I don’t really want to buy a side-grade from the internet. I got really good deals on my other hardware (combo deals from 2019) so $100 more would actually be a decent chunk. Really just seems to me that the GPU market is behind due to crypto->NFTs->AI.

    You might be right on FOSS drivers, but they seem to be still rough-around-the-edges whenever I look into it. In multiple aspects (performance, feature/technology support, segfaults). It might be true that I may not notice in some cases (lighter applications), though a 1050 Ti doesn’t have the headroom where the performance could be cut in half and not result in noticeable instability.



  • I’m still using a 2016 card (1050Ti). If somebody could send a Polaris card my way, it’d save me the headache of having to deal with updating my system to legacy drivers (and from the AUR with my not-very-fast internet? no thanks Samuel). Otherwise, I’m pretty happy with this performance (and yeah, ignoring new/bloated games) and the GPU market seems pretty wrecked by the crypyo->NFT->AI market (on top of companies largely abandoning low-end).

    GPU aside I did build a Ryzen system in 2019 because the sale prices were great (and it was a huge leap in performance from my 2011 hardware), so that’s something. Still happy there, too.

    As for why I went nVidia in 2016? I had ATI driver issues way back in Windows, so that may have clouded my judgement on AMD options a bit longer than it should have though.




  • A partial option is that any controller with analog triggers should work, especially as some driving games use them for acceleration (though I would assume remapping would work too). EDIT: One of the wikis says you may need more steps for analog triggers to work (on windows)

    PCSX2 also now has a ‘pressure modifier’ key+setting (default is 50%) that may work in some cases (EDIT: specifically for digital buttons). At least if you have a key for it (like the OG Steam Controller has extra, like the grip buttons… change grip to keyboard key in sc-controller then bind that to the pressure modifier)


  • I know it, but I don’t know or use it, honestly

    I forgot to say: some of how I figure stuff out is just by autocomplete (in my case, an LSP plugin), and if that isn’t obvious I look at the docs (Raylib has this).

    I like to start with pure code first (no framework), at least where it makes sense (like my sweeper example, I focused on generating the initial maps first) and making that usable via import. The framework/engine-specific file is where I put all the code that is more closely tied to input, game state, and rendering. Doing it this way also means that making a different implementation is a bit easier.

    ‘pure code first’ doesn’t really apply to more advanced(/realtime) stuff like a physics game or platformer though, as you’d be more closely using an engine’s functions and types.


  • but what quick projects? What can I do? I have no idea

    I know exactly what you mean, I am the same way. The most common sort-of-thing I’ve done typically is generator-y involving loading stuff from text files (adventure book reader (gtk4 framework), polygons (raylib)) as it’s an easy start though I didn’t get far with those for one reason or another (I don’t write+font didn’t scale as desired, polygons were too technical of a thing for me to do a complete implementation viable to use).

    Took a while with thinking about structure before I attempted it (I didn’t follow a guide or anything), but the last thing I’ve done is a minesweeper clone with the map generated as a few sequence-of-sequences (in Nim-lang). I finished that with Godot for the GUI+tile rendering as it seems easier for me (I lean in on a lot of the editor features, too), though projects like this could certainly be done with RayGUI (+tilemap editors maybe?). Stalled when it comes to sharing though (for a few different issues).

    So yeah, my method is to find that intersection of something understandable and at least somewhat interesting to you. Something you can actually use. Which sure, may be easier said than done. If you do follow guides, it might make sense if you go in with a plan for adaption after completion (like dodge-the-creeps turned into a roguelike shooter).





  • I’m of the mind that it’s probably better to start out with engines/frameworks to get your footing before you move on to lower-level stuff. Then again, I’m not very far either (and sort of stalled for a few reasons).

    Godot might be a good avenue with GDextension (GDnative for 3.X), particularly with C/C++. Nim bindings exist (and this is my language of choice) but if you like C/C++ it will certainly have a lot less friction and with those you probably can get far with just the official docs. For C++, you could probably edit the engine itself especially for older versions.

    Raylib is another option (and you will likely do a lot more boilerplate stuff) for pretty much any language. And again, with C/C++ it will likely be even more straightforward.

    EDIT: Sorry, I see that you know about Raylib already. To say it more directly, I am saying it is likely better to find quick projects that you want to make on the device you’re already coding on (likely a computer) rather than trying to immediately support a specific device or dream projects. Though other low-cost devices (single-board-computers, microcontrollers) if you can get them (at/below MSRP) might be an easier way to fill that niche as well.


  • insomniac_lemon@lemmy.cafetoGames@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 month ago

    I live a stagnant life (shut-in, somewhat rural area) so there may actually be “greener grass” somewhere but I am unlikely to ever even see it, which is part of my point. And funnily enough, in a literal sense importance of green well-kept lawns is a relatively modern problem as well (going back to aristocrats) adding to sprawl (and bad for pollinators/other wildlife).

    To hammer my point home… on top of USA’s car-centric sprawl, there is also no freedom-to-roam enshrined in law (like Europe has along with the Schengen Area) and I don’t want to end up homeless without even a car to live in.

    There are also a lot of other modern USA problems that are reduced or eliminated in other countries (healthcare, tax filing, worker protections, diet). Which is not to say they don’t have their own problems, but being the richest country in the world certainly is not reflected in our placement when it comes to global statistics of well-being (because yeah, our wealth is concentrated at the top).


  • I’m not trying to go camping, but just in terms of finding a “simple life” still requires weaving around a lot of modern problems/realities. For instance I do plenty of unpaid chores for family (today I helped carry fence panels), but I am not going to travel many hours (esp. lacking a car) to meet strangers to see if I possibly mesh well in such a community where I would also likely have to pay rent even after putting in what effort I could.