The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 Re: Main Forum » Real Money Servers » 2014-01-26 14:05:57

The person hosting would just price game currency so that if all of it was sold, it would be less than or equal to the entrance fees people paid to get in. Not that I think the whole idea is that great.

#2 Re: Main Forum » Real Money Servers » 2014-01-26 10:17:12

The game design as it is now is vulnerable to certain types of cheating by hacked clients (removing the fog, etc), so making the ability to cash out be a regular thing rather than a one-off promotional occurrence would probably not work out very well. It could be fixed (server streams map to client as they explore it), but it would put a much higher load on servers than it does now.

#3 Re: Main Forum » Family » 2014-01-25 23:14:51

The path to the wife needs to be clear, but it doesn't need to be possible for an unarmed player to get to, like the safe has to be. So you can hide the wife down a ridiculously long path full of dogs.

The kids always go a predictable route to the exit, so they're useful for triggering things. The direction that cats and chihuahuas run in is dependent on where the player is, which can ruin a trap if a player cuts through and is on the wrong side.

If a player kills a kid, then the wife will come for them. If she has a shotgun, it can very easily catch players off-guard and kill them.

#4 Re: Main Forum » Automatic Robbery Notification feature with source code (Linux) » 2014-01-25 22:21:31

Yeah, I could see this being a bit much if everyone did it as it is now. I don't think pushing this as-is into the mainline would be great, but I'd hope it could maybe inspire future features and help out other tinkerers too.

Is your server able to have memcached (or redis) installed on it? I think I'll go through the server source code and add some caching so that many requests to read data don't ever have to hit MySQL. It helps a ton in my experience.

#5 Re: Main Forum » Invisible window bug » 2014-01-25 22:19:48

I get that problem occasionally on Ubuntu with various programs. I think it might be a window manager or video driver issue. I doubt it's CastleDoctrine's fault. Usually closing it and restarting it a few times, or logging out and back in fixes it for me.

#6 Main Forum » Automatic Robbery Notification feature with source code (Linux) » 2014-01-25 21:07:27

Replies: 2

I found myself leaving Castle Doctrine open all the time, and manually bringing it forward to hit the filter button frequently to check for new tapes of people robbing my place. I decided on automating this. It would be great if I got a notification pop-up whenever my house was robbed.

My first thought was to make a separate program that would check this, however, Castle Doctrine's server requires all communications to include an increasing sequence number, so if I ran my robbery-watcher program at the same time as my client, they would get each other disconnected (which could have fatal effects for me depending on what I was doing in-game). I decided to modify my game to watch my tapes list. Also, it looks like the server code might kill you if you make a request to check your tapes list while you're in a house, so one can only make it check your tapes list automatically while you're already sitting in the menu.

(I'd love it if there was some way to check your tapes list outside of the game without possibly interrupting your client's sequence number -- maybe HTTPS could be used to secure the server communications fully, without relying on a sequence number? -- and without risking booting or killing the player from a house -- the server could just reject giving the tapes list in that case. With these two things, anyone could make a lightweight program that checks their tapes list safely, independently of the game.)

So I modded the client's source code so whenever you're sitting in the tapes or houses list, every 45 seconds in the background it reloads the tapes list, and if there are any new tapes (that are unwatched, and it hasn't already notified for before) it triggers a desktop notification and sets the urgency flag on the window, so the window's icon flashes or is highlighted until you click on it. Now I can leave the game window open behind my other stuff, and I'll get alerted whenever there's new robberies against my house. (If you minimize the window, it goes into sleep mode, so it won't alert when like that.) Note that this is Linux only since I used libnotify and X11 stuff, but it wouldn't be hard too adapt for other platforms (CastleDoctrine's notify.cpp and minorGem's ScreenGL_SDL.cpp's setWindowUrgency() parts are what would need to be extended).

(The pop-up notification is at the top right. Also, if you look closely at the bottom of the taskbar on the left, you can see that CastleDoctrine's icon, the lowest [?] box, is lit up waiting for me to click on it.)

The modified Castle Doctrine source code is on sourceforge, and it relies on some modifications in my fork of minorGems too. To compile, checkout both of these in the same directory, make sure minorGem's directory is just named "minorGems", go into CastleDoctrine's directory, read build/source/HowToConnectToMainServer.txt, run ./configure, and then run make inside of gameSource/. Make sure you have the usual stuff needed for compiling CastleDoctrine, and then you also need the libnotify-dev package.

Nothing at all is changed in online play; it fully works with the main server fine. Note that the text files in the recordedGames/ directory made by this version can't be played by the official version of CastleDoctrine, though I made sure that the reverse works.

Board footer

Powered by FluxBB 1.5.8