Author Topic: My Best Analog Chiming Clock  (Read 8692 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
My Best Analog Chiming Clock
« on: November 16, 2020, 08:57:13 pm »
I've wanted to make an analog clock using realistic looking hands for a very long time, so I finally figured it out using the RotoZoom Sub. :) It took me all afternoon to make this but I am glad I figured it out. Tell me what you think. Put all of the files in one folder from the zip file in attachments below. There's a photo of it too. :)
It also chimes the hour on the hour using a chime example I got last year I believe in the Wiki example pages for another clock. Understanding how Subs work sure make things a lot easier. :)

Edit: The zip file and picture have been updated, please use these instead. Thank you.

Edit: Updated again with my own drawings of the clock hands and a new picture.

Edited Again: Changed the colors, added a graphical seconds hand and remade the hands and style.
AnalogChimingClockBySierraKen2.png
* AnalogChimingClockBySierraKen2.png (Filesize: 27.17 KB, Dimensions: 599x624, Views: 149)
* Analog Chiming Clock.zip (Filesize: 32.89 KB, Downloads: 126)
« Last Edit: November 19, 2020, 09:39:50 pm by SierraKen »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #1 on: November 16, 2020, 09:09:07 pm »
Fabulous!

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #2 on: November 16, 2020, 09:36:48 pm »
Thanks B+! :)

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #3 on: November 16, 2020, 10:08:20 pm »
Very nicely done indeed!
Logic is the beginning of wisdom.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #4 on: November 16, 2020, 10:11:31 pm »
Thanks Johno :).

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #5 on: November 17, 2020, 12:06:04 am »
That's one of the best ones I've seen.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #6 on: November 17, 2020, 12:10:40 am »
Wow thanks OldMoses! :)

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #7 on: November 17, 2020, 01:10:21 am »
In case anyone else wants to make a similar clock, the trick for using the RotoZoom sub is to use clock hand graphics that are double the length as the graphic itself. That's because RotoZoom rotates from the center so if the hand is only on one side, it will rotate in the center but look like it's rotating from the end like clocks do. Look at the hand graphics I have in my zip file as an example. Also use transparent .png files so graphics or colors behind it can show up around the hands. For specific clock code, etc. refer to my program and if you need help, just ask here.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #8 on: November 17, 2020, 02:29:29 am »
I have updated the zip file with different clock hands. They are better looking in my opinion. I also know that these ones are for personal use only and the older ones I have no idea. Please use the new one instead, thanks.

Update: The zip file and picture were removed from this post. Please scroll to the next one. Thanks.
« Last Edit: November 17, 2020, 03:00:00 pm by SierraKen »

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #9 on: November 17, 2020, 02:59:21 pm »
Well after all that, I decided to draw my own clock hands. This way the whole thing was made by me. :)

Updated: Deleted this version, please keep scrolling to the second page on this forum.
« Last Edit: November 18, 2020, 08:18:17 pm by SierraKen »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #10 on: November 18, 2020, 02:23:25 pm »
@SierraKen

Hi Ken I am wondering how you got your clock hands saved on transparent background? I hate having to go through Paint3D and if I could do that with QB64 I don't remember how unless with Steve's saveImage?

BTW on the old clock hands or the new it might be cool if the holes centered on hour, minute or seconds tick marks?
I like the very smooth moving second hand.
« Last Edit: November 18, 2020, 02:24:39 pm by bplus »

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #11 on: November 18, 2020, 03:18:30 pm »
Thanks B+!! Yeah I agree that I do need to work on the hands a bit more, that sounds like a great idea, with holes over the hour, minute, and second marks.

To make the transparent .png files, I use the free paint program called Paint.Net (I'll put the link to it below). You just make the size of the graphic you want, then use the eraser (I suggest making the eraser size 50 or so) and erase all the white default background the picture has. When you erase it, it turns it into a chessboard type look which is a transparent background. From them on, any graphic you make using the paint brush, lines, shapes, whatever, will be on top of the nothing background. Then save it as .png. That's all you have to do and then you load it with _LOADIMAGE and put it on the screen like you do with any graphic file and QB64 takes care of the rest automatically. I've used Paint.Net for at least 10 years now and it's really good. It has no advertisements either.

For some reason Paint.Net's website isn't loading right now for me but I found it on CNet. Be careful though not to install or change anything you don't want on installation (CNet does that often).
https://download.cnet.com/Paint-NET/3000-2192_4-10338146.html


« Last Edit: November 18, 2020, 03:20:27 pm by SierraKen »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #12 on: November 18, 2020, 03:59:11 pm »
Thanks @SierraKen there's probably an option to start with transparent I would think.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #13 on: November 18, 2020, 05:20:16 pm »
Yeah I looked for that but couldn't find it. Just remember to look hard for any white on the graphic. The first time I tried my analog hands I ended up with some bits of white all over my clock. LOL So I made the eraser big and did it as good as I could.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: My Best Analog Chiming Clock
« Reply #14 on: November 18, 2020, 05:41:22 pm »
Well I know I'd rather draw in QB64 anyway, so do that in separate hand images and use those image handles for an all-in-one proggie. BUT this does not work for times when you want to make avatars say to use at forums.