V-1 Targeting

Ask questions, discuss ideas, get answers
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

V-1 Targeting

Post by archer »

So, we at dznmods made a V-1 launcher for Battlefield 1942. Here are some pics for shameless self-promo... err... for reference:

Image

Image

The weapon behaves in a quite realistic manner: it's unguided, it flies in a straight line, and when it thinks it's over the target, it enters a steep dive and crashes.
The direction of flight is chosen by simply rotating the whole launcher, so that the vehicle would launch with a proper heading.
The target distance is chosen by spawning an invisible object over the target, which informs the missile, that it's time to crash.

The actual problem: how do you enable the player to acquire a target? I mean, the player can choose heading and distance, but how does she/he know where the missile would land?

We've tried several solutions, but so far nothing is satisfying:

The most obvious thing to do is to give the player an overhead "god" camera that would always look where the missile would land. By operating the controls, the player would make the camera move around, showing him where the bomb would drop.
We found out, however, that such solution gives too much information to the team. It's also not believable, which goes against our design principles.

Another option was to make the player only look through artillery cameras placed by spotters. Operating the missile controls would make a special "target marker" (a huge, semitransparent cylinder, actually) move around the map. The player would use the spotter camera to place the marker on the target and launch.
We planned to make the marker visible only to the V-1 operator by using Cockpit LOD-Objects. Unfortunately, we found out that placing the cockpit geometry in a RotationalBundle (which is required to make the marker actually move) causes the game to crash. As a result, we could not make the target marker only visible to the player operating the V-1.
There was an idea to replace the marker with an invisible object, but with a minimap icon that is only visible by the team. But then it turns out that minimap vehicle icons only show up when they are within a certain radius from your PCO, which makes the solution unusable for long distances.

Our last stand was to make ambitious, fully-realistic controls. The player would look at a table inside a bunker. On the table there would be a small target marker, that would move around the table in response to controls. Upon pressing 'm', the minimap would expand to cover the table and the marker. Then the marker would show exactly where on the map the missile would fall.
This, besides being obviously difficult and tedious to implement, also relies on player's minimap to be at last partially transparent. If the player sets her/his minimap to fully opaque, then the expanded map would fully obstruct the target marker, rendering the controls useless. It's also the most difficult of all methods so far.

We are stuck at this point. Do you have any suggestions or your own ideas? :D

EDIT: spelling.
Last edited by archer on Thu Jan 12, 2012 4:13 pm, edited 1 time in total.
dzn.battlefield.pl - my Bf1942 modding website
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: V-1 Targetting

Post by Dennis|8749236 »

a Simple easy solution:
ObjectTemplate.velocityDependentOnHeat 1
Well, that may make it unreal, but thats the only solution i can think about.
I already made a the Fi-103(V-1) work that way about half years ago.
And i got the same problem as you have.
But, what i do is put it in Battle Of Britain, it targetted at Factory, and let player to intercept it.

