Comical v2 Work Log

Comica (formerly Comical) is a configurable web-comic viewer and downloader. [link]
User avatar
Zallist
Spammin' Mofo
Posts: 343
Joined: Mon Mar 01, 2010 2:40 pm
Location: North England
Contact:

Re: Comical v2 Work Log

Post by Zallist » Wed Apr 07, 2010 3:35 pm

BootBlock wrote:

Code: Select all

Main = New BiQubic.Libraries.Comic.Comics(Common.Locations.File.Comics, Common.Locations.File.ComicsUser, Common.Locations.File.ComicsVersion)

If Main.Load Then
      Console.WriteLine("Comics database loaded successfully.")
End If
I don't know what my problem with single-command IFs is. Ever since I learnt that you can do

Code: Select all

If Main.Load Then Console.WriteLine("Comics database loaded successfully.")
They just seemed bloated. o-o

(it adds nothing to the executable, granted, but it still feels bloated to just look at it. D:
__________________
I'm not gonna bother with the Alpha just yet. xD
I'll leave it until it actually gets to a point where I can HELP, rather than just looking at the pretty.

Also, something not yet questioned: Is it possible to Hide the new Comics list? That might be good, since if I don't find any errors in my log, I just use Space to go through updated comics.
(just roll it up, ANIMATEDLY, of course?)
◕ ◡ ◕

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Wed Apr 07, 2010 4:08 pm

Zallist wrote:I don't know what my problem with single-command IFs is. Ever since I learnt that you can do

Code: Select all

If Main.Load Then Console.WriteLine("Comics database loaded successfully.")
They just seemed bloated. o-o

(it adds nothing to the executable, granted, but it still feels bloated to just look at it. D:
I agree with you 100%!

I hate it when people do that, and when they do this:

Code: Select all

  if ($text = "blah")
  {
     echo "Whoo!";
  }
Having braces on their own line really annoys me. Almost to the point where I think the coder is an idiot.

But! In my case above, I replaced the content of that If...EndIf block with a few lines, so that's why I did it across multiple lines. And now I've just trashed it as I've moved things around.
I'm not gonna bother with the Alpha just yet. xD
I'll leave it until it actually gets to a point where I can HELP, rather than just looking at the pretty.
That should be pretty soon. I'm taking things slowly so I don't end up with a code-mess like in the original Comical. Despite everything being split into namespaces and classes, I forget where things are. Not happening again!
Also, something not yet questioned: Is it possible to Hide the new Comics list? That might be good, since if I don't find any errors in my log, I just use Space to go through updated comics.
It'll be collapseable, yep. And maybe auto-expanding (from the left, when the cursor goes near that area).
(just roll it up, ANIMATEDLY, of course?)
Animated? Hell yeah!

Because I've already taken the screenshot (as I chucked it onto Twitter), here's another...
Attachments
Comica006.jpg
Comica006.jpg (109.18 KiB) Viewed 4163 times

User avatar
Zallist
Spammin' Mofo
Posts: 343
Joined: Mon Mar 01, 2010 2:40 pm
Location: North England
Contact:

Re: Comical v2 Work Log

Post by Zallist » Wed Apr 07, 2010 4:38 pm

Oooohh, flashy.
I especially like the gradient on the background of the selected comic. O:

Also, I notice that the menubar has gone walkabouts. Are we getting a new method for those stuff?
◕ ◡ ◕

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Wed Apr 07, 2010 6:27 pm

Zallist wrote:Oooohh, flashy.
I especially like the gradient on the background of the selected comic. O:
I'm trying to get a nice effect for when the mouse is over items in the list, but it's... not... working. Blegh.
Zallist wrote:Also, I notice that the menubar has gone walkabouts. Are we getting a new method for those stuff?
I just haven't gotten around to it yet. But now that you mention it, it would probably be a good idea to have something other than a static bar wasting space along the top.

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Wed Apr 07, 2010 6:39 pm

It's time to get more than just the effects within the interface done, so now I'm working on hooking up the comics list.

Unlike Comical, Comica will be built from the start to handle multiple downloads at the same time. Comical used a global state to keep track of where the downloading comic should go, which is ultimately what prevented more than one comic from being downloaded.

There will now be a download engine that keeps a queue of what should be downloaded. It'll have N download slots, and it will keep those slots busy while there are items in the queue. Any failed downloads can be pushed back onto the end of the queue for another attempt. Placing failed attempts at the end of the queue should minimise queue stalling. A slot will have a definition passed to it for download when it becomes idle.

User avatar
Zallist
Spammin' Mofo
Posts: 343
Joined: Mon Mar 01, 2010 2:40 pm
Location: North England
Contact:

Re: Comical v2 Work Log

Post by Zallist » Wed Apr 07, 2010 6:47 pm

BootBlock wrote:It's time to get more than just the effects within the interface done, so now I'm working on hooking up the comics list.

Unlike Comical, Comica will be built from the start to handle multiple downloads at the same time. Comical used a global state to keep track of where the downloading comic should go, which is ultimately what prevented more than one comic from being downloaded.

There will now be a download engine that keeps a queue of what should be downloaded. It'll have N download slots, and it will keep those slots busy while there are items in the queue. Any failed downloads can be pushed back onto the end of the queue for another attempt. Placing failed attempts at the end of the queue should minimise queue stalling. A slot will have a definition passed to it for download when it becomes idle.
Ooh!
Suggestion: Have an option so that the first comic that's downloaded is shown, before any others?
So, say the 11th Definition that went into a slot starts downloading, and finishes first, let that be the one loaded by Comica as soon as it gets a chance?

And for aesthetic sillyness, I just thought of "Have a progress bar IN the cursor!", which, I must admit, would be pretty damned cool. But it would be a pain, since you'd need to change the cursor constantly to show progress. BUT, just an idea.
◕ ◡ ◕

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Wed Apr 07, 2010 6:57 pm

Zallist wrote:Suggestion: Have an option so that the first comic that's downloaded is shown, before any others?
So, say the 11th Definition that went into a slot starts downloading, and finishes first, let that be the one loaded by Comica as soon as it gets a chance?
Okie-doke!
Zallist wrote:And for aesthetic sillyness, I just thought of "Have a progress bar IN the cursor!", which, I must admit, would be pretty damned cool. But it would be a pain, since you'd need to change the cursor constantly to show progress. BUT, just an idea.
It would be possible to place a tiny progress bar below the cursor that follows it around, giving the same effect.

As to the Comica interface while downloading, there will be progress bars within the name of the comics in the list. That was something I wasn't able to do in Comical without resorting to huge hacks. Should look pretty good if I make them look kinda like the scrollbar.

I've renamed the slots thing to bots, as that's essentially what they are. They have their own logic to do their own thang, and it just sounds better.

User avatar
Zallist
Spammin' Mofo
Posts: 343
Joined: Mon Mar 01, 2010 2:40 pm
Location: North England
Contact:

Re: Comical v2 Work Log

Post by Zallist » Wed Apr 07, 2010 9:21 pm

Comica: The comic viewer so advanced, it has AI!
◕ ◡ ◕

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Thu Apr 08, 2010 9:01 am

Yesterday's progress
Most of the bot download infrastructure is in place. Although I had a couple of brain-farts. One of which was somewhat forgetting to multi-thread any of it. This, as you can probably guess, meant two things: the interface died while a download was in-progress, and only one bot can download at a time as the others are blocked waiting. Oops.

Today's goals
  • Make everything multi-threaded
  • Get the bots reporting their progress within the comics list

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comical v2 Work Log

Post by BootBlock » Thu Apr 08, 2010 10:10 am

Hmm, BiQubic.Comic's single-threaded design has really come back to bite me in the arse.

I made some if it thread-safe a little while back, but the actual download of comic data is entirely single-threaded and I've come to see the extent of it when I tried using it in multiple threads. The whole thing blows up.

The problem with just rewriting it is that I need to ensure it doesn't break Comical v1.xx. Alright, let's get this over with...

Edit: This is too annoying to workaround. I'm going to break compatibility with Comical v1.xx and fix it up later. Sacrificing design/reliability for two projects I created myself is just stupid, especially when they are always distributed together as new builds upon release.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests