Revisit 20 - Infantry Bugs

Web log of development issues.

Revisit 20 - Infantry Bugs

Postby adamsderk » Tue Nov 17, 2009 9:54 pm

Greetings,

I have the infantry gui finished (for now; no mission goals, or squad commands). I have also put in the mechanized infantry. So there are a total of 36 different infantry units. I have also put in the unit selection box from the previous version to pick your unit before starting. There are also 3 friendly and 5 enemy AI units (without brains) to test the targeting and building combat.

Which brings me to the two bugs that are keeping me from pushing out a demo. First was the engine crash when I made the hover mechanized infantry float on the water. I have no idea about this one, so I dropped it and finished what I could. The second, which I'm working on, is that projectiles aren't doing what I thought they were doing now that I have a target inside a building. While they do impact on the walls, they don't see any other units inside the building and pass right through them. Since this is kind of critical, I'm trying to figure it out.

So that's where we are... close but miles away.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby adamsderk » Wed Nov 18, 2009 9:28 pm

Greetings,

Well, the firing inside buildings bug ended up being a relatively easy fix. I slowed down the bullet so I could see what was happening and to my surprise, it was not firing in the direction of the muzzle, but directly opposite. I.e. I was shooting myself (although collisions are turned of for me when firing so it went through me). I traced it through the engine and found that a check was being done for when the weapon was really close to another object that would "bend" the firing direction. It sounds weird, but makes sense when you figure that the weapon is mounted on a player, so the muzzle could be outside the player's collision box. If the player was right next to something else, the muzzle could actually penetrate the other object. So when you fired, it should "ricochet" off the object, hence the extra calculation. In my case, I have the entire player in another object, so that code was always being executed. It was just a matter of commenting out that check and it works beautifully; fire in buildings, hit objects in the building otherwise the wall of the building.

Now if that hover bug would be so easy...

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Ben » Thu Nov 19, 2009 6:48 am

OK, one last poke on SVN. It always helps to have extra eyes on the problems :wink:

Sorry, just excited about the idea of a new build :D
Ben
 
Posts: 169
Joined: Sat Apr 23, 2005 10:42 pm
Location: New Zealand

Postby adamsderk » Fri Nov 20, 2009 5:12 pm

Ben,

It is fine to keep poking :) I still haven't received my "limited access" accounts for SVN. I put in another request to get them.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby adamsderk » Tue Dec 01, 2009 6:57 pm

Greetings,

Well, fix one and find another. I did figure out the hover over water problem... copy and paste without thinking. I had the code process the run surface when there wasn't a run surface (equivalent of dividing by 0). Just reworked the code a bit and voila, perfect hover.

But... The targeting display system doesn't work when the player is inside a building. Now there are actually two gui that do this. The first, which I fixed is the triangles that show the direction of the other units. The second is the one that draws a box around them when they are on the screen. Now the code that determines if the player is inside a building works on the first one, but not the second. Argh. Literally same code, different results. I'm guessing it has something to do with the two different types of gui. So, almost there.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington


Return to Development Blog

Who is online

Users browsing this forum: No registered users and 1 guest

cron