Bay 12 Games Forum

Please login or register.

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

Author Topic: What Coding Language to Use/Learn?  (Read 2465 times)

Werehuman

  • Bay Watcher
  • Talented Modder
    • View Profile
What Coding Language to Use/Learn?
« on: September 28, 2013, 08:16:46 pm »

  Well, I have an idea for a vast open world roguelike. Specifically, you are a person, thrown into the world. You can do whatever, practically everything is possible to do. Probably sound similar to some game, namely Sims or something. The difference, would be the many people you would see. A guy on his way to get some milk and eggs and stuff. If you wanted to, you could watch him go to the grocery store, go to each aisle, grab the items, go to his car, drive off the map. Some people, such as the cashiers, would be remembered, and they would remember. They would have a name that you could learn, and they could learn your name. Such as a chat, such as "Hey, [name], hows it goin'?", etc. As with most roguelikes, you would have an inventory, traits, weapons, that sort of thing. There would be a police system, where cop cars/cops would pursue you, arrest you, you might get a trial, and be fined, jailed, or even executed. You could get a simple job, maybe moving stuff in the grocery stores, you would get a wage. Some things, such as being jailed or during a job, you could set it to auto, to prevent boredom. There would be illegal drugs and items you could buy/sell/use, with the associated risks. You would have food, water, sleep, and entertainment needs.
  Seeing as the game would need to keep track of a lot of memory, the game would have to be able to keep track of that. To get an idea of what the basic city might look a bit like, look at Cataclysm DDA, a great game. It is a fairly massive project, but I have plenty of time on my hands.
  So, what coding language would fit something like that? It would be ASCII, turn based.

tl;dr What is a good coding language for a big open world roguelike?
Logged
+Signature+
This signature menaces with spikes of boringness.

freeformschooler

  • Bay Watcher
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #1 on: September 28, 2013, 08:25:40 pm »

C++ with curses/allegro/anything else
Anything that supports libtcod
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #2 on: September 28, 2013, 11:31:32 pm »

