Bay 12 Games Forum

Please login or register.

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

Author Topic: What is DF programmed in?  (Read 6750 times)

Hippoman

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #45 on: October 12, 2009, 07:54:07 pm »

Curses is a library wich allows you to control a lot of text functions.  It comes from "cursor optimization" or something like that.

With bare C++, you don't have a function to, for instance, write a character in a determinate x,y position but with PDcurses you do have it and many others.

Being able to just locate the cursor wherever you want comes extremely handy for roguelikes. 

Extra information:  Pascal already comes with a gotoxy function.

ncurses is supposed to be platform independent or something.

I went to the website looking for answers.

I found more questions.

Can you explain what I am supposed to do, And how I use Curses to program things?
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: What is DF programmed in?
« Reply #46 on: October 12, 2009, 08:19:36 pm »

Curses is a language library.  That means, more or less, that it is a set of functions you can use for different purposes (in this case, controlling the console and more).

So, if you're using C++ and PDcurses for example... You should include the library file to the compiler's lib folder, then place the headers and the dlls where they belong(include folder, system32 for the dll (unless you want to place it everywhere the .exe will be tried)).

If you havent used a C++ compiler or know C++ yet you should learn the basics first.  Learn how to include libraries and then you'll be ready.

To make, say, a roguelike in curses you need to decide on how you're going to implement the game.  When to calculate movement, when to draw, How to store your game info, etc... That's game design... But you can't do anything without learning basic programming and some practice.

Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Hippoman

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #47 on: October 12, 2009, 08:38:44 pm »

*Imagine a lightbulb lighting up dimmly then sparking out and blowing up and smoke now rising from it.*
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

IndonesiaWarMinister

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #48 on: October 13, 2009, 07:47:07 am »

Would Java be one of these?

No, Java is the island which I AM stepping on RIGHT NOW.
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #49 on: October 13, 2009, 10:27:11 am »

I must say, almost every programming language is an "autobahn without guardrails" if you don't know what're you doing or you don't have a patience to design the features.

Most Languages have more compiler type protections.

eerr

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #50 on: October 13, 2009, 10:58:26 am »

I must say, almost every programming language is an "autobahn without guardrails" if you don't know what're you doing or you don't have a patience to design the features.

Most Languages have more compiler type protections.
java under eclipse couldn't have a more infinite or annoying set of protections.

If you get anything but a null ptr error your doing it wrong.
Logged

PermanentInk

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #51 on: October 13, 2009, 11:35:07 am »

Most Languages have more compiler type protections.

Than C++?  C++ has arguably the richest and most expressive type system of any programming language in common usage.  A type system is basically a proof engine -- the more things are guaranteed to be true due to restrictions on types, the fewer things you need to test (so you can focus testing time on actual functionality).  C++ is strongly, statically typed, meaning that interactions between different data types are tightly mediated and this is verified at compile time.  These are great advantages.

The downside of C++ is that it's an investment, in more ways than one.  Because it's a power tool, there is a rougher learning curve compared to Java, Python, Ruby, ActionScript, etc.  Pitfalls abound, and compiler error messages can be cryptic unless you have a a fair amount of insight into how compilers and programming languages work.  Advanced features, such as templates, offer additional power and challenges, and there's no clear dividing line to keep the newbies out of deep waters.

For a project like this, C++ is a good choice.  Many games are written in C++ generally; this has a lot to do with performance, as well as tradition and installed knowledge base, available tools and talent, etc.  The learning curve of C++ is more of a problem when you have to deal with hiring people from the market; a single programmer working alone can learn lessons once and then lean on that knowledge as much as he wants without worrying about how to explain e.g. "this weird template stuff" to new hires every 6 months.
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #52 on: October 13, 2009, 01:33:58 pm »

Read as 'more protections of the compiler variety' or 'more compiler-type restrictions'

Not as 'more protections in the typing featureset'

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: What is DF programmed in?
« Reply #53 on: October 14, 2009, 06:34:45 am »

*Imagine a lightbulb lighting up dimmly then sparking out and blowing up and smoke now rising from it.*
he... IS there any other topic you'd like me to confuse you about?  :P

My advice:  Make some book surveillance... Get one you feel confortable with and start reading and practising with it.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Hippoman

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #54 on: October 14, 2009, 07:14:00 am »

*Imagine a lightbulb lighting up dimmly then sparking out and blowing up and smoke now rising from it.*
he... IS there any other topic you'd like me to confuse you about?  :P

My advice:  Make some book surveillance... Get one you feel confortable with and start reading and practising with it.

Well i cannot. CANNOT. CANNOT. Learn from online tutorials. And I never go to the library, nor do we buy new books unless needed. So basically Videos are the only way to go. That or a book in my hand.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: What is DF programmed in?
« Reply #55 on: October 14, 2009, 09:06:35 am »

Buy one.  It's a good investment.  Videos wont be detailed enough.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Granite26

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #56 on: October 14, 2009, 09:58:12 am »

My strategy has always been to get existing, working code and make it do something else.

I'm messing with the XNA stuff right now, and learned quite a bit about how things work by just tweaking bits and seeing what it does

Hippoman

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #57 on: October 14, 2009, 03:56:40 pm »

My strategy has always been to get existing, working code and make it do something else.

I'm messing with the XNA stuff right now, and learned quite a bit about how things work by just tweaking bits and seeing what it does

Tried. Can't find any. When I ask, I recieve a lecture.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Granite26

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #58 on: October 14, 2009, 04:28:53 pm »

Isn't the code for a lot of Toady's Ascii stuff freely available?

Draco18s

  • Bay Watcher
    • View Profile
Re: What is DF programmed in?
« Reply #59 on: October 14, 2009, 07:55:37 pm »

Man, I'd love to see DF decompiled into Piet (assuming it was possible; Piet has no concept of variables, its entirely stack based).
Logged
Pages: 1 2 3 [4] 5 6