Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - bartavelle

Pages: [1] 2 3 ... 25
1
DF Modding / Re: DFHack 0.4.0.7b - tools and memory access library
« on: September 20, 2010, 11:13:50 am »
Ok. I know the items module is being dumped and blah blah... but what about materials?

Code: [Select]
#14 0xcd621e8 item_barst [0,-1,8,-1] 8 40 0 0 1 CAT bar
#1648 0xdea4740 item_barst [0,-1,9,-1] 8 0 0 0 1 MULE bar

Why does it think ash and potash are now cats and mules? lol

Probably because I decided to do it empirically instead of systematically reversing the material subsystem. I'll take a look when I have a bit of free time. Also I didn't realize the item module is to be dumped, why is that ? Because of the hackish nature of the accessors decoding "system" ?

2
DF General Discussion / Re: What language is Dwarf Fortress made in?
« on: September 13, 2010, 03:11:35 pm »
Oh and there is a case against intrinsics, you can cover yourself with shame if you don't realize that your compiler will optimize them, and possibly remove them altogether if you don't use the data they compute : http://www.pcworld.com/article/140064/hacker_uses_sony_playstation_3_to_crack_passwords.html :)

3
DF General Discussion / Re: What language is Dwarf Fortress made in?
« on: September 13, 2010, 02:38:26 pm »
The majority of mdcrack was written prior to 2001. It isn't "hand crafted" assembly, and even if was a lot has changed since it was written. The "sse" version of mdcrack is merely compiled with sse optimizations.

Ah I'm wrong ! I always figured it was SSE2 assembly as it was touted to be so much better than the competition. However, I do have a working example. The SHA1 and MD5 implementations in john the ripper. The original MD5 is just plain x86, and not too fast. For 32 bits versions I did provide a SSE implementation years ago, with the reverse trick (for MD5 obviously). I admit it could probably be made much faster, but not without breaking the very convenient macros I used, and thus ending with a nightmare of hand adjusting everything.

Or you could just use the intrinsics code I provided years later, after I saw that barswf program in IDA and realized why it was fast. It's much easier to write than the assembly, doesn't include the reverse trick, but is probably more than twice faster (I don't have hard number, but you are free to download and check it). It is even more dramatic with 64 bits.

I agree I'm far from being a good developper, but I still believe that :
* in the worst case, with applications that are not designed to break ICC, it is on par with hand crafted assembly
* on certain applications (like these hash functions) it will give you a much better result than most hand crafted assembly
* it will always be faster to write something fast with it
* it will be more portable (yes, not portable)

4
DF General Discussion / Re: What language is Dwarf Fortress made in?
« on: September 13, 2010, 02:02:43 pm »
Are you smoking crack?

No shit, the CUDA based fft library beats the snot out of libfft too.

Oh rly ? I'm talking about cpu only performance.

5
DF General Discussion / Re: What language is Dwarf Fortress made in?
« on: September 13, 2010, 01:51:51 pm »
I could care less about what it easier or not when neither option is that hard.

On the contrary, for several applications register allocation is actually the problem, and it is hard to do it properly. That's why barswf ran 3 to 4 times faster than mdcrack, using only intrinsics, while mdcrack was "state of the art" hand written assembly. Of course you could do it by hand, but it would just be the most tedious job ever for a reasonably large application. And gcc sucks at that. Clang is okay, but still not comparable to ICC for my applications.

And there is another good thing that comes from intrinsics : while they are not standard, they are somehow portable, contrary to inline asm. You could possibly compile something on gcc and visual studio. I didn't test visual studio performance, so I have no clue if that would be sensible.

6
DF General Discussion / Re: What language is Dwarf Fortress made in?
« on: September 13, 2010, 12:01:27 pm »
They are not functions, they are literately assembly instructions inside of your code. The advantage of intrinsics is that you can use high level if statements and such with them, so if anything you're really using high level assembly. If you are not using if statements or whatever, your code is identical to the assembly code.

And that you don't have to bother about registry allocation or memory moves, which can make a *huge* difference when a proper compiler (read ICC) is doing it for you. GCC and ICC actually produce a fairly different code from the same intrinsics.

7
Hello thread! Sexy Mustard here to prove i am not just WonderIdiot's imaginary friend and more importantly to replace all those bleh textures that we have packaged with v0.16 located here http://dffd.wimbli.com/file.php?id=3033  i hope you like my work ^.^

Edit: oops i forgot to say, to install them you need to just put the contents of the file into the images folder inside the materials folder.

You should produce a shot !

8
Those 3DS shots do look good.

9
DF Modding / Re: Runesmith - A DC like tool
« on: July 22, 2010, 06:59:37 am »
Actually, DC didn't even have a fully functional mood system. As in, you couldn't induce them and have them work. You had to wait, or press the instamood button and hope you got what you wanted.

Actually you could induce a mood, but not the related "mood job". I don't believe we are at this point yet, so it will require a bit more stuff in DFHack to enable it. On the other hand, it could be possible to tweak the instamood into doing more what you want (dwarf selection, mood type selection, but not final item selection). I personnaly did this a couple time with a debugger.


You also had to put the blood back in his veins, remove all bleeding and choking. As this was not implemented in DC, people used to have the creature be a temporary zombie, so that counters were reset. I'm not sure how this does with the new versions.

10
DF Modding / Re: Stonesense - Official thread
« on: July 01, 2010, 12:31:44 pm »
I managed to smuggle a screenshot of stonesense (undergrotto map) in this magazine http://www.ed-diamond.com/index_misc.php, issue #50.

11
DF Modding / Re: Runesmith - A DC like tool
« on: June 16, 2010, 12:15:53 pm »
Traits + gender switching are planned, don't think DFHack currently supports relationships. Maybe in the future :)

IIRC relationships are in an array (probably in the soul) and in this other structure that is used in legends. Could be horrible to edit and buggy when offloaded.

12
DF Modding / Re: Runesmith - A DC like tool
« on: June 12, 2010, 12:31:49 am »
Ah finally :)

13
DF Modding / Re: Dwarf companion 2, probably to be discontinuated
« on: June 07, 2010, 11:58:33 am »
Anyway, if you are discontinuing Companion I guess all I can say is thanks for all the fun.  I'll miss it, but you deserve free time. :)

It seems to be alright now, but there is somebody working on a tool that would do the same. If it is released soon I'll help him instead.

14
DF General Discussion / Re: Note on some utilities
« on: June 07, 2010, 06:59:54 am »
There was also more badmouthing associated to #dfhack, and apparently they are digging through some symbols that I released on accident, which I consider unethical.  They can do it, legally, as far as I know, but if they want to gleefully capitalize on my mistakes they shouldn't expect my respect.  I'm sure they don't care about that, anyway.

I'm not sure what this is about. I did complain about the complexity of some parts of the code, such as the new body appearance thingie, and I'm pretty sure there were many remarks about some implementation details that were not optimal. I do however believe that everybody on #dfhack love DF, or we just wouldn't invest the time.

As for everybody "shocked" about the reverse engineering use, it makes me feel like they need Captain Obvious. How exactly are you supposed to interpret the memory of a black box project without RE ? I do believe that many people have the wrong idea about how these utilities are written, and for which reason.

For me, the great value of DF is in the ideas that Toady has, and the sheer amount of code he produced, not in the implementation details. If I were to write a clone I would just read the changelogs. It takes a LOT of time to understand just a tiny part of code, such as, as I mentionned previously, getting the hair color of a creature. Without mentionning the stuff you get completely wrong because you miss a lot in such a large project.

Finally about the "don't care" line, I don't believe we are a bunch of bastards that only live to fork DF or dig bad things and make fun of them. I do like to see how things work under the hood, but if Toady really doesn't want us to look, I would just stop.

15
DF Modding / Re: Dwarf companion 2
« on: June 07, 2010, 02:48:11 am »
Seems like the dfhack thread just got removed. I don't really have a clue why, only that it was about some guy making a clone game and telling people not to donate (according to latests Toady's messages). I can't really see the relationship with dfhack, but it might mean that hacking mods will become outlawed. That means I will have more free time for other stuff :p

Pages: [1] 2 3 ... 25