You are browsing as a guest. Sign up (or log in) to start making projects!

renanfartes

@renanfartes

Joined June 8th, 2026

  • 77Devlogs
  • 8Projects
  • 10Ships
  • 108Votes
Open comments for this post

3h 20m 55s logged

Devlog 19

Tree shaking, RLE and terminal checking.

I tried to implement a feature that would make the terminal scale accordingly with the users terminal. It was the hardest thing i would have to handle in C. I tried callbacks to resize, signals and so more and it didn’t work.

The feature would detect any changes on the size and adapt itself. After hours i just deleted the branch and focused on developing the tree shaking (it is complete!) and now the game does not start when the terminal is not big enough.

Next step is to change line breaks with move cursor instructions and move the syscalls to macros so i can add a windows version asap!

Also, now the z key exits gracefully unloading everything.

AMDG

0
0
24
Ship

I made a OpenGL based voxel engine with a terminal Renderer in raw C!

The game uses RGB TrueColors ansi scape codes in a buffer before printing it all ar once. It also compreses the RGB colors.

The main problem i handled was developing hours without seeing something opn the screen in C. But i managed to got it working with block clulling, chunk and mesh generation logic.

  • 18 devlogs
  • 40h
  • 9.06x multiplier
  • 359 Stardust
Try project → See source code →
Open comments for this post

3h 2m 22s logged

Devlog 17

Finally got it to work!!!! I refactored the code so it supports easy tree shaking (yet is not fully implemented)

The termios reads input nonblock and then the game can effectivelly be played (bu terminals reads only one key at a time. This issue i cannot fix right now and it if i try to take input another way the game shall not work on wayland by now.)

0
0
32
Open comments for this post

2h 56m 21s logged

Devlog 16

Terminal Rendering and block placing changed to Stone

I implemented a reallyh bad way of printing the terminal to the screen. It works by copyting the pixels from the opengl context, but the code is a mess and the line breaking is weird at dicfferent terminals (i’m using kitty)

I will refactor and optimize this by making a component which is responsibgle from receivend the pixels, mounting a ultra optimized string and printing it in one single syscall. Also i may use unicode characters because this shall gave me a better resolutui9on and a better experience overall
I

0
0
22
Open comments for this post

1h 27m 5s logged

Devlog 15

Hitbox Interface and Infinite chunk generation

I changed the sky color and finally added infinite chunk generation. I was getting weird bugs but it was all negative coordinates stuff, so i added a offset to the perlin noise calculation. It is alfuw and to big negative coordinates it will happen again. I may need to change the lib itself or come with another solution.

I also removed a dynamic memory allocation on the chunk generation, it could be made static and now the OS handles the basic allocation.

Now the game loads and unloads chunks dynamically. But the render distacne can’t be above 6 or my pc starts to cry. I need to optimize this.

Next steps are to add collision and maybe aw few blocks. For the first ship i don’t think i need trees or clouds or complex illumination.

AMDG!

0
0
19
Open comments for this post

3h 15m 5s logged

Devlog 14

Chunk with hashmaps and big refactor

I Had TONS of headaches with my current code. The mess was a lot more messy than i thought. I changed a lot of the old code and refactored the chunk rendering system. Now the chunks can be on negative coords, the world position unit is calculated in chunks.

I implemented a hashmap to calculate the chunks and implemented chunk unloading. It is not performatic (i may have to use greedy culling or even frustum culling). The dynamic chunk loading is not implemented yet but it is easy with this refactor

Also i think the code leaks memory because of the hashmap implmenentaiton. I will take a look on that later.

0
0
32
Open comments for this post

1h 48m 2s logged

Devlog 13

Block deleting and Block placing

Just finished the core block manegment system. The raytracing engine determines which face it has touched and the player puts the block based on that.

The code is a mess. I tried implementing a face culling between chunks but failed miserably. I tried making the chunk receive the world context and it didn’t work because of circular dependency (the world imports the chunk and then imports the chunk again), and forward definitions also wasn’t solving

My next urgency is to refactor and turn this mess legible.

AMDG

0
0
17
Open comments for this post

48m 20s logged

Devlog 12

Visual for the raytracing!

So.. I hardcoded this cube so the player can clearly see what block he is looking at. I’m really surprised that this was a lot more fast than the raytracing itself.

Deleting blocks will be the next step and will be easy this this help.

Unfornatly i had to use gemini to help me debug some little strange issues, even that the code itself was written by me it makes me feel dependent. I wish someone makes an AI blocker lol

AMDG

0
0
9
Open comments for this post

3h 51m 25s logged

Devlog 11

Gravity, Jump, Refactor and Raycasting

I implemented a very raw way of handling with gravity and a very messy snap logic. It still works but i really do not like the code quality for that. I also added the jump logiac and refactor a lot o the code of the engine itself.

Also i implemented the bassic raycasting to the next steps, which are deleting and creating blocks. I think i will have a hard time with these since there’s all the logic of which face is the player looking etc.

I used gemini to decide some architectural decisions and some debugging, i’m sad to use ai even for that.

Ps: Writing this Devlog for the 3rd time because i didn’t notice that the video was over 50mb.

AMDG

0
0
17
Open comments for this post

1h 5m 34s logged

Devlog 10

