Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » Thread locks too soon

This thread is locked; no one can reply to it. rss feed Print
Thread locks too soon
bamccaig
Member #7,536
July 2006
avatar

this.Over9000?.Invoke(this, args);

I imagine that this would be somewhat slower than just doing a null check and directly invoking the event delegate.

Bruce Perry
Member #270
April 2000

You're assuming Invoke() has a signature along the lines of "params object[] args", but it doesn't - it is generated (presumably by the runtime) with exactly the right parameters for the delegate type it belongs to. I suspect the shorter call syntax is syntactic sugar for the Invoke method anyway in fact.

That said, I think ?[ exists as a null-propagating array index construct. I can understand why ?( doesn't, since it's impossible to tell apart from "? expression : expression" with a finite amount of lookahead.

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Eric Johnson
Member #14,841
January 2013
avatar

I like pie.

[EDIT]
What's this thread even about anymore? :P

Mark Oates
Member #1,146
March 2001
avatar

Well, now it's about pie. :)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Eric Johnson
Member #14,841
January 2013
avatar

Quote:

Well, now it's about pie. :)

Great! I had cherry pie on Christmas. It was tasty, albeit a bit too sweet. I'd rather have apple pie. Apple pie is the best, in my opinion.

Elias
Member #358
May 2000

I had coconut cream pie on Christmas. And I seem to like anything with coconut in it.

--
"Either help out or stop whining" - Evert

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Eric Johnson
Member #14,841
January 2013
avatar

@Elias: I don't think I've ever had coconut cream pie before. Sounds tasty though!

@Edgar: Cake. Cake is a lie! >:(

bamccaig
Member #7,536
July 2006
avatar

amarillion
Member #940
January 2001
avatar

Happy New Year

We had vegetable pie, filled with broccoli and Brussels sprouts.

Bruce Perry
Member #270
April 2000

The pie is a fake :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Elias
Member #358
May 2000

Hm, my brain works in a strange way. On the first day of Krampushack when I decided to use the three holy kings as main characters of my game I seemed to have this vague memory of a song I once knew about those three kings. But I could not remember any specific text nor the tune. Google also completely failed me and gave me lots of carols with the three kings/mages but none I had heard before.

Several days later I woke up in the morning and had a strange melody in my head, with no idea where it had come from. And it would stay in my head for several days - I wasted precious time during the competition using various tune searches, but without luck... but I wrote it down as notes.

So today I saw those notes again and gave finding out what it is another try. Going through just about 30 tune search results I did finally find it (my mind had doubled one note and changed another so that must be why I hadn't found it at first). It was "Le Marche des Rois", a pretty popular French Christmas carol from the 17th century. About the holy three kings. (And not unpopular in English either it seems, but just unknown enough it fell under the Google radar for "three kings carol".)

So somehow I must have heard it as a kid and must have known what it is about, so "three kings" gave me that vague memory of something. And then the first few days of Krampushack my brain must have started a background search process to find the tune - and when it finally found it just put it in my head that morning.

Now I have to add new music to my game...

--
"Either help out or stop whining" - Evert

Johan Halmén
Member #1,550
September 2001

I once made a Christmas hack game about St Nicholas running around. I searched for suitable music and found a lovely carol, which I'd never heard before. Since that, I've heard it a few times.

Exactly 10 years ago, I wrote a tune for Christmas hack and that tune turned into a new carol with lyrics by my wife a year ago. It's one of our best songs.

I guess I have at least three more songs, which relate directly to Allegro games. Some made by me, some made by Andrei Ellman. One sung by Andrei Ellman!

Then there was the Monday Song, sung by Matt Somethington. That song is still waiting for being used in a game.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Elias
Member #358
May 2000

Which carol was it? And where can I listen to the other ones? :)

I wonder what Andrei is doing nowadays. He moved to Austria after I had left there and was working for Austria's largest game studio, but they shut down a while ago.

--
"Either help out or stop whining" - Evert

Johan Halmén
Member #1,550
September 2001

Jolly Old Saint Nicholas.

The 10 year old game tune was played on a glockenspiel. You can still hear it in this video:

video

...though the solo singer and the choir might cover the glockenspiel. If there's somewhere an archive with old Christmashack entries, you might find the game there,and the original dat file with the original midi tune.

In Andrei Ellman's "Chickens" you can find my music. Two of the tunes got lyrics, but there's no sung music track in the games. I have one recording on an old Macintosh laptop somewhere.

And Andrei's excellent performance of my DTL-song from DTL-rally is on an even older laptop somewhere.

One old recording I managed to find. It's actually from the depot here on a.cc.

Here's Blub and Blob singing:

media player

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Elias
Member #358
May 2000

I like that carol! Is there a translation (or the Finnish text so I can put it in Google translate)? I suppose it is about all the countries Santa has to visit...

Also love the Blub and Blob song... is that you and Andrei singing in it?

--
"Either help out or stop whining" - Evert

Johan Halmén
Member #1,550
September 2001

No, it's about Santa's vacation in July. Here's my own translation from a blog I wrote about our carols:

The white beard is fluttering. A mild breeze. A yellow balloon shines with the sun. There's a long time to Christmas. Santa's enjoying. In July the familiar scenery looks different. Peace, happiness, warmth and love. Peace, happiness, keep your Christmas mood always with you. (A list of countries) How beautiful our world is, when seen from above! (More countries...)

In Blub & Blob there's only me. In that game there's a karaoke function I developed. It played a midi file while showing timed lyrics. You had to include a txt file with the lyrics which had the time code in seconds in square brackets at each word.

Some day I'll continue with the karaoke project. I like the idea of having singable game music. I find similar joy in creating a game, creating music and writing song lyrics.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Onewing
Member #6,152
August 2005
avatar

This thread will lock soon. Dare I say...too soon?

------------
Solo-Games.org | My Tech Blog: The Digital Helm

GullRaDriel
Member #3,861
September 2003
avatar

To be honest I was hoping to get M.Leverton back to us with the size of the thread.
Seems like size isn't the only thing that matters ;-P

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

GullRaDriel
Member #3,861
September 2003
avatar

What if we mention all his nicks in the thread ?
What if he DOES have an alarm system and then we use the call "Supreme Dictator" 3 times ? Facing a mirror ?

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

bamccaig
Member #7,536
July 2006
avatar

Bruce Perry
Member #270
April 2000

As a kid, I had a totally mixed-up dream. At that age, I was used to BBC BASIC, but had noticed that machine code existed. I also loved playing with tape recorders. In the dream, machine code looked like random strings of symbols, but could be used to accomplish anything, lightning-fast - and I used some to materialise a jetpack on my back which looked like a tape recorder.

In the real world, however, Matthew Leverton cannot detect whether you are facing a mirror. ;)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

GullRaDriel
Member #3,861
September 2003
avatar

I even tried to add him to my Facebook, with no luck so far :-p

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Eric Johnson
Member #14,841
January 2013
avatar

bamccaig said:

ML is probably just busy starring in his own reality show.

This thread is now the roast of Matthew Leverton. :o



Go to: