The Zombie Source!

No, not the source of the plague, but the source of the game. That’s right my friends, after a long and frankly embarrassing hiatus, I’ve decided to release the full source code for Zombie Wasteland Goners. The code is being released under the GPLv3 license. The goal of releasing the source code is two-fold: first, to allow other individuals to setup their own servers and second, to just put the damn code out there in case anyone wants to edit, tweak, or improve it, because unfortunately, I just don’t have the time and resources to carry this project forward any more. First thing’s first though, how do you setup your own server?!

SERVERS
OK, as I write this I have fixed my server and it is back online. Unfortunately the reason my server went offline for a few months there was that it completely crashed! This means all the user info was lost (sorry guys).

The newest version of ZWG is v0.20, and available from the downloads page. This version includes server selection. When the game starts it now asks if you want to connect to the default server (mine) or a custom server (yours). For the time being, you may continue to use my server, but should it ever go down again, here is how to setup your very own zombie server on any internet connected PC (huzzah!!!)

The very first thing you need to do is setup your server computer with Apache2, MySQL, and PHP. Often times when people setup servers they use Linux as the OS so if you want to take that approach, you can find a LOT of easy tutorials out there by googling “LAMP setup” (LAMP = Linux, Apache2, MySQL, PHP). Here’s one I recommend. In case you are using Windows though, don’t despair, because there are a lot of tutorials on how to set these basic services up on Windows too (here’s one I just found). If you encounter any troubles at this step, find a geeky cousin or friend and see if they can help you out. Honestly if you just poke around on google you should be able to find enough tutorials and help to get these basic services running.

Once you have your LAMP (or AMP) server running the rest is quite easy. Login to your MySQL database (any easy way to get clean access to your database is to install phpMyAdmin and then go to “localhost/phpmyadmin” in a web browser on your server computer). You’re going to create a database called “goners”. Next you’re going to create a table called “users”. When making this table, go ahead and create a column called “idx” which is an INTEGER that AUTO-INCREMENTS and its INDEX is UNIQUE. Now you’re going to make a few more columns, all of which should be TEXT types. The columns you want are “name”, “pass”, “hint”, “secret”, and “email”. You need to make 1 last column called “opt” but this column should be type BOOLEAN.

Phew! Still with me? To actually run the server you need the ZWG socket server script. This is a PHP script is self-contained, and runs the ZWG “socket server” (you don’t need to know what a socket server is but just know that that’s the name of our game server). To get the socket server running you need to make minimal changes to it. It just needs to know the login info for your MySQL database and your local and public IP address. You can open up the server script (zsockShell20.php) with any text editor you want. You should have a MySQL user name and password (often it’s “root” and “root” or “root” and nothing), edit the mysql_user and mysql_pass variables to be equal to your username and password. The script is going to access the “goners” database, so if you followed the steps above you don’t need to change that. The only other values you need to change are the ip_address and port. Please note that this is your LOCAL ip address. If you try to use a website or google to find our your ip address it will return your public ip address which is not necessarily the same as your local address, so please follow these next steps.

To find the local ip_address on your computer, if you’re using Linux type “ifconfig” from the terminal window. In Windows typing “ipconfig” from the command line should work. In either case, after typing those commands you’ll get a list of the network connections on your computer. Look for your ethernet or wireless adapter and then look for the ip address listed (“inet address” in Linux and “IPv4 Address” in Windows). In my case the address was 192.168.1.111. Whatever your address is, put that in the php file for ip_address.

Holy jeez you’re almost there! The last step really, is to decide what port to use. If you don’t know anything about ports, leave it as 2081. If you do know about ports, change it to whatever you want/need it to be. And… now you’re done fella. Open up a new terminal window (Linux) or command prompt (Windows) and navigate to the folder that contains the socket server file (zsockShell20.php). Then type “php zsockShell20.php”. Voila… the server should initalize (in the newest version of php I get some warnings when I initialize the server… sorry about that. The php file may need some updating, but they’re just warnings, it should still run fine). Assuming the server is working you can go to google and type in “what is my ip address”. It will tell you your public ip address. This is the address you will give to your friends for connecting to your server. Make sure to give them the port number too if you changed it from 2081. When they start goners they just need to enter your public ip address and port and hit connect and they should be able to play through your server! If you watch your terminal windows/command prompt where you’re running the socket server, you should be able to see every time that your friends do something or speak to your server! (NOTE, that when you reboot your computer or anything like that you will need to restart the php script. Open a new terminal window/command prompt, navigate to where your php script is and type “php zsockShell20.php”. You need to do this every time you want to turn your server on and if you close the window you’ll stop the server).

