Discuss the massively-multiplayer home defense game.
You are not logged in.
Pages: 1
Backpacks are now returned to your vault after 5 minutes of inaction, and also if you view security tapes. So, you can no longer use the backpack to keep tools hidden and safe from robbers.
Hilariously, this change brought 50 houses out of the woodwork that had been fully looted but were still hiding tools in their backpacks! They are now back to earning salary as a result.
This change happened server-side. As usual, keep an eye out for any strange server behavior. This time, I made a full database backup right before applying the change, though.
Offline
Slight bug; the items pushed into the vault through this don't actually seem to add onto the house price.
Offline
Oh.... yeah, not in the initial push of existing backpacks. I used a place-holder value of $100 for all of those existing backpacks.
But ever after, a separate value estimate (rounded-off resale value) is being track for every backpack. So, whenever backpack and vault are merged, the value estimate can reflect the true value of backpack items added. I'm pretty sure this part is working.
I wasn't able to assign true values for existing backpacks because I did the update with a MySQL query in one fell swoop, and there's no way to do the item-string to value conversion in such a query (the value calculation occurs in my code), so I just used a placeholder value there. That means that some houses are rather undervalued in the house list right now. As soon as owners touch those houses, though, each will be fixed.
Offline
the top house with $44,000...
was.. empty..
..but the vault had 90 guns.
edit: i have been robberying a lot and someone has been in my house the whole time. my cash/tools do not go into my vault until i return home, right?
edit 2: yes, good!
Last edited by largestherb (2013-06-24 13:38:23)
Offline
I wasn't able to assign true values for existing backpacks because I did the update with a MySQL query in one fell swoop [...]
Bit off-topic, but I'd like to ask - how have you found using a mySQL database
has worked out for this project?
I'd have been tempted to just use flat files and a directory structure, with
hand-rolled indices where necessary, and flock() or whatever for locking.
Would you estimate that using mySQL instead has, on balance, increased or
decreased pain over such an ad hoc approach?
Offline
I've used flat files for server-side stuff in the past, but would never go back.
MySQL + PHP are the quickest way to get complicated stuff done that I've ever found. The data storage and retrieval part of your project are done, right from the start.
Furthermore, it is SO easy to solve many common "programming problems" using a simple DB query without even writing any real code. These solutions are inherently robust, in that they usually fail and rollback in the case of a bug, instead of doing something that you're not expecting.
Finally, it's pretty malleable, in that I can change table structure in rather dramatic ways rather simply without breaking things. I never need to do anything manually, like writing scripts to filter and update data files after a structural change. Again, such updates can be done with simple queries.
Finally finally, it's really fast. Or at least fast enough where it doesn't matter. A black box that just works magically, and always works. I've never found a single bug in it.
The C side of my world (client code) is much more messy, time-consuming, and error prone because I don't have MySQL running there. You should see the hairy, branch-laden mess that is used to slurp in all the house object configurations out of a directory tree. That would be like one line in MySQL.
Offline
oh okay $50000000 floods into the game this is dumb again. send me a memo when its gone
Offline
Ah! But it was there all along, hidden in backpacks.
Though that hidden value suddenly did cause a bunch of houses to start earning again, which is where all the extra money is coming from.
Offline
Thanks for the mySQL pitch, that's really interesting.
Maybe it's time I actually finally learnt how to use it...
Offline
...and with that Batman is dead.
R.I.P. +
| |
....| |..
Last edited by dalleck (2013-06-25 01:26:13)
The rich aren't safe. Nobody is safe. -jere ...but the smell wafts out from the pit, obviously. - Jason Rohrer
And the more dickish they are, the more I feel like beating a house to destruction after finally figuring it out. -bey bey
Offline
Wot happened?! Influx of that much cash and still only 6 houses on the block?!?! :-o
In fact you can be batman.
(if he robbed houses and murdered families.) - Dalleck
Offline
I think a lot of that cash was spent on ladders.
Offline
Looks like it. Funnily enough, I just happened to login after somebody had pumped up a starting layout house to 30+k with guns. Don't mind if I do.
In fact you can be batman.
(if he robbed houses and murdered families.) - Dalleck
Offline
bit better now~
Offline
Pages: 1