Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Border issue in sprite layer implementing sprite stack

A topic by phreda created 64 days ago Views: 49 Replies: 3
Viewing posts 1 to 4
(+1)

First, thank's for you work!

I try to implement sprite stacking in my lang (forth related), I can use opengl but for now I use sdl_rendergeometry for write the sprite layers (perhaps this is the problem, I don't know).

when the camera is near the floor, the layers are almost flat, then the borders of texure are not correct.

Have you ever faced that problem?

(1 edit)

This is a common issue with sprite stacking. Considering planes have no "thickness" to them, you will get gaps between layers when you become parallel to them. This is just the nature of sprite stacking. The only real fixes are to either A) tilt planes towards the camera to fill the gaps, or B) extrude between the gaps to fill the space (typical voxel rendering). 

Thank's a lot Gizmo199 ! 

I continue try. My implementation is open source too but no GM related.

Current implementation is in https://github.com/phreda4/r3/blob/main/r3/dev/spritestackesc.r3

I finish my scene implementation, now can draw a scene complete with one draw call.

The previous error continue, not is the thickness because I fill the gaps between layer for mimic voxel rendering, really no gaps between layer now. but to certain ange the texture don't draw the borders complete. pehaps in opengl this not happen.

I try to advance in lighting, I read you code but not know about gm, I see you add normal information to the vertex..How work the illumination? You can say what file I need to read to see this?