The only possible hitch you guys might encounter is if you use a router at home. You’ll have to turn on something called port forwarding on your router. Each router is different so you’ll have to take it upon yourself to figure this part out, but the basic idea is simple. When someone connects to your public ip address on a certain port (e.g., 2081), they’re trying to send your server data. The router is getting these messages but doesn’t know which computer should be getting these messages. Port forwarding tells your router that any communication on port 2081 (or whatever port you ended up using) should be sent to your server’s local ip address. So you need to go into your router’s settings and forward all 2081 (or whatever port you used) communication to the local ip address of your server. (It sounds hard to do but believe me it is easy once you look up how to do it).

Anywho, voila! Enjoy! I hope it all works. I’d like to say let me know if you encounter problems and I will try to help but I’m going to be dead honest with you guys, you’re better off turning to google or posting on message boards asking for help. The whole reason I’m putting all this code online finally is that I just don’t have time to maintain the game any more. You can try messaging me if you need help, but just a heads up, I can’t guarantee a quick response.

THE REST OF THE DAMN CODE
All right, so you downloaded the server code, put up your own server blah blah blah. We both know that you want more. You want to edit my game, change stuff in it, maybe improve the damn thing or fix something that’s been bugging you a long, long time. Well you know what? Go ahead. I’m making the source code for the actual game is available under the GPLv3 license. What this license means is that the game has to remain open-source, and that you can’t close it up and try to sell it or anything like that. The good news is that means anyone can now tinker with the game, the bad news is that you’re going to be subject to my messy, messy code. You can get the full source code for ZWG here.

I should say that I fully intended to clean up the game’s inner workings, but largely by not having enough time to finish a game comes not having enough time to clean up a game. So the code is provided here as is. I can’t make any guarantees about its readability or promises to help people decipher it. That said, I do try to comment my work as much as I can and use sensible names/structures for things. But you’ll have to be your own judge for how good a job I did. I know that means it might be hard to wade through, but hey, better than nothing, right?

To edit the code you’re going to need a Flash AS2 editor and compiler. I was compiling the game into Flash 9. If there’s any other essential info that people need about the code I can provide it if you contact me, but there shouldn’t be much else you need to know. If you do want to tinker, the network code exists entirely in one action script and the game’s logic code exists on another (frames 2 and 10 I believe). So now you know where to find everything.

Lastly, I’ve packaged up all the art and resources you’ll need to compile the game. Enjoy. There are some incomplete tilesets that were never implemented like stores and supermarkets and such. Originally I envisioned the city being much more diverse with different types of buildings and different types of objects being found in buildings. I never got around to implementing a lot of those ideas, but you’ll see in the art that I was working on it.

FINAL WORDS
Guys, it has truly been a blast. When I first had the idea for ZWG so long ago, I never really thought it would see the light of day. I remember scribbling down some notes about, what I thought would be, a fun and interesting zombie game, but I never thought I’d have the time to really try to put it together. Not to mention I didn’t think I knew enough to program an online game (this is my first attempt). Little did I know that one day ZWG would be implemented. Yes, there were more ideas I had that never did see the light of day, but in all honesty 90% of what I scribbled down that first day ended up in the game.

Thanks for playing. Thanks for reading this. And don’t let the game die. Zombies, after all, are supposed to live forever. Maybe one day I’ll be able to come back and finally finish goners the way I had originally envisioned. But as I said, the game right now isn’t that far off. Either way, until then, it’s up to you to feed it with your decaying corpses, or maybe even take up the challenge of building on the game that I started. Ciao folks! Happy hunting! And have fun with all this!!!

ALERT: Study Reveals Pittsburgh Unprepared For Full-Scale Zombie Attack

PITTSBURGH—A zombie-preparedness study, commissioned by Pittsburgh Mayor Tom Murphy and released Monday, indicates that the city could easily succumb to a devastating zombie attack. Insufficient emergency-management-personnel training and poorly conceived undead-defense measures have left the city at great risk for all-out destruction at the hands of the living dead, according to the Zombie Preparedness Institute. (read more)

Make a Friend

