It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
Azrapse: Nice work!
I wouldn't have known where to even start to make those experiments!
Did you give an A-Wing an exact amount of hitpoints so that it would pop after exactly a particular amount of shots? Where were you seeing the exact amount of damage dealt?
Thanks!
Yes, I use XW SE 5.0 (where you can extract and modify all craft data), I set the A-wing's hull to say 500. One shot, it pops. Then I set it to 501, one shot, NO pop.

I'm reworking the table because the targeting computer makes errors(!), now I'm experimenting with laser and ion speeds & ranges. The data differs considerably from my previous findings, stay tuned!
New weapons data with new experiment methods. NOT relying on targeting computer, it cheats! :-)

- Speed is now in game units
- it seems that ion blast's speed had a mistype 345 vs. 375. haha.
- observed range in distance may be different then theoretical due to length of blast.
- laser's speed is about 450 m/s!

The targeting computer cheats!!
- it thinks laser has a range of 1.33 km, this should be based on the speed=1000 and lifetime=3 -> range=1.3333. Of course, due to length of laser blast it is possible to hit a target at 1.375km , probably 1.38 km is possible.
- low yield laser lasts 2 second instead of 3 but the computer doesn't corrects its indicaton. It is possible that computer indicates a hit, but it will NOT be unsuccessful!
- ion cannons just works crap. Computer indicates a hit at 0.46 km, but range is at least 0.85 km. Pretty bad.

Any more questions?
Attachments:
Post edited July 05, 2015 by Sekir_Delyn
avatar
Sekir_Delyn: New weapons data with new experiment methods. NOT relying on targeting computer, it cheats! :-)

- Speed is now in game units
- it seems that ion blast's speed had a mistype 345 vs. 375. haha.
- observed range in distance may be different then theoretical due to length of blast.
- laser's speed is about 450 m/s!

The targeting computer cheats!!
- it thinks laser has a range of 1.33 km, this should be based on the speed=1000 and lifetime=3 -> range=1.3333. Of course, due to length of laser blast it is possible to hit a target at 1.375km , probably 1.38 km is possible.
- low yield laser lasts 2 second instead of 3 but the computer doesn't corrects its indicaton. It is possible that computer indicates a hit, but it will be unsuccessful!
- ion cannons just works crap. Computer indicates a hit at 0.46 km, but range is at least 0.85 km. Pretty bad.

Any more questions?
Really nice! Also, I was about to ask about the length of the lasers, but you read my mind. :D
Thank you so much, and for now, I have plenty of data to work with.
I still have lots work ahead with the AI. I'll keep you all informed.
avatar
Azrapse: Really nice! Also, I was about to ask about the length of the lasers, but you read my mind. :D
Thank you so much, and for now, I have plenty of data to work with.
I still have lots work ahead with the AI. I'll keep you all informed.
Your welcome!
I'm really interested in the project! Thinking about to do the same, but I lack of programming knowledge to this level. AI bugs me the most! How can you replicate that?
avatar
Azrapse: Really nice! Also, I was about to ask about the length of the lasers, but you read my mind. :D
Thank you so much, and for now, I have plenty of data to work with.
I still have lots work ahead with the AI. I'll keep you all informed.
avatar
Sekir_Delyn: Your welcome!
I'm really interested in the project! Thinking about to do the same, but I lack of programming knowledge to this level. AI bugs me the most! How can you replicate that?
Oh, i just remembered that the main reason that started this series of posts, the Roll and Pitch ratings, we still don't have proper meaning for those ratings.
Also, do you have any way to test the speed, lifespan, and damage of capital ship's lasers? I think they are longer, last longer, and maybe deal more damage?
Also, do capital ships shoot different kind of lasers against fighters than against other capital ships?

About your question on the AI:
I posted some diagrams a while ago about what I had planned to do. Well, most of those became actually much more complex than I expected.
I have divided the AI in two layers: flightgroup and individual ship.
Flightgroups have a set of orders given to them in the mission file. It tells when do they come in, when do they go away, how many waves, if they are part of the player's goals and how. But most importantly, they have an order given, and a primary and secondary objectives.

