Amazing zone settings
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Hmm, well. Sanity checking is on the list though right?hoop wrote:I thought they were absolute too, since they were called 'bot' and 'top' before, but after a short test I realized that 'top' should've been called height.Tank Program wrote:I think you should be doing sanity checking on sg_zoneHeight/sg_zoneBottom so that a user can't wind up with oddly shaped zones, and then for height to truely be height, I think...
since the coordinates appear to be absolute.
Try it and you'll agree
Do you mean I should check whether the user tries weird values?Tank Program wrote:Hmm, well. Sanity checking is on the list though right?
In that case I'd be a bit confused, which limits would you suggest?
Question: I do 2 checks inside gZone::Render
Code: Select all
if ( sg_zoneSegLength <= 0 )
sg_zoneSegLength = .5;
if ( sg_zoneSegments < 1 )
sg_zoneSegments = 11;
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Yes, weird values. Things like the height being negative, or the height being less than the bottom... that sort of stuff.hoop wrote:Do you mean I should check whether the user tries weird values?Tank Program wrote:Hmm, well. Sanity checking is on the list though right?
In that case I'd be a bit confused, which limits would you suggest?
If you're worried about running the checks every time, run them just when the zone is initialized, and then copy the approved values into the object itself so that any changes are ignored. Such changes are cosmetic only, so a short persistence shouldn't have any ill effects.
Thanks for posting the patch Kyle.
I've noticed 2 errors though:
1: line 43 seems just to be a delete mistake
2: the difference between 0.2.8 and 0.3 zone render code is right about how 'top' and 'bottom' are implemented. In 2.8 'top', which I renamed to sg_zoneHeight is indeed a variable for zone's height. In 0.3 instead the same variable effectively is the 'top' parameter.
We didn't notice that the last night because we were testing zone_height keeping zone_bottom at 0.
In fact if you try:
the zone won't be rendered, and that's s not what we want.
So, sg_zoneHeight = top - bottom. In other words line 83, 84
should be changed to
That's what tank was saying in a previous post
http://forums.armagetronad.net/viewtopi ... 634#198634
I'd like to know which developer changed that part of code and what he'd have to tell us about.
ps: why has ZONE_ALPHA been removed from 0.3? It's a pretty useful setting!
Here is the the patch corrected
I've noticed 2 errors though:
1: line 43 seems just to be a delete mistake
Code: Select all
- color_.a_ = ( lastTime - createTime_ ) * .2f;
We didn't notice that the last night because we were testing zone_height keeping zone_bottom at 0.
In fact if you try:
Code: Select all
ZONE_BOTTOM 1
ZONE_HEIGHT 1
So, sg_zoneHeight = top - bottom. In other words line 83, 84
Code: Select all
+ glVertex3f(sa, ca, sg_zoneHeight);
+ glVertex3f(sb, cb, sg_zoneHeight);
Code: Select all
+ glVertex3f(sa, ca, sg_zoneBottom + sg_zoneHeight);
+ glVertex3f(sb, cb, sg_zoneBottom + sg_zoneHeight);
http://forums.armagetronad.net/viewtopi ... 634#198634
I'd like to know which developer changed that part of code and what he'd have to tell us about.
ps: why has ZONE_ALPHA been removed from 0.3? It's a pretty useful setting!
Here is the the patch corrected
- Attachments
-
- zone_0.3-20080819_1454.patch.zip
- zone settings patch for 0.3 (tested on alpha 20080819 source)
- (1.81 KiB) Downloaded 402 times
Last edited by hoop on Tue Aug 19, 2008 2:17 pm, edited 2 times in total.
It hasn't been removed. It was never in 0.3. There was heavy merging trouble at one point (specifically, the 0.2.8 zone code was removed completely from 0.3) and you're not supposed to be touching the code since it's basically just there for backwards compatibility; we'll probably bring it back in sync with 0.2.8 one time the hard way (copy over the 0.2.8 code and hand-pick the 0.3 changes).hoop wrote:ps: why has ZONE_ALPHA been removed from 0.3? It's a pretty useful setting!
So, in short: if someone feels like committing the patch, do it on 0.2.8.
-
- Average Program
- Posts: 61
- Joined: Fri Jul 25, 2008 11:24 am
So, any chance this will get added to 0.2.8/0.3?
Winner of the How Many Pages Before The Lock® competition and a grand total of 18,93 euros in Euromillions.
- apparition
- Match Winner
- Posts: 628
- Joined: Sun Dec 03, 2006 9:59 am
- Location: The Mitten, USA
I think it's a very useful *gameplay* setting. Particularly in game modes that involve a lot of inzone crazyness...
The current flying squares don't get that much in the way, but making it smaller/lower/etc is much better IMO.
EDIT: oops, a word was MIA
The current flying squares don't get that much in the way, but making it smaller/lower/etc is much better IMO.
EDIT: oops, a word was MIA
Last edited by madmax on Fri Jan 09, 2009 11:23 pm, edited 1 time in total.
Winner of the How Many Pages Before The Lock® competition and a grand total of 18,93 euros in Euromillions.