Creating a computer-aided version of WCTO

Wedge has also been busy this week, so there's no guarantees of anything in Phase 5 being at-all cross-platform safe yet...
I've been keeping up with it. The only thing I can't work around right now is the incorrect layering of the menu bar. The other browsers look okay to me except for one point: The menu bar has Account, Field Report and Turn Navigation in Gecko, WebKit and Presto, but is missing Turn Navigation in Trident and KHTML. I'm not sure if that's something to do with script handling or something - Turn Navigation is empty for the particular turn I was looking at: game 2, turn 38, phase 1.

Also, I'm not sure if you've committed everything necessary to the repository - the Objects drop-down box does not work in my copy - it's an empty menu. (I've recopied everything over just to make sure, the broken result is the same.)
 
I also noticed the turn navigation bar was present, but empty for some earlier versions of firefox as well (demo'ed on local friends machines).

I don't know if this matters, but we're using more and more jquery/ajax-style coding here. Each of those tabs is actually loading based on sub-programs, completely dynamically. Unlike most of what's been done before, which was single-scripted (aside from calling libraries) these are literally loading extra pages up to your browser for local insertion on-the-fly.

Hmm, you raise a great point about the objects box; I may have forgotten to add the files, let me check... no, it looks like I did update everything, I think. Please note that I actually edited some externally supplied core files that you may have overlooked uploading (notably the jquery-ui-1.8.2.custom.min.js and the jquery-ui-1.8.2.custom.css). In your copy it is empty; is it empty when you browse my copy? Wait, I know. One of my most recent updates put in a 'ROOTDIR' constant variable! I just browsed over to your branch and saw even the css wasn't working for me.

Okay, go edit your function.php and change the ROOTDIR define() at the top. Let me know if that fixes things?
 
I can't issue any orders to Bravo 1... The Kamekh seems to be overlapping it completely. :( (Speaking for phase 4 here - I tested phase 5 as well, but I guess I don't have any user rights there yet, anyway.)

Why don't you put some more fighters in phase 4, and I'll write an email to our former WCTO players. I'm sure some of them would like to hop in at this time! :)
 
