Cant get some of my issues fixed

In the game.py, if I uncomment the ai object avoidance at line 127, it crashes when you load a level to play. Which is a shame, because now they run into the walls and then stop.

self.aiWorld.update()
AssertionError: !is_infinite() at line 49 of c:\buildslave\sdk-windows-i386\build\built1.10\include\boundingSphere.I

The player gets ‘caught’ on the walls. I dont know why that would be. It’s also possible to go through a wall, which is especially bad when the rabbits do it. I’ve put it back on colliding with the geometry, which is the best one of the options I tried. Seems to keep the rabbits in at least.

I’m completely failing at texturing the walls. Dunno why, I feel like I overlooked something obvious. It seems to put a sort of smoothed color on the wall instead of the texture. game.py line 164,172-173 The comment stuff is things I tried that didnt change anything.

edit:
As Thaumaturge pointed out, the problem with the wall Textures was in the UV coordinates. Me and and Blender dont get along. Eventually I downloaded MilkShape3d, which gave me textures on the first try, and compared it’s egg with the Blender created egg in notepad++. Ended up manually editing the milkeshape egg to properly size it and make the textures point right way up. Was easier than fighting Blender.

The player getting stuck was at least partially related to the isOnGround check, if the camera wasnt angled straight forward, the player sometimes lifted up a bit or pressed into the ground a bit. Movement is better now but walls can still stick a bit.

The player getting stuck on the walls was completely eliminated after making changes to how the walls are constructed. The old code uses cubes to construct the wall, which puts two collision surfaces facing eachother at regular intervals, where the cubes touch. That’s where and why the player got caught. The code now builds the walls face by face instead of plopping down cubes so only the relevant collision surfaces are placed now.

AI issue not resolved.

Could you post an excerpt of the relevant code for this, please?

(It’s easier to study a short section than to comb through an entire program that I’m not familiar with, I find.)

Based on your description, could it be that your walls don’t have UV coordinates?

That indeed seems to be the problem. Testing with setTexGen does make the texture show up.
wallBlock.setTexGen(TextureStage.getDefault(), TexGenAttrib.MEyePosition)
That points me in the right direction. Thanks.

1 Like