Bay 12 Games Forum

Please login or register.

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

Author Topic: Need help with choosing a programming language  (Read 14023 times)

Lordinquisitor

  • Bay Watcher
  • Innocence proves nothing.
    • View Profile
Need help with choosing a programming language
« on: April 28, 2010, 09:35:13 am »

Often i marvel at the work toady and many other guys out there create. And finally i decided to learn some programming myself since this seems like stuff i`d enjoy.

But.. Where to start? Let`s say i want to create some kind of heroes of might and magic like strategy game. Low graphics (Maybe even ASCII only), much tactical content. (I know that this is probably far off.)

Which programming language(s) should i learn for such a task? And are there any good tutorials or even books out there that you might recommend?

Any input would be most welcome.
« Last Edit: April 28, 2010, 02:17:13 pm by Lordinquisitor »
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #1 on: April 28, 2010, 09:38:47 am »

Pretty much any language is good, common favourites for game dev would be c++, c#, java or python. Personally I'm a fan of c++ and you'll find plenty of information about it. But there are plenty of people that can point you at resources for all of those.

Assuming you don't know anything about programming I'd grab one of the many 'learn in 21 days' books to give you a basic grounding. They aren't wonderful but should teach you the basics, after that just play :)

Although it's always worth learning how to do things such as graphics yourself I'd recommend using one of the many rendering engines to build your game on. You'll find you'll end up doing a lot better if you have something you can actually play with.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

DJ

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #2 on: April 28, 2010, 01:07:47 pm »

I second C++, because it's easiest to find resources for it (tutorials, libraries etc).
Logged
Urist, President has immigrated to your fortress!
Urist, President mandates the Dwarven Bill of Rights.

Cue magma.
Ah, the Magma Carta...

Urist McMalaclypse

  • Bay Watcher
  • Physician of Philosophy
    • View Profile
Re: Need help with choosing a programming language
« Reply #3 on: April 28, 2010, 01:11:40 pm »

I'd say C++, in part because it's a major language in terms of commercial games. It's not exceedingly difficult to learn, and has power potential in the event that you want to go beyond a simple game. The coding structure also helps to keep things (relatively) neat.

If you have tried and failed to learn programming in the past, you might try Python - it's also a decent language, and is somewhat easier to learn. If you want a challenge, LISP is a very powerful language that contains the object-oriented elements of C++. It does take time to wrap your head around, though.

The biggest difficulty in a strategy game would likely be the enemy AI - it would be somewhat difficult in combat instances, but very challenging if you want them to move around the world on their own. You could have them move randomly, but it sounds like you want an intelligent opponent. You might be able to find some suitable code for the AI online, but you might not.
Logged
After a long time of fleeing unsuccessfully, she did what any cornered dwarf would do:  she sucker punched her own baby and then kept running.
Good god man, cats training cats? That's like how every robot apocalypse starts. But with cats.

Lordinquisitor

  • Bay Watcher
  • Innocence proves nothing.
    • View Profile
Re: Need help with choosing a programming language
« Reply #4 on: April 28, 2010, 01:54:25 pm »

Seems to be C++ then- I think i might have a book about it lying here somewhere anyway..  8)

