Computer-Aided WCTO Progress Updates


Vice Admiral
Greetings Everyone. Some key points from the general posting thread are copied below, to act as an index for you!

These were the initially proposed phases:

Phase 1: Establish a working, static html/css board which successfully overlays the grid on a background, and puts ships in grid cells. Being static, I expect a hardcoded change is necessary to move the ship to a different cell. I also need to work out how ships that are larger than cells will work (since images typically aren't positioned based on their center), and how to handle multiple ships in the same cell.

Phase 2: Generate database format, and take apart the CSS/html, causing it to be formed using php. Create a 'test' game in the database, which successfully repositions the same ships when viewed. (While present, don't yet worry about users, validation, etc.)

Phase 3: Insert in a jquery (javascript) layer which adds in things like the mouse-over info (possibly retrieved using Ajax and php, or perhaps just pre-loaded and hidden. Ajax-style coding is new to me, but I want to try it out on this project to speed it up and also to learn)

Phase 4: Develop the ship order database storage format, and code the game engine to process the orders correctly.

Phase 5: Add one final layer to the system, including 'games' 'turns' and 'users' such that the system can keep track of who is playing in which game, and knows to run the turn order processor when a given game's "we're waiting on X players" counter empties out.

Phase 6: Populate object database with the ship/environmental/missile templates.

Phase 7: Test and add new features per request.

As I go, I find I end up further splitting them up. Here are the current phase demos:

Phase1a is a static demo of 2 ships.
Phase 1b is a simple php form that lets you move the ships around. This demostrated that we could weave in the grid system into the php.

Phase 2a demonstrates the same system, after it has been completed converted to object-oriented coding. See the associated post for details.

The Phase 2 completion demo shows off the first fully-database-driven game demo.

I then began learning and working on jquery-related forms. First, I created the ship entry form which I still welcome people to use to input data from the game manual.

I am currently prototyping various pop-up windows before I weave them into the phase 2 php-based game shown previously. The prototyping can be found on this html-only page

Finally, if you really want to fly ships around, have fun with the Phase 3 Bonus
I hope you don't mind me posting in the sticky thread, but I noticed your reference to a 'Sheldon Slide'. I don't know if that spelling is ever used in the literature - I think it should be 'Shelton Slide'.
The progress is looking good.

Just one thought: would it be possible to add a slight delay (maybe half a second?) on closing the pop-up window when the mouse moves out of its area? It would make getting to the Details/Hide button a bit easier, I think, as it seems to disappear before I have a change to click it sometimes.
Great suggestion, Wedge. That should be doable, in theory; I'm still getting familiar with the jquery side of things so I'll need to think on how to implement that, but I suspect it will be a matter of throwing up a flag when you leave the area, setting a timer, and then when the timer runs out, if you're not back in the area, and the flag is still up, closing it. At the moment, however, I'm not actually aware of you being 'in' the area, only of the events of you entering or leaving.. but I can probably do something sneaky with the re-enter event.
While fancy client-side scripting makes some nice presentational effects, I stay away from it on my personal pages because of the nightmare of cross-browser compatibility and the necessity of testing noscript fall-backs. So I really don't have much experience in what goes on with client-side scripts, but I can see how it is useful - even necessary - in a presentation-heavy application like what you're trying to write here.

What qualifies as a 'leave' event? Maybe that's why the window opening/closing feels a bit 'jittery' with relation to the mouse position.
At the moment, when your mouse leaves the bounds of the div that contains the popup, it triggers the 'mouseleave' event. One possibility would be for me to wrap that div in a bigger, transparent div full of padding and put the 'leave' event on that guy.

Please note, these are jquery events, and not necessarily the standard javascript events.

Also Wedge, normally I stay far away from javascript/jquery/client side implementations as I can, for similar reasons... but I also am not usually building interactive games. In this case, we had to go flash or java or javascript; admintedly the first two would probably have produced a more consistent, and cleaner-looking game, but they also would have eliminated the need for the php/css/mysql (presumably). If I had flash or java skills, that would have been the smart path, but since I'm decent with php/mysql, I could already visualize how I wanted the game to work, so it was just a matter of improving my CSS and picking up jquery.

If you're interested in learning how jquery works, its website is very intuitive and the language itself is surprisingly straightforward.
I'm not criticising your choice of client-side scripting. Nay, I'm very impressed with what you've done largely on your own efforts. (:
Not sure if you changed anything on the mouse-over pop-up functions. It seems a bit easier to use now, although it is possible to have multiple pop-up windows simultaneously. Is this your intention?
No, I didn't clean them up aside from trying to improve the minor overlap each window has with its ship (which improves the probability that your mouse stays on it).

That said, yes, allowing multiple pop-ups at once is intentional. If everyone believes this is a design flaw, it can be removed.
I think it's fine to have multiple windows open, I'm just thinking the triggers for opening/closing the pop-ups needs a bit more work. But the current state suffices for now, I think.
Phase 4 Is nearing completion. This is the primary game engine development phase. I encourage you to see the phase 4 demo to test it out. Note that game 1 on this demo, while interesting, contained a lot of bugs to be fixed, and is now stuck/dead at "phase" 127.

Game 2 is the first game we have where everything is testable.

There are still a number of untested features as of this posting (read in the other thread for details), so expect it to stop working if I'm doing development. If you find something not working as per the WCTO manual, please point it out in the other thread too!

Also, please note that the following WCTO game features were outside the scope of what I could finish for phase4, and will be added at a later revision, after phase5 is finished:

1. Capital Ship Weapons
2. Tailing
Well, it has been forever since I posted an official update, and frankly, these are well out of date.... but since this is stickied I figured I'd try to summarize where I think we are now and where we're going.

We are still in Phase 5. Tailing was "just" implemented (ahead of schedule according to my revised schedule, but it looks like I've thrown that out the window anyway). Still fixing bugs with missiles, but we're narrowing them down nicely.

I've found someone who, with some coaxing, might build us a level editor (one of the big thing stopping us from doing massive amounts of testing).

My current goals are to:
  1. Clean up existing bugs
  2. Get missile pop-ups finally made to identify missiles
  3. Implement the pilot skill system
  4. Deal with line-of-sight issues (and therefore try implementing asteroids)
  5. Capship weapons.
Based on the revised schedule, I am going to call an end to 'Phase 5' when I accomplish points 2 and 3. I will isolate points 4 and 5 into the Phase 6 development.

As a bonus update, I just implemented the Targetting: on the slide out pop-up to identify long-term missile locks.
Last edited by a moderator:
Ha, man, that thing is a few years old, but it should still work. The game is a lot more sophisticated at this point.