|
Post by zaimoni on Apr 17, 2016 9:07:06 GMT
Repository: github.com/zaimoni/RSRevived/ . Downloads are at github.com/zaimoni/RSRevived/releases . StatusUndead. Revived 0.9.9.5 has risen. The latest unstable release is November 18, 2024. Using the private messaging feature to copy-paste full bug reports to me is preferred. There is precedent for copy-pasting full bug reports in this thread.
|
|
|
Post by zaimoni on Apr 17, 2016 9:13:44 GMT
Tools: JetBrains dotPeek C# decompiler - note that everything else .NET-related by JetBrains has a monetary price. This doesn't.
Visual Studio 2015 Community Edition- You will have to log in, using your Microsoft network login (e.g., what Win10 nags you for when setting up) to render the duration indefinite, rather than a 30-day demo.
- This login also enables dotPeek to see it can export the source code for RogueSurvivor into a Visual Studio project.
- The sole free target format (MSIL) is incompatible with the SFML dlls (x86). The other four formats cost $$$.
Install Visual Studio first, then dotPeek. This allows dotPeek to integrate with Visual Studio. Then: ask dotPeek to construct an entire Visual Studio C# project for RogueSurvivor.exe . (I plausibly also have to do the configuration utility, but that can wait.) Opening the project will trigger a one-way upgrade in Visual Studio 2015. The first commits after baseline were squelching errors and warnings.
|
|
Fool
Junior Member
Posts: 58
|
Post by Fool on Apr 17, 2016 19:33:31 GMT
Good on ya mate! You never cease to surprise me Zaimoni. So you managed to decompile and recompile the code? I take it the code is unlabelled, like classes and other? So you're going to have to figure out what classes and lines correspond to different parts of the game?
|
|
|
Post by zaimoni on Apr 17, 2016 21:55:31 GMT
Both RS alpha 9 fork and the config utility have been decompiled and recompiled, yes. SFML has been disconnected from both programs.
The code is mostly properly labeled, as expected from the Cheat Engine seeing all of the class, method, and field names. The compiler generated names for presumed lambda functions are, of course, improperly named. CodeReflect reported that the member function that implements zombification looked obfuscated, so I expect that to be particularly illegible.
As of time of posting: The config utility does not crash on open. I suspect it will work as-is, but have not tested yet. The authentic RS alpha 9 config utility will interoperate with RS alpha 9 fork for now. (I was careful not to change any enumeration values when disabling SFML.)
RS alpha 9 fork still crashes on open. (It's no longer Windows stomping it, it's a plain old runtime error that would be compile time in C++.).
|
|
|
Post by zaimoni on Apr 18, 2016 1:57:34 GMT
RS alpha 9 fork still crashes on open. (It's no longer Windows stomping it, it's a plain old runtime error that would be compile time in C++.). Fixed. RS alpha 9 fork is now reanimated, with exactly the same intended features as RS alpha 9. I was wrong about the cause of the runtime errors. I hope it was a subtle bug in decompilation. C# does not cope with multiple enumeration labels with the same numeric value.
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Apr 18, 2016 12:41:45 GMT
Yeah, rock on! time to add destructible cars and buildings. (HAHAHAHA) And ninjas, it needs more ninjas
|
|
Fool
Junior Member
Posts: 58
|
Post by Fool on Apr 18, 2016 17:52:49 GMT
Both RS alpha 9 fork and the config utility have been decompiled and recompiled, yes. SFML has been disconnected from both programs. The code is mostly properly labeled, as expected from the Cheat Engine seeing all of the class, method, and field names. The compiler generated names for presumed lambda functions are, of course, improperly named. CodeReflect reported that the member function that implements zombification looked obfuscated, so I expect that to be particularly illegible. As of time of posting: The config utility does not crash on open. I suspect it will work as-is, but have not tested yet. The authentic RS alpha 9 config utility will interoperate with RS alpha 9 fork for now. (I was careful not to change any enumeration values when disabling SFML.) The zombification code shouldn't be too hard to reimplement. Detect the conditions for zombification, and create a handler that copies over the relevant stats from the survivor instance to a new zombie instance. Theres other ways you could do it, but thats how I would implement it. I take it you're familiar with C#?
|
|
|
Post by zaimoni on Apr 18, 2016 18:40:00 GMT
Ah...but there are corner cases. dotPeek decompiled the Zombify function so there's something there. Right now what's scheduled is a basic "read every single line of code for a good reason" overview. It appears that the alpha 9 release was forced by external circumstances; the heuristics backing the AI dropping items (new in alpha 9) look like they need only an hour or two of systems analysis to specify how to improve dramatically.
I had to disconnect DirectX as well; the latest version of DirectX that interoperates with C# is DirectX 9. (Microsoft found out the hard way that garbage-collected languages and realtime graphics don't mix.).
My fluent languages are : C++ (first one, have been using on-and-off since 1986), Perl (using since 2000). Second-tier languages: JavaScript, PHP, Ruby, Python. Third-tier: various flavors of Pascal and BASIC, and FORTRAN.
This is the first time I've touched C#. It's a conventional C-syntax language, so the only slowdown I'm taking is from looking up syntax and memory model. It should promote from third-tier to second-tier within two months or so.
|
|
L33TMaster
Member
I lurk and mess with tiles, not much else to say.
Posts: 108
|
Post by L33TMaster on Apr 20, 2016 12:16:10 GMT
Who taught you all that? College, Self-taught, or mentor? Oh, I made a link to this in the cata forums to show that RS is not dead
|
|
|
Post by zaimoni on Apr 20, 2016 20:08:25 GMT
Link to this from other forums: Thanks.
It's mostly self-taught. (Perl and PHP are most of how I'm self-employed.) I do have college credits for about three-fourths of a bachelor's degree in computer science as course work, but they're 20 years old. (I had to drop the computer science major when the mathematics major coursework got too demanding.)
|
|
Fool
Junior Member
Posts: 58
|
Post by Fool on Apr 20, 2016 22:48:26 GMT
Wow, Perl? You must love what you do. I'm not proficient but some of densest code I've ever seen was in perl. So many hackers. Whats your plans for RS?
|
|
|
Post by zaimoni on Apr 20, 2016 23:16:33 GMT
It's too early to talk high-level plans. I need to see how things look after the savefile has been de-bloated and minor tweaks made (in particular, line of sight (LoS) and line of fire (LoF) need basic symmetry properties working). Any significant AI improvements will be very memory hoggy, and that has to be paid for somewhere. The manual garbage collector calls have visibly improved response times, so a spot release once LoS/LoF are sane is indicated.
The current maximum district size of 100 appears to be closely related to the minimap. The rash of time-related constant back-substitutions yesterday (April 19 2016) was to set up everything "scaling properly" just by changing WorldTime.TURNS_PER_HOUR , but with the current level of resource usage it can't really be dialed up even if the minimap is revised to cope. (Right now, food and sanity should scale, but stamina and district dimensions won't.)
|
|
Fool
Junior Member
Posts: 58
|
Post by Fool on Apr 21, 2016 17:33:10 GMT
Wow that code is kind of thick and not at all self-documenting. Welcome to the jungle. You're talking about making LoS sane, do you mean you're cleaning it up so we can see whats going on in the code, or making it more performant? I take it you're talking about the " AsymetricBresenhamTrace/AngbandLikeTrace" lines in Los.cs?
|
|
|
Post by zaimoni on Apr 21, 2016 20:51:07 GMT
Yes, AsymetricBresenhenamTrace [sic] is the old implementation. It has the slight disadvantage that whether these work, depends on your exact coordinates in-game:
...... ###@## .S.... s.....
..@.. ##.## .S... .s...
That is, whether the wall blocks your shot is not constant. A correct implementation, would be consistent (good) but probably not allow both (bad). (Both should not block shooting the S)hamber, because if you could manually target the s)keleton, the path could be forced to be hit the S.)
There are corresponding spatial asymmetries in the field of view, including seeing squares that are geometrically blocked from view. This is before the "los fuzzer" that makes not-seen squares with three adjacent seen squares, visible.
|
|
|
Post by zaimoni on Apr 22, 2016 4:26:56 GMT
Wow that code is kind of thick and not at all self-documenting. Welcome to the jungle. You're talking about make LoS sane, do you mean you're cleaning it up so we can see whats going on in the code, or making it more performant? I take it you're talking about the " AsymetricBresenhamTrace/AngbandLikeTrace" lines in Los.cs? There was some effort at a literate programming style (most function names are English phrases). Besides all comments going away when compiled, the C# compiler is very aggressive about constant replacement. The only reason the constant definitions are still there, is that the C# MSIL format is designed much like the *NIX unified executable/library format. That is, the Rogue Survivor *.EXE is *also* a library that a C# compiler can link against. That's how the original configuration utility got its SetupConfig class; it simply imported the definition from the main Rogue Survivor game. I'm guessing that the original alpha 9 release was a debug build; the erratic exception throwing checking would be within #if DEBUG ... #endif blocks in any reasonable coding style. The living AIs need re-documenting before doing anything remotely interesting to them (like remembering to turn off flashlights when going to sleep).
|
|