Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Beta-test a mining-related utility  (Read 8960 times)

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Beta-test a mining-related utility
« on: September 05, 2008, 07:28:21 pm »

Wanted: a few good dwarves to test a utility related to mining.

Prefer experience with programming and/or program testing.

Edit: now at Stone Sense beta 3

This utility is not in its final form; it is a feasability test.  Still it may be somewhat useful.

What does it do?  That... is a secret.

Feedback welcome in this thread, via this board's PM, or on my Wiki Talk page.
« Last Edit: September 15, 2008, 10:57:51 am by 0x517A5D »
Logged

Tibbles

  • Bay Watcher
  • Kobold Mechanic
    • View Profile
Re: Beta-test a mining-related utility
« Reply #1 on: September 05, 2008, 07:32:29 pm »

Asking us to test it without telling us what it is supposed to do is a good way to make sure that no one will [behave politely, apparently].
« Last Edit: October 20, 2008, 02:23:29 am by Toady One »
Logged
GODAMMIT KOBOLDS

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #2 on: September 05, 2008, 07:57:39 pm »

Asking us to test it without telling us what it is supposed to do is a good way to make sure that noone will test your shitty program, bumblefuck.

Thanks for sharing!
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Beta-test a mining-related utility
« Reply #3 on: September 05, 2008, 08:55:20 pm »

He said it like a jackass, but yes.  You won't get any takers without telling us what it does.
That just makes us suspicious.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #4 on: September 05, 2008, 09:12:55 pm »

He said it like a jackass, but yes.  You won't get any takers without telling us what it does.
That just makes us suspicious.

Full source code is included.  Feel free to indulge your suspicions.
Logged

Noble Digger

  • Bay Watcher
    • View Profile
Re: Beta-test a mining-related utility
« Reply #5 on: September 06, 2008, 12:50:29 am »

Gee, I get to read your source code to help you beta a utility that I don't know what it does? Sign me up!
Logged
quib·ble
1. To evade the truth or importance of an issue by raising trivial distinctions and objections.
2. To find fault or criticize for petty reasons; cavil.

Lord Dullard

  • Bay Watcher
  • Indubitably.
    • View Profile
    • Cult: Awakening of the Old Ones
Re: Beta-test a mining-related utility
« Reply #6 on: September 06, 2008, 01:36:34 am »

@ OP: To reiterate what has already been said, it'd probably be a good idea to tell people what your utility is supposed to do or it'll be impossible to try and find bugs (how would you know if they're bugs if you don't know whether the program is supposed to be behaving in such a way?).

@ Tibbles: You have a lousy attitude, and this isn't the forum for it. May I suggest this forum instead? *reports to moderator*
Logged

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: Beta-test a mining-related utility
« Reply #7 on: September 06, 2008, 02:12:35 am »

@ OP: To reiterate what has already been said, it'd probably be a good idea to tell people what your utility is supposed to do or it'll be impossible to try and find bugs (how would you know if they're bugs if you don't know whether the program is supposed to be behaving in such a way?).
Prefer experience with programming and/or program testing.
Considering the source is <200 lines, I'd say that any decent programmer should be able to read it. Maybe not understand the assembly portion, but should be able to read and understand the code. Without stating what is done, it will probably limit it to as 0x517A5D prefered: programmers.

Feedback [...]
It crashed on me, however, when I recompiled the code, it didn't crash. The crash occured somewhere between where it says "I am stone_sense" and when it prints df_pid. The crash was caused by "call eax" and eax was null.

After getting it working, and verifying that it was working. After comparing what I counted with the numbers in the source file, then yeah, I believe it did work. I must say, it's kinda nice.

After I looked at the ini file... can I get a copy of v0.28.191.40c too? :P
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #8 on: September 06, 2008, 03:39:47 am »

It crashed on me, however, when I recompiled the code, it didn't crash. The crash occured somewhere between where it says "I am stone_sense" and when it prints df_pid. The crash was caused by "call eax" and eax was null.

That is a bummer.  Tomorrow I'll take a look with a debugger/disassembler.

Did it take Dwarf Fortress down with it?  If so was it a crash or a hang?

Also, what compiler did you use?  I was using gcc-mingw, but I also have downloaded the free parts of MS VS9, so I could use that.  I'm just more familiar with the Unix toolchain.


Quote from: Jifodus
After getting it working, and verifying that it was working. After comparing what I counted with the numbers in the source file, then yeah, I believe it did work. I must say, it's kinda nice.

Cool.  It's overpowered at the moment.  I am hoping to scale it with miner skill, up to maybe 5 for legendary.  8 is 17x17 which is way too much.

If you find any corner cases, let me know.  I have tested it at the edges of the map, it appeared to work okay and not go out-of-bounds.

I have found one oddity: it doesn't cause the large map blocks to be allocated, so there will often be a side or two which are "short" because there is no data available.  It goes away once you actually dig into that block.  (It should go away as soon as any part of the block is allocated for digging; I haven't tested that yet.)

Quote from: Jifodus
After I looked at the ini file... can I get a copy of v0.28.191.40c too? :P

Ah, typos.  I wish I had that version too.
Logged

ChJees

  • Bay Watcher
    • View Profile
Re: Beta-test a mining-related utility
« Reply #9 on: September 06, 2008, 03:41:44 am »

Woah! :o

Heavy stuff! (Looked at source) I am no memory hacker but this looks complicated :P.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #10 on: September 06, 2008, 02:39:59 pm »

Woah! :o

Heavy stuff! (Looked at source) I am no memory hacker but this looks complicated :P.

I admit the hexsearch.c module is over-engineered.  (But it was fun to write.)

As for the memory manipulation itself, I'm just changing some loop start and finish values.  4 bytes get changed.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #11 on: September 06, 2008, 02:58:33 pm »

It crashed on me, however, when I recompiled the code, it didn't crash. The crash occured somewhere between where it says "I am stone_sense" and when it prints df_pid. The crash was caused by "call eax" and eax was null.

There are only two call eax instructions in the utility, both in the mingw default unhandled exception filter.  That should not be chokeing.  Darn.  I'll throw in more error checking.  And maybe figure out how to turn on try/catch in C mode.
Logged

Xgamer4

  • Bay Watcher
    • View Profile
Re: Beta-test a mining-related utility
« Reply #12 on: September 06, 2008, 06:17:37 pm »

Stone Sense. Scale with miner skill.

Hmmm...
Would I be correct in assuming this is a utility to try and implement the "miners can sense what stone is around them" suggestions? 
Logged
insert something mind-blowing/witty here*

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Beta-test a mining-related utility
« Reply #13 on: September 06, 2008, 07:32:24 pm »

Stone Sense. Scale with miner skill.

Hmmm...
Would I be correct in assuming this is a utility to try and implement the "miners can sense what stone is around them" suggestions? 

Um... er... LOOK! What's that behind you?!
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Beta-test a mining-related utility
« Reply #14 on: September 06, 2008, 07:44:37 pm »

Stone Sense. Scale with miner skill.

Hmmm...
Would I be correct in assuming this is a utility to try and implement the "miners can sense what stone is around them" suggestions? 

Um... er... LOOK! What's that behind you?!
Do you really think that any member of this community could complete this project faster then you if you're already at the testing phase?  Look, you may as well just explain what you're attempting to make it do so your testers know exactly what it should be doing.
Nobody could possibly steal the idea and get it done faster, unless you're really not as far along as I'm guessing.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries
Pages: [1] 2 3