Skip Navigation

What are you working on?

I've finally managed to join this community from kbin, seems we were having federation problems with programming.dev.

So anyway, what sorts of projects are you all using Nim for?

Edit: Post isn't propagating. Maybe this edit will help?

9
9 comments
  • Edit: Did you know that if a post or comment fails to propagate, editing it will force a retry?

    Here's mine: https://github.com/chrisacheson/crnstc

    It's intended to be a "traditional" (neotraditional?) roguelike with a cyberpunk setting. Both the world and the UI are in 3d, which isn't something I've really seen done before. Usually it's either one or the other, like CataclysmDDA having a 3d world rendered in 2d slices, or Jupiter Hell having a 2d world with 2.5d graphics. I figured for a cyberpunk setting, being able to visualize the cityscape is important for the feel of it.

    So far it's very much just in an "early tech demo" state. I've implemented basic randomly generated terrain and player movement. I was working on adding line of sight (which gets a lot more complicated in 3d), but ended up getting distracted by the reddit protests and migration to the fediverse. I'll get back to it eventually.

    If you want to compile it, you'll actually need Nim 2.0. The .nimble file doesn't currently reflect that.

    Edit2: Images attached to comments on kbin don't seem to get copied over to lemmy. Trying this:

    https://media.kbin.social/media/39/15/3915a060e227fd686cc11b5ba77d43d845b4fe904926f98001b751f08314e996.png

  • Spending a bit of time cleaning up my libraries and adding features before the new uni semester starts

    Hoping to fix this big bug in my validation library and then publish it to nimble. Also working on a testing framework that has similar API to std/unittest but have better diff printing (since trying to read test failures is a pain at times)

  • Also on Kbin, I see all posts but the 2 oldest (older Nim version, sortplz).


    Not a project (sorry) but installed Naylib (Nim bindings for Raylib) and am not sure what to do (especially for something that I will continue making content for) to have projects I am motivated to do. Some of the issue is that I want an editor for the boring stuff, though I've been thinking about procedural or external assets that might make it bearable. Though not sure if I'll get the type of setup I'm expecting.

    I mostly want something not based on textures. So polygons, but I'm not sure if I would be better off making(pasting) a basic 2D polygon editor (or only using basic shapes) and possibly integrating it into a tilemap, or if I should go with basic 3D (possibly with some other 3D tilemap editor?) as I expect that to have better support for vertex/face colors. Also I want the game to be maximizable (particularly without bars, that seems more possible with tilemaps or 3D).

    Note that I have lurked with programming for a while, the last thing I did was a simple (92 LoC) game book reader (custom format) with Nim(+Owlkettle) last may. That again was a problem of content.

    EDIT: With Naylib I got a triangle that rotates with the mouse wheel (relevant for an idea I had) but now seeing polygons can't do collision like squares/circles(?) (which, not directly related but kind of generally not good).

    • Hey, I created something. It's like XPM but instead it's to define polygon vertices in the proper order. I have a text file (first line is number of verts, 0 is origin):

      11
      
             1        
      
      3             9
      
           2   A      
      
             0        
          4     8     
      
             6        
      
      5             7
      
      

      Code and result in attached screenshot.

      I'm not sure how practical it is (rotation, collision, resized-window-friendly placement etc.) or if I'd be better off with something else (that allows vertex colors too? Godot4 would be ideal if the bindings were there, here's an animated eye I made with Godot4).

      For the format though it might be better if I could have it in the code file (can I have a 16x16-or-bigger matrix?) rather than reading line-by-line. And either way it'd look better with a truly square font (see also Square is a TTF font intended for roguelike games).

      @cacheson

      • Huh, that's cool. My own experience with this stuff is pretty sparse. I learned a bit of OpenGL 2.0 about 20 years ago, and never quite got to the point of understanding model files. My "models" were just arrays of 3d vertices that I adjusted by hand.

        OpenGL 3.0 and onward are totally different from 2.0, so I had to basically relearn everything. Mostly I used these videos to get caught up, though I didn't get all that far in. One of them covers Blender OBJ model files, though that may be too heavy for your purposes. Are you just doing 2D? I'm not aware of any formats for that... SVG maybe? Also likely overkill. You might be able to make 2D stuff in Blender, but I've never used it.

9 comments