Friday, December 20, 2013

Retrolab Quake II Server

The first Linux Quake II server I ran was around 13 years ago, on a Pentium 166 with 100MB of RAM and a 4GB hard disk running Mandrake Linux 6.5. The server could support roughly 4 people, as well play the Quake 2 client itself in software-render mode with the server churning away in a terminal window. It felt really solid for such a fun first-person shooter at the time. I recall a segmentation fault error once or twice, but for the most part the server ran flawlessly. A couple of friends and I had a lot of fun with it for a while; forming a "clan" and creating a few maps and mods for Quake II, Doom II, and Quake 1.

Recently, I've been working with Amazon Web Services and thought it would be fun to launch a dedicated Quake II server in Amazon Linux. I've written a general guide below on the experience.

Everyone is welcome to come play at retrolab.servebeer.com:27910 and try to get a high score. The only thing required to play is a copy of Quake 2. The server is currently running a insta-gib railz mode using the Lithium mod. I'm also working on getting configuration files ready for deathmatch and possibly mods other than Lithium to toggle between every few days.




It wasn't exactly as easy as I assumed it would be going into it. While the more modern r1q2ded binaries make things a bit simpler, and the now near-ancient Linux libraries on ftp.idsoftware.com still function, the problem is getting the server to run as a "service" or "daemon". I've yet to get around to finishing a proper init.d script to be used for this (UPDATE: I have now. See newer post for script), but through some trial and error I did manage to figure out a command to run the server and keep it running after closing the terminal window.

 cd /home/ec2-user/quake2/ && ./r1q2ded +set rcon_password 'password' +set game lithium +exec server.cfg > /dev/null >&1&
I can then use the following to ensure the server is running and check the process id so I can kill and restart the server when needed.

 sudo netstat -tulpn | grep :27910

A couple of other pointers for anyone else wanting to run a Quake 2 server in Amazon Linux are:

1. You should make sure the Quake 2 port (27910 by default) is open in your security group for both TCP and UDP protocols

2. Grab the original unix game binaries from ftp://ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz and extract into your Quake2 folder.

3. sudo yum install glibc.i686. Also, run sudo yum whatprovides libz.so.1 and sudo yum whatprovides libgcc_s.so.1 to learn of what packages you need to install to get those in, and sudo yum install those.

4. Use the newest r1q2ded binary from http://old.r1ch.net/stuff/r1q2/

5. (Ignore if you are not planning on running mods) Also grab any available newest binary for any mod you may plan to run. In my case, I wanted to run the Lithium mod to customize my game, and the old binary I used to use no longer worked properly. When connecting, I would see a kaleidoscope effect in my client window or spawn outside the map until I found the newest Lithium II version and added it to the server.

If anyone reading this is trying to set up a Quake 2 server in Amazon Linux and having a problem, please leave a comment.

Note: This my first non-Interactive Fiction related post here. If you are following the Planet-If feeds, you should not be seeing this via that feed. All IF-related posts are labelled as such.

See my more recent post that contains the init.d script for this here!


Saturday, October 19, 2013

EctoComp 2013

Sometimes, it can be fun to be spontaneous. Earlier this month, I saw an announcement for another Ectocomp at IntFiction.org and came up with an idea for an entry. EctoComp has interested me since I began making my first work of interactive fiction, but the time constraint of 3 hours was completely unrealistic to me as I was just starting to learn how to use Inform7 and creating Hallow Eve.  

19 days later, I sat down with a piece of notebook paper filled with notes and map scribbles I had jotted down from random ideas since then, and wrote the game using Inform7 in just slightly over two and a half hours. This barely allowed time for a very helpful play-tester to spend about 30 minutes or less on it to give me any feedback on bugs or grammar and only 15-20 minutes left for any bug-fixing and improvements.  




I don't want to go into the details of the game yet other than sharing the cover for it above and the fact that the game is short given the time constraint of its creation. Also, I hope people enjoy playing it as much I enjoyed making it. After the competition is over, I will have a website link for it here to play and download the source code. Speaking of source code, I realized that I have not yet released the source for Lunar Base 1 yet. I will try to get to that soon as well.




