Curve Crafter banner

Curve Crafter

5 devlogs
4h 38m 20s

CurveCrafter is a terminal-based tool that visualizes mathematical functions. It’s split into 2 parts, a very basic cli game-engine and a very basic math parser, so the project can be taken appart to take and use any tool you want.

This project uses AI
  • Used chatgpt to generate github readme.
  • Used copilot to generate git commits.

Loading README...

hack.clubber
  • I tried making the character move with WASD which made me realize my old code didn’t work as expected so I switched input detection on windows from using <conio.h> to <windows.h>.
  • And as you see the new input system works very well.

  • Also planning to add docs for anyone who wants to use the game-engine by itself for himself…
2

Comments

nmsoukmandjiev007
nmsoukmandjiev007 about 14 hours ago

Woah that looks super cool! This is rlly unique as well. Good luck on it!

hack.clubber
hack.clubber about 13 hours ago

Thanks dude

hack.clubber

Rename and simplify renderer functions, add FPS control, and add keyboard constants.
init_win_cli() -> init_renderer(), clear_con() -> clear_console(), swap_buffers(float) -> swap_buffers() and a new set_fps(float) were introduced.
init_renderer() now sets a default fps of 60.
main.c updated to use the new renderer API (init_renderer, clear_console, swap_buffers) and removed the old cursor positioning usage.
Also added KEY_A..KEY_Z defines to src/input/win_input.h for letter key codes.

Will add a camera system and a status bar with usefull commands in the future.

Attachment
0
hack.clubber

Introduce key constants and input helper functions (esc_pressed, key_pressed, arrow_key_pressed) in win_input.* to centralize keyboard handling. Add draw_char and draw_chars wrapper functions in renderer to encapsulate WriteConsoleOutputCharacterA usage and update main to use draw_char. Minor whitespace/comment cleanup in main.

Attachment
Attachment
0
hack.clubber

Refactor codebase to separate Windows and Unix platform layers and improve build targets.

  • Makefile: add CC/CFLAGS, variables, and explicit win and unix targets; run now uses the built binary. Unix build is stubbed with a helpful message (unix support not implemented yet).
  • Platform refactor: rename/move Windows-specific modules: src/input.c -> src/input/win_input.c and src/win_cli.c -> src/renderer/win_renderer.c; corresponding headers moved/renamed under input/ and renderer/.
  • Additions: add placeholder Unix sources/headers (src/input/unix_input.* and src/renderer/unix_renderer.*) to prepare for Unix support.
  • Remove cli_os_layer.h and replace with conditional includes in main.c (#ifdef _WIN32 / #else) to include the correct platform headers.
  • API change: swap_buffers parameter type changed from int to float; implementation adjusts Sleep timing (Sleep(fps / 3.75)) and call site updated from swap_buffers(16) to swap_buffers(60.0).

These changes prepare the project for cross-platform support and cleaner separation of platform-specific code while improving the build workflow for Windows. Unix implementation remains to be completed.

Attachment
0
hack.clubber

Made basic text rendering with double buffering to reduce flicker.

0