About your problem, i have no idea how to solve it perfectly, i guess you made a rotational bundle to control the flight(mines can turn in the flight, but it need lots of adjusting so i cancelled this feature)(i'm lazy =P).

The only solution that I think is good is, can make your Fi-103 a Player Control Object, but it only can fly straight, no rudder, no flaps, just wing. and when approach the target, the player will click right or left mouse button, which will enable the rotational bundle to turn the flaps, so the Fi-103 will head down and Caboom(the bad things is it the player will get uncredit kills unless you smash into a player directly)..

For the problem uncredit kills, you can have an another solution: add a firearm to the weapon instead of the a rotationalbundle. When player reach to its target, fire the firearm, and the firearm will spawn a projectile with exactly same StandardMesh (thats what i did in my own Mod, which is gone when my Computer is dead half year ago), and the PCO Fi-103 will self destruct, so only the Projectile left and make an credit kill(it works fine just...).
And the only problem is the death effect. I used EXPLBombSmallNS explosion effect for the Fi-103, but it explode too when you fire the firearm, which is unreal... I have no idea how to solve this problem.

=========== NEW IDEA!!!! =============
OMG, i forgot the tutorial i wrote today.
You can make a Spring and an invisible object. the invisible object is over the ground, the V-1 will fly high at same attitute as the invisible object, and only thing you need is move the collision object to your target. and when the spring of Fi-103 collide with the Object, the bounce force of Spring will force Fi-103 to dive, and thats it = D
The Method of Homing Missile XD
the way it work, is like this.
Download this file to see a picture of it = D
Pic.rar
The Picture of my New Idea by using Springs
(16.9 KiB) Downloaded 705 times
=========== Add ==========
Only thing you need to do to make ur missile to hit the target is to move that Invisible object.
That invisible object should be child of the rotational bundle of the Fi-103 Firearm, and it rotate in a circle, Player control the distance of invisible object to set the target coordinate. I think you can use 2 rotational bundle to make the invisible object move horizontally.
Is like 1 rotationalbundle head down, and 1 is up, the 1 is up hold the invisible object.
The bundle that head down rotate upward, and the 1 head up rotate downward, and keep the object moving at same attitute.


======= Another Add ======
In fact, the Fi-103 don't dive at the final trajectory. The real sequence is, it lower down the Brake, and slow the Fi-103 down, and it will fall gradually until it hits the ground.(The Engine stop working because it is falling downward and early Oil Supply system cannot work in that condition, so the engine will shut off, but the later version they fixed that problem.)
Thats why on the old video of Fi-103 attacking, the Fi-103 is like dancing and stalling when fells down. Also that is the reason why Fieseler AG put it's Fuse on its belly, because it lands with its belly first..


========== OMG!! So many ADD!!! ===========
Try use my Effect for Fi-103.
The Fi-103's Engine does not have trail but very long and flashing flame.
This effect requires a StandardMesh called called e_JetFire_m1 from BF1942's Expansion - Secret Weapon of WWII

Code: Select all

rem **************************
rem *** Effects for Fi-103 ***
rem **************************



rem *** e_Fi-103Beam ***
ObjectTemplate.create EffectBundle e_Fi-103beam
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
rem -------------------------------------
ObjectTemplate.addTemplate Em_Fi-103Beam_mesh
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 180/0/0
rem -------------------------------------
ObjectTemplate.setStartOnEffects 1

rem *** Em_Fi-103Beam_mesh ***
ObjectTemplate.create Emitter Em_Fi-103Beam_mesh
ObjectTemplate.template fx_Fi-103Beam_mesh
ObjectTemplate.lodDistance 500
ObjectTemplate.IntensityAtSpeed 10
rem ObjectTemplate.timeToLive CRD_NONE/0.1/0/0
ObjectTemplate.timeToLive CRD_NONE/0.07/0/0
rem ObjectTemplate.intensity CRD_NONE/11/0/0
ObjectTemplate.intensity CRD_NONE/110/0/0
ObjectTemplate.startRotation CRD_NORMAL/0/180/0
ObjectTemplate.noPhysics 1
ObjectTemplate.addChild 1
ObjectTemplate.looping 1

rem *** fx_Fi-103Beam_mesh ***
ObjectTemplate.create Particle fx_Fi-103Beam_mesh
ObjectTemplate.geometry e_Jetfire_m1
ObjectTemplate.timeToLive CRD_NONE/0.11/0/0
ObjectTemplate.size CRD_NONE/2/1/0
ObjectTemplate.gravityModifier CRD_NONE/0/0/0
rem ObjectTemplate.sizeModifier 1/0.7/2
ObjectTemplate.sizeModifier 0.4/0.7/4
ObjectTemplate.sizeOverTime 0/1|100/0.5
ObjectTemplate.alphaOverTime 0/0|100/0.2
What is the meaning of Life?? (Don't think about it!)
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re: V-1 Targetting

Post by archer »

Hi, thanks for your reply. I really appreciate your elaborate answer, your ideas are quite interesting. I'm afraid, however, that we misunderstood each other. The actual missile is already working perfectly, that is, it hits the chosen target just fine. I purposely didn't dwell into how exactly we made it work, so that it wouldn't obstruct our actual problem.

My actual question is how to allow the player to choose a target without giving them a god camera over the battlefield. If you reread my post you will notice that I list our approaches to this problem and why they didn't work.

If you are interested in how we made the actual missile fly and hit the target, then I can explain it in more detail later today. But that's a totally different problem, unrelated to my original question
dzn.battlefield.pl - my Bf1942 modding website
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: V-1 Targetting

Post by Dennis|8749236 »

Maybe is my english problem. But i'll try to make it clear

My Quote:
You can make a Spring and an invisible object. the invisible object is over the ground, the V-1 will fly high at same attitute as the invisible object, and only thing you need is move the collision object to your target. and when the spring of Fi-103 collide with the Object, the bounce force of Spring will force Fi-103 to dive
And you said:
Our last stand was to make ambitious, fully-realistic controls. The player would look at a table inside a bunker. On the table there would be a small target marker, that would move around the table in response to controls. Upon pressing 'm', the minimap would expand to cover the table and the marker. Then the marker would show exactly where on the map the missile would fall.
My method is: You move the Invisible Object by watching the marker moving on the table, and move it to the place whatever you want.(Player do not have God Camera, player will only watch the marker on the table)
And the Fi-103 will do the step i said. The Spring will bounce against that Invisible Object, so the Fi-103 will start to dive.

Also, i can give you a suggesttion, you can make the map fixed on the Texture. So you need to make a every single texture for each map(I dont think its lots of work, just Copy n Paste). Even a player have "sets her/his minimap to fully opaque", they already have a map on the table, the only thing they need to find, is the enemy, so, what he/she need to do is press "M" to check the Game Minimap, choose target, then close it and move the Marker =)

I can write a code about that invisible object on the launcher
It should be like this.

Code: Select all

ObjectTemplate.create RotationalBundle Fi-103LauncherRamp
ObjectTemplate.setHasCollisionPhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate Fi-103LauncherWeapon                 <--- Your Fi-103 Firearm
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate InvisibleObjectStretcher               <---- This is a bunch of Rotational Bundle so it can make the Invisible Object move in a straightline
ObjectTemplate.setRotation 0/0/0
rem -------------------------------------
ObjectTemplate.setMinRotation 360/0/0
ObjectTemplate.setMaxRotation 360/0/0
ObjectTemplate.setMaxSpeed 15/0/0
ObjectTemplate.setAcceleration 15/0/0
ObjectTemplate.createInvisible 0
You can see, they rotate at same time, so the Fi-103 will fly straight, and start dive when it hit the InvisibleObject that on the ramp.

=== Add ===
I'll start to make one to show you how it works, right now..
What is the meaning of Life?? (Don't think about it!)
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re: V-1 Targetting

Post by archer »

I appreciate your enthusiasm, but I've already said that the "marker-on-the-table" method is not acceptable, because it depends on player minimap settings being just right. It's also quite difficult to aim and counter-intuitive, so we need something better.
Placing the map texture on the table doesn't help, because the camera has a perspective distortion, which makes it impossible to align the textured map object with the "real" map.
We've spend hours playing with the marker-on-the-table method, we just couldn't make it work. That's why we're looking for something better, and that's the whole point of this thread.

I don't have problems writing scripts, I'm just looking for new ideas.

As for the spring on the ground, as I said, I already have something like that. The missile works. It really does. We're just looking for a better way to make the player know where they are aiming at. Because all the aiming methods I've described in my first post are either bad or impractical. I don't know how to explain it any better, I'm sorry.
dzn.battlefield.pl - my Bf1942 modding website
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: V-1 Targetting

Post by Swaffy »

With this engine, you might have to accept at least some level of unrealistic gameplay.
Personally, I think the "God camera" idea can work out well enough.

I don't really have an idea on what this stuff looks like in-game.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

archer wrote: There was an idea to replace the marker with an invisible object, but with a minimap icon that is only visible by the team. But then it turns out that minimap vehicle icons only show up when they are within a certain radius from your PCO, which makes the solution unusable for long distances.
Just as a notice, you can crank up the ViewDistance for the serverfiles only, it will affect the range of how long you can spot the minimap icons of a empty vehicle/pco.

edit: underlined "serverfiles" to distinguish the difference in modding techniques. the ViewDistance should be kept at standard value in the client files. this of course is only usable if you have separate server and client files.
Last edited by freddy on Tue Jan 10, 2012 11:32 pm, edited 2 times in total.
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re:

Post by Dennis|8749236 »

freddy wrote:
archer wrote: There was an idea to replace the marker with an invisible object, but with a minimap icon that is only visible by the team. But then it turns out that minimap vehicle icons only show up when they are within a certain radius from your PCO, which makes the solution unusable for long distances.
Just as a notice, you can crank up the ViewDistance for the serverfiles only, it will affect the range of how long you can spot the minimap icons of a empty vehicle/pco.
That works too but it may cause some lag..
because if you see more, then there will be more thing to be render at same time.

====

I take this back..


====
But i will keep working on it..

====
The rotionalbunlde works fine for me, but it got some problem on other things, got to test it =)
What is the meaning of Life?? (Don't think about it!)
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re:

Post by archer »

freddy wrote:Just as a notice, you can crank up the ViewDistance for the serverfiles only, it will affect the range of how long you can spot the minimap icons of a empty vehicle/pco.

edit: underlined "serverfiles" to distinguish the difference in modding techniques. the ViewDistance should be kept at standard value in the client files. this of course is only usable if you have separate server and client files.
This sounds very promising, we could use it to make the "minimap marker" method work! And it would have an extra advantage of warning your team that there is a V-1 going their way.
Are there any side-effects of increasing the ViewDistance in server files? Like bots going crazy or something?
Are there any other advantages of having separate server files?
Swaffy wrote:With this engine, you might have to accept at least some level of unrealistic gameplay.
Personally, I think the "God camera" idea can work out well enough.

I don't really have an idea on what this stuff looks like in-game.
I have no problem with "unrealistic", it's "unbelievable" that's bothering me. One does not simply walk into a bunker and become an almighty being that sees everyone, everywhere. It's not very credible even in modern standards (satellites have their share of problems,) not to mention the world war 2 reality. Things like that are bad for immersion, and once you can no longer suspend your disbelief, you care less for the game itself ("Satellite-guided V-1? Yeah, right, whatever")
I think that believability plays at least some role in a mod being successful. That's why "realistic" mods like Forgotten Hope are much more popular than "crazy" mods like Action Battlefield (anyone still remember that?)
dzn.battlefield.pl - my Bf1942 modding website
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: V-1 Targetting

Post by Dennis|8749236 »

The Viewdistance does not effect AI
The max range of AI/Weapon does.
The Bot actually see where you are, and if you are in the range of there weapon (which is setted in AI/Weapon.con), they will fire at you, if you just edit the ViewDistance, the Bot wont do anything wacky (when i start modding, i changged the maxrange value in AI/Weapon very large and i always dead even the bot are in fog)
"Are there any other advantages of having separate server files?"
I dont know, i never open a server before, but what i'm sure is the server files cannot have too much difference than client file.


Another question: what is "perspective distortion" ?
What is the meaning of Life?? (Don't think about it!)
Post Reply