Forum:The Game namespace needs help

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
Forums: Index > Village Dump > The Game namespace needs help
Note: This topic has been unedited for 3729 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

BEFORE WE GO TOO FAR. It's too early in the year for anyone to start suggesting we delete the Game namespace - that usually happens in November/December. Any suggestions to delete the namespace are off topic and not wanted here.

Short Summary

  1. Too many text based adventure games
  2. Too many subpages
  3. Too hard to patrol and clean up

Suggested solution

  1. VFD or QVFD games that are substandard or incomplete
  2. Create games that are a little more advanced than 1985
  3. Remove excess pages with a bit of Wiki-Fu

What has been done so far

  1. Games have been moved to VFD, QVFD or ICU depending on the age, level of completeness, quality, etc.
  2. Multi-page games have been minimised. Alone in the dark has shrunk to about 10 pages, Castle has been reduced to 2, Abyss has been reduced to one.

What is needed

  1. People to go through the Game namespace and find games that are sub-par and nominate them for deletion on VFD, or add {{ICU}}
  2. People who are willing to go through and reduce massive multi-page games to only one or two pages. (More detail on this later, but main thing is to create a list of locations and inventory items in a game to start with.)

Even shorter

I need help. Any volunteers? Nominally Humane! some time Sunday, 22:58, Jan 16 2011 UTC

I volunteer to delete any Game that has passed through the normal deletion process swiftly and mercilessly. I will also huff all of the subpages, even if it takes me over a week. -- The Zombiebaron 00:31, January 17, 2011 (UTC)
I volunteer to help out with anything that doesn't require actual effort. 1234 ~ 16px-Pointy.png 00:33, 17 January 2011
How about a new Image? – Preceding unsigned comment added by PuppyOnTheRadio (talk • contribs)
For what? 1234 ~ 16px-Pointy.png 01:59, 17 January 2011
How's this? -- The Zombiebaron 02:08, January 17, 2011 (UTC)
But I already made this... *tears up* Okay, I admit, it was for a joke template, but wouldn't it be funny to put a bright pink star on all the top ten articles? 1234 ~ 16px-Pointy.png 02:18, 17 January 2011
I like it, but now we have to choose between User:Lyrithya/Nothing/top pink and {{2010Top10}} Nominally Humane! some time Monday, 02:22, Jan 17 2011 UTC
Well, maybe you should have looked before saying we needed an image. *sniffs haughtily and stomps off*
In other news, Zombiebaron's image is too dark. o_O 1234 ~ 16px-Pointy.png 02:26, 17 January 2011
Actually it was more the height that was bothering me... Nominally Humane! some time Monday, 02:27, Jan 17 2011 UTC
I could...umm...make my thing pink...and then we could use that instead of this. I don't like the font on this very much, and it doesn't match the previous years so much. -- The Zombiebaron 02:28, January 17, 2011 (UTC)
Eh, like I said, that was a joke, but neither does yours, for that matter - it isn't even a stamp like the featured thing and the other top 10 one. It has a shadow and the text doesn't line up with the border, so what is it supposed to be? Colour is easily resolved in any direction, at least... feh, I'll give yours a proddle. 1234 ~ 16px-Pointy.png 02:31, 17 January 2011
I took some creative liberties with mine and really made it my own. I can upload a version without a shadow if you'd like to play around with it. -- The Zombiebaron 02:38, January 17, 2011 (UTC)
Wot, make it your own and then complain about me fonts? Pfft, silly... there, I made a new one with a normal font, just like the 2009 one. *glares at everyone involved* 1234 ~ 16px-Pointy.png 02:59, 17 January 2011
{{2010Top10}}... Are you sure that the tone is right? Nominally Humane! some time Monday, 03:04, Jan 17 2011 UTC
Oh, so now we do want it pink? Well... *sputters* Okay, I've completely lost track of what's going on, here. 1234 ~ 16px-Pointy.png 03:10, 17 January 2011
I just make the code - I don't do any of the colour stuff. Nominally Humane! some time Monday, 04:06, Jan 17 2011 UTC
I wanna help. I'll do the VFD, QVFD, and ICU stuff. --Wanna see a magic trick? 15:34, January 17, 2011 (UTC)

Back on to the topic though

Choose Your Own Adventure has just made the list of condensed games. If anyone wants to know how to move a multiple page game into one, this is probably the least complicated one to steal code from. Nominally Humane! some time Monday, 04:06, Jan 17 2011 UTC

So... Could you explain these ifexpr offset cody thingies a bit, so I don't mess it up if I decide to use it? Sir SockySexy girls.jpg Mermaid with dolphin.jpg Tired Marilyn Monroe.jpg (talk) (stalk)Magnemite.gif Icons-flag-be.png GUN SotM UotM PMotM UotYPotM WotM 18:50, 17 January 2011
Cool. I've actually simplified it as much as possible, so there's not a huge amount of coding knowledge that is needed, and made a few things that are designed to work on the Zork type format, but here goes.

