Bay 12 Games Forum

Please login or register.

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

Author Topic: What code does Toady use to write DF?  (Read 1781 times)

noodle0117

  • Bay Watcher
  • I wonder what would happen if I pull it.
    • View Profile
What code does Toady use to write DF?
« on: July 22, 2011, 05:39:07 am »

And by that I mean, does he use C++, Java, C or some other kind of programming language to create the world of DF?

Just curious because I just began learning how to program.
Logged

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: What code does Toady use to write DF?
« Reply #1 on: July 22, 2011, 05:44:51 am »

C++, I believe. According to the .dlls packed with DF, he apparently uses Microsoft Visual C++ as a compiler.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

frodo0800

  • Bay Watcher
  • Son of Ilúvatar
    • View Profile
Re: What code does Toady use to write DF?
« Reply #2 on: July 22, 2011, 06:06:59 am »

if he used java instead of c++ your ram would explode when you breach the circus
Logged

noodle0117

  • Bay Watcher
  • I wonder what would happen if I pull it.
    • View Profile
Re: What code does Toady use to write DF?
« Reply #3 on: July 22, 2011, 09:16:54 am »

By that do you mean that Java is far more memory intensive?
Logged

Lancezh

  • Bay Watcher
  • Noob Inc
    • View Profile
Re: What code does Toady use to write DF?
« Reply #4 on: July 22, 2011, 09:33:28 am »

Its performance is under most circumstances just worse. While C++ is more complex in terms of debugging it performs simply better than Java. There are exceptions, but not many.

If you're interested. The Compiler is a huge factor:

http://www.developer.com/java/article.php/3856906/Java-vs-C-The-Performance-Showdown.htm
« Last Edit: July 22, 2011, 09:36:28 am by Lancezh »
Logged

Satarus

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #5 on: July 22, 2011, 09:53:41 am »

The NY Times article about DF says Toady uses C++
Logged
Quote
You need to make said elf leather into the most amazing work of art.  Embed it with every kind of gem you have, stud it with metals, and sew images into it.  Erect a shrine outside your fort with that in the center.  Let the elves know that you view their very skin as naught more but a medium for your dwarves to work on.

Tharwen

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #6 on: July 22, 2011, 01:16:18 pm »

C++ with the icons rendered as bitmaps using OpenGL.
Logged
[Signature]

Johuotar

  • Bay Watcher
    • View Profile
    • Some game projects
Re: What code does Toady use to write DF?
« Reply #7 on: July 22, 2011, 01:21:05 pm »

I read from somewhere that he started with C and then added C++ as he learned it more.
Logged
[img height=x width=y]http://LINK TO IMAGE HERE[/img]
The Toad hops in mysterious ways.
This pure mountain spring water is indispensable. Literally. I'm out of paper cups.

eataTREE

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #8 on: July 22, 2011, 03:41:36 pm »

C++ is pretty standard in games programming, as nothing else is fast enough (other than pure C which nobody wants to deal with anymore).
Logged

Melagius

  • Bay Watcher
  • Lord and Master here
    • View Profile
Re: What code does Toady use to write DF?
« Reply #9 on: July 22, 2011, 07:52:07 pm »

MACHINE CODE
Logged

BloodBeard

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #10 on: July 22, 2011, 10:40:08 pm »

He actually codes Dwarf Fortress within Dwarf Fortress.

I'll leave it to you to speculate which came first.

Rafal99

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #11 on: July 22, 2011, 11:33:06 pm »

It is coded using floodgates and pressure plates. What else did you expect?
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: What code does Toady use to write DF?
« Reply #12 on: July 23, 2011, 01:44:15 am »

He actually codes Dwarf Fortress within Dwarf Fortress.

I'll leave it to you to speculate which came first.

Dwarf Fortress came first.

NeuroFuzzy

  • Bay Watcher
    • View Profile
Re: What code does Toady use to write DF?
« Reply #13 on: July 23, 2011, 02:25:07 am »

C++ plus visual studio. Also:
Quote
*** LIBRARIES ****************************************

DF uses the FMOD Sound System
Copyright (C) Firelight Technologies Pty, Ltd., 1994-2006.

The SDL version of DF uses SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 Sam Lantinga
See the SDL folder for license information.

This SDL version of DF uses The OpenGL Extension Wrangler Library.  What follows is the GLEW License.
*** start GLEW license ***
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.

So... mostly it's just C++ and SDL. Looking at GPU usage, it seems he also uses the OpenGL components of SDL for sped up rendering.


On the long term, I'd recommend learning OpenGL from http://lazyfoo.net/, and then OpenGL from http://www.arcsynthesis.org/gltut/
(NOT NeHe, which is what the lazyfoo site recommends. Fixed function pipeline=not great, although that might be considered personal opinion [and the opinion of a lot of people])

Of course, if you're unfamiliar with C++, that would be damn hard. In the short term, I'd recommend DarkGDK: http://www.thegamecreators.com/
http://forum.thegamecreators.com/?m=forum_read&i=22
It's not the best, but it's easy to use, and most of the time it gets the job done.
Logged

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: What code does Toady use to write DF?
« Reply #14 on: July 23, 2011, 02:31:45 am »

I'll second the recommendation of learning c++ with SDL and lazyfoo's tutorials. It's what taught me.

This is also an excellent resource for beginners learning C++, though I'd follow lazyfoo's tutorials and use this other one as a reference for basic stuff.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.
Pages: [1] 2