Couple of bugs

Couple of bugs

Forboding Angel's vision of a flexible, story-driven universe drawing heavily from classic game design and modern artistic sensibilities.

Moderators: Moderators, Content Developer

Post Reply
klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Couple of bugs

Post by klapmongool » 16 Apr 2014, 10:00

1. Fighters can kill air factories because they aim at an air unit that is being built.

2. The blue graphic for adv generators that are positioned on the very edge of the map wont display properly. The graphic displays completely on the map instead of cutting off at the edge. Check it out ingame, it is easy to see.
Last edited by klapmongool on 17 Apr 2014, 11:57, edited 1 time in total.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14436
Joined: 17 Nov 2005, 02:43

Re: Couple of bugs

Post by Forboding Angel » 16 Apr 2014, 20:36

1. Spring issue. Not much i can do about it unless spring has some way to tell aircraft that they can't shoot other aircraft that are being built (afaik this doesn't exist atm).

2. Yeah I know. I blame zwzsg :-) That said, the graphic does not exceed the blue circle, it just looks weird. I'll see if I can get z to switch it up. I've already looked and that code is beyond my understanding.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7003
Joined: 16 Nov 2004, 13:08

Re: Couple of bugs

Post by zwzsg » 16 Apr 2014, 21:02

:o I don't even recall what this is.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14436
Joined: 17 Nov 2005, 02:43

Re: Couple of bugs

Post by Forboding Angel » 16 Apr 2014, 21:17

0 x

klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Re: Couple of bugs

Post by klapmongool » 17 Apr 2014, 08:03

Ok.

About the fighters: It seems they hit the air factory because it is in the way of the air unit being built. If the unit would be 'on top' instead of 'in' the factory it would not kill the lab probably?
0 x

User avatar
Anarchid
Posts: 1372
Joined: 30 Nov 2008, 04:31

Re: Couple of bugs

Post by Anarchid » 17 Apr 2014, 10:48

1. Spring issue. Not much i can do about it unless spring has some way to tell aircraft that they can't shoot other aircraft that are being built (afaik this doesn't exist atm).
You're not ZK, you can use armor classes :)
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Couple of bugs

Post by knorke » 17 Apr 2014, 11:02

1) Spring.SetUnitNeutral = unit does not get targeted by enemies anymore

In case players manualy targeting unfinished aircrafts: Block such orders with AllowCommand()

To make fighters deal less* damage vs factories: armor classes
(*think 1 is minimum)

To make fighters deal zero damage vs factories: UnitPreDamaged
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Couple of bugs

Post by knorke » 17 Apr 2014, 11:20

2)Maybe coordinates in this gets clamped to mapborder:
gl.DrawGroundQuad(x-xs,z-zs,x+xs,z+zs,false,0,0,1,1)
For example placing a building a left mapedge:
x=near 0
xs=100 (or whatever size the decal is)
So because of the clamping it gets drawn with 0 instead of -100.
Since only one part of the x or z coordinate pairs ever gets clamped, the texture appears stretched?
0 x

User avatar
Jools
XTA Developer
Posts: 2771
Joined: 23 Feb 2009, 16:29

Re: Couple of bugs

Post by Jools » 17 Apr 2014, 12:44

knorke [numbering added] wrote:1) Spring.SetUnitNeutral = unit does not get targeted by enemies anymore

2) In case players manualy targeting unfinished aircrafts: Block such orders with AllowCommand()

3) To make fighters deal less* damage vs factories: armor classes
(*think 1 is minimum)

4) To make fighters deal zero damage vs factories: UnitPreDamaged
I think options 1) and 4) are best. 2) is problematic because then you have the interface say one thing and the resulting action being something else. We need less of this in spring, not more.

3) is reserved for zk it seems ;)
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7003
Joined: 16 Nov 2004, 13:08

Re: Couple of bugs

Post by zwzsg » 17 Apr 2014, 21:33

Right, I coded it for you some times ago.

If it fails on the edge of the map, I suppose it's because gl.DrawGroundQuad doesn't like map edges. So I guess you could replace

Code: Select all

gl.DrawGroundQuad(x-xs,z-zs,x+xs,z+zs,false,0,0,1,1)
by something such as:

Code: Select all

gl.BeginEnd(GL.QUADS,
	function()
		local v=function(x,z,u,v)
			gl.TexCoord(u,v)
			gl.Vertex(x,Spring.GetGroundHeight(math.max(0,math.min(Game.mapSizeX,x)),math.max(0,math.min(Game.mapSizeZ,z))),z)
		end
		v(x-xs,z-zs,0,0)
		v(x-xs,z+zs,0,1)
		v(x+xs,z+zs,1,1)
		v(x+xs,z-zs,1,0)
	end)
Of course it would cause massive tearing as textures fight for the depth buffer, which must be fixed by a judicious use of gl.PolygonOffset.

And if you find textures floating half-way out of map ugly, then you have to limit the x and z to map dimension, and cut exactly as much in the texture coordinate space.
0 x

Post Reply

Return to “Evolution RTS”