[RESOLVED] Tiles and Artifacts on Boundaries

Sleep is for mortals.

1 Like

Since this is 2d, wouldn’t it be best to have one box built in blender exactly as this one and just use a texture for the graphics of the squares? This level would be two boxes and about 16 or less verts for the bottom and 4 for the top box with two textures.

Edit: Nothing for Z to fight in that case.

Edit: Could just change those boxes to a plane I would think.

1 Like

Actuall in the beginning I had different boxes with open endings like u propose and had the same problems, that’s why I though fuckit I just use cubes and figure out what it is. But… didn’t expect it to be that hard.
What I also don’t get is why do does flickering lines also show up when the scene is far away.

But I’ll keep trying. Seems I’m the only one who has this sort of issues. Thx anyway

I have very much the same problem and I am using textures.
This is what I am getting with the cubes framework.

Your case looks like texture bleeding from a neighboring cell in the atlas. Something different.

Ok I did now remove all the side planes I had, but still same same. I didn’t really get the grid request, but I will scale it down a tiny bit and then it is visible…

So I think even if I have pure planes placed to each others I will have the same issue. Pretty sure, not too sure. I will also now try to strip down the issue to a few sameish cubes and I will just use plain flat cubes without anything but colors…


Try making it with JME Boxes to see. Then at least the rest of us could play with the same code.

The spaced out version shows me what I suspected in that the ‘invisible’ sides are dark. So in the case where we’re seeing dark lines, it’s not the scene background but the hidden faces bleeding through. It was hard to tell if things were lit before or not… but I guess they are.

Also, if these are all separate objects instead of batched together then it’s possible that some error in the hierarchy creeps in. That’s one reason having things from 0 to 1 might be better than having them from -0.5 to 0.5. Perhaps different floating point rounding would be happening.

Since your scene seems really far away from the camera, you could also try setting the near plane farther away though I doubt it will make a difference.

Having an example made with colored JME cubes would be helpful for eliminating extraneous issues.

1 Like

I agree. Maybe I even find the issue doing a self contained test app. I did it in the center because dyn4j does that too so I could sneak around calculating the physical appearance match exactly the visible one…

I probably need a bit time to make that example though

And can I batch them? I mean different objects? I thought not ? or was this more texture related?

Also please note, this issues would not exist it you would use voxel-like world where “unnecessary faces are hidden”.

But i hope for current code you will find fix too.

What i would try would be setting Camera Frustrum near bigger(farer) and see - just to try.

And one side note I removed the side planes so the can not bleed they don’t exist. a bit weird. anyway I try with pure blender cubes and pure planes and with jme cubes as well. just need a bit time for those trials.

You can batch them if they have same material.

They have :slight_smile: so I try this as well. So many trials ahead :joy:

Not true in my case as I wrote one of my trials were exactly that I removed the non visible planes on the side but no differences.

I tend to what @pspeed said with my centered placement aproach and floating point rounding hazzle down the road.

Btw, there is this nice Blocks library that will do all the hard work for you. I am already using this and not encountered a similar problem.


Thank you I look into that. so with that you can place custom blocks? or just blocks which I have to decorate with textures. I really like my idea of having real 3D objects

You could still use the library for your main cubes and then decorate them with additional stuff.

Yes, you can. It already has a bunch of block shapes that will mostly satisfy your needs but yet you can use custom shapes if you want. (I already made a bunch of custom shapes in Blender for my usecase)

List of default shapes are:

1 Like

And just to throw in a side order of reality - if there’s anything terraria and that goat game taught us - it’s that although there’s always “the best way” to do things - a great game is a great game regardless of how perfect it is.

Terraria is known in its modding community as a meme. Its coding practices are monstrous. Literal “how not to code” practices.

Don’t let it hinder progression. If you write your game in self contained stages it makes your life a lot easier.

I wrote a separate project for tilesets, events, plugins, noise, etc. This way you can have individual tests for each area in each project which lets you isolate issues a lot and separates game code. I don’t have to mess with my game to fix things that aren’t related to my game logic.

1 Like

I do have those libs or sometimes I just relay on existing libs and know how to use them. I never dealed a lot with graphic stuff and could always sneak around troublesome parts. So it’s the first time with this. I’ll lear continually :sweat_smile: That’s the great part. I already learned a lot and integrated tiled as my level editor which speeds things a lot already. So I’m pretty close to what I want.

1 Like