Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF and learning to develop games  (Read 453 times)

Mephistopheles

  • Escaped Lunatic
    • View Profile
DF and learning to develop games
« on: January 11, 2023, 07:19:35 am »

Hi,

Long time lurker, first time poster ( I think)

I'm trying to learn how to code and have some questions.
When you download df it's compiled I believe. Is it possible somehow to look into the code for research?
Or is that impossible when compiled (sorry if I'm using terminology wrongfully).
Df's logic is almost magical to me in that regard. And I only know math not code, and figured I could reverse engineer a bit to learn c++/

Thx,

M
Logged

Mephistopheles

  • Escaped Lunatic
    • View Profile
Re: DF and learning to develop games
« Reply #1 on: January 11, 2023, 07:40:07 am »

Also I've just learned about SDML for ascii but obviously I need to learn C++ too
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DF and learning to develop games
« Reply #2 on: January 11, 2023, 09:12:52 am »

DF is closed-source. Only Toady and Putnam have access to the code.

The only way to figure out what's going on is to run it through a disassembler, which requires knowing assembly and is a painful slog. There is DFHack, though, where others have already reverse engineered parts so they can hack DF to do stuff. Here's a function that returns the plant/tree at a given tile coordinate.

I'd say DF is not a good way to learn C++, given its complexity.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?