Saturday 12 July 2014

STables...and Blogs...Do you LIKE it?!

The past few days I've been hammering out a lot of the "stable" page.

It's not complete, but there's some stuff that could do with being hammered in testing to ensure it works well. It will put us in good stead for when we get to building forums, being as a lot of this code will provide the basic functionality there too.

I know that Trophies are a little messy... I'm thinking I might have just one trophy shelf on display, and then up/down arrows just above/below the "world" tag, to scroll to other "categories" of Cup
  1. The Calendar (and on your own stable, the Current Events) - yet to be added. It should be a brief bit of work and I expect it completed early next week.
    • Calendar will be almost identical to the one in TK. When looking at someone elses stable, you will simply see their racing events and future cup invitations. 
    • Events will provide the info from the Current Events block as per current TK, but broken into sections "Race Invitations, "Results", "Recent Events", "Community", and "Advice". The first 3 are fairly obvious, the Community link will tell you about anyone who has 'liked' or 'disliked' any of your posts recently, any guestbook posts to your stable, as well as any bookmarked stables that have posted recently to forums or blog. The "Advice" block will have general simple advice which is particularly targetted at newbies, like suggesting they buy more agistments as appropriate or enter league races and so forth.
  2. Results and History Tabs - should work immediately, as they are using the same code as per Jockeys and horses.
  3. Guestbook & Blog - This is the Big feature that could use testing!
    • Stable Owner can post to Blog, edit old blogs
    • Stable Owner can Delete guestbook posts
    • Visitors can post to guestbook
    • All viewers can like/dislike blogs and guestbook items.
    • Posts use a nice "WYSIWYG" editor, which allows embedded images. It should NOT allow formatting other than what is provided.
    • There will most likely be display issues on "old" TK with these posts.. but I don't care!
    • Anyone who has the ability, see if you can "hack" the editor and try to add an "onclick" or a "mouseover" event to something that you post... or any sort of javascript....anything that is clearly naughty.

**UPDATE** The Current Events page should be completed now too

Silks are proving problematic, and I need Fishbrain to do a small re-write of his Flash code. But Logo and Rename should now be done

Wednesday 28 May 2014

Searching for Jockeys

Today I've been working on the ability to search for (and hire) Jockeys, in much the same way that the Auctions work for horses.

I think I've knitted together the various aspects of Jockeys sensibly. You can find the page in the "Office" menu, titled "Jockeys". Seems fair enough, hey?

So, this page will offer a few functions:
  1. Searching/Hiring Jockeys
  2. Hiring New Apprentices
  3. Checking out recent jockey hirings and firings
  4. Looking at your ex-apprentices
 At the time of this post, #1 and #3 have been built. The other two should be done within the next 24 hours..... closely followed by apprentice training and sending them to the races.

Then I'm likely to take a week off of TK to get some other work done, probably resuming with "Stable Staff" which should be a fairly quick win

 

Thursday 15 May 2014

Jockeys

So much going on at the moment! The past week or so I've had a little work for a distant relative, which has been good. But now, back to TK redevelopment!

The latest addition is the Jockey Page - and instantly I've been able to get some quick wins by simply plugging in functions like Scheduling, history, and results. Yay!

The biggest item here though, is not so much a bugtest but an exploration of a "new perspective" on Jockeys.

Firstly, a new "description" of Rapport, breaking the current categories into 5 "Types"... nothjing has changed, but hopefully this ceases to present them as "levels" and starts to promote the fact that each Rapport type has its' benefits.

Secondly, I've included a "pentagraph" describing the relative importance of each stat to each jockey. This really helps you get inside the mind of the jockey... and understand what the most important stat for a jockey is. I've long been trying to educate players that simply "maxing out" each stat on a jockey is not necessarily in their best interest... and hoping that this graph will address the imbalance.


*EDIT*
I've just completed the "Graduate Jockey" feature.... but I don't really want to promote my apprenticex to test it out!

I'm fairly confident that it will work smoothly...... but if anyone would like to test it, I'd be glad for your help!

If I don't get any takers in the next few days reporting on whether it worked, well, I'll have to do it myself and then try to "hack" my apprentice back into my stable lol!




Tuesday 29 April 2014

Horse History (And stable/Jockey History)

An all-encompassing piece of code. This is a great example of how the new Track King can be more efficient behind the scenes, and less confusing for players.

I've replaced 4 pages (Stable Diary, Stable History, Horse History, Jockey History) with one page.... implemented as a Tab which can appear on Horse, jockey, or stable.

This Tab formats the history into "bitesize" chunks, (12 week blocks for horses and stable history, and 4 week blocks for jockeys and stable diary) and allows OC members to page back to the start of the "object"...and non-OC to page back once only.

I even think the display is fairly tidy, given the chaotic nature of the data being displayed!

I'm pretty sure all items are being displayed correctly, but if anyone would like to undertake a comprehensive survey of horses bought, sold, studded, bred, yearlings, retired, cup winners, races, travel, and so forth, that would be awesome!! ;-)

Monday 7 April 2014

Training and Vets Schedules

Have implemented a bit of "cleverness" around Schedules today.... this is largely in readiness for the Transport page being almost complete.

Now, when you amend your Vet/Training Schedule - whether its on the horse page or on the Training/Vet tabs, it should automatically update ALL copies of the Horse schedule.... whether they be on the Horse Page, or it's Transport Tab, or wherever.

