Creating a computer-aided version of WCTO

There was no need for the announcement, I've yet to even start making any contributions. x.x

The image of a Fralthra attempting an Immelman manoeuvre popped into my head after reading all that. It just seems so... ludicrous. (:
 
I've committed a few things - check the logs to see what's changed.

Only thing I haven't committed from my local copy yet is phase4.php. I still need to get the pop-up windows working in standards mode (which could be quite tricky).
 
I'm pleased to say I was in the middle of a relatively significant coding session on the project (had about a dozen files open and with edits) when I saw your post. I did the 'svn update' and was able to seemlessly bring in your corrections without impacting my work. All hail SVN.
 
Well, yeah, that's what any decent source code version control system should do. (:

And if any conflicts occurred, it should be easy to see where they were and deal with them.

Of course, given that I'm only working with the HTML code, it shouldn't be surprising most of our changes should be separate to each other.
 
I committed some more changes, the details are in the logs. Basically, we have standards-compliant HTML output now. I've only really thoroughly checked it in Gecko, but a quick look at the other browsers suggests the HTML is fine for their layout engines too. The next thing for me to work on is the proprietary CSS code, but I probably won't do that until I've had a chance to finish digesting all the CIC birthday updates. (:

One last thing, Avacar: could I encourage you to use the generic block-level element <div> and in-line element <span> when doing presentation formatting? Paragraph tags, <p>, are for... well, paragraphs. And you can't nest them like you were doing before. Well, at any rate, the code I committed fixes that now, I'm just letting you know for future development.
 
Thanks for the help Wedge; it was doing what I wanted, so I wasn't bothering with standards, but it is great to have you on the team to catch these errors!


That said, I am pleased to announce the Movement Phase Engine is "done". It can't handle capital ships, with their multi-turn acceleration/movement yet, but everything else works. I am releasing a limited time alpha test of it. This test is limited because it is accessing the real game data, and I'll need to take it down to start work on the combat engine in a few days... I also effectively 'hacked' the game to allow a non-logged in user to fly any ship. It is also still missing some game-level navigation controls, so you'll need to use your browser's back button to get to the "turn" menu. I've deactivated the concept of 'phases' for the purposes of the demo only (they actually work great in the real version I'm working on). This means that each turn has *only* a movement phase.

Okay for those that don't follow the project closely and just want the beef:
You can go play with the movement engine now, and fly 2 ships! Please report any
bugs or behaviour not predicted by the rules here. Oh, and please don't fly off the map for
now, or I'll need to spawn a new ship, or have someone guess/fly back on (since map-edge-death isn't in place yet).


Ironduke: I need a capship in the database, along with its graphics files, ASAP please.
 
Ironduke: I need a capship in the database, along with its graphics files, ASAP please.
Consider it done. I'll send you the files now and add the Bengal to the database. I'll probably do some more capships while I'm at it. Once I'm finished with all ship graphics, I'll send you one big zip file.

Oh, two things I noticed while playing around with the movement orders: The Rapier's speed is always displayed as 0, and the difficulty is always some number - even if I'm not trying to perform any maneuver at all.

And one more graphical issue: Try to put the info pop-ups one layer above the actual ship graphics. It looks weird if the ship is on top of the info screen... :)
But otherwise, this is getting better and better! :cool:
 
And one more graphical issue: Try to put the info pop-ups one layer above the actual ship graphics. It looks weird if the ship is on top of the info screen... :)
But otherwise, this is getting better and better! :cool:

Hmm, I actually put the pop-up under the ships intentionally. It solves an interface issue for me, but I probably need to re-write the mouse-over/popup code anyway to make it less sensitive (see previous discussion with Wedge in the other thread). At the moment, the idea is that there is a slight overlap, so that when you mouse-over a ship, your mouse is already on top of the pop-up (the pop-up closes when you mouse over it and then out of it). These are design choices that can be changed, however.
 
And a first quick update to the movement demo: the dialog boxes now have working 'close' buttons. I had always wanted these, but had a programmatic issue getting them working. I accidently solved it earlier today, and I realized the connection a few minutes ago. 2 lines of code later, and they work great!
 
Ship Entry Form (phase3 issue) has been updated to allow 3 characters in the acceleration field. I also remembered to make turn rate and acceleration floats instead of ints in the database!
 
Oh, two things I noticed while playing around with the movement orders: The Rapier's speed is always displayed as 0, and the difficulty is always some number - even if I'm not trying to perform any maneuver at all.

Good catch on the rapier. The problem was also true on ferret, apparently. Basically, the 'regular movement' command wasn't updating the speed, whereas hard_brake was.