I know that it will most likely be very challenging (Especially the a.i if i even get so far..) But i`ll try it.

Thanks guys!

(Be free to comment further, though. )
Logged

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: Need help with choosing a programming language
« Reply #5 on: April 28, 2010, 02:52:11 pm »

Ha. Nice one guys.
I had people help me out and they said C++ was bad for learning, and they advised python.
If you're interested I can link you to a text book that teaches it, since I'm currently learning python
Logged

Lordinquisitor

  • Bay Watcher
  • Innocence proves nothing.
    • View Profile
Re: Need help with choosing a programming language
« Reply #6 on: April 28, 2010, 03:05:17 pm »

Just link it, if you don`t mind. I`d like to have a look at different sources.  ;)
Logged

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #8 on: April 28, 2010, 04:49:51 pm »

Ha. Nice one guys.
I had people help me out and they said C++ was bad for learning, and they advised python.
If you're interested I can link you to a text book that teaches it, since I'm currently learning python

Personally I find C++ pretty straight forward, it's very hard to judge what is easier once you already know a language though. In any case python is a good language for game dev, especially for prototyping (as it has bindings to pretty much everything) and the more languages you know the better at developer you'll be.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Sir Pseudonymous

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #9 on: April 28, 2010, 06:05:35 pm »

Python is probably the easiest to learn in order to learn the basic skills to program in the first place.

C++ is more useful, but harder to learn if you don't already have a feel for coding.

Java is like C++, but has absurdly bad performance (so does python, but that's balanced out by being much easier to use), and so is useless for most things (since a given task would either be resource intensive, in which case C++ is the better solution, or not, in which case python is much easier to work with).

I don't know what the fuck C# is, though from what I've heard it's kind of like java, only it runs on the .NET framework.

Perl is interesting, but not something you'd want to start off with, and certainly not something you'd want to try to make a game with (python beats perl in functionality and ease of use, though, even if it's not as wonderfully batshit...).

C is C++, except harder to work with but slightly more efficient.

And that would be the extent of my experience...
Logged
I'm all for eating the heart of your enemies to gain their courage though.

runrobotrun

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #10 on: April 28, 2010, 07:32:17 pm »

anything object oriented can be put to good use in game development

personally, I'm fluent only in java (english a close second) and I love it to death for its compatibility
this does mean that will be slower than OS-native languages which have the benefit of native peers to do the heavy work
Logged
Quickfort utility, Chromafort

runrobotrun 8x8 tileset (early WIP)

soundtrack to your regicide, the Dwarven Mixtape

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Need help with choosing a programming language
« Reply #11 on: April 28, 2010, 08:40:20 pm »

Many game engines have some sort of script engine built into, around, or as a key component themselves. Often, they use syntax similar to other languages the developers like.

Learning the right language(s) really helps when working with those.
Logged
Eh?
Eh!

Shades

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #12 on: April 29, 2010, 02:23:56 am »

anything object oriented can be put to good use in game development

Although I would recommend object oriented languages (I think all my suggestions where) it's not the be all and end all for development. There is plenty of scope in aspect originated languages too. As long as pick a style and write clean code it should be fine. Don't just ignore a language because it's not OO.

Another option is ObjectiveC which if you know C or C++ is similar enough to not cause problems and is also a pretty good langauge. Personally I prefer C++ but both are good and ObjectiveC (well a subset of it) will let you write iPhone apps if that is your poison :)

I don't know what the fuck C# is, though from what I've heard it's kind of like java, only it runs on the .NET framework.

Yer, but a lot of people like the .net framework and if your going to learn one of them it might as well be the C style one so you can move to a decent language later :)

Many game engines have some sort of script engine built into, around, or as a key component themselves. Often, they use syntax similar to other languages the developers like.

Lua and (again) Python seem to be the most commonly used in my experience.
« Last Edit: April 29, 2010, 02:26:53 am by Shades »
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Need help with choosing a programming language
« Reply #13 on: April 29, 2010, 09:48:05 am »

Let me reiterate the whatever-you-like point - You're talking about developing a turn-based strategy game, not necessarily the best graphics. Literally any programming language short of things like Brainfuck, or hideously involved things like Assembly or OpenCL, will work for what you need.

Actually, my recommendation from personal experience would be FreeBasic. Yes it's a dialect of BASIC, but it shares many features with more advanced languages such as pointers, function/operator overloading, UDTs, even in-line assembly. It's a compiled language, so no, you don't need to worry about sending off an interpreter with your program. It has wrapper libraries to everything you need to make a game, a great extension library (FB-EXT), and a pretty damned good basic selection of tools. The help documentation is in CHM format, compiled from the wiki, and very useful and comprehensive. Best of all, it's bloody fast for a BASIC implementation.

Also,
Spoiler (click to show/hide)
Spoiled for rant
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

Shades

  • Bay Watcher
    • View Profile
Re: Need help with choosing a programming language
« Reply #14 on: April 29, 2010, 10:02:54 am »

Just to mention if your ranting about Java performance you should mention that in a number of cases it's better than direct machine code compiled languages due to hardware specific (generally cpu in this case) optimisations in the byte code interpreter being better than the generic ones a compiler does. It's not that common but it does happen.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd
Pages: [1] 2 3 ... 8