I also noticed the turn navigation bar was present, but empty for some earlier versions of firefox as well (demo'ed on local friends machines).
When I said the menu bar was being layered incorrectly, I forgot to mention that this was happening in Internet Explorer. As for the missing Turn Navigation tab, I still have no clue as to why that is happening.

Each of those tabs is actually loading based on sub-programs, completely dynamically.
I did notice something like this happening because it does make HTML standards testing a lot more difficult. Would it be possible to have some sort of HTML dump function for debugging purposes? If that's too difficult, don't worry about it, we'll have to make do with what's available.

Please note that I actually edited some externally supplied core files that you may have overlooked uploading (notably the jquery-ui-1.8.2.custom.min.js and the jquery-ui-1.8.2.custom.css).
I did notice that these had changed (I always check the logs when doing a SVN Update, but this time it's my fault: the confusing directory structure meant I missed uploading the new JQuery CSS file. It seems to be working now.
 
I did notice something like this happening because it does make HTML standards testing a lot more difficult. Would it be possible to have some sort of HTML dump function for debugging purposes? If that's too difficult, don't worry about it, we'll have to make do with what's available.
In this case, coding it into the software is unecessary; there are external tools that let us see what is coming in from the Ajax; I use them to do my own debugging. The easiest one to use that I know of is called 'Firebug' it is an add-on for firefox. You can find it on the get firebug website, or just do an add-on search within Firefox. Once you have it installed, click the firebug icon on the bottom-right corner. Open up the 'console' tab (you may need to enable it). Then when you load up the page, you'll see GET and POST statements listed for anything that isn't part of the original page load. If you open them up, and go to 'response' you can see what is being sent back. If you right-click, you can 'copy response body' and get the entirety of the response, for submission into validation. This will also let you get a feel for which files are loading what. Hopefully this is what you're looking for.

I did notice that these had changed (I always check the logs when doing a SVN Update, but this time it's my fault: the confusing directory structure meant I missed uploading the new JQuery CSS file. It seems to be working now.

Yeah, I'm not keen on the existence of that custom-theme directory, but it is the default configuration for the jquery-ui add-on library to jquery. We could probably just move the file up a directory and change the css <link> tags.
 
I can't issue any orders to Bravo 1... The Kamekh seems to be overlapping it completely. :( (Speaking for phase 4 here - I tested phase 5 as well, but I guess I don't have any user rights there yet, anyway.)

Why don't you put some more fighters in phase 4, and I'll write an email to our former WCTO players. I'm sure some of them would like to hop in at this time! :)

Used Phase 5 to move them out (since I'm the pilot in truth on all current Phase 5 ships). Ironduke, if you want to send me a mock-up test scenario, I could always start a 'Game 3', and we could actually assign registered pilots to the various ships. Alternatively, just pick a few more fighters, and I can throw them into game 2 for use in the phase 4-style testing.
 
Ironduke, if you want to send me a mock-up test scenario, I could always start a 'Game 3', and we could actually assign registered pilots to the various ships. Alternatively, just pick a few more fighters, and I can throw them into game 2 for use in the phase 4-style testing.
Let's throw some more fighters into game 2 and wait how many beta testers want to register before creating another game. I'd suggest something along these lines:
1-2x Epee
1x Rapier II
1-2x Drakhri
1x Broadsword
1x Gothri
Should give us enough opportunities to test various things and have fun...

Oh, I've managed to get the Sabre and the Kamekh stuck again. Sorry 'bout that! :rolleyes: I thought that nifty feature from phase 5 might be working in 4 as well, but obviously, it isn't implemented yet. :p

A couple of observations I've made until that point:
- Turn 39 CP: The Sabre was able to target an IR missile/torp on the Kamekh, but not on the Ralatha. (Did I miss something?)
- Turn 40 CP: I could lock on the IR at the Ralatha, but not the torp - this seems correct, as the Ralatha is outside of the torp's fire arc. (As opposed to turn 39...?)
- Turn 41 MP: I noticed that banking is only possible across 1 hex. This is actually the way it is described in the 0.14 manual, but I remember having changed this during one of our last games. It's also in my internal "additions to the manual" file. According to the new banking rule, you'd be able to traverse more than 1 hex to the left or the right, as long as your fighter's turn rate allows for it. (So, 2 hexes for turn rate 2, 3 hexes for turn rate 3, always given that your speed is high enough.) This is not really a bug, since it's not yet in the manual, but I'm wondering if we should include this in WCTOO. Which leads me to another thought: Should we allow "homebrew rules" for specific games/scenarios? (Might make for a good testbed in the future...)
 
Let's throw some more fighters into game 2 and wait how many beta testers want to register before creating another game. I'd suggest something along these lines:
1-2x Epee
1x Rapier II
1-2x Drakhri
1x Broadsword
1x Gothri
Should give us enough opportunities to test various things and have fun...
I'll get on this in a minute, after I look at everything else here.


Oh, I've managed to get the Sabre and the Kamekh stuck again. Sorry 'bout that! :rolleyes: I thought that nifty feature from phase 5 might be working in 4 as well, but obviously, it isn't implemented yet. :p
Yeah, sorry about that. Believe it or not, while it is all cosmetics, there were some significant 'under-the-hood' changes from phase 4 to phase 5. None of them had to do with the game rules, but how the website itself displays the ships, and lays out the work was overhauled from what was created back in Phase 3. This isn't to say that any code was wasted in the past, only that I took what was a straight function, and turned it into more of a on-the-fly website script for use with ajax. Anyway, the point is, once I had done all that, it was much easier to build the mult-selector for overlapping ships directly into phase 5, and unfortunately, I would have to completely recode it to put it into the phase 4 branch. It'll have to be out of phase 4, so just try not to overlap the ships (or if you register a phase 5 account, I can make you pilot for debugging).

A couple of observations I've made until that point:
- Turn 39 CP: The Sabre was able to target an IR missile/torp on the Kamekh, but not on the Ralatha. (Did I miss something?)
Okay so it is out of IR range, but there was a bug in the code that had Torp's only having a range of 8 instead of 12. Fixed in phase 4.
- Turn 40 CP: I could lock on the IR at the Ralatha, but not the torp - this seems correct, as the Ralatha is outside of the torp's fire arc. (As opposed to turn 39...?)
Well see above about the range issue.. and yes, I made it so that missiles can't target missiles. I can change that, if you want...?

- Turn 41 MP: I noticed that banking is only possible across 1 hex. This is actually the way it is described in the 0.14 manual, but I remember having changed this during one of our last games. It's also in my internal "additions to the manual" file. According to the new banking rule, you'd be able to traverse more than 1 hex to the left or the right, as long as your fighter's turn rate allows for it. (So, 2 hexes for turn rate 2, 3 hexes for turn rate 3, always given that your speed is high enough.) This is not really a bug, since it's not yet in the manual, [...]
Yeah, I'm not a mind reader, especially over an ocean!;)
[...]but I'm wondering if we should include this in WCTOO.
Yeah, I can do it; it shouldn't take too much extra work, although it does add a whole new drop down option to the movement pre-engine. If you say 'go', I can get this coded in an hour or two of work.

Which leads me to another thought: Should we allow "homebrew rules" for specific games/scenarios? (Might make for a good testbed in the future...)
Well, at the moment, the game isn't built for this, per se, but I suppose I could segregate all the 'game code' files off into a directory, and put a game variable in the database that picks which 'rules' directory you read from. It could be doable. That said, you'd have to have someone (*sigh* probably me?) customize the game code modules for your 'homebrew' rules. Of course, I'm happy to open up the code to anyone who wants to mess with it.
Let's put this feature off, for now, until Beta 2 or Beta 3. Remind me then, if you're still interested in it. It shouldn't be hard, but I'd rather not move around core game files at this early stage of development (i.e. I'd rather not introduce one more potential red herring failure point when debugging core issues).

Okay, now let me go unstick those two ships, and also add a bunch more.
 
Okay ships have been added. They will work in both Phase 4 and Phase 5 (currently I'm piloting all of them). Also, we don't have the Gothri in the database, so I couldn't add it. likely that's because I can't find it in the WCTO rulebook. If you want to provide graphics and stats for it, I can add it for the future.
 
In this case, coding it into the software is unecessary; there are external tools that let us see what is coming in from the Ajax; I use them to do my own debugging. The easiest one to use that I know of is called 'Firebug' it is an add-on for firefox.
Thanks for the tip, it should be handy in the future.

As it turns out, changing the ROOTDIR definition to my own directory seems to have fixed the missing Turn Navigation tab issue. I wonder if there's something going on in your current working code. There should be an appropriate _SERVER PHP-defined variable we can use instead of a hard-coded address, if you wish.

Edit: I had another go at trying to see why Trident doesn't render the menu bar properly when it is in 'closed' mode, but I've given up. I can only conclude that there's something weird going on in the broken engine.
 
As it turns out, changing the ROOTDIR definition to my own directory seems to have fixed the missing Turn Navigation tab issue. I wonder if there's something going on in your current working code. There should be an appropriate _SERVER PHP-defined variable we can use instead of a hard-coded address, if you wish.

I usually make judicious use of the $_SERVER superglobal myself, but in this case, because our "root" is a sub-sub directory off the domain, there was not a suitable result within $_SERVER that didn't involve me parsing the string to chop off something. I suppose that wouldn't have been too difficult (using rtrim() or something) but I was in a rush.
 
Yeah, I had a closer look at it myself, and it's going to involve some string manipulation. Messy. ):
 
It'll have to be out of phase 4, so just try not to overlap the ships (or if you register a phase 5 account, I can make you pilot for debugging).
I registered for phase 5, but if you want to do some more testing yourself, I'd rather not assign me to one of the ships there. (Or can you still override my pilot and give orders directly when you need to?)

Okay so it is out of IR range, but there was a bug in the code that had Torp's only having a range of 8 instead of 12. Fixed in phase 4.
Thought it might be the range, but wasn't sure. Good thing it's fixed now! :)

Well see above about the range issue.. and yes, I made it so that missiles can't target missiles. I can change that, if you want...?
No, that's perfectly okay!

Yeah, I'm not a mind reader, especially over an ocean!;)
Well, you should start training, then. It will make your life a lot easier, especially since you're married now! :p Just kidding...
I'd say we keep it the way it's in the manual (only 1 hex) for the time being, since we can always go back to this later. Right now, I think you have to do more important stuff with those 1-2 hours of work... ;)

Well, at the moment, the game isn't built for this, per se, but I suppose I could segregate all the 'game code' files off into a directory, and put a game variable in the database that picks which 'rules' directory you read from. It could be doable.
Can't you just leave the core rules as they are and get homebrew rules to just override them? So you'd only have to use smaller modules instead of complete rulesets. Maybe this is what you meant anyway.
Anyway, as long as we don't desperately need this to try out different stuff, I'm all for postponing it.

Um, sorry about the Gothri, btw... First I typed in "Jalkehi," then I thought it might be better to have a bomber in there. However, the one I really meant was the Grikath. The Gothri was probably just wishful thinking... :p
 
Bug report for turn 43 CP:
The "Orders" buttons for both Drahkris and Epees don't work (you can click on them, but they won't open up the orders window), and the Rapier pic is gone. Also, info pop-ups seem to close themselves arbitrarily when dragging them around. (Since they're closing once you move your mouse over another ship, I've tried to move them away a bit.)
 
Update: I just tried the same with Firefox, and this is what I get when trying to issue orders to one of the Epees:
"Fatal error: Nesting level too deep - recursive dependency? in /home/agespast/www/www/avacar/phase4/combat_preengine.php on line 185"

Firefox also gives a more elaborate error message about the missing Rapier image (it's there in phase 5 with Chrome, btw!). According to a screenshot I took, these are the problems listed:

"Warning: imagecreatefrompng(images/indicators/Rapier_II_1.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /home/agespast/www/www/avacar/phase4/indicator.php on line 168

Warning: imagesx(): supplied argument is not a valid Image resource in /home/agespast/www/www/avacar/phase4/indicator.php on line 174"

The last message repeats for imagesy() on line 175. Then there's

"Epee_1.png
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/agespast/www/www/avacar/phase4/indicator.php on line 176"

Could the double "www" subdirectories be the problem here?
 
Ah, I probably just forgot to upload the renamed rapier files into phase 4 when I changed them to comply with a bug in phase 5. .... yep, that appears to be it.

Okay as for that 'nested dependency' bug, it took a bit but I figured it out. I was directly comparing objects, but the objects had self-recursion between the weapons and ships. Comparing them apparently meant following down that tree all the way.

I fixed it by swapping the comparisons from being about the full object to just comparing database ID's, which are unique anyway. I *think* I squashed all the cases of this, but there were a lot of them, so it may come up when the game runs the actual engine for all 3 types of engine. Once we've been through a full turn with no issues, we'll know it is truly dead.

Fixed for Phase 4 (not merged to phase 5 yet)
 
Hm, went through all orders in CP, but it won't move on to EP (turn 43). Probably some ghost in the machine... Also, one minor issue: The Jalkehi's pop-up is blue instead of red. ;)
 
fixed both issues. Both were bad database inserts on my part. Still don't have a non-manual way to insert new ships into the database.
 
Looks like more nesting recursion errors. As I suspected, we're going to bump into them through all 3 turn phases once until I find and clean them up, and the easiest way to do so is to hit them like this.

Unfortunately, I didn't bring my laptop with me today, so I don't have access to either machine with the source. It'll have to wait for tonight to get fixed.
 
Okay, squashed all the redundancy comparators I found; I ran through a full turn, and it went through cleanly. Testing should be able to proceed.
 
Back
Top