Fixed (I think).
 
Hello again. I think this will be the final development update from me for the time being.

I've finished tidying the CSS code, splitting IE and other proprietary code into their own files. ie.css is selectively included using IE's conditional comments and proprietary.css is automatically imported by phase4.css (it just makes it easier to validate the code when all the proprietary stuff is put aside).

Only the alpha filter is in ie.css at the moment, but at least it won't interfere with non-IE browsers now. Surprisingly, the current WebKit, Presto (Opera 10.61), and KHTML (4.5.0) engines handle the CSS3-standard border-radius selector just fine, only Gecko is stuck using its own -moz-border-radius at the moment.

I've also added the 2D-transform for Presto-based browsers, to tilt the Details/Hide box in the pop-up window by 90 degrees. It's available, so let's use it.

Finally, the most obvious change will be the background colour on the pop-up window. It's available for all browsers now, but the caveat is that I could not get the linear gradient override to work if the background image is present. I think at least having a background for the text to be visible against is preferable to having a transparent background with a background image. So Gecko and WebKit will have their fancy gradient background while the others will have a standard, plain colour fill for a background.

I hope this will make future development easier. I'll keep watch on progress to see if any more work needs to be done.
 

Attachments

  • firefox.png
    firefox.png
    967.2 KB · Views: 151
  • chromium.png
    chromium.png
    998.2 KB · Views: 159
  • opera.png
    opera.png
    920.8 KB · Views: 162
  • konqueror.png
    konqueror.png
    923.2 KB · Views: 149
  • ie.png
    ie.png
    822.9 KB · Views: 160
Thanks wedge, this is awesome! I'll probably need you to do similar cleanup to the 'submit orders' windows once they are all in place.
 
Sure. Like I said, I'll go over things again when updates happen.

Speaking of which: is there something special in your directory that makes the Orders button appear differently? Mine only has the standard grey button.
 
You probably need to upload the newest ship_popup.js The fancy-ness is coming from the jquery and not the pure CSS.
 
Okay, i've finished coding capital ship movement (i.e. how to handle 0.5 and 0.3 for accel or turn radius) "in theory" but I haven't tested it yet. Code was fairly straightforward, but did involve adding yet another database field.

This also brought up an interesting rule question. The purpose of a 1/3 or 1/2 turn rate is to simulate these ships taking a long time to bank up and actually turn. Now let's look at the Clydesdale, for instance. This is a ship that has regular shields, therefore a DF can target it. DFs can only be targetted at ships that held course... so does the beginning turn or two of turn count as turning, and thus reduce DF accuracy? Realistically, I'd say no, since any ship that takes that long to turn is likely a slow enough/large enough target that shooting it with a DF is a no-brainer on the pilot... but that isn't officially clear in the rules. Thoughts?
 
You probably need to upload the newest ship_popup.js The fancy-ness is coming from the jquery and not the pure CSS.
I recognised that, and uploaded all of your updates including the JavaScript stuff. Or so I thought. Well, I suppose it doesn't matter too much as long as it doesn't hinder my efforts.
 
DFs can only be targetted at ships that held course... so does the beginning turn or two of turn count as turning, and thus reduce DF accuracy? Realistically, I'd say no, since any ship that takes that long to turn is likely a slow enough/large enough target that shooting it with a DF is a no-brainer on the pilot... but that isn't officially clear in the rules. Thoughts?
As long as there's no visible turning taking place in the game, the DF can be fired. So yes, your answer to this issue was right. I'll probably do a Q&A section for one of the next manual versions AFTER people have been playing for a while and questions like these turn up.

Also, things get interesting when you start a maneuver with a turn rate of 0.3, but then decide to turn to the other direction two game turns later. This would actually have to take 5 game turns instead of just 3 then. I guess your new database field is there to cope with this...? :)

And Wedge009: Thanks for cleaning up all the code! I'm sure it was some dirty work... :p (Considering what my own source codes look like.)
 
No worries, I enjoy that sort of thing. I didn't do that much, really: just remove/replace invalid code/syntax and make sure it matches the previous, quirks-mode stuff as best as possible + check for cross-browser consistency.
 
I fed the ship database with all of the remaining capships, except for bases and the Kamekh. There were two issues I encountered:
  • Shield strength seems to be set to a maximum of 2 digits. However, the Kamekh has 196 shield points, and the refinery 200.
  • When processing the "Confed Sector Base," the entry form gave out an error. Probably because there's already a "Confederation" in the database, or because I put in blanks in the name...? We'll have the same problem with the Kilrathi bases, so I left these out for now.
 
Back
Top