This was quite a tricky update to get in place, particularly having it work out where in a Table to insert a row for new Training/Vet.

The big plus here though, is that when travel is booked it will instantly appear in all schedules rather than prompting for a refresh.

If anyone making vet/training updates in future can keep an eye on schedules after updates, that would be awesome thanks guys.

Latest Addition:

It's now possible to flip back to training reports from previous weeks ;-) Very happy with this new feature!

Friday 4 April 2014

Auctions Bug

Auctions Bug

Found a major issue on the Auctions page today, which was a real headache to fix. The bug didn't apply to the "Horse" page, only when placing a bid on a horse direct from the Auctions List.

Basically, it was ignoring the number that you entered, and simply placing the "default" bid value.

(For those that like a bit of tech thinking) - The reason was because the row of data about the horse is "copied" into the table from a hidden area on the page (it can't be a permanent part of the table or else it will disappear when the table gets sorted)... the original form had already been created and cloned, but when re-inserted into the page it needed to have javascript events setup again otherwise it was still pointing to the original copy in memory. For some reason the cloned javascript events weren't cutting it.

Anyways, bottom line - anytime you want to do anything on Auctions, it would be REALLY appreciated if you can use the new TK and test it out... feel free to try unusual stuff and see how it responds.... it's currently the most technically complicated page in the new TK, so it would be great if you guys can see if it stands up to a bit of punishment.

Thanks!

Thursday 20 March 2014

Travel Scheduling

Started work: 21st March

This tool will display the existing schedule for the horse/jockey in question, and provide "smart booking" options based on the existing schedule. Also, rather than orienting the travel on the departure time, it will be the reverse, predicting the departure time based on the desired arrival time.

Updates
  • All "display" work on this page is now done, including javascript functionality.
  • If there are future travel requirements for the horse being viewed, it should automatically set the travel to be a destination/time/date that is sensible
  • Adjusting Continent/region/track should automatically adjust options available
  • Changing the arrival date to be sometime today should set a minimum arrival time that is achievable, changing to a later date should free up all times.
  • Setting a Smart Booking should set all default values and quote the flight for you.
  •  

Update 8th April

  • Booking Travel, getting quotes, and "smart travel" should all be working properly now
  • Please report any errors ;-)

General News, Issues and Requests

How this works

I'll create new blog posts with each item I start working on, which will be great places for you to post your feedback about those pages and features.

But, for features that I haven't started working on, or any issues that don't really relate to any particular page, it's probably best for people to place their comments and feedback here. Cheers!

General Testing Procedures
  • When a bug has been mentioned as being "fixed", you'll probably need to do a full refresh to get all the new code (ie click the refresh button at the top of the page, not the small window).
  • If there's been a fix to the overall layout of the page, you might need to empty your cache as well as refresh
  • If there's been a fix to the colour/negative layouts, you will definitely need to empty your cache as well as refresh. These layouts will definitely not be updated with just a basic refresh.
  • If you encounter a problem, please try to give as much feedback about the problem as possible. Include details of:
    • the page you were on;
    • the action you tried to take(ie clicked whatever link, clicked refresh etc)
    • the result you saw. Sometimes exact wording of errors is important to help debug
    • any other information that you have on hand. For example, if you use "Firebug", maybe you can copy/paste results from the "console"

Blogging the TK Redevelopment

 Purpose of this Blog

The purpose of this Blog is to document the advances in the TK Redevelopment, and provide a central hub for people to ask questions and keep up to date with progress.

If we can all get in the habit of commenting and reporting and reading this blog, then we'll streamline development immeasurably!

Accessing the Development Environment

  1. Login to Track King as per normal
  2. View one of your horses
  3. Amend the URL (web address)...
      Immediately after "www.trackking.org", insert "/hairboylabs/redesign"
      so that the URL looks something like:
      www.TrackKing.org/hairboylabs/redesign/horse.php?hid=....
  4. You're away!
  5. PLEASE remember that the new version is hush-hush. I'd appreciate you asking me before you post details and screenshots etc to any other TK players. The last thing I want is to have to deal with an uproar in TK about the new design or some other decision at the same time as I'm building it lol!

Progress so far

I've now started keeping an up-to-date list of pages/functions that should be functional. Please refer to that Post (dated April 8th) for details.

***Window Caching Explained

PHP code, as in original Track King, builds the entire page and sends it to your computer every time you click a new link. This is quite "expensive" on the server resources.

In the TK Redevelopment, I've designed a system which keeps the "framework" of the page intact and loads only the essence of each page. It also then retains those pages in your computers memory (artificially cached) so that if you open a link that you've previously viewed, it will simply pull up the old version, and not need to contact the server at all! This will clearly reduce load on the server hugely, especially at peak times.

It should also greatly reduce the need for tabbed browsing, because you can store your favourites as hot links and quickly switch between windows to get information on the go. Tiled display mode will also assist in this, especially for mobile devices.

As a consequence, each "window" has a "last refresh" counter in the top corner. This enables you to quickly decide whether the content is up-to-date, and allows you to manually refresh when you feel necessary.

Many updates that happen, such as training, vets, servicing, and gelding, will push their updates into the cached windows, meaning that data will generally be up to date.

So, when testing the system, please keep an eye on how this performs and report any instances where an update hasn't flowed into another window as you'd have expected. Not all cases can be fixed, but it's good to have them reported so that I can make those assessments.