Depending on their flightgroup's order, a ship gets whay I call a "flightplan". A flight plan is a non-deterministic finite automaton that gets assigned to the flight group at mission start.
For example, there is the "Attack Enemies" flightplan. Or the "Fly home" flightplan. Or the "Close escort" flightplan.

Each flightplan has a number of states, with transitions between them. When a ship AI needs to "think" what to do next, it checks the state it is currently at in the flightplan. Then the state tells her what game action to perform immediately, and which condition must be matched for the state to consider itself finished, and move onto one of the next states in the flightplan.
If you aren't lost by now, let me put an example. Currently, I have a test mission that I use while I am coding the AI engine. It is the Collector's CD-ROM edition of the Y-Wing Historical Mission 6: Rescue Ackbar.
In that mission, Red 1 and Red 2 are two AI ships whose orders are Attack Enemies.
The flight plan for Attack Enemies is something similar to:
- If you have no target, choose one. Based on "Attack Enemies" and Flightgroup RED primary and secondary objectives, I choose the closest enemy. It selects T/F Alpha 1.
- If you have a target, fly to combat range. The AI determines what the combat range is based on the weapon of choice. Because Attack Targets, and its target being a fighter, it selects the laser cannon. The laser cannon reports that at its current speed and laser charge, the combat range starts at 1.66 km from the target. So the Y-Wing flies until it is at that distance from the target, then moves on to the next state.
- If you have a good shot, shoot. The default AI routines always try to aim the ship to the trajectory of the target. Later on, I plan to modify this to accept different AI difficulty levels (Rookie, Veteran, Ace...), so that Rookies aim at where the target is, while Aces aim at where the target is going to be. Currently, all my AIs are Aces, so the Y-Wing fine tunes its bearing to aim at where the target is, plus the target speed vector multiplied by the time the laser will take to reach the target. This is the equivalent of the player waiting to get a lit targeting reticle. If the Y-Wing is close enough to this ideal bearing (there is a margin of error), it shoots its weapons.
- If you are too close, prepare another attack run. If the AI determines that it has reached too close to the target, in particular, if the distance between them is less than 100 m or so, it moves away from the target until it reaches again half the max distance of effective combat range.

This automaton is not linear, but there are multiple transitions between those states, because at any moment, for example, the target might be destroyed, hyper out, etc, then the AI jumps back to the first state, or whichever is a good candidate.

I'm not sure if you were actually interested on this wall of text. But basically that will give you an idea of what I am doing right now, and why I consider this to be the hardest part of the game. You need to get these behaviors right so that the game feels like X-Wing and not some other game. And there are many conditions, variants and mission orders. Even if I worked 8 hours a day on this, it would take me several months to complete only this part. So patience. :)
avatar
Azrapse: Oh, i just remembered that the main reason that started this series of posts, the Roll and Pitch ratings, we still don't have proper meaning for those ratings.
Also, do you have any way to test the speed, lifespan, and damage of capital ship's lasers? I think they are longer, last longer, and maybe deal more damage?
Also, do capital ships shoot different kind of lasers against fighters than against other capital ships?

About your question on the AI:
That explanation was just fine, now I get the point! Very well done! It gave me urge to try this out. :-)

I'd like to add my observation on AI levels. For me it seems that all AI does the same thing expect lower ones does them just slower. Like a top ace using its craft's manouvering capabilities to its limits, whlie rookies adjusting their course to say 1/5 speed. I have a plan to observe this more closely as well.

Okay, for your request: i can set up an environment to test roll and pitch ratings in the game, so I can provide you some data. Like, how much it takes to get a full turn, then divide it, see if the data is proportional to other crafts, and so on.
Next thing I wanted to test out is enemy fire, because I had a very very disturbing experinece! I hacked myself into a cockpit of a TIE Fighter (yes, in the x-wing game!), and found out what I knew of laser fire is just not true! Slower blast speed, less damage, and so on! A complete new test will be needed!
Capital ship fire: I don't think so there is a difference against fighter/capital. But there's another disturbing factor in the data I extracted with XWSE50. Somehow I'll have to deal with that one as well.

First things first, I'll give you the data on roll/pitch speeds after I ran the tests!
avatar
Azrapse: Oh, i just remembered that the main reason that started this series of posts, the Roll and Pitch ratings, we still don't have proper meaning for those ratings.
Also, do you have any way to test the speed, lifespan, and damage of capital ship's lasers? I think they are longer, last longer, and maybe deal more damage?
Also, do capital ships shoot different kind of lasers against fighters than against other capital ships?

About your question on the AI:
avatar
Sekir_Delyn: That explanation was just fine, now I get the point! Very well done! It gave me urge to try this out. :-)

I'd like to add my observation on AI levels. For me it seems that all AI does the same thing expect lower ones does them just slower. Like a top ace using its craft's manouvering capabilities to its limits, whlie rookies adjusting their course to say 1/5 speed. I have a plan to observe this more closely as well.

Okay, for your request: i can set up an environment to test roll and pitch ratings in the game, so I can provide you some data. Like, how much it takes to get a full turn, then divide it, see if the data is proportional to other crafts, and so on.
Next thing I wanted to test out is enemy fire, because I had a very very disturbing experinece! I hacked myself into a cockpit of a TIE Fighter (yes, in the x-wing game!), and found out what I knew of laser fire is just not true! Slower blast speed, less damage, and so on! A complete new test will be needed!
Capital ship fire: I don't think so there is a difference against fighter/capital. But there's another disturbing factor in the data I extracted with XWSE50. Somehow I'll have to deal with that one as well.

First things first, I'll give you the data on roll/pitch speeds after I ran the tests!
What happened in that TIE Fighter that was so disturbing?
avatar
Azrapse: What happened in that TIE Fighter that was so disturbing?
As I mentioned: laser fire was not I used to. Slower shots, less damage.
Finished!

Pitch/roll was waaay harder to figure out, but finally!

Roll rate: ingame value is actually 2 bytes data, not 1, what we thought of, but no bother with that.
Formula: Roll rate = ingame roll rate * 3.125 [ degrees / second ]

HOWEVER! There's a catch! It caps az 150 deg/sec at value 48! (150/48=3.125). Beyond ingame value 48 everything will result in a 150 deg/sec roll.

Pitch rate is the same as roll rate: 2 byte data.
Formula: Pitch rate = ingame pitch rate * 3.9 [ degrees / second ]

Cap is 62.4 deg/sec at ingame value 16 (62.4/16=3.9). Values bigger than 16 will result in a pitch rate of 62.4 deg/sec, no matter what.

One question reamined only: data of the T/A, contains errors...
avatar
Sekir_Delyn: Finished!

Pitch/roll was waaay harder to figure out, but finally!

Roll rate: ingame value is actually 2 bytes data, not 1, what we thought of, but no bother with that.
Formula: Roll rate = ingame roll rate * 3.125 [ degrees / second ]

HOWEVER! There's a catch! It caps az 150 deg/sec at value 48! (150/48=3.125). Beyond ingame value 48 everything will result in a 150 deg/sec roll.

Pitch rate is the same as roll rate: 2 byte data.
Formula: Pitch rate = ingame pitch rate * 3.9 [ degrees / second ]

Cap is 62.4 deg/sec at ingame value 16 (62.4/16=3.9). Values bigger than 16 will result in a pitch rate of 62.4 deg/sec, no matter what.

One question reamined only: data of the T/A, contains errors...
Awesome work!
I have some questions, though:

If the maximum rating is 48 and 16, why two bytes are necessary for that?
I guess you are looking at the particular offsets in BFLIGHT.OVL?
What about a Yaw rating? Why there is no yaw rating if it's clear that the ships actually yaw when you press right or left (with a mix of roll).
And by the way, when pressing right or left, it yaws and rolls in which proportions? It feels a bit like 2:1?
Kindly, scotsdezmond figured out that it performs an almost closed loop, that misses by 5 degrees from being perfect.

I don't have an hexeditor and the game files here right now. What values hold the T/A? Maybe the devs entered just whatever knowing that it would use the capped ratings that you found out?
avatar
Azrapse: Awesome work!
I have some questions, though:

