Skip to content

u/echeese

In this archive from Aug 2009 to Jun 2022

3
posts
147
comments
0
media
631
score
1 saved before deletion

I tried writing a program to quickly test different methods. tm.tm_yearcontains the year-1900.

time_t t = time(0);
struct tm now;
localtime_s(&now, &t);
printf("%d\n", 1900 + now.tm_year); // 2017
printf("19%d\n", now.tm_year); // 19107
char year[] = { '1', '9', '0' + (now.tm_year / 10), '0' + (now.tm_year % 10), '\n', '\0' };
printf("%s", year); // 19;7
6 points

What comes to my mind would be

  • Only render the voxels that are not surrounded by other voxels
  • Only render the sides of voxels that aren't touching other voxels
  • Only render chunks that are in your field of view
  • Upload the meshes to the GPU if you can. Sending the co-ordinates of thousands of voxels each frame is going to kill your framerate
3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.