Author Topic: [XMAS_2013] Virtual Advent  (Read 26026 times)

0 Members and 1 Guest are viewing this topic.

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #20 on: December 10, 2013 »
Cheers Raizor,

The music is selected by the PHP and the required file name is inserted into an audio tag source definition. The music files themselves are mp3 and ogg format, just in case somebody is watching using a non-mp3 compliant browser.

Bamboozle was great - the page numbers used hexadecimal page numbers which were not available on the remote, but were a valid part of the Teletext specification. The page numbers associated with the "fast text" buttons used for the answers used hexadecimal addresses to prevent cheating. I miss Teletext.
You are our 9001st visitor.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #21 on: December 10, 2013 »
lets bring back teletext for mobile devices!!  :) i also miss the good old teletext days.

i remember when i was a kid thinking it was a really nifty computer with the big block text then taking a tantrum when my mum said it couldn't play dizzy.
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #22 on: December 10, 2013 »
Drifting a bit off-topic here, but I could do a Teletext style website in Javascript using the canvas. That should run on mobile devices.

I heard the guy who wrote Digitiser moved on to write scripts for kids TV shows.

Back on topic, I've just finished day 22, but could go back to day 21 to add a little variety ;)
You are our 9001st visitor.
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #23 on: December 10, 2013 »
Bamboozle was great - the page numbers used hexadecimal page numbers which were not available on the remote, but were a valid part of the Teletext specification. The page numbers associated with the "fast text" buttons used for the answers used hexadecimal addresses to prevent cheating. I miss Teletext.

Hehe, nice :)
raizor

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #24 on: December 11, 2013 »
Quote
Drifting a bit off-topic here

indeed! sorry mate,

finally the lamp post has arrived!  :) just realized you have added a time of day at the side that controls the sun and moons position accordingly and the lamppost switches off and on depending on day or night.

its developing into a proper dynamic scene, how cool!!
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #25 on: December 12, 2013 »
Thanks Nino,

The server time used to dictate the hour setting, which is used to determine the sky colour and sun / moon position.
With the Hour control the visitors don't need to wait for hours to see the sky change and the house lights & lamp post turn on and off.

I've finished coding day 24 - once I've done day 25 I'll post the source code.
You are our 9001st visitor.
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #26 on: December 14, 2013 »
Week 2 is up, so here's a run down just in case anybody missed it:

Day 8: Sun & Moon - Track #8 "Silent Night" by 8 Bit Jesus. The sun changes colour to red during dawn and dusk while it is normally yellow. The moon is drawn from a bitmap. Initially, the time on the server dictated the time of day in the demo, but I have also built an hour selector so we don't need to wait for the server to catch up.

Day 9: House - Track #9 "Santa Baby" by Mafialligator. Like the sun and moon, the house follows the day / night cycle with the timing of its internal lights.

Day 10: Wreath - Track #10 "O Come O Come Emmanuel" by Rush Coil. Sorry guys, this was included just to make up the numbers and is very difficult to spot unless you look for it.

Day 11: Lamp Post - Track #11 "Rudolph the Red Nosed Reindeer" by 8 Bit Jesus. The lamp post turns on at night and off in the day - it even mimics the red "warming up" colour at dusk.

Day 12: Snow Pile - Track #12 "What's This?" by Mafialligator. A mound of snow has appeared under the lamp post. What could it be?

Day 13: Snowman - Track #13 "Walking in the Air" by 8 Bit Bonkers. It's a snowman. Just a man made of snow. That is all.

Day 14: House Decoration - Track #14 "First Noel" by DMA-SC. There's a message in the lights, but you can only read it at night. Its speed is dictated by the rhythm of the music.
You are our 9001st visitor.
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #27 on: December 17, 2013 »
I have now uploaded the source in the first post, minus the music, since there is 139MB across 50 files.

If you choose to run the source on a PHP enabled server, please do not spoil the surprise. Feel free to read the Christmas "facts" on line 19 though, some of them are funny :)
You are our 9001st visitor.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #28 on: December 18, 2013 »
Quote
"SNOW IS ACTUALLY THE DANDRUFF OF ANGELS"
that's it i am becoming a hermit next time it snows  ;D

it looks like there is some really handy code in there! k++

what would you suggest as an easy means for me too test the code out ck? when it  comes too browser  based stuff i am a complete noob but would love too learn lol. cheers mate
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #29 on: December 19, 2013 »
The best way to test the source code would be to install a PHP capable web server on your computer and host the source as a web page.