If the maximum rating is 48 and 16, why two bytes are necessary for that?
I guess you are looking at the particular offsets in BFLIGHT.OVL?
What about a Yaw rating? Why there is no yaw rating if it's clear that the ships actually yaw when you press right or left (with a mix of roll).
And by the way, when pressing right or left, it yaws and rolls in which proportions? It feels a bit like 2:1?
Kindly, scotsdezmond figured out that it performs an almost closed loop, that misses by 5 degrees from being perfect.

I don't have an hexeditor and the game files here right now. What values hold the T/A? Maybe the devs entered just whatever knowing that it would use the capped ratings that you found out?
2 bytes: 48 possible choices give you an increment of 3.125 deg/sec, with the second byte you can fine tune it. No additional value to our business, devs didn't use it.
Yes, I am extracting raw data now from bflight.ovl, I just wrote a program to figure out values for T/A.
I have no idea on yaw at the moment, probably your idea is right of mixing the pitch/roll. Figuring this out from the code is beyond me. I'll let you know if I find a way around.
Yes, scotsdezmond's finidig is interesting, but I can not confirm it. It seems it can end of that closed loop below and above starting point as well. Cause is unknown.

Two ships has an error in bflight.ovl: FRG and T/A. Correct data on those:
Accel,Roll,Pitch
FRG: 10,8,2
T/A: 10,50,24

Of course, T/A caps. Interesting, that the error in the field of T/A's acceleration (0) gives you 255 or similar. Very fast!. :-)
I have found something in bflight.ovl which indicates there were plans to use a yaw data. It is not consistent, so right now I can support you with the data of my experiments.

Yaw rates
X-wing: 97.7
Y-wing: 61.2
A-wing: 106.8
B-wing: 78.8
TIE Fighter: 105.9
TIE Interceptor: 105.9
TIE Bomber: 105.9
Assault Gunboat: 106.5

Clearly, there is a cap of 106 degrees/sec

My input device is joystick, keyboard acts waaaay slower. But I believe, the devs intented to take full advantege of the A-wing's high maneuverabilty, so consider the cap somehow else.

I think the overall roll cap is 150, of course, using A-W's 60 makes the multiplier 2.5 instead my experimented 3.125.
Pitch should use a multiplier of 3.5, makes A-W's 18 to 63 deg/sec, which is a pretty close guess.
You should do the calculations for adjusting yaw rates.
How did you correct the values for the erroneous fields?
What offset are you reading Yaw from? I have never seen any tool in the past providing that data! Incredible. :)

I have been researching, and the AI routines are stored also in BFLIGHT.OVL. However, I am not such a good reverse engineer to be able to decipher them. At this point, it doesn't matter much, as I am halfways thru reimplementing them, anyway, although with the inconvenient that everything must be inferred from observing empirical data.

One of those observations about the AI is the kind of turns that the AI ships do.
I am not sure if I am seeing more than what there is, but it seems to me that TIEs and the Assault Gunboat, while dogfighting, they try to put some distance between them and you, then they do a 180 yaw turn to face you.
As a contrast, I don't think I have ever seen an X-Wing, Y-Wing or B-Wing do that. They perform more like a climb and do half a loop to face you.
At the beginning I was thinking that maybe the devs programmed different styles for the different ships to give more flavor and variety to the game. But I wonder if it is just a general criterium followed by the AI based on the knowledge of its own ratings. Basically, what kind of turn in the ship would be fastest.

I need to observe more, tough, because the numbers don't seem to back this theory, unless it is based on some weighted formula (that I believe I read in some technical document about the game, was something like Roll+2*Pitch, or similar, but I cannot remmeber seeing Yaw there)
Post edited July 03, 2015 by Azrapse
Holy smokes, so this is actually happening?

Granted no publishers/dev groups are touching a modern-ish replica of these games, so it might as well be up to fans to make it happen.
Post edited July 04, 2015 by thehawkness
avatar
thehawkness: Holy smokes, so this is actually happening?

Granted no publishers/dev groups are touching a modern-ish replica of these games, so it might as well be up to fans to make it happen.
It's slowly happening. :)
The goal is to serve as a community patch or mod for the GOG editions of this game (or the others), not attempting to make an independent product.