Saturday, September 14, 2013

End of Summer Update

 The dust has been collecting here since Janurary. Time for an update!

Free time has been very short since the last update. Things with my current job never did slow down. If anything, they became more intense and time-demanding. The work is both exciting and interesting for me, so I can't complain. Some of the things I've either learned from scratch or improved along the way prompted me to start my own web browser game engine, which is a Wizardry-like CRPG type thing. I'm not sure how much will actually get done with this, but it's a fun side project to tinker with. But of course, nothing half as Robb Sherwin's upcoming game, Cyberganked.

Within the bits of free time I've had, I found myself reverting back to simpler things. Actually playing some games rather than writing them, and most of these being older games. I acquired a Commodore 64 setup over the past few months, including a Zoom Floppy. More than a few hours have gone into playing games like Wasteland and other RPGs on this setup. This has been a bit of inspiration for creating my own "retro" graphics for use in my games.

One such game is one I worked on some more this morning called "Surf's Down". It's original intention was for it to be a non-traditional IF written in Hugo for an upcoming Hugo Comp. That competition has yet to come, but I continue working on it here and there because it's been a good learning exercise for me as I write the more complex DPRK game. Hopefully the short source code of Surf's Down will also serve as good example code for others learning Hugo as well.

Surf's Down is basically a Hugo conversion of an old Atari 2600 game prototype which was never released, called Surf's Up. I fired up the game on an emulator and was actually a bit impressed with some of the design aspects of the game, especially the beginning phase of paddling out into the ocean. I've been a surfer for quite a while myself, and despite the very out-dated graphics, I felt the game managed to somehow capture the feeling of going out into the waves. Unfortunately, the actual gameplay phase of the Surf's Up left much to be desired. The gameplay in my game is decision-based, yet all decisions are made using cardinal compass points.

Progress on Three Days in DPRK has been much slower than I had hoped for. At one point, I was considering trying to enter it into IFcomp 2013. In retrospect, I'm glad I did not. While the game is roughly three-fourths complete, it would have been way too much of a rush to try to finish something I'd be confident in entering. Instead, I look forward to playing the games of others. Perhaps I'll have something ready for Spring Thing 2014. Though, I think Interactive Dreaming would be a bit more well suited for that one.

The actual code of Interactive Dreaming hasn't been touched since my last update here, but the story and materials for the game continue to slowly build. The conversation system also needs to be redone now that I've removed a prototype system I used in Lunar Base 1. Trying some recent ones others are using has some ideas about what I'd like to use or create myself, but I'm still researching this. A new release of Inform may affect this as well. While I'm eager to try the new version once released, I'm not sure how smooth it will be to compile Interactive Dreaming along with all of its required libraries.


Thursday, January 17, 2013

2013 IF Plans

This year I will be working more on Interactive Dreaming along side another project I've recently started, called Days in DPRK.

The general prototype framework of Interactive Dreaming feels okay, but one of the first things I will be doing is completely changing the conversation system. I originally used one that ended up in Lunar Base 1, but that doesn't feel flexible enough to be quite what is needed for dream conversation. I think I will just test out a few systems or try creating a hybrid of one specific for the anxiety/lucidity statistics. For now, the best thing to focus on is fleshing out most of the rooms and developing a few puzzles that will also utilize those stats.

(Interactive Dreaming)

Days in DPRK will be my first game written in the Hugo language. Because there's sure to be a bit of a learning curve, I don't want to get too over-ambitious with my plans for it, but I do think it will be an amusing adventure (though it may be a bit short). The concept is that you are spending 1 day in the life of a tourist in North Korea, the 2nd day you are a resident of Pyongyang, and the last day you are in another different situation. I don't really want to elaborate on the plot much further than that for now.

(Days in DPRK)

Other than that, I don't know that I'll be doing much else. Paid work lately has been rather hectic, but I am learning stronger programming skills as a result of that which will help in all future game programming projects.