Hey guys. So a new version of Goners is now out. There are only a few minor bug fixes in it but the reason it’s being released is that Goners itself links to the new forums that have been setup. These forums were setup in an attempt to help you guys find other players to play Goners with! If you play and enjoy Goners, please check out the forum and put up a post. Tell people when you’re available to play and maybe, someone will write you back, and ask if you’d like to try a match together.

Goners v0.15!

Hi all. So I’ve just now released Goners v0.15. If the links on the main page don’t take you to v0.15 you probably just need to reload the page and then the links will update (this occurs if your web browser is caching pages). Anyway, the newest version of Goners contains a handful of small fixes and improvements to S.T.E.V.E.N. (the bot AI) and one gameplay change. Namely, zombified players can now move through barricades.

In the last update, I changed it so that zombified players no longer receive 8 AP at the start of their turn, but instead earn +3 AP/turn. This change was to balance the fact that zombie players could, theoretically, just hammer players with power cards one after the other, making it very hard for those players to do anything. By reducing the AP of the zombified players, those power cards will occur less often. However, in nerfing the player controlled super zombies in this way, it also made playing as a super zombie just that much more difficult. For example, how are you supposed to stop a player from finding the cure when you don’t have enough AP to play zombies on him or her and the player is also barricaded up in a building so you can’t even get to them?! The solution, was to let player controlled super zombies disregard barricades. A side effect of this is that it creates even more motivation for players to kill off player controlled super zombies before they get too close.

All in all, I’m hoping the changes to the super zombie movement will make the game more fun. As for S.T.E.V.E.N., I’ve made too many small fixes to list. However, one big change in S.T.E.V.E.N.’s behaviour is that he will keep an eye out for players that are moving towards the helipad, hospital, lab, or power plant. Assuming he doesn’t have the Hope Must Go On goal, He’ll intentionally try to move those players away from those destinations and/or otherwise sabotage them.

Lastly, due to some spam bots messing with the wiki, I’ve had to disable anonymous editing. The wiki is still completely open and I encourage people to help improve it, but you will need to create an account and login before you can make any changes from now on.

S.T.E.V.E.N. Cometh…

OK before we get to the big announcement today, let me just say that I’ve made a small change to the gameplay of Goners. Zombified players no longer get 8 AP at the start of their turn. Instead, at the start of each of their turns, they earn +3 AP. In this way, undead players have to save up to use more expensive cards. It makes killing undead players more worthwhile I think, because it will wipe their AP clean, and make them start from scratch. It also prevents undead players from just hammering power cards on you one after the other. OK, on to the big news!

Today, I give you AI. Yes, the new AI for Goners has just now been released. I’m calling it S.T.E.V.E.N. (Strategic Tactical Environment and Virtual Engagement Network) because hey, why not? S.T.E.V.E.N. will now automatically take control of any empty player slots in Goners. Even if someone is playing with you and they drop out, S.T.E.V.E.N. will take over that player too! He is aware of the goals of each player he controls, and develops wants and preferences based on those goals. He will try to keep each player alive (assuming that works with their goals), and also try to sabotage other players. S.T.E.V.E.N. plays each player independently of the other, so there are no alliances between bots or anything like that here.

S.T.E.V.E.N. is already implemented in Goners. In order to activate him, simply download the new EXE or play directly via the new Play Now link (Linux and Mac only) and leave a player slot open when you start the game (UPDATE: These links are now obsolete. S.T.E.V.E.N. is integrated into the newest version of Goners accessible from the main page). The main page’s links have also been updated but do make sure that you reload the main page before you click on the EXE or “Play Now” links. Make sure that the file you are using is called “zwgoners014x”. (The X indicates “Experimental”, mostly because although S.T.E.V.E.N. can and will play the game with you, there are a few things I still want to improve before I’ll consider him “done”.)

So give S.T.E.V.E.N. a try, see how you like him. Again, he’s still in his early days so there may very well be small bugs. Remember to let me know if you encounter any. And finally, here is a list of things I know that need to be fixed in S.T.E.V.E.N.

Things to Fix in S.T.E.V.E.N.
* Currently S.T.E.V.E.N. disregards all barricades when controlling undead players
* When S.T.E.V.E.N. uses a card, sometimes it says he used it on someone, when it is just a positional card
* Rarely, S.T.E.V.E.N. disobeys weapon ranges and attacks from a longer range than should be allowed