Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Emerald Nova

Pages: 1 [2]
My clipping issue was solved by
Code: [Select]
, thanks guys.

It has, however, introduced a new issue. The camera seems to warp objects near the edge of the screen. I'm not sure if this is a fundamental issue with projections, a feature, or a setting I'm not changing. Images attached. I don't want to go full on orthographic, but the warping seems a bit extreme.

I have also made an attempt to use the Jo Map Editor to import a 3D file I made in Blender and exported as a Collada file, a simple textured cube. I'm fairly certain I created and exported the file correctly, but attempts at loading and drawing the converted 3d model + texture have left nothing on screen. I also discovered that the coordinate points that are apparently generated for my model are massive compared to the numbers I'm used to using. I tried moving backwards by more than the 3276800 units but still saw nothing and polygon counts confirm it. The generated header from the Map Editor .dae conversion is partially below:

Code: [Select]
static POINT    PointCube[] =
{3276800, 3276800, -3276800},
{3276800, -3276800, -3276800},
{-3276800, -3276799, -3276800},
{-3276799, 3276800, -3276800},
{3276800, 3276798, 3276800},
{3276798, -3276803, 3276800},
{-3276800, -3276799, 3276800},
{-3276800, 3276800, 3276800},

static POLYGON    PolygonCube[] =
{{0, 0, -65536}, {0, 1, 2, 3}},
{{0, -65536, 0}, {4, 7, 6, 5}},
{{-65536, 0, 0}, {0, 4, 5, 1}},
{{0, 0, 65536}, {1, 5, 6, 2}},
{{0, 65536, 65536}, {2, 6, 7, 3}},
{{65536, 65536, 0}, {4, 0, 3, 7}},

Share your code / Re: JoMapEditor is now available on GitHub !
« on: January 14, 2019, 10:07:50 pm »
Beginner question: We build this in Visual Studio to run it, right?

I've been struggling with implementing a couple things that relate to SGL. All of my attempts to play with said things have not gone well. Any help would be appreciated.

Back-Face Culling
First, I've had a short conversation on my Youtube channel with XL2 about back-face culling. If I understand correctly, I have to implement this on a quad by quad basis. My confusion is to how, since the documentation doesn't paint much of a picture on how to play with SGL. I am loading an object like so:

Code: [Select]
jo_vertice    metal_crate_1_v[] = JO_3D_CUBE_VERTICES(32);
jo_3d_quad    metal_crate_1_q[6];
int       metal_crate_1_nq;

// Load Texture
jo_sprite_add_tga(JO_ROOT_DIR, "BOX.TGA", JO_COLOR_Transparent);

//  Write textures
jo_3d_create_cube(metal_crate_1_q, metal_crate_1_v);
metal_crate_1_nq = 6;
for (int i = 0; i < metal_crate_1_nq; ++i)
    jo_3d_set_texture(&metal_crate_1_q[i], 0);

Drawing it:

Code: [Select]
//  Perform matrix manipulations and draw
    jo_3d_translate_matrix(x, y, z);
    jo_3d_rotate_matrix(rx, ry, rz);
    jo_3d_draw_array(quads, num_quad);

//  Restore default matrix

If I understand correctly, the flag is an attribute under pdata. Should I be writing this line while writing textures for every quad I want culled? (excuse the bad C, I don't quite know what I'm doing):

Code: [Select]
quad->data->attbl->flag = 0;

Camera Clipping
Second, I've just encountered some trouble while implementing collision. It appears that quads just in front of the camera's position do not get rendered. Is there a way to change the camera's drawing plane (i.e. move the projection surface closer to the camera's position?) I believe this is controlled by a property called ScreenDist in SGL, but I am unsure where to implement said change.

Project announcement / Seniriu
« on: January 04, 2019, 10:48:41 pm »
I'm working on a first person role playing game titled Seniriu. The plan is to create a more simplified version of a Daggerfall-like game in a science fiction setting. Right now I am still grappling with how to implement basic in the engine like menus, multiple level locations, game objects, etc.

I am working in JO Engine and do development live on Twitch, using Mednafen as an emulator and test bed until I get a Saturn Satiator for live tests. I plan on pushing these live streams to Youtube and possibly doing a few shorter tutorial videos for JO Engine if there is a demand for it.

You can follow along with my progress on my Twitch page. I will update later with a github for the project code. My Youtube channel hosts older streams and Twitter announces stream announcements.

Twitch Stream:



Pages: 1 [2]
SMF spam blocked by CleanTalk