- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Which came frist, the Chicken or the Easter Egg?
Admin
I can imagine the conversation between dev and QA: "Why does it say chicken sometimes?" - "No it doesn't, see, I'm doing the same thing and there is no chicken!" - "But it did when I tried earlier this morning!" - "I have no idea what you are talking about" and so on :)
Admin
Unrelated to the topic at hand, but I love some parts of UnrealScript. It's designed for games first, so of course localized strings and networking are first class keywords. Just do var localized string mString and bam, the string is automatically localized. Create a function with and add the 'server' at the start and if it's invoked on a client, it's automagically dispatched to the server, no network wrangling on your part required.
If you're checking out the documentation, also have a look at UnrealScript's states system. The tl;dr is that every class is also an implicit state machine. You can wrap your functions inside a state{} block, and then wrap functions with the same signature but different implementations in a different state block. Then, when those functions are called, the function in the currently active state is triggered. Really handy for AI, where you can just call GotoState("Attacking") and all the functions automatically switch to an attacking mode. It's also got a stack, so you can PushState() to temporarily enter a state (Say, playing a hurt animation), and then PopState() when done to return to whichever state you were in before.
Would love to see something like this for other game engines. I know Unreal Engine 4/5 uses a custom preprocessor over it's C++ code to do similar stuff, but it doesn't feal quite as elegant as UnrealScript.
Admin
Just adding "Chicken" to the list of randomly chosen words could have had the same effect, but I expect this was more difficult to remove during code review.
Admin
Reminds me of the Homer Simpson Thesis on World Peace:
"Everybody eats chicken!"
Mind, I'm not here to argue for or against this thesis, I'm just sayin'.
Admin
Could this have been inserted by Leeroy Jenkins?
Admin
I did basically the same thing in a software package I wrote for in-house use. A certain random amount of the time, the user would get a message that was built as " Hello, $USER, you just won a $PRIZE" . Prizes included a pony, 10 pounds of chocolate, a Tesla Roadster, etc.
Admin
Actually I do see a WTF. Assuming the language supports while loops, I would have packed the selection of word 2 into one, instead of duplicating that code segment.
Admin
https://www.youtube.com/watch?v=yL_-1d9OSdk
Admin
Also: https://www.youtube.com/watch?v=miomuSGoPzI (Video is the classic "Chicken Attack" song by the Gregory Brothers, featuring the famous Japanese yodeler Takeo Ischi)
Admin
On the topic of Easter eggs, decades ago, in a land far away, I worked for a company that made a version of the BASIC programming language. Some of you may remember the standard BASIC prompt, "Ready". Well the company had had a programmer whose last name just happened to be Ready. For one release of this BASIC, if you used a really slow terminal, 300 baud or so, you would see Mr. Ready's first name appear as the prompt and then erased with backspaces and then the READY prompt.
Are we sure Mr. Chicken doesn't work for Steam?
Admin
I haven't played the new XCOM games but was a BIG fan of the original XOM games, they were a lot of fun and the R&D aspect was pretty well done.
Admin
It would in fact not have the same effect. Here you can tweak the chance of chicken independently of the amount of other words, which is pretty desirable for an easter egg you want to appear very rarely.