Posts for Derakon


Experienced Forum User
Joined: 7/2/2007
Posts: 3960
The description of the movie is inaccurate, as Shades is now used again.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
At a guess, ZSNES is not an accurate enough emulator to do it properly. There might be some emulator-specific way to trigger it in different circumstances, but I wouldn't know what it'd be. I'd suggest using SNES9x instead, on the assumption that BSNES isn't an option for some reason.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Many obvious things are only obvious once they have been already done. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
NitroGenesis wrote:
Should be published in the Dumpster tier where we place ridiculously bad movies that even the Vault wouldn't take.
Is this really necessary? Okay, the guy made a mistake by submitting an unoptimized TAS. That's no cause to just dump on him.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
In short, remember that a submitted TAS needs to beat all existing records in its category (or else be an entertainment-oriented superplay in which case time doesn't matter). If it doesn't, then it doesn't belong on the workbench. Sorry for the bad news. Welcome to TASVideos, and I do hope you stick around and polish those skills!
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Well, that bomb subweapon sure broke the game wide open. I wouldn't mind seeing this on the workbench.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
I haven't watched any of the WIPs, but I'm curious to see what this game is like when TASed. I played it ages ago on a borrowed Game Gear and seemed to recall it being rather interesting, but the final levels were beyond my skills. So I look forward to seeing this on the Workbench! Good luck. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
1970-01-01 is the "zero date" on Unix/Linux; looks like some post managed to lose its date data.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
KennyMan666 wrote:
That wouldn't work on account of how bombs don't actually damage enemies. They only destroy blocks.
What. And they describe it as his "secret weapon" and everything! Oh well.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
My thinking was that you would be able to drop a bomb from above and use it to both kill the enemy (thus not producing an item since the enemy is killed by the explosion) and break open the blocks. I'll grant that the delay before being able to charge a new bomb is pretty long though.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
When you're bombing through all those walls, you keep jumping down to the next level as soon as possible, which requires landing on a slime and doing a short bounce before you can start charging another bomb. Could you just throw the bombs from the upper level instead? Otherwise looked good! This is a very strange game.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
I'm sorry, what do you mean by HP Meter?
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
It's the increase in difficulty and the fact that most of the levels are really monotonous compared to SOR2. In SOR2 levels, you usually only have 3-4 "fights" to get through before you progress to a new environment (where a fight is a point where scrolling stops and you have to dispatch all of the enemies to continue). In SOR3 you have long, samey corridors with enemy after enemy all with entirely too much health. Bare Knuckle 3 is reasonably fun but still kind of monotonous, but SOR3 is a slog.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
The screen can't scroll anyway, if Blaze is stuck over on the left-hand side of the screen. EDIT: too slow.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Warp wrote:
BadPotato wrote:
(Such a solution would basically be "security by obfuscation" which is not a good idea.)
Well, it's not a good idea to solely rely on security through obscurity; however, that can make a useful component of making your security as a whole harder to crack. It just needs to not be the only component. Sort of like how it's reasonable to set up your SSH server on some weird random port just because most attackers will assume it's on port 22; that one minor bit of obfuscation can save you from a lot of attacks. But yes, if you're relying solely on security through obscurity then you're doing it wrong.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Awright, this is completed! The run looked great; nice job! Congratulations on finally finishing. I don't think the inconsistency about the new and improved Handshake of Death is a big deal. I mean, sure, ideally there'd be a run that is consistent throughout, but that run doesn't exist. This run does exist, and it's a good run, so it should be published. (Similar logic applies to your 1P run, but I guess that ship has sailed...)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Decorator functions are functions that modify other functions; there's some nice syntactic sugar in Python for applying them. For example:
Language: python

@callInNewThread def doSomething(): .... def callInNewThread(func): def wrappedFunc(*args, **kwargs): threading.Thread(target = func, args = args, kwargs = kwargs).start() return wrappedFunc
callInNewThread is a function that accepts functions as input and returns functions as output. In this case, it takes doSomething() as its input, and returns as its output a function that calls doSomething() in a new thread. As far as serializing, I'm not entirely certain how it'd work but I guess the decorator could simply act to register the function as a serializable function? The actual operation of the function need not be modified; the decorator would just note it down.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Alas, Pyrel is open source, so as you say, the hacker could just make a modified version of the game that inserts their malicious code into the savefile and then generates an appropriate hash/checksum.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
I actually don't want to use Python's serialization library (pickle), precisely because pickle lets you serialize code. As soon as you have "pickle.load()" in your code, you have a potential security vulnerability. Since players may distribute savefiles between each other, it is theoretically possible for someone to distribute a malicious savefile that would, when loaded, do Bad Things. This is almost certainly paranoid, but I consider it a good design principle to avoid known security holes. :) I'm willing to use Python's json library, though, since loading JSON objects is perfectly safe. In fact the main reason Pyrel uses json instead of, say, YAML, is because Python has the json library built-in, so it's one less dependency that prospective contributors have to install. As for intense coupling (ahem), it's more that there is a single object in the game state that contains all other game objects (it's the game map, and also serves as a database of sorts). Any lambda that has that object in its context perforce has the entire game in its context, whether or not it uses it. Unless I misunderstand how lambda contexts are set up. Enumerating the allowed serializable function pointers seems kind of brittle; every time you introduce a new function that you want to be able to serialize, you have to add it to the enum. I expect in practice that means you'd have a file in the project that knows about a huge proportion of the functions in the codebase. Making serializable function pointers into their own separate objects is a bit better (since you don't have that centralized list of things-that-can-be-serialized), but then you have to deal with giving the function access to member variables in its parent. Doable, but probably pretty fiddly. Maybe a decorator function could do the job, though? Basically it sounds like I can either have an "automagic" hacky system, or a more rigorously formalized system; the latter will be cleaner / more explicit, but requires significant extra work for anything that wants to be serializable. Hm.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
No offense intended, but that's a bit like someone asking for help with a math problem and being told they should try using a pencil. The file format will likely be JSON, in any case, since that's what is used for the other datafiles that Pyrel uses.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Post subject: Programming: serializing game state
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
I've been working on Pyrel, a roguelike implemented in Python, off and on for a bit over a year now. And it's now about time for me to start working on implementing saving and loading of the game. Yeah, you'd have thought I'd get to this point earlier; oh well. I've run into a bit of a snarl and would appreciate insight from the many experienced programmers here. I feel confident that I can write code that will serialize/deserialize game objects and the formal relationships between them (i.e. this object contains this other object, etc.). Where I run into problems is with function pointers, and worse, lambdas. For example, I have some game objects that are simply timers: they count down until their timer hits 0, then they invoke a function. So their game state looks something like this:
Language: python

"id": 10024 # Auto-incrementing; unique across objects "duration": 10 "func": [bound method Foo.foo of [__main__.Foo instance at 0x1004a73f8]]
or, with lambdas:
Language: python

"func": [function [lambda] at 0x1004a1de8]
(Pardon, had to replace < with [ in the code because otherwise it broke when displayed) In the former case, I should be able to map from 0x1004a73f8 back to a game object (since the serialization process needs to touch every object anyway, it's straightforward to get a mapping of object addresses to those objects), get the object's ID, and generate a serialization that says "Okay, you need to call the "foo" method of the object with ID 9782345". Then the deserialization process would have access to the recreated object with ID 9782345, and thus can look up its "foo" attribute, to recreate the function pointer. It'd be pretty dang hacky, but I think I could do it; I'd like to hear comments on this though. In the latter case, as far as I can tell, I'm completely boned. Lambdas contain both bytecode and context. Bytecode is verboten as far as I'm concerned -- as soon as you have any bytecode (or any text that you compile into code, etc.) in your savefile, you leave yourself open to malicious users distributing savefiles that do nasty things to unsuspecting players. Would this ever happen in practice? Probably not. But it's bad design anyway; for the same reason, Pyrel's datafiles are JSON instead of pure Python, even though the latter would be easier to load. And the lambda's execution context is almost as bad -- a single lambda could easily contain basically the entire program context. Am I missing anything here? I've just about convinced myself that I have to ban lambdas from any part of the program that needs to be serialized, but I'd love to be wrong. And I'm not especially happy with my proposed approach to [de]serialization of normal function pointers, but I can't think of a cleaner solution. Feedback is welcome.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
I strongly suspect that no remotely-complicated game is free of game-breaking bugs. :) It's just that Mario, Zelda, et al get thousands of times more scrutiny than most other games, so their bugs are more likely to be brought to light.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Wow, I'm just full of misinformation about this game, aren't I? Thanks again for the corrections; I'll stop complaining now.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
The thing that really rubs me the wrong way about this level is that it's a completely luck-based thing -- IIRC the rooms you need to enter are selected randomly, and every time you want to go into a room, you first have to kill the enemies outside. The pair of gunmen aren't too bad, but the Fabio clones are pretty horrible with their blocking and their jump-kicks. It's conceptually terrible. I'd hate to play this far on Mania (assuming I even had that much skill, which I don't) and then get screwed out of the good ending through no fault of my own.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Geeze, even with TAS skill you only have 15 left on the timer (~45 seconds). I can't believe anyone's ever managed to beat Mania difficulty with the good ending on console. Agreed with hegyak, though I'm not certain there are any other movies that have the tag "takes damage for entertainment". The "Takes damage to save time" tag also got inverted awhile back to "forgoes time-saving damage", since it's expected that runs take damage these days, if doing so saves time.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.