World generation, stone and perlin noise fized!

I fixed that weird bug and added the texture to the dirt, improved a little the terrain generation system and the movimentation. The code for that is still a mess but it works.

I also do not know how i can turn this terrain more natural. Just seems so uniform and feels kinda weird.

Next steps are making the chunks load and unload on RAM (They’re fixed at the moment) and making the world infinite.

I also need to implement gravity and collision to the player.

AMDG

0
0
34
Open comments for this post

3h 48m 27s logged

Devlog 09

Raw Chunk generation!

I refactored Tons of lines of code, improved the performance and readibility and added a random and undocumented perlin noise library to generate the chunk.

I also made the camera and the player 2 separated entities, so in the future if i want to add another persapective a state machine would be more easy.

I added the stone block (yet it still not visible on the video) and the chunk generation stills weird. I’m gonna fix that.

Also, this perlin noise library is from 12 yearss ago. It is small so maybe i can improve the documentation by opening a pull request (it doesn’t even have a README or License… So i added a reference at external/perlin/LICENSE.md

AMDG

0
0
18
Open comments for this post

2h 57m 57s logged

Devlog 08

BLock culling.

Finally added block clulling to my voxel engine game! I also refactored all teh mesh generation logic and made MANY refactors to the engine.

The first was to break the code into smaller pieces with different responsabilities so i can think only on the problem i am handliing with. I added CubeFace and removed hardcoded pieces.

As seen on the video, faces between 2 solid blocks are not generated anymore…. my code looks dangerous on the border btw but the getBlock returns air block when out-of-index.

0
0
12
Open comments for this post

2h 54m 18s logged

Devlog 07

Chunk Rendering added!

I added a lot of things since last devlog. I Encapsulated the textures, organized project structure and started working on the chunk logic.

I really do not like the result, it is not optimized but the goal was to see something on the screen fast. I added a block interfacee with the chunk. But i used a lot of pointers and i might be in danger if i not refactor this later or take really care with malloc.

I plan to refactor and optimize the logic (faces between solid blocks still being rendered) and i really wonder how i shall add the texture mapping to this.

I also had a hard time debugging this because buffer underflows were being caused by premature optimization (yall can even see in the src/core/chunk.c the comment). I used Gemini to debug the logic, but i plan to refactor and using AI makes me kidna sad even for debugging

0
0
18
Open comments for this post

2h 25m 57s logged

Devlog 06

Movimentation + sensitivity + textures added!

I added some really simple textures based on the minecraf t classic ones. I created also a texture interface class and modded some shaders because i was troubleshotting to make the atlas work.

I want now to work on the core logic as we have all the basic interfaces we need (I just need to put the texture encapsulated and everything shall be ready). Chunks and mesh building will be probably next.

As this is a simple model for testing the texture atlas, i raw coded the vertices and this was kinda a headache. Not doing this again for a long time. Also my index buffer was not needed because the faces had shared vertcices but the UV was totally different

PS: The texture of the top face is grey because the atlas expect me to color it, but i`m to tired to do this now.. XD

0
0
16
Open comments for this post

1h 13m 32s logged

Devlog 05

Working camera!

I was trying to make the camera workingh and i had hard times with it, because opengl does not warn about anything that goes wrong with the shader stuff so it just desapears.

I also learned a lot about matrices and this beautiful opengl course is helping me a lot: OpenGL by Victor Gordan.

I also added really basic movements for testing. It is not a 3d object yet, it is more like a paper. I need to work in textures and model matrices while making a renderer to organize and optimize the graphical pipeline. Also all the minecraft logic needs to initialize urgently.

0
0
13
Open comments for this post

2h 23m 52s logged

Devlog 04

Added matrices library and meshs

Ok, so first i coded the mesh logics and it worked well. I do not remember but i have in my memory that it was successfully added, but when i opened vs code today i realised i’ve pushed a code that didn’t compile and even don’t display anything because i did not test the logic after encapsulated.
I had to go to gemini and ask it about the bug. I feel bad fort that.

I also added the cglm bind to C and it worked well, i even made the square rotates with some matrices (and that was in teh commit that couldn’t compile). I removed it to debug and i’m not likelly to code this again.

Next steps is to add some more logic to the Mesh such as model matrices. I plan to make the camera and start going 3d next.

Also as seen on the image i added input! I made a wrapper as the GLFW will after be hidden so i don’t need to rewrite input handling in 70 different files.

0
0
24
Open comments for this post

2h 57m 13s logged

Devlog 03

Added triangles and mini library!

So i learned a little techniques in C while doing this code. I coded some helper functions to handle Shaders (w/ file reading), VAOs, EBOs and VBOs, which are kinda weird to look into the raw call to opengl

The functions kinda look like POO but as these objects are just simple unsigned integers i didn’t made any cache miss on that, and no allocation was indeed made.

I learned to make it work alos!

I hard coded everything on main then refactored line by line commiting it. The result is just a square but the base is readdy!!!

0
0
13
Open comments for this post

2h 8m 41s logged

Devlog 03

This had everything to be wrong because i’ve lost internet for a long time. I basically spent the time refining the todo logic core. Now it is possible to create and delete tasks, also marking them as concluded.

0
0
9
Loading more…

Followers

Loading…