Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 59 60 [61] 62 63 ... 72

Author Topic: The Roguelike Development Megathread  (Read 245517 times)

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: The Roguelike Development Megathread
« Reply #900 on: February 05, 2013, 05:13:12 pm »

Well you obviously don't start with C++ or whatever. Python/scripting language is probably best.

Also, for some reason I can't really relate to its syntax >.> I guess I need to find an interpreter that actually works, first.

This is the kind of innocent looking but extremely destructive and misleading comment that really should be avoided. Please, please, PLEASE avoid them... If anything, it's C++ that has that problem with its OS-dependent standards and compilers. Good luck cross-compiling anything at all in C++! It requires pre-processors, emulated linux environments, multiple individually downloaded, configured and linked library versions... In Python you copy the source file and double-click it.... there is ONE official interpreter, available for all major platforms, and I've yet to hear about or experience any cross-platform issues.

You've made as many comments about C++ like that as he has made comments about Python. Besides, I don't understand why you (in general) think that speed is unimportant. I get how the whole roguelike thing works, but even so, it might matter at some point.

The only times I use Python is when I want to write something quickly, like on my phone (and that I only found a free Python app). I realize that is exactly what some people have been saying, but I use it because I want to write quickly, not because I want it to run quickly.

And finally, C++ isn't really that difficult to use.

EDIT: By the way, Python was made with C.
« Last Edit: February 05, 2013, 05:40:12 pm by kytuzian »
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: The Roguelike Development Megathread
« Reply #901 on: February 05, 2013, 07:06:23 pm »

Isn't XNA "the big thing" for C#? They're both Microsoft technologies, so both should work just fine, no?
A blog post from developer Promit Roy earlier this week apparently detailed Microsoft's plans to fully retire the XNA Game Studio tools on April 1, 2014...

"XNA Game Studio remains a supported toolset for developing games for Xbox 360, Windows and Windows Phone," said the representative. "Many developers have found financial success creating Xbox LIVE Indie Games using XNA. However, there are no plans for future versions of the XNA product."

Well, shoot! I was actually pondering foregoing multi-platform because XNA seemed to be "the thing", but I guess not anymore :)

Well you obviously don't start with C++ or whatever. Python/scripting language is probably best.

SNIP

You've made as many comments about C++ like that as he has made comments about Python. Besides, I don't understand why you (in general) think that speed is unimportant. I get how the whole roguelike thing works, but even so, it might matter at some point.

Sorry if I didn't make my point clear. What I meant to say is that the comment made apparent that there are serious problems with getting Python to work, when it's a matter of running the official installer and that's that. It's the kind of comment a newcomer would look at and say "interpreter? What's that? And some don't work? Ooh, better not get into THAT" - I find it really hurts the possibility of Python being used, and it's entirely ironic that it's C++ that has those problems and not Python at all. I might've gone off my top a bit... I apologise :)

Regarding speed: it comes down to who we are trying to advise. Python has a cleaner syntax and an easier development environment to work with in general. Like you said: it's about writing (or learning) quickly, not about how fast it goes. Let that be a concern for further down the line, when they've figured out whether they like programming and whether they need to worry about it :)

By the way, the first C compiler was made with assembly. Should we all use that instead? ;)


But to get a little bit further back on topic... is everyone using curses for roguelike development? I've been toying with PyGame a bit and find it's perfectly OK for tile-based games. I still feel it's far too low-level, but such is life :)

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: The Roguelike Development Megathread
« Reply #902 on: February 05, 2013, 08:28:36 pm »

By the way, the first C compiler was made with assembly. Should we all use that instead? ;)

Yeah, saw that one coming. I agree with everything else, but that a little more extreme. If speed is absolutely critical, then yes. But for most things, that too extreme.

This is Assembly for a random function in C++
Spoiler (click to show/hide)

This is the original (I know I'm not amazing at this or anything, but that's not the point):
Spoiler (click to show/hide)