An alternative is to learn the windows way, with C/C++, the console win32 api, and use ANSI. (NO! .net IS NOT the windows way! That's the bullshit way!)

ncurses is easier though.
« Last Edit: September 28, 2013, 11:36:19 pm by wierd »
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #3 on: September 29, 2013, 01:54:15 am »

So I'm a little surprised nobody said suggestion Python yet. Really guys?

freeformschooler

  • Bay Watcher
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #4 on: September 29, 2013, 11:20:41 am »

So I'm a little surprised nobody said suggestion Python yet. Really guys?

Anything that supports libtcod includes python.
Logged

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #5 on: September 29, 2013, 12:05:09 pm »

Check out the Roguelike Development thread to get started.
Logged
Quote from: Toady One
I wonder if the game has become odd.

Hugehead

  • Bay Watcher
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #6 on: September 29, 2013, 09:32:21 pm »

I'll second Python with libtcod, Python's probably one of the best languages for someone new to programming and libtcod has a lot of useful stuff in it.
Logged
We're Bay12er's. If there is a bug, we will find it, exploit it, and make a recursive statue out of it. Just look up Planepacked.
When a dwarf enters a martial trance, they become Jedi. Short, drunken Jedi.

zombie urist

  • Bay Watcher
  • [NOT_LIVING]
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #7 on: September 29, 2013, 10:36:25 pm »

If you don't know which programming language to use/learn, you should probably start with a smaller, less ambitious project.
Logged
The worst part of all of this is that Shakerag won.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #8 on: September 29, 2013, 10:49:16 pm »

A text based adventure game is the only thing "Easier".  Drawing images on the screen with ASCII graphics is something you can do even with MS Qbasic with minimal effort. Making a console application is about the easiest type of project you can do, as you can draw the screen using stdout if you really REALLY REALLY wanted to. (*Not recommended.)

While many people suggest learning python or some other high level script language first, I am reminded of something I think is poignant.  It is harder (estimated 40 times harder in fact) to unlearn something than it is to learn something new.  High level languages let you get away with all kinds of "Not really best practices" things, which makes you produce lower quality work later, in more constrained languages.  The flipside is trying to write your own malloc()/free() routines when dealing with C++, which is just plain dumb.  (Assuming you start with straight C or even dive straight for ASM first, then move to easier languages after cutting your teeth. C++ has a lot of memory management built in. No need to do that yourself.)

As such, given the abundance of bad things you can learn when cutting teeth with the "Easier" language, I would suggest cutting teeth on the harder one, so you learn best practices, and why they are best practices, straight away.

* just my 0.02$


Logged

lue

  • Bay Watcher
  • [PREFSTRING:missing right bracket
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #9 on: September 30, 2013, 12:00:51 am »

I'm assuming zombie urist meant less ambitious as in "not a game", because they tend to be incredibly complex for first projects, unless you use a specially designed system (Game Maker, Inform 7 (debatable), etc.)
Logged
Post not guaranteed accurate or pristine for all of time.
Sigtext. Enticing, yes? If you do not know where things I have "sigged" go, this page will explain.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #10 on: September 30, 2013, 12:39:24 am »

I dont agree with that assertion. One of the first projects I ever did was a text based adventure written using (of all things), MSDOS batch script.  (It is SUPER weaksauce.)

The fundamentals of program flow can be taught using something boring, or it can be taught using something fun. Writing a simple game is something that is fun. One of the more ambitious projects I did was made using inline assembler in qbasic to make a high speed capable PONG clone. (Because QBasic graphics routines make the pitchdrop experiment look like a cheetah on speed.)

The basic things, like checking for object collision, were simple and easy to program, and using best practices by using modular programming, I was able to draw easily to the screen using my homebrew VGA memory window manipuation graphics routines.

These days, QBasic is worthless for any application, even teaching programming. It is simply not useful these days. However, you can use C++ and the console APIs, and do many of the same things-- all that's missing is a handy execution environment to develop in. 

The same basic thing is true on linux/osx/bsd flavor platforms, with (n)curses. Curses is just a console application API, just like win32 console apis on windows. Learning to call these apis, and how to make use of them in novel and fun ways, is how you learn to program, and making a game that way is an EXCELLENT way to learn. 

Again, because of the difficulty in unlearning something learned incorrectly/improperly, I strongly suggest using the "Hard" language first when learning to program, as it will actively prevent you from doing things the wrong way in many cases. (not always though.) Attempting to do it the "wrong way" will give you a face first taste of why best practices are best practices. :D

Writing an ASCII version of centipede, or Snake, or even just PONG bouncing around a filled bullet char between two bars made of ascii char #253's, will teach him about loops, conditionals, variables, flags, data types, and a lot of other fun, basic things-- and do so in a way that isn't dryer than a nun's you know what.

I think it is wrong to say you cant make a game easily without a dedicated easybutton, like game maker. That's lugging around a whole boatload of crap, for no benefit. It's the same reason why .net is the "Bullshit way", and NOT the "windows way".  Just like VisualBasic was the Bullshit Way back in the 90s. .net is the new visual basic. Same shit, different day. If you are making a simple hello world console application, WHY THE HELL does it need the .net framework (Multiple versions!) installed to run? IT DOESN'T, and the resulting program is lugging around epic amounts of baggage, for no benefit. The program just poops "Hello world!" through stdout.  Oh-- it's because you wrote it with MS visual studio, as a .net application. That's why. (How is lugging around several hundred megabytes of interpreter, NEEDLESSLY, in any sense a best practice? Really? The OS ITSELF, WITHOUT THE FRAMEWORKS, has the APIs needed to do the job! USE THEM! They are lighter weight, already present, FASTER, and guaranteed to be in the system anyway.)

So no. I say start with C, with the console API of your choice. You don't need more than that to do an ASCII based game. Make learning not only efficient, but also fun.

Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #11 on: September 30, 2013, 11:19:24 pm »

You know in general it is more important to learn programming than it is to learn the syntax of a specific language. Once you understand the control structures of the procedural paradigm, you can pick up most languages a lot more quickly. Learn and develop some design patterns for OOP and you can start to ave a really fun time, regardless of specific language. It is all about the logic, rather than brackets and semicolons. I know some people get all fussy about their memory management and understanding GPU optimization but they are more focused on the tools than the task. A sorting algorithm is just as sweet by any other syntax, so why not understand how it functions in a language that is easier to understand, so that the knowledge can be translated into something more powerful later on?

VB, C#, Python, Java, Ruby, all good stuff.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #12 on: September 30, 2013, 11:30:16 pm »

Indeed, I don't discount that at all. Logical program flow, with conditions, variables, and descisions are the core of programming.  However, the main benefit of learning the "hard" language first, is that by default, it has no tool kit other than basic internal functions for logic and arithmetic.

Learning to create a function, then call it later, (because there is no pre-existing one) teaches you more meaty lessons than does "call magic function SuperFastDrawPixels(buffer,format,Location);"

It makes you appreciate the toolkit functions more, and teaches you that you can make your own functions when you need them; eg, that you don't have to be stopped because there isn't a function that does exactly what you want. You can make your own function that calls the toolkit function, then does "stuff" to it to make it do exactly what you want, then call that instead.

Learning the logic is basically the same everywhere in most languages. A For Next is the same everywhere, by and large. Same with If Then Else, or While Wend, or Select Case, or Try Catch.



Logged

zombie urist

  • Bay Watcher
  • [NOT_LIVING]
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #13 on: October 01, 2013, 12:29:57 am »

I disagree. I think starting with C will make programming difficult and less fun, which is very important starting out. No one wants to start to create a game by learning how to push pixels or allocate memory. Every programming language has functions and lets you create functions.

As for easier, I think some good beginning projects are Minesweeper, Snake, etc. A decent programmer can build these in less than a day. But a roguelike that rivals DF in complexity is well, too complex.
Logged
The worst part of all of this is that Shakerag won.

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: What Coding Language to Use/Learn?
« Reply #14 on: October 01, 2013, 12:52:07 pm »

I think do python, do maybe 6 projects(for each), then C and the either ASM or C++ dependant on what you will want.
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click
Pages: [1] 2