Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

is C not ideal for making a roguelike?

140 views
Skip to first unread message

sogeking99

unread,
Sep 18, 2011, 2:24:40 PM9/18/11
to
hey guys, I have spent the last 3 days learning programming, focusing
on C. some people have told me C is not ideal for making roguelikes,
is this true? Because one of the reasons I started this is so I could
one day make an RL for fun.

Mario Lassnig

unread,
Sep 18, 2011, 3:23:35 PM9/18/11
to

Troll? If not:

Choice of programming language is irrelevant. What is important is that
you understand your algorithms and data structures.

If that sentence didn't make sense to you, read this for a start:
http://en.wikipedia.org/wiki/Algorithm
http://en.wikipedia.org/wiki/Data_structure

Once you start to understand that, you will notice that different
algorithms and data structures are easier to implement in different
programming languages. So, first decide which data structures and
algorithms you need, and then choose an appropriate programming language.

Once you are more experienced, you can then decide to choose a
programming language based on "style" alone.

alex23

unread,
Sep 19, 2011, 1:07:53 AM9/19/11
to

If this were true, someone might want to tell the Doryen Library devs
so they can stop wasting their time... :)

C is a low level language that doesn't do much to get between the
programmer and the machine. This is fantastic in terms of raw power,
but requires you to have a much broader and deeper knowledge of
internal computer architecture than the 'higher' level languages in
order to get something up and running.

Languages like Python, Smalltalk etc provide abstractions around the
low level architecture and handle a bunch of things that in most C
apps you would end up adding yourself, like memory management. It can
be a lot quicker for new programmers to get up and running with such
languages. However, when you inevitably hit a point where the
abstraction breaks down and requires that low-level understanding, it
can be difficult to realise this without that understanding in the
first place.

I would say that people recommended you start with something other
than C because they believe you'll see results from it more quickly.
This is most likely true, but as your knowledge of C grows, that gap
will shrink. Personally, I like to use a bit of both: high level langs
for the main code logic on top of low level libraries for the
performance.

Gerry Quinn

unread,
Sep 20, 2011, 11:01:42 AM9/20/11
to
In article <9b93bf3c-b6b0-4a06-a99a-d31419191840
@d41g2000yqc.googlegroups.com>, wuw...@gmail.com says...
What Alex says.

In fact C is probably the language that has most often been used to
make successful roguelikes. That doesn't mean it is the best choice
these days but clearly it is capable of doing it.

Two advantages of C are (i) you can look at the C-code of lots of
famous roguelikes, and (ii) a performance language like C actually
gives you something back in terms of ease of coding because you never
have to worry much about optimisation, and can concentrate on writing
clearly.

Really, the best language may be the language you are most comfortable
with. C is not the easiest language for beginners, but it is by no
means the hardest, and at least there is lots of help available on the
internet.

- Gerry Quinn



neilal...@gmail.com

unread,
Sep 20, 2011, 12:11:32 PM9/20/11
to
Thanks guys, yeah I am currently pretty happy with my choice of C.

Do you think I am probably best trying out a few languages before I pick one? Mayve some Common Lisp or python?

Mario Lassnig

unread,
Sep 20, 2011, 1:24:36 PM9/20/11
to
On 11-9-20 18:11 , neilal...@gmail.com wrote:
> Thanks guys, yeah I am currently pretty happy with my choice of C.
>
> Do you think I am probably best trying out a few languages before I pick one? Mayve some Common Lisp or python?

Stick to C.

sreservoir

unread,
Sep 20, 2011, 9:21:10 PM9/20/11
to
On 09/20/2011 12:11 PM, neilal...@gmail.com wrote:
> Thanks guys, yeah I am currently pretty happy with my choice of C.
>
> Do you think I am probably best trying out a few languages before I pick one? Mayve some Common Lisp or python?


if you're comfortable with c and already have code written, don't
bother switching, but do try other languages.

alex23

unread,
Sep 20, 2011, 11:08:17 PM9/20/11
to
On Sep 21, 2:11 am, neilalt300...@gmail.com wrote:
> Do you think I am probably best trying out a few languages before I pick one? Mayve some Common Lisp or python?

I think familiarising yourself with two languages at the same time
isn't necessarily a bad idea. Having one low-level and one higher
language in your tool kit is practically essential these days; its
also helpful to compare the contrasting approaches.

And there's no reason why they can't work together: C for the core
code, Python/Ruby/Perl/bash etc for your build & test environment, for
example. Being able to rapidly prototype an idea against general
enough libraries before hard coding your own specific implementation
is another handy technique to have too.

Joseph Bradshaw

unread,
Nov 6, 2011, 5:10:04 PM11/6/11
to
I'm a bit late to the party man but lemme put it simple.
1. You can make a roguelike with ANY programming language.
2. C (and C++) is a fantastic starting language. Can't think of one
better.
3. So for you, I say C is spot on.

simendsjo

unread,
Nov 7, 2011, 10:18:24 AM11/7/11
to
On 20.09.2011 18:11, neilal...@gmail.com wrote:
> Thanks guys, yeah I am currently pretty happy with my choice of C.
>
> Do you think I am probably best trying out a few languages before I pick one? Mayve some Common Lisp or python?

You might also look at D, my favorite :)
You can code very C-ish if you like (it's not 100% backwards compatible
with C as C++ is), but you can also use templates, classes, functional
programming, design by contract, unittesting etc.

http://d-programming-language.org

Thomas Bartscher

unread,
Nov 7, 2011, 10:43:02 AM11/7/11
to
Getting to know different languages is good, as it teaches you different techniques. And out of personal preferences I very strongly recommend Common Lisp and Shen (www.shenlanguage.org).

Wally the Grey

unread,
Nov 7, 2011, 11:19:46 AM11/7/11
to
On 06/11/2011 5:10 PM, Joseph Bradshaw wrote:
> C (and C++) is a fantastic starting language. Can't think of one better.

Clojure.

Wally the Grey

unread,
Nov 7, 2011, 11:21:44 AM11/7/11
to
On 07/11/2011 10:18 AM, simendsjo wrote:
> You might also look at D, my favorite :)
> You can code very C-ish if you like (it's not 100% backwards compatible
> with C as C++ is),

What? Try this in your favorite C compiler, then see how far you get
with it in C++.

#include <stdio.h>

int main (void) {
int class = 95;
printf("I graduated in the class of %d!", class);
return 0;
}

0 new messages