Skip to content

JopjeKnopje/fdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTES

General flow

  • Parse
  • Project
  • Draw

Clearing screen performance

Test map 42-custom2.fdf

  • Using a while loop for each pixel 400-450 fps
  • Using ft_memset 390-440 fps
  • Using memset 1800-2100 fps WTFFF??! (colors are incorrect tho because of the 1 byte thing).
  • Using a memset32 820-920 pretty good :)

So instead of implementing this and probably facing more endianness related issues, lets just use the while loop. Since this stuff is like 5% percent of the actual performance on bigger maps.

TODO

Features

  • Read norm about global static const char arrays.
  • Double check if makefile MLX related rules function correctly
  • Resize window.
  • Min max window size.
  • Support multiple projections in an enum that we can pass to the projector.
  • Weird color behaviour on linux.
  • Gradient on lines
  • Save projection angles on number keys.
  • Linedrawing optimization
  • Black white gradient
  • In view_saved just memcopy.
  • Don't use jumptable in view select.
  • FPS Counter in screen.
  • Gradient on height.
  • Sidebar.
  • Use t_timer in fps_hook(void *param).
  • For clearing the screen just memset into the pixel buffer.
  • Instead of gnl just read a shit ton of data from the map.
  • Spherical projection.
  • Add automatic rotate funcion.
  • Add screensaver mode (like a dvd player has).
  • Switch between gradient for height and gradient for actual map color values.
  • Rainbow colors.
  • Z-buffer to prevent "When loading t1 for example some lines don't get drawn and seem to dissapear at certain angles".
  • Perspective camera.
  • Calculate the initial size of the wireframe so it fits perfectly in the window (also do this on resize).
  • Mouse dragging to move wireframe.
  • Check for newline when counting width.
  • Draw square for all the point colors.
  • Speed-up big maps.

Issues

  • Only draw the pixels that are viewable.
  • Segfault when opening a max with scale too large for window. (only on mac)
  • Pixels being draw at x = 0.
  • Colors in map don't correspond to their hex value on linux.
  • Use union for colors to get rid of get_color_x functions.
  • Map does weird stuff on spaces see weird_map.fdf
  • Segfault when resizing too quick.
  • Color union endianness?
  • Calculating the gradient in COLOR_MODE_HEIGHT is pretty slow.
  • Malloc protection.
  • overflow protection in ft_atoi.

Resources

Projection

Line drawing algorithm

Color union

Faster hypotenuse for color gradient.

Colors

Sidenotes

  • vaporwave type beat colors c_start.value = 0xff00ffff; c_end.value = 0x00ffffff;

About

Rendering wireframes from map files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published