Hey MasterQ32.
Thanks for this awesome contribution. I've been having a look at it to see how you've done things and I am quite impressed. Moreover, I am trying to adjust the size of the world via WORLD_SIZE_X in the cubex.h file from 32 to 64 (for example) I get an error that it cannot create the blocks when I run the project.
Its obviously not creating the first block correctly... any help?
EDIT: I tried to pre-define the world_size_x / y / z and get an engine crash.
Edit2: I discovered the minecraft_cover.c file and realized how extensive your contribution is. After much time and playing around with it, i've implemented my own movement with jumping and a nice fps camera.
I kind of understand what you have done and have been reading your notes. I'd like to expand on this and create an awesome game with it eventually so I will have some questions for you. I hope that wont be a problem.
I've been trying to give the light a texture and with little luck i've finally got a visual. However, it seems that the object clips, and is inverted.. Perhaps you could tell me please, why?
function place_light()
{
VECTOR from;
VECTOR to;
vec_set(from,screen_size);
vec_scale(from,0.5);
vec_set(to,from);
from.z = 0;
to.z = 1000;
vec_for_screen(from,camera);
vec_for_screen(to,camera);
if(c_trace(from,to,TRACE_DEFINE))
{
if(you->skill[0])
{
VECTOR loc_temp;
vec_set(loc_temp.x,you.x);
BLOCK* b = you->skill[0];
if(b)
{
VECTOR p;
vec_set(p,normal);
vec_add(p,b.x);
if(p.x >= 0 && p.y >= 0 && p.z >= 0 && p.x < WORLD_SIZE_X && p.y < WORLD_SIZE_Y && p.y < WORLD_SIZE_Y)
{
if(!world[p.x][p.y][p.z])
{
ENTITY* temp_ent = ent_create("torch.tmdl",loc_temp.x,NULL);
blocklight_create(p,range,100);
world_update_light();
}
}
}
}
}
}
Your work is amazing friend. You're very talented.
Regards.