Pages: [1]
Print
Author Topic: Wiki Game - A Siege by Three Variables  (Read 9305 times)
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« on: March 08, 2011, 05:54:42 pm »

I am working on a game of sorts using nothing but Wikipedia. It is a very simple game, where a city must maintain a strong enough force to repel barbarians. It is in fact a very simple game, however since I cannot store any variables, I have to rely on Wikipedia's variables such as the current day and current month. This makes it quite a challenge, since I then have write the same code lots of times.

It's currently incomplete, the basic idea is there, however I intend to create functionality such as a monthly breakdown of the losses and gains from the city.

You can alter the outcome of the "game" by creating an article on the Wiki. One article represents two gold. This gold is used to train more swordsmen.

You can find it on my profile page: http://physxinfo.com/wiki/User:AquaGeneral
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
Zogrim
Administrator
Hero Member
*****
Posts: 564


Expert Scrounger


View Profile WWW
« Reply #1 on: March 08, 2011, 09:15:44 pm »

Represent a Wiki life as a city ? And by filling up Wiki users can help the city to fight agains barbarians ? That's a great idea  Cheesy

Can it rely on more parameters though ? Number of users, amount of data edited per day, etc ?
Logged

PhysXInfo.com Team
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« Reply #2 on: March 09, 2011, 04:16:27 am »

Thanks Smiley

I was hesitant about changing the way it works, but now that you brought it up, it does sound so much better if it did take in the number of users and such. If your interested, you can see every variable I can use in the Statistics category here.
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
Zogrim
Administrator
Hero Member
*****
Posts: 564


Expert Scrounger


View Profile WWW
« Reply #3 on: March 09, 2011, 11:23:58 am »

Quote
If your interested, you can see every variable I can use in the Statistics category here

PhysX Wiki is highly specialised, so it will have limited number of pages in any case. So number of users or number of page edits will fit better, you may add them as additional resources - wood, stone, or something.
Logged

PhysXInfo.com Team
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« Reply #4 on: March 09, 2011, 11:32:32 am »

Good thinking Zogrim Smiley

I am currently working on a tool in C# which will help me generate the code automatically, since it is already getting to the point where it is hard to manage manually.
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« Reply #5 on: March 16, 2011, 05:34:28 pm »

Looks like I will continue work on "A Siege by Three Variables" in the coming weeks. Now units are produced based on a formula which determines how many units of the type should be purchased depending on a set priority number. This makes the code harder to read, but I think it is worth it in the end.

In the end I realized it is a bad idea creating an application to help me write the game because by the time I am finished writing it, I could have already completed the game itself. Plus, I also have a trusty spreadsheet which fills most of the need for a helper program anyway.
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
Zogrim
Administrator
Hero Member
*****
Posts: 564


Expert Scrounger


View Profile WWW
« Reply #6 on: March 17, 2011, 10:21:11 am »

Good to see a progress Smiley
Logged

PhysXInfo.com Team
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« Reply #7 on: March 25, 2011, 04:51:39 pm »

Since I am working on so many project concurrently (granted they are small in scale), I thought it would be a great idea to get some more work done on this. I ended up actually completing it Cheesy

I wanted to have the page show what unit will be built next, but that would require me to pretty much double the code I have right now. It was hard enough creating the formula for the Guard Towers defence;
Guard Towers Remaining * Unit Defence + Number of Archers Garrisioned (max 2/tower)

To put this in perspective; this formula alone is 1450 characters. The code for every statistic of every other unit is 1432 characters.

Let's see how much the city's defence will decrease as the months go by Smiley
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
Zogrim
Administrator
Hero Member
*****
Posts: 564


Expert Scrounger


View Profile WWW
« Reply #8 on: March 25, 2011, 10:28:16 pm »

Good work Grin
Logged

PhysXInfo.com Team
Zogrim
Administrator
Hero Member
*****
Posts: 564


Expert Scrounger


View Profile WWW
« Reply #9 on: April 03, 2011, 10:57:12 pm »

Dunno if it is just me, but your game looks messed up   Undecided
Logged

PhysXInfo.com Team
AquaGeneral
Jr. Member
**
Posts: 70


View Profile
« Reply #10 on: April 04, 2011, 04:11:43 am »

Thanks for warning me about it. It turns out that the variable {{NUMBEROFEDITS}} was returning a number with comma seperations, like this: 1,001. All I have to do is add the R flag to the variable like this; {{NUMBEROFEDITS:R}}, which returns 1001 instead.

I am pleased that the solution was so simple Smiley
Logged

Intel Core i7 2600K | GeForce GTX 570 | 8GB of RAM | Windows 7 64-bit
Pages: [1]
Print
Jump to: