Repository navigation
v1.0.0
v1.0.0 — Stable release (MiniLibX)
First stable release of FDF, an isometric projection wireframe renderer for .fdf maps (project 42).
Highlights
- Isometric map rendering with lines via Bresenham's algorithm
- Colors per point (parse of 0xRRGGBB in the map file)
- Initial auto-zoom and centering based on map and window size
- Pan (arrow keys), zoom via mouse scroll, and Z-scale adjustment (+/-)
- 1024x768 window with simple image pipeline and copy to window
Features
-
Reading .fdf maps (z-per-point and optional hexadecimal color)
-
Isometric projection with Z-scale adjustment
-
Mesh drawing (horizontal and vertical lines between adjacent points)
-
Zoom limits to prevent excessive zooming:
-
Minimum zoom: 1
-
Maximum zoom: 50
-
Cleanup and resource release when closing the window
Controls
-
Keyboard:
-
Arrow keys: move the map (pan)
-
- or =: increase Z-scale
-
-: decrease Z-scale
-
ESC: Exit
-
Mouse:
-
Scroll up: Zoom in
-
Scroll down: Zoom out
Compilation
-
Dependencies (Linux):
-
X11 (libX11, libXext)
-
minilibx-linux (downloaded and compiled automatically by the Makefile)
-
libft (libft/ folder included in the project)
-
Build:
-
make
-
Output:
-
binary: fdf
Execution
-
Example:
-
./fdf 42.fdf
-
./fdf basictest.fdf
-
The program validates the file extension and interrupts with an error if the format is invalid.
Structure and Components
- File Reading and Parsing:
- read_file.c, handle_file.c, handle_map.c
- Rendering:
- draw.c (scanning and calls to Bresenham's algorithm)
- bresenham.c (step calculation and line rasterization)
- global_utils.c (image creation, pixel writing, utilities)
- Configurations and Types:
- fdf.h, keys.h
- Auxiliary Library:
- libft (strings, lists, numeric values, get_next_line, printf, etc.)
- Graphical Backend:
minilibx-linux/(cloned via Makefile)
Compatibility
-
Tested on Linux with X11.
-
The example maps in test_maps were used for manual validation.
Known Limitations
-
No rotation/transformations beyond isometric projection and Z scale.
-
Fixed line width (1 px).
-
X11 dependent (Linux); does not natively support macOS/Wayland in this version.
-
Performance may degrade with very large maps (CPU rendering with lines).
Makefile Notes
-
The Makefile:
-
Compiles libft
-
Clones and compiles
minilibx-linuxif necessary -
Links with
-lmlx -lXext -lX11 -lm -lft -
Objects can be generated in obj if your environment has an updated Makefile (compatible variant).
Acknowledgements
- Project built for curriculum 42.
- Based on MiniLibX (42Paris) + custom libft.