0.3 glancing mod

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
clime
On Lightcycle Grid
Posts: 10
Joined: Mon Feb 15, 2010 9:53 pm
Contact:

0.3 glancing mod

Post by clime »

Hey,

I know there is a branch with old 0.2.8 camera glancing but i wanted to keep the 0.3 code and just mod it a bit to make glancing more usable.

https://code.launchpad.net/~clime7/arma ... edGlancing

Two things are changed. Glancing is relative to cycle direction, so if you tap glance back twice fast, you won't end up looking right or left, etc. And mainly, returning from glance is implemented as forward glance, which unifies movement there and back. That means returning from glance is influenced by all glance settings, particularly camera_glance_angular_velocity.

The original glancing is still available though. camera_glance_return 0 enables it. Setting this parameter to positive number gives my mod, which is also default.

There seem to be two minor bugs in the original code that remain in my branch too. Both exhibit if you press/hold glance key before start of a round. Camera then does not align correctly immediatelly. In one case it stays in a grid corner, in the second case it aligns but with rise = 0. Mainly with custom cam it occrus. The first case is division by zero but I haven't found a cause of the second (and i really think there are two different causes). Holding glance (and continue holding with the original glancing) while pressing enter on Local Game is the easiest way to reproduce the first one. But it is not so important matter i suppose. Ye, and I haven't found a right way to fix these things so far.

The branch also contains all the fixes that are needed for build on Windows.

User avatar
Lackadaisical
Shutout Match Winner
Posts: 822
Joined: Sun Dec 21, 2003 4:58 pm
Location: Amsterdam, Netherlands
Contact:

Re: 0.3 glancing mod

Post by Lackadaisical »

Good stuff! The fact that the turning back of the camera after glancing was determined by custom_camera_turn_speed has always bothered me a bit.

User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: 0.3 glancing mod

Post by dlh »

Do you have a clean diff of your changes? I'm not sure how you got this massive diff, unless you completely rewrote eCamera.{h,cpp}

Aside from that, your changes sound good.
Last edited by dlh on Wed Jul 06, 2011 10:04 am, edited 1 time in total.

User avatar
Z-Man
God & Project Admin
Posts: 11427
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.3 glancing mod

Post by Z-Man »

Yeah, definitely good changes. The massive diff may come from line end code differences, he's on Windows and bzr isn't too good with them, last I read.

User avatar
clime
On Lightcycle Grid
Posts: 10
Joined: Mon Feb 15, 2010 9:53 pm
Contact:

Re: 0.3 glancing mod

Post by clime »

Thx, just one more thing...glancing direction in my mod is relative to the cycle direction !at the time the glance key was pressed!. So cycle turns does not turn camera when glance key is down. Idk if it is good or bad, I don't mind it. Please, tell me if it is a problem. Diffs are in attachment, i'll try to make code::blocks to use LF or i'll get some converter. Sry for that.
Attachments
eCamerah-diff.txt
(375 Bytes) Downloaded 114 times
eCameracpp-diff.txt
(4.03 KiB) Downloaded 112 times

User avatar
Z-Man
God & Project Admin
Posts: 11427
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.3 glancing mod

Post by Z-Man »

Tested it: it's neat and an elegant way to get a bit of the old glancing back. I'll commit it, if I may, with one small change: with smartcam enabled, if you release a glance key, it'll first do the movements as if you were glancing forward (because that's what it really is doing, and it's a good thing for the other camera modes since the only difference between the regular and glance motions there is the speed) and only return control to the smartcam after that glance turn is practically complete. This gives an irritating change of camera motion. I'll try to remedy that. Easiest way would be to only switch back to the regular camera on the next turn.

Keeping the camera looking in one direction is fine; I guess this is the change from 0.2.8 glance nobody disagreed with.

User avatar
Z-Man
God & Project Admin
Posts: 11427
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.3 glancing mod

Post by Z-Man »

Done. I also fixed at least one of the initialization bugs, possibly the other as well, I could not reproduce it. And by default, glancing back now snaps the view again and does not slowly turn the camera.

FAQ:
Q: You changed it! It sucks now!
A: You can back to the behavior before this commit by following instructions in settings_visual.cfg.

Q: It's still not completely like in 0.2.8!
A: Yep. IMHO, it's better.

Q: No, it's not! It sucks! Change it back!
A: None of those were questions, and no, it's not feasible to keep both codes coexisting. However, if you have a concrete feature you feel is missing now (like the glancing stopping on turns), we can emulate it no problem.

Q: Wasn't meriton against such changes?
A: I can't remember, really. He hasn't been around for some years, however, and submitted his work under the GPL. The choice was to make those changes or discard his work and start over.

User avatar
Mkay1
Shutout Match Winner
Posts: 1146
Joined: Mon Jun 01, 2009 4:35 pm
Contact:

Re: 0.3 glancing mod

Post by Mkay1 »

That was hilarious z-man! Thanks, you cheered me up!

User avatar
madmax
Round Winner
Posts: 306
Joined: Thu Mar 02, 2006 11:14 pm

Re: 0.3 glancing mod

Post by madmax »

A few years back I used the armagetronad-old-glancing branch which was updated by dlh.
I assume this is the way to go now? Is it both in 0.4 and trunk?
Winner of the How Many Pages Before The Lock® competition and a grand total of 18,93 euros in Euromillions.

User avatar
/dev/null
Shutout Match Winner
Posts: 820
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

Re: 0.3 glancing mod

Post by /dev/null »

this seems like a solution no one needs. If it works for you though thanks for giving back.

User avatar
sinewav
Graphic Artist
Posts: 6334
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: 0.3 glancing mod

Post by sinewav »

I was never able to figure out how to get 0.2x glances in 0.4x. I looked through settings_visual.cfg but nothing I changed seem to make a difference. Can someone explain to me what setting(s) needs to be changed?

Post Reply