Offset/forumheader/Get/Goto

When opening a page with the full URL as http://uncyclopedia.wikia.com/index.php?title=Forum:The_Game_namespace_needs_help&offset=1 you create a CGI number, which is a longer way of saying a number that can be read by the parser. To return that number all you need to do is write {{#forumlink:1}} which will return a number that is one higher then the number sent. This, of course, can get really messy, with lots of code snippets all over the place, so I've cleaned it up to 2 main templates.

  • {{Goto}} This will create a link that looks like an internal link that you can use to generate an offset number. The structure is {{Goto|The number you wish to send|The text you want displayed in the link|the hover text|The style of the link}}. Other than the first variable the rest of these are optional. The template page has a little more info.
  • {{Get}} This will return the value of the number sent by {{Goto}}

expr/ifexpr/switch

  • {{#expr:}} allows you to do calculation. So as an example {{#expr: 12 * 12}} would return 144. The best place to get more info on this is w:Help:Calculation.
  • {{#ifexpr:}} is a behavioural statement. The usage is {{#ifexpr: expression here|value if true|value if false}}. There are a bunch other other behavioural expressions, but this one I've found is the most robust if you are looking for only 2 possible outcomes. So if I were to write '''{{#ifexpr:12 * 12 < 100|Less than 100|More than 99}}''' I would have as a result More than 99
  • {{#switch string|case = result|case = result|#default = result}} is a more extensive behavioural statement, as it can have a significant number of responses, and works on a string basis. This was used on God's Answering Service to return the different results depending on which button was pressed. More information on this is found on mw:Help:Extension:ParserFunctions

ShowSecHead/ShowSec

  • {{ShowSecHead}} and {{ShowSec}} are templates that I created (based on a snippet of code I stole from Spang, which was how he managed to have such a gigantic talk page) that returns the section header and section text from another page. Now I have to be honest here and admit that I don't understand dpl extremely well, which this uses, and I've only just started playing with string functions as part of mediawiki, so I'm not going to explain why it works, just how it works.
Say you wanted to know what the second header and section text was on Vicodin. For the header I would write ''{{ShowSecHead|Vicodin|2}}'', which would return Acquisition. If I wanted to know what the text was in that section I would write <small>{{cquote|{{ShowSec|Vicodin|2}}}}</small> which would return the following:
Of course why you would want to know what is on that terrible page is beyond me, but that's what happens when you press the random page button.
Now the other thing to note here, if you haven't already realised, is that these templates can be used within other formatting tags and templates, and will return with the original formatting. The header tags though are removed from the {{ShowSecHead}}, but whatever other formatting you have there will remain. The first header of that page has been italicised, so {{ShowSecHead|Vicodin|1}} will return Etymology. ''{{ShowSecHead|Vicodin|1}}'' will however will return Etymology, as it sees it as ''''Vicodin''''.
Have I confused everyone yet?

Other templates used

  • {{GetDig}}. I haven't written any details on the usage of this on the template page yet, so if you go there you'll see a blank page. What this does though is returns the value of one digit of your {{Get}} result. This means if you use a single digit to control a certain aspect of a game, then it will return the value of that one digit. Alone in the dark was created originally with about 200 pages, because I hadn't worked out all of the above stuff earlier, but each page in the game proper had three digits appended to the page name.
(The first page in the game proper is still called Game:Alone in the dark/Game/0/0/0 as a result of that. It's not hurting anything, so I'm happy to leave it that way).
The digits referred to last action taken/amount of movement in a particular direction/inventory items. Having moved this over to utilise {{Get}} I created this sub-template to then return the individual digits of the result, so {{GetDig|1}} returns the number of the far right (units column, or 100), {{GetDig|2}} returns the number second to the right (tens column, or 101), and so forth. This means that although the parser will only allow you to have one variable, this variable can be broken down into several smaller variables.
  • {{GetBin}} and {{GetOct}} have also been created but are currently unused. These convert the number to binary or octal Number Bases and then return the value of the indicated digit. {{GetBin}} is good for a game with a number of On/Off states, like a Bubble Wrap simulator, or a yes/no game like 20 Questions.
  • {{3Dig}} gets three digits from within an existing number. This doesn't have {{Get}} included as part of the code, but {{Get}} can be used within {{3Dig}}. Castle uses this with a 9 digit {{Get}} number - the first 3 digits controlling the score (which I haven't given scores to many moves in that game yet), the second 3 digits covering number of moves, and the third covering the location/state of play (which is obtained using {{ShowSec}} and {{ShowSecHead}}) There is a bit of documentation on the template page, including a faux scoreboard I created.

Limitations

Now there are a few limitations to all of the above, so best to mention them now before we start trying to put this all together. The first is that these are all server side commands, and different servers have different limits. On of those is that they can only handle numbers up to a certain number of digits. When {{CGI}} was created (a forerunner of {{Get}}/{{Goto}}) the limit was set to 232 - 1, or 4294967295. While I was playing with {{Get}} I noticed that it lost accuracy above 1014 on my end, and I discovered that the parser functions are only certain to be accurate up to 1012, or 999999999999. This means that {{Get}} can give you 232.83 times more flexibility, but it still has a limitation.

Just to give you an idea of what that means, a sheet of bubble wrap with 30 bubbles on has 1,073,741,824 different possible combinations of popped/unpopped bubbles, which could be done with {{CGI}} and {{Get}}. A sheet of bubble wrap with 35 bubbles has 34,359,738,368 possible states, which can be done with {{Get}} but not {{CGI}}. A sheet of bubble wrap with 40 bubbles has 1,099,511,627,776 different states, which wouldn't be supported by either template, and not guaranteed to be accurate done on server side at all.

The other thing is obviously the time taken to create a game. Bubble wrap pop is easy to be done using {{GetBin}}, but for a 20 questions game you have 221 - 1 possible states, which would entail writing 2,097,151 different possible "pages". If you were to work 8 hours a day writing a new "page" every 5 seconds, you would be working solidly for a year, without weekends, before you had them all done. (Okay, 350 days roughly, so you could have time off for Christmas - New Years.)

Putting it all together

Okay, enough with the scary Math talk. All we need to do now is use the handily provided templates and we can create/condense a game. Let's start with the simplest example - Choose Your Own Adventure.

This is a very straightforward game as there is nothing special about the look of each page - it's basically each page is formatted a particular way, each has separate title, but there is no ongoing score or move count. So the main page is

{{Title|{{ShowSecHead|Game:Choose your own adventure/subpages|{{Get}}|Choose Your Own Adventure 
Page 1}}}}
{{ShowSec|Game:Choose your own adventure/subpages|{{Get}}}}
{{#ifexpr:{{Get}}=0|{{UnGames}}|}}
[[Category:Uncyclopedia Games]]

Which is dummy code is

{{Change the title to|{{Show me the section header|from the page "Game:Choose your own 
adventure/subpages"|using the number obtained by the get template|but for the very first section 
without a header call it "Choose Your Own Adventure Page 1"}}}}
{{Show the the section details|from the page "Game:Choose your own adventure/subpages"|using the 
number obtained by the get template}}
{{If the expression:the number obtained by get = 0|add the UnGames template|otherwise do nothing}}
[[Add this to the Uncyclopedia games category]]

So then the content for the page will come from the subpage Choose your own adventure/subpages. Looking at that page we have:

(a bunch of text here)

*''If you go into the cave, {{Goto|1|turn to page 12}}.''
*''If you decide to go to work, {{Goto|6|turn to page 22}}.''
*''If you wonder what the fuck is going on go away.''
==Choose Your Own Adventure Page 12==
(a bunch of text here)

*''If you proceed further into the cave, {{Goto|4|turn to page 17}}.''
(and so on)

Now this ends up transcluded onto the main page, so the only thing which we really use here is headers, a bunch of text, and the indication of the next section to transclude. So {{Goto|1|turn to page 12}} is just saying {{Reload the page but change the get number|to 1|and display the link (and hover) as "turn to page 12"}}

So to condense "Oliver Twist", for example, the front page would be

{{Title|{{ShowSecHead|Oliver Twist/subpage|{{Get}}|Oliver Twist}}}}
{{ShowSec|Oliver Twist/subpage|{{Get}}}}
{{#ifexpr:{{Get}}=0|{{UnGames}}|}}
[[Category:Uncyclopedia Games]]

And of course you'd probably want to add a featured template on there as well. The buttons at the base of each page come from a template called Game:Oliver Twist/button - which I'd just create Template:Oliver Twist/button and have in there:

{{Goto|{{{1|0}}}|{{{2}}}||border:2px #CCC solid; padding:1em; background:#fff;}}

And then the links would just need to show on the subpage as

{{Oliver Twist/button|2|Throw the gruel}}

Or something similar.

Hope that you get enough out of that long and complex description of what I've been doing to be able to create/condense the games. Nominally Humane! some time Tuesday, 02:11, Jan 18 2011 UTC

I think you should write an article in Game:Main_Page/Editing_Guideline.--Sunny周 14:53, January 19, 2011 (UTC)


I write too code heavy unfortunately. I'm getting to all the new game pages and tweaking them a little. SPIKE did a lot of work recently changing the way UnNews is set up, including creation of articles, and I'm probably going to set up something similar for games, so anyone wanting to create a game can do it easier that way, but I'm focusing on cleaning up what's there first, and then will come back to improving the creation later. Nominally Humane! some time Wednesday, 18:14, Jan 19 2011 UTC
Oh Yep! Template:CGI can get number up to 1010. Template:Get can get number up to 1014. And I think I get a way to make it up to 1016.
(User:SunnyChow/sandbox or zh-tw:template:CGIex)--Sunny周 16:50, January 20, 2011 (UTC)
Problem is that once you get beyond 10^14 it starts to give inconsistent figures depending on the server. 10^14 is as far as I could go where I found that it never gave me odd outcomes. Besides, 10^14 gives you a huge amount of flexibility. And of course you can use further subpages, if needed, to get you beyond that point. Zork has around 1000 subpages and that goes on for longer than anyone would be likely to play. Nominally Humane! some time Thursday, 20:25, Jan 20 2011 UTC

Yo

There's this game, I played it a long time ago. And it sucked. But it has potential. If anyone wants to fix it up, here it is: Game:Suicide Bomber --Wanna see a magic trick? 18:09, January 19, 2011 (UTC)

I'd rather you have a crack at fixing it yourself, if you feel it has potential. If you need a hand to condense code then the "putting it all together" bit should have what you need. Nominally Humane! some time Wednesday, 18:19, Jan 19 2011 UTC
Ok. I might need *Cough*alot of*Cough* help. --Wanna see a magic trick? 19:29, January 19, 2011 (UTC)
Tell you what - check out the coding for some of the above stuff that I've mentioned (particularly whichever example I said was the easiest - they're all blurring into a big miasma of mould now) and see if you can steal that to get started. If it gets to the "too hard" stage, then the next best thing is grab the code from each page of the game and stick it all on one page, with the first section (before any headers) being the main page. Give each section a header that relates to the title of the page it came from. So for instance
Welcome to stupid adventure. You are a douche. 

[[Game:Stupid adventure/masturbate|Click here to surf your favorite web sites]]
[[Game:Stupid adventure/grue|Click here to sit in the dark]]
==Game:Stupid adventure/AAAAAAA==
You walk through the door and fall victim to yet another meme. You douche. 

'''The End'''

[[Game:Stupid adventure|Restart game?]]

What that does is allows you to create the bulk of the game in one sheet.

The next thing is to re-create the links between pages of the game. So any link that looked like [[Game:Stupid adventure/AAAAAAA|Go through the door]] becomes {{Goto|1|Go through the door}}. This is the most laborious part of condensing these, so I'd suggest taking advantage of software that allows you to find and replace all [[Game:Stupid adventure/AAAAAAA| with {{Goto|1|, and after you've changed the start of all the in-game links find replace ]] with }}, but do this with a little more manual control. Oh, and use all level 2 headers. It means that you can work out the section number of each page just by looking at the TOC. Let me know how it goes.

And if anyone can work out a way of writing these instructions so try are a little easier to understand, please do so. Nominally Humane! some time Thursday, 10:26, Jan 20 2011 UTC

To tell you the truth. I still don't really {{get}} this. Ba-dum crash! Like how do you make a game one page, but it's still playable? I'm very confused. --Wanna see a magic trick? 15:11, January 20, 2011 (UTC)
You get a number by {{goto}}, and the server shows the content depended on your number({{get}}). Therefore it's possible to make a zork in one page. But the problem is, this page will become so big and its script will be hard to read. The server also have to cope with this giant page in every click.
Therefore I am not sure it's a good idea to combine every game content into one page.--Sunny周 17:14, January 20, 2011 (UTC)
It used to be recommended that you keep pages below 32kb to preserve server, and I'd probably push that out to 64kb, but beyond that I'd start getting to sub-chapters of the games in separate pages. I think so far The largest sub-page I've created with these is about 40kb - still peanuts for the servers. The {{ShowSec}} is actually a very clever parser function that puts minimal stress on the server. But Zork will not become 1 page, but it could be reduced to 10. Nominally Humane! some time Thursday, 20:33, Jan 20 2011 UTC
Okay, but how do you change the content of a page with {{goto}} and {{get}}? --Wanna see a magic trick? 00:40, January 21, 2011 (UTC)

Tutorial

I've just condensed another game, and I've made notes along the way in the page history to show you all how I have been doing it. You don't have to do things exactly the way I do, but it's a good start point as it will, hopefully, make it clearer how it all works. Game talk:Automated Telephone System/subpage. There are a couple of minor things I still have to do with it to finalize it, like adding back the {{UnGames}} template, but most of the process is explained. Nominally Humane! some time Friday, 22:30, Jan 21 2011 UTC