Creating a computer-aided version of WCTO

Discussion in 'Wing Commander TacOps' started by Avacar, May 27, 2010.

  1. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    Hm... I'm still pondering whether auto-point defense for turrets is a good idea or not. This will only work for missiles that are headed for the ship using point defense, right? Or do turrets auto-fire on any (enemy IFF?) missiles in range?

    Will do. I just hope I don't run out of missiles anytime soon, else you'd have to patch some more in. ;)

    Goody! Since the missile QuailPilot noticed is still there, I guess this only works in future turns, right?

    With so many things going on, that's hard to tell, but at least there were no explosions or any other possible "non-objects" at that time. Do missiles or chaff count as non-objects?

    Okay, I just thought it might be easier to do it the other way - if it's not, don't bother. The list is fine (and probably better in the long term anyway).

    Well, I'd settle for an overpowered Sabre myself. :p At least I could test chaff, torps, turrets and afterburner movement (evasive action) that way.

    Not sure if we don't need any more phase 4 testing... I guess we should still keep an eye on those bugs that keep coming up, but if we can do all the work in phase 5 as well, then everything's fine with me. Maybe we (as beta testers) should keep track of our in-game orders, just in case something goes wrong.
  2. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    It's there again:
    "Fatal error: Call to a member function submit() on a non-object in /home/agespast/www/www/avacar/phase4/move_phase_engine.php on line 196"
    And this time, I think it's here to stay... I didn't do anything special - just your usual movement orders, a speed decrease for the Ralatha, banking for the Sabre, an Immelman for one of the Epees, and that was about it. Strange... :confused:
  3. Wedge009

    Wedge009 Rogue Leader

    Messages:
    9,952
    Likes Received:
    9
    Trophy Points:
    59,385
    Gender:
    Male
    Location:
    Sydney, Australia
    Yep, the missile has got lost somehow.
  4. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    So yes, I should have been clear; I didn't go retroactively run the board cleanup routine on the game. On the next phase change, those missiles should vanish. It shouldn't even need to wait for the turn. If they don't, let me know and I'll poke at it more.

    Hmm, oops. Now that you mention it, I may have forgotten to make sure the targets were only missiles. That said, here is how it works:
    1. The turret must have reserved fire. (Reserved Fire is automatically assumed during Combat Phase if there had been no valid turret targets)
    2. At the moment, the turret fires at the first enemy IFF missile it sees; it doesn't necessarily have to be coming in at the ship itself. I suppose self-defense should be the first priority. Shall I update this?

    Replenishing missiles/hp/shields/chaffs/afterburners is way easier than adding ships themselves!


    Well, at the moment, any child of the 'indicator' class would successfully go through. This means that missiles, ships, asteroids, flak, and explosions should all pass the 'object' check. This is likely coming up because a destroyed object has gone null instead of being replaced by an explosion or something. Does this usually happen after something blows up (or maybe when a missile has smashed into something?)

    Actually, knowing your orders (what you think you ordered) would help a lot with debugging since I can compare that vs. what the game thinks you ordered. I'd prefer, though, if we didn't spam this particular thread with that, so maybe we should open another thread for just order posting in the form of game/turn/phase: ship name: orders

    Edit: On a side note, what do you guys think of the improved turn navigation system of Phase 5? Is it working for anyone? It isn't 100% done. When I next have time to code 'new' features, I'll add an 'update' button which would be the same as refreshing the turn selection list (in that it would run the engines if all orders are in) as well as an auto-countdown to do such a refresh automatically.
  5. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    Yes, please! It should be a last-ditch effort to stop a missile, instead of demonstrating just how trigger-happy your turret gunner is. :p

    A lot of missiles hit their targets without this error cropping up, but maybe it only affects a special class of missiles... Torps, maybe? I can only take wild guesses here, since I'm not familiar with your code (or php in general), but I'll try to provoke this error once again and see what might cause it.

    I guess it would suffice if we just include our orders when something goes terribly wrong... Or would you rather have a complete log?

    Turn navigation seems to work for me, although I have to admit I didn't even notice the update (still doing all my testing in phase 4).
    Minor gripe: Personally, I'd like it better if the menu bar items would stay at the top all the time, while the account, field report and turn navigation open up below. ;)
  6. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    That was fast... Fatal "non-object" error on line 138. I didn't fire any missiles this turn (don't know what other people might have ordered before, though). The Rapier and Delta 2 had an "Orders" button, but without any valid targets showing, so I only fired the Drakhri's lasers at Tango 3 and Tango 3's port turret at the Drakhri.
    Phase 5 seems to work well, by the way...
  7. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    And again, non-object error. Seeing that there was a missile in the far right bottom of the screen (way off the grid), could it be that this has something to do with it? I know it should classify as an object, but then again, it shouldn't be there in the first place. ;)
  8. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    I don't think the non-object error is related to the missile... that said, have you completed a turn since I announced I "fixed" the board cleanup issue? The missile should have vanished in that case. If it hasn't, then the board cleanup routine is broken.

    I haven't had time to do any coding this weekend/week; busy IRL. Hopefully on Thursday I can look into this non-object issue, and certainly the board cleanup issue if it exists.
  9. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    Not sure about that non-object error, especially since I noticed it's present in game 1 as well! Only in phase 4, though - phase 5 works perfectly. (Except for the missile - I'll try if I can make it disappear in phase 5. Phase 4 seems to occasionally work, but it's the same non-object error again after I finished the current CP.)
  10. Wedge009

    Wedge009 Rogue Leader

    Messages:
    9,952
    Likes Received:
    9
    Trophy Points:
    59,385
    Gender:
    Male
    Location:
    Sydney, Australia
    The missile is still present in the current phase (as of writing, turn 53, phase 3).
  11. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    New warning showing up in turn 53 EP:
    "Warning: Invalid argument supplied for foreach() in /home/agespast/www/www/avacar/phase4/weapon.php on line 195"
    Not sure what caused this... I gave no orders in this EP (ignoring all tailing opportunities), and there was just one FF missile fired from the Sabre (supposed to be deflected by the Ralatha's phase shields).
  12. Wedge009

    Wedge009 Rogue Leader

    Messages:
    9,952
    Likes Received:
    9
    Trophy Points:
    59,385
    Gender:
    Male
    Location:
    Sydney, Australia
    Can you give a link or screen shot to that, please? I can't seem to reproduce that problem, on mine or Avacar's test sites.
  13. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    most of those warnings are not reproducible without hacking because they are being generated by the actual processing engines, which each get run only 1 time for a given turn. I can force them to be re-run which would reproduce the warnings.

    I'll be back to coding probably tomorrow, and I'll first look into the board cleanup issues, and then these applications on non-objects of functions. Maybe they're even related.
  14. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    My favorite "fatal error" seems to be appear everytime I submit orders and hit F5 to refresh the game turn list... Sometimes it's gone if you try it again after a while, though.
    Oh, and I think Delta 1 is stuck. Perhaps it's just my subjective feeling due to the above error after every phase, but I'm under the impression I haven't been able to issue movement orders to this Epee for quite some time now... ;)
  15. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    Okay, I could have sworn I addressed the missile issue, but all the code I wrote seems to have vanished in that regard. That said, I tracked down the source of the non-object messages (at least this time) and it seems to have been the semi-built board cleanup code trying to submit a now non-existant missile.

    Hmm, that doesn't read very clearly. The bottom line is, phase 4 should now eliminate missiles that go off the board, AND should not have the current non-object bug.

    This does require testing; try to fire a missile off the map if possible, see if it goes away.

    This brings up another issue: why didn't the missile 'rot' away after its lifetime ran out? Looking into that now...

    [later]
    Okay, I think missiles will rot from timer again. Looks like while fixing some of the missile damage reporting issues and point defense issues, I moved the missiles to a condition where they didn't rot.

    Sorry it took me so long to get to these issues, guys! This doesn't mean I've solved the "warning: invalid argument" bug yet though, as I haven't tried to reproduce it. Who knows? Maybe it was related too.

    Still need a verdict on whether chaff works even though it doesn't report.

    edit: note: changes are for phase 4 only
  16. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    Okay, again phase 4 only for now, I've finally hacked in the first cut of an 'incomming: ' warning for missiles on a ship. We'll need some missiles to be shot to see if it registers. I also am not sure if it'll pick up on FF's or not. Frankly, I more or less definitely expect the missiles, when listed, to completely break the slide-out's layout, as they'll likely overflow.
  17. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    I guess this error is reproducible, since I've had it repeatedly and it stalls game play right now, but I'll include a screenshot anyway. You can't "Report Orders to Command" right now. After you click the button, the "Orders" button will still be there in the ship's info screen.
    Also, in the detailed info slide, there's "None" twice in the "Incoming" section, one written in yellow and the other in white - might be hard-coded text from before (?).

    Attached Files:

  18. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    Okay, found and cleaned up this issue. Obviously it was related to my most recent fix.

    I also merged all the phase 4 changes into phase 5.
  19. Ironduke

    Ironduke Spaceman Staff Member

    Messages:
    670
    Likes Received:
    0
    Trophy Points:
    50
    Location:
    Germany
    Check out turn 57 MP: One FF missile got fooled by a chaff pod, so it seems to be working. Another one (or was it the same?) has left the combat area without disappearing outside the hex grid, so this seems to work as well. I'm just curious as to what happened to the HS missile chasing Tango 2 - I released a chaff pod as well, but there's no notice about that. Maybe the missile just missed its target and there's no report about this yet?

    Oh, and chaff pods haven't been substracted from the Broadsword's and Rapier's payload...
    The incoming missiles seem to register as they should. Although I'd advise abbreviating them to just "HS" and "FF," adding a count where needed ("2 FF, 1 HS").
  20. Avacar

    Avacar Commodore

    Messages:
    742
    Likes Received:
    2
    Trophy Points:
    16,035
    Sorry guys that I've been AWOL for the last week or so. Things are getting very busy IRL; at this point, we're way past how long I thought this would take me to build it when I first said I would back in the Spring. My timeline that I published in September predicted a full release of a playable version by 'mid october' for a reason: I knew I was going to get really busy in late october!

    As it stands, in addition to everything else I do IRL (which I guess I've never gone into here), I happen to be the chairman for a conference that is happening the weekend of November 4th-7th, which has ~250 people in attendance. As we're now in the last 2 weeks out from said conference, I'm getting progressively more and more busy with that until it is done. As such, WCTOO has been on the backburner.

    I actually think I might have a bit of time this week to toy with it, but I don't know how much. Hopefully I can at least figure out what is going on with Quailpilot's ships over in Game 3, and take apart turn 56EP from game 2 to figure out what is going on with chaff and missiles.

    Anyway, if I do end up falling silent again, that's probably what happened, and expect to see me pop up again in the post-November 7th time frame to try and wrap up what we need to make this "fully playable" (where fully playable basically means Game-3 like setups with no additional interaction from me besides setting the game up unless I happen to be playing too).

Share This Page