This is my guess of what it would look like in Python (Note: I've never done anything like this in Python):
Spoiler (click to show/hide)

Pretty darn similar.
« Last Edit: February 05, 2013, 08:31:08 pm by kytuzian »
Logged

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: The Roguelike Development Megathread
« Reply #903 on: February 05, 2013, 09:15:08 pm »

And finally, C++ isn't really that difficult to use.

EDIT: By the way, Python was made with C.

C++ is certainly alot harder than most languages to use, often unnecessarily so. I would not want to deal with its issues (especially its error messages) when there are simply superior languages out there for a given task to make development easier.

C I don't have much of an issue with (except as a beginners language. C was simply not designed as a beginners language.). It's low-level, fast, portable etc. It's a system language and programming a language with C makes plenty of sense. Also there are Python interperators in other languages available (Including Python itself, its CPython that is made in C).



Actually, I think C++ has some nifty features. The stream operator (<<), compile-time templates (that don't suck, like Java generics...), C++11 initializer lists (squeeeee), language-level support for the = operator and copy constructors, great compiler and debugger support. C++11 also modernizes the language a lot (although, for backwards compatibility, it also introduces a lot of its own complications).

The "stream" operator is just an overloaded bitshift operator.

Java's generics do indeed suck, and C++'s templates work pretty well, I will give it that. But many other languages have good template/generic support.

Initializer lists have been in many languages well before C++11 (Here is a C# example).

the = operator is nice for allowing fine control, but is often a stumbling point when new programmers start copying their super-long arrays all over the place (and passing by value rather than reference on non-mutating functions. In loops  >:( ).

The obscurated error messages the compiler give are often difficult to understand. Many other languages offer much nicer debugging, some even allow you to modify code while the program is running.

C++11 does alot to modernize the language (lambda expressions + <algorithm> ftw), adding in some much-needed stuff and is a step in the right direction, but many more steps IMO are needed (still no reflection, garbage collection etc).

Quote
def load_animation(self, file, frames, speed):
    new_animation = animation(speed, 0, 0)

    loaded = image(NULL, NULL)

    for i in range(0, frames):
        loaded.original = load_image((file + "_" + str(i) + ".png"))
        new_animation.images.append(loaded)

    self.animations.append(new_animation)

That just fill a list full of the same, identical image instance. (when you add an object in Python, you add a reference to it not a copy).

A trivial example will look similar. If you write a whole program C-style, Python programmers will hang you. This study, for example compares C/C++ and scripting languages (and java) for a string searching/processing program and the length of the scripting languages came up much shorter in length.

Now do some callback stuff with functions of object instances and compare the two ;D
« Last Edit: February 05, 2013, 09:28:57 pm by alexandertnt »
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

Robosaur

  • Bay Watcher
  • [POOP:INORGANIC: NUCLEAR_BOMBS]
    • View Profile
Re: The Roguelike Development Megathread
« Reply #904 on: February 05, 2013, 09:23:34 pm »

IMHO they need to make a pokemon roguelike that plays something like the battle pyramid in pokemon emerald.

Alternatively, Froguer. The frogger roguelike.
Logged
You are a terrible person and the sad truth is deep down you know it.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: The Roguelike Development Megathread
« Reply #905 on: February 05, 2013, 09:43:15 pm »

Spoiler: Incensed rebuttal (click to show/hide)

I use libtcod. :D Full RGB support makes it a good choice to make pretty games, and it supports tiles a la DF, with pictures moving around.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

GlyphGryph

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #906 on: February 05, 2013, 09:53:48 pm »

Here's the thing about speed, and using a language like C++ for that reason.

Your language is far less likely to be your bottleneck than your crappy code and algorithms.

Just... as a general rule. Heh. Hell, 99.99% of programmers would probably get slower code out of assembly than they would out of C++, because the language requires so much more of the programmer to use it efficiently. A python script you actually run isn't being interpreted anymore than C++ is anyway, since it's all in bytecode, and if you precompile it you skip all the interpreter load time stuff. Anyone know what the actual speed difference is between an average compiled C++ and Python program?

Also Sky, like I said, you should really eventually use a Lisp variant like Scheme. You'll learn a lot! :P You don't really lose out by skipping Python. It's a nice language, but it's not terrible special.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: The Roguelike Development Megathread
« Reply #907 on: February 05, 2013, 09:58:11 pm »

There was a graph above there somewhere, and it said Shedskin Python(compiled) was only four times(twice? forgot the exact number...) as slow as C on average, while interpreted Python took one hundred times as much time as C xD
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Mephisto

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #908 on: February 05, 2013, 11:39:13 pm »

This is the one thing I hate about the computer science field. It's all e-arguments about which language is better and selectively choosing which facts to support.

Since we're going off of this set of benchmarks, I could say that Python is only 1.4x as slow. I would hardly call sudoku solvers and counting insane numbers of strings "typical programs."

If a language works for you, use it.
Logged

Absolute Niro

  • Bay Watcher
  • I HATE DOGS
    • View Profile
Re: The Roguelike Development Megathread
« Reply #909 on: February 05, 2013, 11:48:33 pm »

IMHO they need to make a pokemon roguelike that plays something like the battle pyramid in pokemon emerald.

Alternatively, Froguer. The frogger roguelike.

The Pokemon Mystery Dungeon games are roguelikes, I believe. At least they play very similarly to roguelikes, I'm sure lots of people would disagree. :P
Logged

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: The Roguelike Development Megathread
« Reply #910 on: February 06, 2013, 12:03:04 am »

Your language is far less likely to be your bottleneck than your crappy code and algorithms.

Absolutely.
With some languages, however, it is easier to accidently write inefficient code. Take, for example C++ and people's tendancy to pass everything by value.

Quote
I pasted the tutorial code and pressed run. I got hit with an incomprehensible erot message.

incomprehensible error messages in python doesnt sound right. Can I see this error message (mostly out of curiosity)?

This is the one thing I hate about the computer science field. It's all e-arguments about which language is better and selectively choosing which facts to support.

Since we're going off of this set of benchmarks, I could say that Python is only 1.4x as slow. I would hardly call sudoku solvers and counting insane numbers of strings "typical programs."

If a language works for you, use it.

Languages have their use in certain situations (try writing a system driver in Python :P). I posted some empirical studies that is not just "e-arguments" or selectively chosen facts.

I would not claim that a language is simply superior entirely and ignore flaws and I do not believe that I have been "choosing which facts" to support. I also mentioned in an earlier post that if someone has been programming in language X, they will probably continue to do so and do a better job than programming in language Y.

Most of my arguments have been from the viewpoint of learning programming, and a particular opposition to learning C/C++ first, or "moving onto" C/C++ if you did not intend to use the features or the perks unique to that language (but had to deal with all its issues as previously mentioned). If you do not intend use the perks of C/C++, why move onto it? There is a strong belief that C++ is "the" language to learn (hell, thats why I learnt it) despite the fact that there is not much basis in reality behind this (there can be depending on why you want to learn it, but my opposition is to it being "the" language).

The discussion over the languages has been a fair and reasonable one. If you want to identify any issues with any of my arguments, I will be happy to fix, or rescind then if they are faulty and im sure others would do the same.

At least they play very similarly to roguelikes, I'm sure lots of people would disagree. :P

They do play very much like roguelikes.
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

Mephisto

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #911 on: February 06, 2013, 01:13:07 am »

The discussion over the languages has been a fair and reasonable one. If you want to identify any issues with any of my arguments, I will be happy to fix, or rescind then if they are faulty and im sure others would do the same.

That was not directed toward you. Apologies.
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: The Roguelike Development Megathread
« Reply #912 on: February 06, 2013, 07:27:14 am »

Let me start with an apology. I didn't mean to imply you did those comments with some secret and dark ulterior motives, Skyrunner (you spawn of Morgul, you!). Re-reading my post, it definitely looks like it, so I'm sorry. What I meant is that independently of your motives, it's still very damaging to a beginner's perception of Python, but most of all, I feel it's inaccurate :)

I am very surprised that happened to you in Python. I've been toying and re-learning it for - oh - about 8 years now, using multiple sources, and have never had those problems. If it's recent, it might've been that Python 3.x was made so as not to be backwards compatible in certain instances from Python 2.x (minor things like print("Hello world.") instead of print "Hello world"). I'll definitely agree that this is adding confusion... kind of like the one generated by different C/C++ standards :(

From my experiences of using C++, Java and Python (and ocaml, javascript, php, actionscript, etc) rather intensively at different times, I am still going to claim equally proficient people are going to develop faster in Python than in Java, and faster in Java than in Python. And for learning, I believe this is THE critical point. I guess I can't stress this enough: if you're learning, screw performance ;)

Heck, I hear it's not that hard to do most things in Python and outsource the CPU-intensive stuff to C++ code :)

Also, what GlyphGryph said.


And finally, I haven't really tried libtcod, but I've heard some less than fantastic comments about it from Lord Dullard who is doing Cult. I also think what Toady did was to use some graphics library and just draw characters instead of actual graphics. That gives you a little more flexibility, at the expense of "ugh, graphics libraries..." :)

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: The Roguelike Development Megathread
« Reply #913 on: February 06, 2013, 08:13:22 am »

I wouldn't ever say that C++ is not only the beginner's language of choice, nor would I ever say that Python isn't useful for pretty much most things.

What I'm doing right now with C++ is create a calculations-heavy simulation (to hopefully later plug into a roguelike front-end :P), and if I'm going to do the calculations in embedded C++ and do the rest in Python, why not do it in C++ (which I'm pretty proficient at, at least from what I think) instead of trying to learn a bunch of things at once while also having to use C++ anyways... :/ Also, from a quick search long ago, I think it was C that had native embeddedness, and C++ needed some sort of add-on.

Also, I do think developing speed is hands-down Python over C++ after a certain time of experience in both. I just don't have the Python experience to justify it. :c
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: The Roguelike Development Megathread
« Reply #914 on: February 06, 2013, 08:54:25 am »

I guess we agreed all along then :) What kind of simulation are you doing?

And if you ever do get time, please give it a go! It's not hard to get into at all - you can still program C/C++ style, but then make use of all the awesome shortcuts it gives you (that you can learn bit by bit).

I've been toying with the idea of doing a serious collaboration with people from B12, since so many people are off doing their own projects and sometimes motivation flags. By serious collaboration I mean we would "skype-meet" at least once a week to discuss, have fun and work together. Hasn't it been tried before?
Pages: 1 ... 59 60 [61] 62 63 ... 72