Tankshooter

Hi all!

I’ve been hanging around here for quite a while now without writing anything,collecting your wisdom and codegems. :smile:

I’m working on a multiplayer tankshooter,right now there is only one tankmodel (Panzer VI Tiger),but I’m almost finished with a Sherman Firefly that hopefully will hold its own against the Tiger.

Networking is taken from Leepos free tutorial,so to play change the name (DITT_NAMN sorry for using Swedish) to something else and start a server (with STARTA SERVER) and if you open 2 webplayers connect as a client with the ANSLUT-button.

http://dl.dropbox.com/u/20727661/Firefly/WebPlayer/WebPlayer.html

Tanks controls:

Movement: Arrowkeys
Turn turret: A-D
Move Gun up-down: W-S
Followcams: U-I
Turretcam: O
Reticle/Guncam: P
Firebutton: SPACE

As already mentioned in another thread about dynamic tanktreads:

http://forum.unity3d.com/threads/77102-Dynamic-tank-tracks-Proof-of-concept?

The choice not to let the Tiger be able to spin on one spot is a concious one,because tanks before 1945 generally couldn’t do this without breaking the gearbox.Maybe I will let the Firefly be able to do this to even out the differenses between the tanks in firepower. :stuck_out_tongue:

The dynamic treads are made with bones that are connected to the wheels who in their turn is controlled by one raycast per roadwheel to follow the ground,and lastly one more raycast from the tanks body to ensure that the wheels only can move a certain lenght from the body to avoid a silly cartoony stretcheffect.Drive around the hills with camera U to see the effect.

The turning of the tread is done with texture offset.

The terrain is only a stand-in (sucks).Later I will build a Normandian landscape with bocage.

Please comment and give me advice how to make a fun playable game.

Some pictures:

Shootin’

Dynamic treads that follow the ground using bones and raycasting.

Working reticle in original style

Right now I’m working on the textures for this Sherman Firefly.A worthy opponent to the Tiger. :slight_smile:

That’s a great start. Reminds me of my learning project (http://koti.mbnet.fi/marwer/tankshock.html), which was a bit more action-oriented. I was also looking into dynamic tracks but gave up and just did the texture offset thing. Do you have any kind of damage model, or do the tank just have health?

My type of thing this :smile:,you could make the reload a bit faster.Nice picture of a shell when reloaded.I like to use the mouse to fire.But it has a great look to it allready.I play this demo a lot( http://www.fancygoal.com/game.html )It might give you some more ideas to help you along.

Dave

I actually played your game a long time ago when I was lurking around here without writing anything,so I’m not at all surprised to find that some elements are the same hehe. :slight_smile:
I havent had the time to implement a damagemodel yet,but I’m planning on one with different “damagezones”.
A hit in the motor maybe takes away 10 hitpoints while a frontal hit only is worth 2 because of the thick armour.

Thx for the great link and the kind words!
I immediately saw some things I can “borrow”. :wink:

The thing is that a skilled loader could load the 88gun in about six seconds.Maybe I shouldn’t call my demo a shooter but a tanksimulator instead haha.It is all part of the balance of not making the opponent too weak.I’m planning on making the Firefly much faster and manouverable than the Tiger but with less armour (just as it was in reality).

The GUI-graphics I have now is only stand-in to test the function.The next big thing is to build a small French town with fields and stuff,cause I’m getting real tired of driving around on a golfgreen all the time!

Todays updates:

1.The tank can now rotate on the spot when standing still.Not the modern way when the treads move in opposite direction,but breaking one tread and letting the other drive the tank around.
To make this convincing (hopefully…), I made a separate pivotpoint for each tread and the used transform.RotateAround in combination with if statements to make it work.The “rotationmode” switches back to normal when the tank moves over a certain speed.

I’ll fix the treadUV-animation later.

2.I put a windzone in the explosionprefab so that the trees bend when they are in the “zone”. :slight_smile:
Unfortunately I haven’t found a way to let the wind fade out.Now it’s just a timer that destroys the prefab.This causes jerky motion.
Does anybody know how to solve this problem?It seems like windzones not was meant to be used this way…

Link to the newest build:

http://dl.dropbox.com/u/20727661/Firefly/WebPlayer/WebPlayer.html

that’s a really cool project, I like your progress so far. the colision between the tank barrel and a tree would be nice, too :wink: because the tank is already coliding with the tree - I’m looking forward to see more of your work

Yeah!So you noticed that! :wink:

I have a configurable joint between the turret and the body to make things a little “bouncy” and when I added a collider to the barrel and smashed into a tree the whole thing began to spin around like a propeller,so I hoped nobody would notice lol.

Thx for the kind words!

Great work so far. I’d like to discuss with you turning this into a full game.

Very nice Larsa334.

Some Tiger tank feedback for you, if I may.

The optic is very good, though in the real Tiger you move the triangle down (strich) then you put the tip of the triangle back on the target, therefore elevating the barrel. As it is at the moment the shot always goes where the strich is.

The recoil of the main gun should be at the first joint after the mantlet.

A camera that was pan-able around the tank would be very nice, so we can see those tracks in action :slight_smile:

There is a very good description of how the TZF9b optic in the Tiger works here:

http://pedg.yuku.com/topic/1728/t/Ranging-Turmzielfernrohr-TZF-9b-gun-sight-optics.html

Jeff

Create like here… http://www.youtube.com/webwolfrus#p/u/3/cbJcIGs-dHc Your tank twitches.
Create change of cameras…

Hey very nice proyect you have here.
There’s something that i really need to know. How did you do the tracks movement? did you did it as an animation or is it scripted?

Reminds me of Reign of Steel, but still a bit of a journey to go. Good luck anyway :slight_smile:

Yes,you may! :slight_smile:

Sorry for the late answer,I’ve had the flu for almost a week now,first day out of bed.

Great link!Thank you very much.
Do you also happen to know how the Fireflys reticle looked and how it worked?

I have now uploaded a new webplayer with the camerasolution that WebWolfRussian suggested.

http://dl.dropbox.com/u/20727661/Firefly/WebPlayer/WebPlayer.html

The twitching is also taken care of now,there was something wrong with the lerpfunction in the camerascript.

Thx!! :slight_smile:

It is all done with scripts.
In the middle of this thread there is more info how it is done: http://forum.unity3d.com/threads/77102-Dynamic-tank-tracks-Proof-of-concept

Hehe,for example,the whole of Normandie is currently missing!! :slight_smile:

I will soon add the Firefly.Texturing is almost complete,the treads still looks like they are fresh out of the factory and one turrethatch is missing.
I will also add normalmaps to save some triangles.The model now weighs in at 8000 tris.Mostly because of the suspension.

Hi Larsa334

pm sent :slight_smile:

I have finally imported the Fireflymodel into Unity.Worked very well!
The only problem now is the suspension.
The roadwheels are mounted in pairs as opposed to the Tigertank where every roadwheel is separate and can move independently.
Don’t know if I’ll separate each half of the suspension and fake it or use a hingejoint to make it more realistic…

Like the look of the Firefly Larsa :slight_smile: