Jump to content




In Game Time Clock


34 replies to this topic

#1 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 12:31 AM

Decided to make a project of making an in game digital clock

12 hour display mode:
Posted Image
24 hour display mode
Posted Image
Wiring
Posted Image
Connection View
Posted Image

Spoiler

Silly code snippit tool makes my indentation all wonky.
Anyway, colon is fed power from the hour cable. the PM dot is fed power from the minute cable if 12 hour mode is true.

#2 Advert

    Custom Title

  • Moderators
  • 459 posts
  • LocationLondon

Posted 12 February 2012 - 12:50 AM

:(/> The else-if chain has returned from the ashes! :D/>

You should consider finding an alternative method for that, such as using sting.sub().

I'll give you some more code critique after that is fixed. ^_^/>

#3 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 12 February 2012 - 01:09 AM

Hey, nice clock.
I see you're feeding the 4 digits into 4 sides of the computer. You could bundle it up even more, though.
Since each side of the computer can take 16 bits off of a bundled cable you can combine the 14 segments of two digits into one side.
That means you'd only need three bundled cables going into your computer. 2 for the 4 digits and 1 for the colon.
But you could even add the colon signals to one of the digits-cable, because there's still room for 2 more bits.
Then you'd only have 2 bundled cables. ^_^/>

#4 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 01:12 AM

Yes but then i'd have to rewrite the driver script for the 7digit displays and... meh not interested in doing that at this time.
It works as intended so I'm going to work on other things for a while. I may come back to this and clean the code further later on.
As for the if..else structure, thats how it worked using my old structure, again something I didn't bother drastically changing for this version of the release. I mainly combined my existing code from the old method and changed the few points that needed to be altered.

#5 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 12 February 2012 - 01:24 AM

View PostBrigander, on 12 February 2012 - 01:12 AM, said:

yes but then i'd have to rewrite the driver script for the 7digit displays and... meh not interested in doing that at this time.
Hehe, yeah the programming logic would need a rewrite, that's for sure.^^
And it all depends on need anyway, right? I mean, if you don't need that computer for anything else, then I guess it doesn't matter much.
I'm quite engaged in my own little project at the moment, or else I'd have done a 2-cabled clock myself, just for the heck of it.
Hmm... or can it be even more 'compressed'? Just for the heck of it?^^
Gnaaaah, now it got me again, damn side-experiments! It's all your fault Brigander! ^_^/>

#6 epicskymi

  • New Members
  • 3 posts

Posted 12 February 2012 - 02:00 AM

what wire did you used for the part thats being covered by the stone bridge

#7 arongy

  • New Members
  • 37 posts
  • LocationQuebec, Canada

Posted 12 February 2012 - 02:03 AM

Can I have your texture pack ^_^/>

#8 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 12 February 2012 - 02:13 AM

View Postepicskymi, on 12 February 2012 - 02:00 AM, said:

what wire did you used for the part thats being covered by the stone bridge
The specific color he used doesn't really matter, because he just has to remember which one it was when he wrote the code.
But to answer your question:
My guess is it is pink, because it looks like he just started from the beginning and went through the color-codes sequentially.
At least in too-many-items they appear in the order of the bits they represent, i.e. from 1 on upwards to 2^15.
And since pink is within the first 7 colors and he had to use 7 colors for his 7 segments of each digit and pink is the only color that is missing in the picture, my guess is that it is exactly this color. Pink!^^

Edited by Espen, 12 February 2012 - 02:17 AM.


#9 epicskymi

  • New Members
  • 3 posts

Posted 12 February 2012 - 02:28 AM

i just built it but it stays still....

i thought it would keep up with the time

#10 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 03:00 AM

Yes the last color is pink, tbh didn't think about it being covered up. and epicsky, it needs a timer pulse in order to update the time. note the timer attached to the redwire in the middle of the pic ^_^/>

#11 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 03:06 AM

Gr curses, now I can't get this blasted clock off my mind. (That and I finished the only other small project I had planned >_>) Gonna rewrite the code to use two cables >_>

#12 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 12 February 2012 - 03:09 AM

View PostBrigander, on 12 February 2012 - 03:06 AM, said:

Gr curses, now I can't get this blasted clock off my mind. (That and I finished the only other small project I had planned >_>) Gonna rewrite the code to use two cables >_>

Sounds good.

#13 Advert

    Custom Title

  • Moderators
  • 459 posts
  • LocationLondon

Posted 12 February 2012 - 03:31 AM

View PostEspen, on 12 February 2012 - 01:24 AM, said:

View PostBrigander, on 12 February 2012 - 01:12 AM, said:

yes but then i'd have to rewrite the driver script for the 7digit displays and... meh not interested in doing that at this time.
Hehe, yeah the programming logic would need a rewrite, that's for sure.^^
And it all depends on need anyway, right? I mean, if you don't need that computer for anything else, then I guess it doesn't matter much.
I'm quite engaged in my own little project at the moment, or else I'd have done a 2-cabled clock myself, just for the heck of it.
Hmm... or can it be even more 'compressed'? Just for the heck of it?^^
Gnaaaah, now it got me again, damn side-experiments! It's all your fault Brigander! :P/>

I have the same problem: I was making a lock/unlock with some login for a computer. Then, I made the save/load snippet. And then, I made a matrix screensaver because I was bored ^_^/>

And Brig, you don't *really* have to worry about your code if it works, but it's always a good exercise.

#14 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 04:37 AM

Updated the code and pics in the first post.

Old Version Backup
Spoiler


#15 scyl

  • New Members
  • 4 posts

Posted 12 February 2012 - 11:59 AM

I can't get this to work..., I got a cable on the left and on the right of the computer and is running it program, but none of the wires are powered
I don't know if having the program on a disc like you seem to have, will make a difference? I am new to all the computer stuff, in Minecraft that is.

EDIT:nevermind, you must have a hidden timer somewhere? manage to find out you need one from reading your code

Edited by scyl, 12 February 2012 - 01:11 PM.


#16 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 12 February 2012 - 12:54 PM

View PostBrigander, on 12 February 2012 - 04:37 AM, said:

Updated the code and pics in the first post.
Hehe, it didn't let you go, heh?^^
Looks nice now and very streamlined.

You still left the colon on a separate cable though. *trollface*
Nah, just kidding, that was just my ocd talking. Pay no attention to it. ^_^/>

#17 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 12 February 2012 - 05:56 PM

View PostEspen, on 12 February 2012 - 12:54 PM, said:

You still left the colon on a separate cable though. *trollface*
Nah, just kidding, that was just my ocd talking. Pay no attention to it. ^_^/>

View PostBrigander, on 12 February 2012 - 12:31 AM, said:

Anyway, colon is fed power from the hour cable. the PM dot is fed power from the minute cable if 12 hour mode is true.
No I didn't =P purely off of the two cables. I'll get a shot of the connections to add to the description.

#18 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 12 February 2012 - 06:24 PM

View PostBrigander, on 12 February 2012 - 05:56 PM, said:

View PostEspen, on 12 February 2012 - 12:54 PM, said:

You still left the colon on a separate cable though. *trollface*
Nah, just kidding, that was just my ocd talking. Pay no attention to it. :P/>

View PostBrigander, on 12 February 2012 - 12:31 AM, said:

Anyway, colon is fed power from the hour cable. the PM dot is fed power from the minute cable if 12 hour mode is true.
No I didn't =P purely off of the two cables. I'll get a shot of the connections to add to the description.
Oh ok, just saw the new image. Yeah, it seems I misinterpreted the other image then.^^
You even wrote about it, but I totally missed that. My bad, sorry!
brigander.flushMemory() *this never happened...* ^_^/>

#19 Brigander

  • Members
  • 30 posts
  • LocationThe Darkness

Posted 16 February 2012 - 12:07 AM

Added an actual video in the OP. Enjoy.

#20 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 16 February 2012 - 05:18 AM

View PostBrigander, on 16 February 2012 - 12:07 AM, said:

Added an actual video in the OP. Enjoy.

Awesome video, nice IR is jumping on this mod, hard not to with stuff like this :D/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users