camview widget for cockpit

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

camview widget for cockpit

Post by voodoo »

Hi all,

Here is a patch to add an extra widget for the cockpit.
Actually, I took the idea in this post :
http://forums.armagetronad.net/viewtopic.php?t=1856

Here is an example and some details about it :
<Camview camera="in" view="in">
<Position x="-0.95" y="-0.95" />
<Size height="0.15" width="0.3" />
<Translation x="0.5" y="0" z="0" />
<Rotation value="150" />
<Mirror value="true" />
</Camview>

Some explaination:
-> Camera, position and size are standard elements as for all other widget.
-> View accept the same parameters as camera except * and all. It defines the camera to use in the view.
-> Translation move the camera from his normal position according to his direction (assuming the direction is (0,1,0)).
-> Rotation, hmmm, rotate the camera on Z axis (what a surprise)
-> Mirror flip the image

other params :
<Rise value="0" />
<FOV value="100" />
<MainCameraDir value="true" />
-> Rise overwrite the rise of the camera
-> FOV, same
-> MainCameraDir force the widget to use the main viewport camera as a original direction (it still apply the rotation on it) so glancing affect the widget as well

I've tested the patch on ubuntu gg and macos 10.5 for a few days, works fine so it's time to share it.

I hope you'll like it. Have fun ;)
Attachments
screenshot_8.png
camview.patch.tar.gz
(9.75 KiB) Downloaded 238 times
User avatar
Fonkay
Match Winner
Posts: 776
Joined: Fri Jul 08, 2005 4:24 pm
Location: eh?
Contact:

Post by Fonkay »

Yay! :D :D
Similar to something I suggested/requested here years ago.
This post does not come with any form of Warranty or Return Policy.
If you're unhappy with this post, please feel free to suck it up and move on.
User avatar
DDMJ
Reverse Outside Corner Grinder
Posts: 1882
Joined: Thu Jun 08, 2006 12:15 am
Location: LA, CA, USA, NA
Contact:

Post by DDMJ »

Why did you flip the image? In the 'left' mirror it appears the pink bike is on your right while on the mini-map it's on your left.

EDIT: And why is 'Enemies' green and 'Friends' red? :P
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

<Mirror value="true" />
ˌɑrməˈɡɛˌtrɑn
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

That's cool. I've been wanting this for years, in fact, it's one of the reasons the cockpit went where it did, so we could make a widget like this, it just hadn't been done yet.

Here's hoping wrtl will see this pretty soon and have a chance to read through the patch. Definitely want to see this make it in, good work!

Also, is that my cockpit you put it in? Do you use that one, or just use it because it had plenty of room for more widgets? Curious because everyone I know of that's tried to use my cockpit said it wasn't usable to them...
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Awesome. I looked at some of the code at it looks OK, someone that understands all the bits will need to check it.
Image
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

small fix to make the widget show the same cycle as the main camera when spectating. Once you died, it was stuck on the first alive cycle found instead while the main cam was allowed to switch from cycle to cycle.

@lucifer: actually it's the default cockpit I use as an example (also because I lost my own cockpit ;) )
Attachments
camview.patch.tar.gz
(9.82 KiB) Downloaded 230 times
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Oh right, I forgot that the incam cockpit in the default cockpit is based on mine, just with some labels added and stuff (mine doesn't have labels for the bars, you're supposed to know what they are without reading labels).

Well, as soon as I get a new cpu fan for my laptop, and this is in the trunk (hopefully), I'll see about updating my incam cockpit to use it.

Hey, while we're on the subject of you writing cockpit widgets, would you be interested in seeing if you could turn the console/chat area into a cockpit widget? Also the chat input line?
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Lucifer: it's the default cockpit…

I don't have too much time to check the patch right now, but I'll try to do so as soon as I can.
There's no place like ::1
User avatar
DDMJ
Reverse Outside Corner Grinder
Posts: 1882
Joined: Thu Jun 08, 2006 12:15 am
Location: LA, CA, USA, NA
Contact:

Post by DDMJ »

Jonathan wrote:<Mirror value="true" />
Yea, but why?
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

So the left edge of the view and the left edge of your viewport mean the same direction on the grid.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

and also act like mirrors --Mr. Obvious
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

Good job.
Lucifer wrote:Hey, while we're on the subject of you writing cockpit widgets, would you be interested in seeing if you could turn the console/chat area into a cockpit widget? Also the chat input line?
Second.
Bosf
On Lightcycle Grid
Posts: 15
Joined: Wed Apr 02, 2008 2:02 pm

Post by Bosf »

It looks nice but what i must do with that file?I just want to install it and play...
User avatar
Z-Man
God & Project Admin
Posts: 11710
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

It's a patch. You need basic development knowledge to apply it, the wiki tells you everything if you look at the right page. You need to be able to
1. compile arma from source
2. fetch the latest source from SVN/BZR
before you can think about running a patched version.
Post Reply