If you don't have access to a web server, it is also possible to copy the source from its current running location by using the "View Source" function in your browser and then saving the output. That way you lose the PHP randomness while retaining full JavaScript functionality. This may be tidier than trying to unpick the PHP from the JavaScript from the original source file. For absolute full functionality you'll need a copy of the music tracks, but since there's over 130MB of them I can't host them here. I'll put links up on Christmas day or Boxing day if you want to download them.

I have just realised that I have left out the JavaScript modules for the music - these are selected by the PHP depending on which music track is playing. I'll put them into the zip file and re-upload it.

If you want tips on specific aspects of JavaScript, let me know and I'll do my best to explain it.
You are our 9001st visitor.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #30 on: December 19, 2013 »
thanks ck,

i did a little reading last night and have started too get a little feel for how this stuff works. so too run your code i have two options, either strip all the php out leaving just the java behind or instal a virtual server such as http://www.apachefriends.org/en/index.html.

i think in the interest of learning ill have a go at removing the php bits out first. i tried your tip through firefox but couldn't figure out how to get it to automate the process.

some really cool stuff, thanks ck!

[edit] ahh i see what you mean!! if i rip the code from your uploaded php code then it gives me a local html code file k++  8)
« Last Edit: December 19, 2013 by ninogenio »
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #31 on: December 20, 2013 »
One of the good things about this particular demo is that you can rip local html sources at different stages of development using the Day setting and see how the different JavaScript modules work together.
You are our 9001st visitor.
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #32 on: December 21, 2013 »
Week 3 has ended and Christmas is close. Here's a quick recap:

Day 15: Igloo - Track #15 "Fairytale of New York" by 8 Bit Bonkers. I have built an igloo - not particularly festive, but wintery.

Day 16: Pine Tree - Track #16 "Oh Christmas Tree" by Rush Coil. The tree is up, finally!

Day 17: Baubles - Track #17 "Winter Wonderland" by Mafialligator. There's only a few baubles, but look at the size of them - they're quite large when you examine the scale of everything!

Day 18: Tree Lights - Track #18 "Angels We Have Heard On High" by Rush Coil. Chaser lights in 6 different colours now adorn the tree. They also move to the music.

Day 19: Wind - Track #19 "Carol of the Bells" by Rush Coil. The wind blows the clouds and snow around. Also, this is my favourite music track.

Day 20: Smoke - Track #20 "I Saw Mommy Kissing Santa Claus" by Mafialligator. There's smoke rising from the chimney. Santa had best be careful when he arrives, as the wind might blow it into his face...

Day 21: Lamp Post Lights - Track #21 "Last Christmas" by Goto80. The design of the lamp post lights is selected at random by the PHP. Can you spot all of the different designs? Also I've heard Goto80 hails from Sweden. SWEDISH STYLE!
« Last Edit: December 24, 2013 by combatking0 »
You are our 9001st visitor.
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: [XMAS_2013] Virtual Advent
« Reply #33 on: December 21, 2013 »
It's a nice concept you got there!
It's better to watch it at night, when neon lights is on. :)
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #34 on: December 22, 2013 »
wow what a massive difference those few small additions have made ck  :clap:

really loving what you have done here. the wind blowing the snow and smoke about, the neon sign's and shooting stars.. also really love todays tune, i can fully appreciate how much work has gone into this after doing some work in the last few days with a bit of php/java... having too manage all the individual states etc you should be really proud of what you have done here so far well done mate!!
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #35 on: December 22, 2013 »
I'm glad you appreciate it. Every one of the 1563 lines of code was carefully crafted by hand.

There's only 3 more items / effects to be added. Any guesses as to what they are?
« Last Edit: December 22, 2013 by combatking0 »
You are our 9001st visitor.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #36 on: December 22, 2013 »
  :) does it have anything too do with a big man who dresses in red, and a massive bag full of gifts by any chance??  ;)
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #37 on: December 22, 2013 »
They arrive together on one of the future days. That leaves only 2 other things.
You are our 9001st visitor.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [XMAS_2013] Virtual Advent
« Reply #38 on: December 22, 2013 »
i can see on the 24th at night the igloo will light up but for the life of me as much as i have searched i cant find that 3rd effect lol
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [XMAS_2013] Virtual Advent
« Reply #39 on: December 22, 2013 »
Well spotted. There's going to be a star on the tree too.
You are our 9001st visitor.
Challenge Trophies Won: